geforkt von Mirrors/Paper
SPIGOT-6890: Add repair cost amount in AnvilInventory
By: Doc <nachito94@msn.com>
Dieser Commit ist enthalten in:
Ursprung
2007d3c69f
Commit
f46c4e64ea
@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/inventory/ContainerAnvil.java
|
||||
+++ b/net/minecraft/world/inventory/ContainerAnvil.java
|
||||
@@ -18,6 +18,10 @@
|
||||
@@ -18,12 +18,16 @@
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@ -11,6 +11,13 @@
|
||||
public class ContainerAnvil extends ContainerAnvilAbstract {
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
private static final boolean DEBUG_COST = false;
|
||||
public static final int MAX_NAME_LENGTH = 50;
|
||||
- private int repairItemCountCost;
|
||||
+ public int repairItemCountCost; // PAIL private -> public
|
||||
public String itemName;
|
||||
public final ContainerProperty cost;
|
||||
private static final int COST_FAIL = 0;
|
||||
@@ -33,6 +37,10 @@
|
||||
private static final int COST_REPAIR_SACRIFICE = 2;
|
||||
private static final int COST_INCOMPATIBLE_PENALTY = 1;
|
||||
|
@ -27,6 +27,16 @@ public class CraftInventoryAnvil extends CraftResultInventory implements AnvilIn
|
||||
return container.itemName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRepairCostAmount() {
|
||||
return container.repairItemCountCost;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRepairCostAmount(int amount) {
|
||||
container.repairItemCountCost = amount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRepairCost() {
|
||||
return container.cost.get();
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren