SPIGOT-6434: Smithing Table and Anvil inventories .getType() returns CRAFTING
By: md_5 <git@md-5.net>
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
|
||||
public ContainerSmithing(int i, PlayerInventory playerinventory) {
|
||||
this(i, playerinventory, ContainerAccess.a);
|
||||
@@ -63,13 +68,16 @@
|
||||
@@ -63,13 +68,15 @@
|
||||
List<RecipeSmithing> list = this.g.getCraftingManager().b(Recipes.SMITHING, this.repairInventory, this.g);
|
||||
|
||||
if (list.isEmpty()) {
|
||||
@@ -31,13 +31,12 @@
|
||||
this.resultInventory.a((IRecipe) this.h);
|
||||
- this.resultInventory.setItem(0, itemstack);
|
||||
+ // CraftBukkit start
|
||||
+ this.repairInventory.setCurrentRecipe(this.h);
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareSmithingEvent(getBukkitView(), itemstack);
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
}
|
||||
@@ -85,4 +93,18 @@
|
||||
@@ -85,4 +92,18 @@
|
||||
public boolean a(ItemStack itemstack, Slot slot) {
|
||||
return slot.inventory != this.resultInventory && super.a(itemstack, slot);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user