mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2024-11-22 03:06:17 +00:00
42 lines
1.9 KiB
Diff
42 lines
1.9 KiB
Diff
--- a/net/minecraft/world/inventory/AbstractCraftingMenu.java
|
|
+++ b/net/minecraft/world/inventory/AbstractCraftingMenu.java
|
|
@@ -13,14 +13,17 @@
|
|
|
|
private final int width;
|
|
private final int height;
|
|
- public final InventoryCrafting craftSlots;
|
|
+ public final TransientCraftingContainer craftSlots; // CraftBukkit
|
|
public final InventoryCraftResult resultSlots = new InventoryCraftResult();
|
|
|
|
- public AbstractCraftingMenu(Containers<?> containers, int i, int j, int k) {
|
|
+ public AbstractCraftingMenu(Containers<?> containers, int i, int j, int k, PlayerInventory playerInventory) { // CraftBukkit
|
|
super(containers, i);
|
|
this.width = j;
|
|
this.height = k;
|
|
- this.craftSlots = new TransientCraftingContainer(this, j, k);
|
|
+ // CraftBukkit start
|
|
+ this.craftSlots = new TransientCraftingContainer(this, j, k, playerInventory.player); // CraftBukkit - pass player
|
|
+ this.craftSlots.resultInventory = this.resultSlots; // CraftBukkit - let InventoryCrafting know about its result slot
|
|
+ // CraftBukkit end
|
|
}
|
|
|
|
protected Slot addResultSlot(EntityHuman entityhuman, int i, int j) {
|
|
@@ -38,7 +41,7 @@
|
|
|
|
@Override
|
|
public ContainerRecipeBook.a handlePlacement(boolean flag, boolean flag1, RecipeHolder<?> recipeholder, WorldServer worldserver, PlayerInventory playerinventory) {
|
|
- RecipeHolder<RecipeCrafting> recipeholder1 = recipeholder;
|
|
+ RecipeHolder<RecipeCrafting> recipeholder1 = (RecipeHolder<RecipeCrafting>) recipeholder; // CraftBukkit - decompile error
|
|
|
|
this.beginPlacingRecipe();
|
|
|
|
@@ -65,7 +68,7 @@
|
|
}
|
|
}, this.width, this.height, list, list, playerinventory, recipeholder1, flag, flag1);
|
|
} finally {
|
|
- this.finishPlacingRecipe(worldserver, recipeholder);
|
|
+ this.finishPlacingRecipe(worldserver, recipeholder1); // CraftBukkit - decompile error
|
|
}
|
|
|
|
return containerrecipebook_a;
|