aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-vineflower/net/minecraft/world/inventory/FurnaceResultSlot.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-vineflower/net/minecraft/world/inventory/FurnaceResultSlot.java.patch')
-rw-r--r--patch-remap/mache-vineflower/net/minecraft/world/inventory/FurnaceResultSlot.java.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower/net/minecraft/world/inventory/FurnaceResultSlot.java.patch b/patch-remap/mache-vineflower/net/minecraft/world/inventory/FurnaceResultSlot.java.patch
new file mode 100644
index 0000000000..4d7f3def30
--- /dev/null
+++ b/patch-remap/mache-vineflower/net/minecraft/world/inventory/FurnaceResultSlot.java.patch
@@ -0,0 +1,39 @@
+--- a/net/minecraft/world/inventory/FurnaceResultSlot.java
++++ b/net/minecraft/world/inventory/FurnaceResultSlot.java
+@@ -7,6 +7,7 @@
+ import net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity;
+
+ public class FurnaceResultSlot extends Slot {
++
+ private final Player player;
+ private int removeCount;
+
+@@ -23,7 +24,7 @@
+ @Override
+ public ItemStack remove(int amount) {
+ if (this.hasItem()) {
+- this.removeCount = this.removeCount + Math.min(amount, this.getItem().getCount());
++ this.removeCount += Math.min(amount, this.getItem().getCount());
+ }
+
+ return super.remove(amount);
+@@ -44,8 +45,17 @@
+ @Override
+ protected void checkTakeAchievements(ItemStack stack) {
+ stack.onCraftedBy(this.player.level(), this.player, this.removeCount);
+- if (this.player instanceof ServerPlayer serverPlayer && this.container instanceof AbstractFurnaceBlockEntity abstractFurnaceBlockEntity) {
+- abstractFurnaceBlockEntity.awardUsedRecipesAndPopExperience(serverPlayer);
++ Player entityhuman = this.player;
++
++ if (entityhuman instanceof ServerPlayer) {
++ ServerPlayer entityplayer = (ServerPlayer) entityhuman;
++ Container iinventory = this.container;
++
++ if (iinventory instanceof AbstractFurnaceBlockEntity) {
++ AbstractFurnaceBlockEntity tileentityfurnace = (AbstractFurnaceBlockEntity) iinventory;
++
++ tileentityfurnace.awardUsedRecipesAndPopExperience(entityplayer, stack, this.removeCount); // CraftBukkit
++ }
+ }
+
+ this.removeCount = 0;