@@ -31,7 +31,7 @@
|
||||
public static final int MAX_NAME_LENGTH = 35;
|
||||
public static final int INPUT_SLOT = 0;
|
||||
public static final int ADDITIONAL_SLOT = 1;
|
||||
@@ -46,6 +68,13 @@
|
||||
@@ -46,15 +68,22 @@
|
||||
super.setChanged();
|
||||
ContainerGrindstone.this.slotsChanged(this);
|
||||
}
|
||||
@@ -44,7 +44,18 @@
|
||||
+ // CraftBukkit end
|
||||
};
|
||||
this.access = containeraccess;
|
||||
this.addSlot(new Slot(this.repairSlots, 0, 49, 19) {
|
||||
- this.addSlot(new Slot(this, this.repairSlots, 0, 49, 19) {
|
||||
+ this.addSlot(new Slot(this.repairSlots, 0, 49, 19) { // CraftBukkit - decompile error
|
||||
@Override
|
||||
public boolean mayPlace(ItemStack itemstack) {
|
||||
return itemstack.isDamageableItem() || EnchantmentManager.hasAnyEnchantments(itemstack);
|
||||
}
|
||||
});
|
||||
- this.addSlot(new Slot(this, this.repairSlots, 1, 49, 40) {
|
||||
+ this.addSlot(new Slot(this.repairSlots, 1, 49, 40) { // CraftBukkit - decompile error
|
||||
@Override
|
||||
public boolean mayPlace(ItemStack itemstack) {
|
||||
return itemstack.isDamageableItem() || EnchantmentManager.hasAnyEnchantments(itemstack);
|
||||
@@ -124,6 +153,7 @@
|
||||
this.addSlot(new Slot(playerinventory, j, 8 + j * 18, 142));
|
||||
}
|
||||
@@ -53,50 +64,17 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -145,7 +175,7 @@
|
||||
boolean flag2 = !itemstack.isEmpty() && !itemstack.is(Items.ENCHANTED_BOOK) && !itemstack.isEnchanted() || !itemstack1.isEmpty() && !itemstack1.is(Items.ENCHANTED_BOOK) && !itemstack1.isEnchanted();
|
||||
|
||||
if (itemstack.getCount() > 1 || itemstack1.getCount() > 1 || !flag1 && flag2) {
|
||||
- this.resultSlots.setItem(0, ItemStack.EMPTY);
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareGrindstoneEvent(getBukkitView(), ItemStack.EMPTY); // CraftBukkit
|
||||
this.broadcastChanges();
|
||||
return;
|
||||
}
|
||||
@@ -156,7 +186,7 @@
|
||||
|
||||
if (flag1) {
|
||||
if (!itemstack.is(itemstack1.getItem())) {
|
||||
- this.resultSlots.setItem(0, ItemStack.EMPTY);
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareGrindstoneEvent(getBukkitView(), ItemStack.EMPTY); // CraftBukkit
|
||||
this.broadcastChanges();
|
||||
return;
|
||||
}
|
||||
@@ -170,7 +200,7 @@
|
||||
itemstack2 = this.mergeEnchants(itemstack, itemstack1);
|
||||
if (!itemstack2.isDamageableItem()) {
|
||||
if (!ItemStack.matches(itemstack, itemstack1)) {
|
||||
- this.resultSlots.setItem(0, ItemStack.EMPTY);
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareGrindstoneEvent(getBukkitView(), ItemStack.EMPTY); // CraftBukkit
|
||||
this.broadcastChanges();
|
||||
return;
|
||||
}
|
||||
@@ -183,12 +213,12 @@
|
||||
i = flag3 ? itemstack.getDamageValue() : itemstack1.getDamageValue();
|
||||
itemstack2 = flag3 ? itemstack : itemstack1;
|
||||
}
|
||||
-
|
||||
- this.resultSlots.setItem(0, this.removeNonCurses(itemstack2, i, b0));
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareGrindstoneEvent(getBukkitView(), this.removeNonCurses(itemstack2, i, b0)); // CraftBukkit
|
||||
} else {
|
||||
- this.resultSlots.setItem(0, ItemStack.EMPTY);
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareGrindstoneEvent(getBukkitView(), ItemStack.EMPTY); // CraftBukkit
|
||||
}
|
||||
@@ -136,7 +166,8 @@
|
||||
}
|
||||
|
||||
private void createResult() {
|
||||
- this.resultSlots.setItem(0, this.computeResult(this.repairSlots.getItem(0), this.repairSlots.getItem(1)));
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareGrindstoneEvent(getBukkitView(), this.computeResult(this.repairSlots.getItem(0), this.repairSlots.getItem(1))); // CraftBukkit
|
||||
+ sendAllDataToRemote(); // CraftBukkit - SPIGOT-6686: Always send completed inventory to stay in sync with client
|
||||
this.broadcastChanges();
|
||||
}
|
||||
|
||||
@@ -250,6 +280,7 @@
|
||||
@@ -238,6 +269,7 @@
|
||||
|
||||
@Override
|
||||
public boolean stillValid(EntityHuman entityhuman) {
|
||||
|
||||
Reference in New Issue
Block a user