@@ -1,7 +1,7 @@
|
||||
--- a/net/minecraft/world/inventory/ContainerAnvil.java
|
||||
+++ b/net/minecraft/world/inventory/ContainerAnvil.java
|
||||
@@ -17,6 +17,10 @@
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -19,6 +19,10 @@
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
+// CraftBukkit start
|
||||
@@ -11,7 +11,7 @@
|
||||
public class ContainerAnvil extends ContainerAnvilAbstract {
|
||||
|
||||
public static final int INPUT_SLOT = 0;
|
||||
@@ -39,6 +43,11 @@
|
||||
@@ -42,6 +46,11 @@
|
||||
private static final int ADDITIONAL_SLOT_X_PLACEMENT = 76;
|
||||
private static final int RESULT_SLOT_X_PLACEMENT = 134;
|
||||
private static final int SLOT_Y_PLACEMENT = 47;
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
public ContainerAnvil(int i, PlayerInventory playerinventory) {
|
||||
this(i, playerinventory, ContainerAccess.NULL);
|
||||
@@ -66,7 +75,7 @@
|
||||
@@ -69,7 +78,7 @@
|
||||
|
||||
@Override
|
||||
protected boolean mayPickup(EntityHuman entityhuman, boolean flag) {
|
||||
@@ -32,7 +32,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -89,7 +98,7 @@
|
||||
@@ -92,7 +101,7 @@
|
||||
this.inputSlots.setItem(1, ItemStack.EMPTY);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
this.access.execute((world, blockposition) -> {
|
||||
IBlockData iblockdata = world.getBlockState(blockposition);
|
||||
|
||||
@@ -120,8 +129,8 @@
|
||||
@@ -123,8 +132,8 @@
|
||||
byte b1 = 0;
|
||||
|
||||
if (itemstack.isEmpty()) {
|
||||
@@ -52,7 +52,7 @@
|
||||
} else {
|
||||
ItemStack itemstack1 = itemstack.copy();
|
||||
ItemStack itemstack2 = this.inputSlots.getItem(1);
|
||||
@@ -138,8 +147,8 @@
|
||||
@@ -141,8 +150,8 @@
|
||||
if (itemstack1.isDamageableItem() && itemstack1.getItem().isValidRepairItem(itemstack, itemstack2)) {
|
||||
k = Math.min(itemstack1.getDamageValue(), itemstack1.getMaxDamage() / 4);
|
||||
if (k <= 0) {
|
||||
@@ -63,7 +63,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -153,8 +162,8 @@
|
||||
@@ -156,8 +165,8 @@
|
||||
this.repairItemCountCost = i1;
|
||||
} else {
|
||||
if (!flag && (!itemstack1.is(itemstack2.getItem()) || !itemstack1.isDamageableItem())) {
|
||||
@@ -74,7 +74,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -243,8 +252,8 @@
|
||||
@@ -246,8 +255,8 @@
|
||||
}
|
||||
|
||||
if (flag2 && !flag1) {
|
||||
@@ -85,7 +85,7 @@
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -267,11 +276,11 @@
|
||||
@@ -270,11 +279,11 @@
|
||||
itemstack1 = ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
itemstack1 = ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
@@ -290,7 +299,8 @@
|
||||
@@ -293,7 +302,8 @@
|
||||
EnchantmentManager.setEnchantments(map, itemstack1);
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
this.broadcastChanges();
|
||||
}
|
||||
}
|
||||
@@ -317,4 +327,18 @@
|
||||
@@ -334,4 +344,18 @@
|
||||
public int getCost() {
|
||||
return this.cost.get();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user