diff options
Diffstat (limited to 'patch-remap/mache-spigotflower/net/minecraft/world/inventory/FurnaceResultSlot.java.patch')
-rw-r--r-- | patch-remap/mache-spigotflower/net/minecraft/world/inventory/FurnaceResultSlot.java.patch | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower/net/minecraft/world/inventory/FurnaceResultSlot.java.patch b/patch-remap/mache-spigotflower/net/minecraft/world/inventory/FurnaceResultSlot.java.patch new file mode 100644 index 0000000000..101aa475e1 --- /dev/null +++ b/patch-remap/mache-spigotflower/net/minecraft/world/inventory/FurnaceResultSlot.java.patch @@ -0,0 +1,79 @@ +--- a/net/minecraft/world/inventory/FurnaceResultSlot.java ++++ b/net/minecraft/world/inventory/FurnaceResultSlot.java +@@ -11,55 +11,50 @@ + private final Player player; + private int removeCount; + +- public FurnaceResultSlot(Player player, Container container, int i, int j, int k) { +- super(container, i, j, k); ++ public FurnaceResultSlot(Player player, Container container, int slot, int xPosition, int yPosition) { ++ super(container, slot, xPosition, yPosition); + this.player = player; + } + + @Override +- @Override +- public boolean mayPlace(ItemStack itemstack) { ++ public boolean mayPlace(ItemStack stack) { + return false; + } + + @Override +- @Override +- public ItemStack remove(int i) { ++ public ItemStack remove(int amount) { + if (this.hasItem()) { +- this.removeCount += Math.min(i, this.getItem().getCount()); ++ this.removeCount += Math.min(amount, this.getItem().getCount()); + } + +- return super.remove(i); ++ return super.remove(amount); + } + + @Override +- @Override +- public void onTake(Player player, ItemStack itemstack) { +- this.checkTakeAchievements(itemstack); +- super.onTake(player, itemstack); ++ public void onTake(Player player, ItemStack stack) { ++ this.checkTakeAchievements(stack); ++ super.onTake(player, stack); + } + + @Override +- @Override +- protected void onQuickCraft(ItemStack itemstack, int i) { +- this.removeCount += i; +- this.checkTakeAchievements(itemstack); ++ protected void onQuickCraft(ItemStack stack, int amount) { ++ this.removeCount += amount; ++ this.checkTakeAchievements(stack); + } + + @Override +- @Override +- protected void checkTakeAchievements(ItemStack itemstack) { +- itemstack.onCraftedBy(this.player.level(), this.player, this.removeCount); +- Player player = this.player; ++ protected void checkTakeAchievements(ItemStack stack) { ++ stack.onCraftedBy(this.player.level(), this.player, this.removeCount); ++ Player entityhuman = this.player; + +- if (player instanceof ServerPlayer) { +- ServerPlayer serverplayer = (ServerPlayer) player; +- Container container = this.container; ++ if (entityhuman instanceof ServerPlayer) { ++ ServerPlayer entityplayer = (ServerPlayer) entityhuman; ++ Container iinventory = this.container; + +- if (container instanceof AbstractFurnaceBlockEntity) { +- AbstractFurnaceBlockEntity abstractfurnaceblockentity = (AbstractFurnaceBlockEntity) container; ++ if (iinventory instanceof AbstractFurnaceBlockEntity) { ++ AbstractFurnaceBlockEntity tileentityfurnace = (AbstractFurnaceBlockEntity) iinventory; + +- abstractfurnaceblockentity.awardUsedRecipesAndPopExperience(serverplayer); ++ tileentityfurnace.awardUsedRecipesAndPopExperience(entityplayer, stack, this.removeCount); // CraftBukkit + } + } + |