mirror of
https://github.com/BX-Team/DivineMC.git
synced 2026-01-04 15:31:43 +00:00
Upstream has released updates that appear to apply and compile correctly Purpur Changes: PurpurMC/Purpur@fbedef8 Updated Upstream (Paper) PurpurMC/Purpur@cc43efd Updated Upstream (Paper) PurpurMC/Purpur@f6fd5f6 update paperweight to 1.5.7-SNAPSHOT
63 lines
3.2 KiB
Diff
63 lines
3.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
|
Date: Sun, 25 Jun 2023 22:54:47 +0300
|
|
Subject: [PATCH] Fix MC-65198
|
|
|
|
Original post on Mojira: https://bugs.mojang.com/browse/MC-65198
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/inventory/ItemCombinerMenu.java b/src/main/java/net/minecraft/world/inventory/ItemCombinerMenu.java
|
|
index a578882b64c581ef4f47fa483a9f2988cfa4c8cf..0660c07e1f360cb5e0a865a6b7574ea14a327f10 100644
|
|
--- a/src/main/java/net/minecraft/world/inventory/ItemCombinerMenu.java
|
|
+++ b/src/main/java/net/minecraft/world/inventory/ItemCombinerMenu.java
|
|
@@ -141,6 +141,7 @@ public abstract class ItemCombinerMenu extends AbstractContainerMenu {
|
|
ItemStack itemstack1 = slot1.getItem();
|
|
|
|
itemstack = itemstack1.copy();
|
|
+ ItemStack itemStack2 = itemstack.copy();
|
|
int j = this.getInventorySlotStart();
|
|
int k = this.getUseRowEnd();
|
|
|
|
@@ -179,7 +180,7 @@ public abstract class ItemCombinerMenu extends AbstractContainerMenu {
|
|
}
|
|
|
|
this.activeQuickItem = itemstack; // Purpur
|
|
- slot1.onTake(player, itemstack1);
|
|
+ slot1.onTake(player, itemStack2); // DivineMC - Fix MC-65198
|
|
this.activeQuickItem = null; // Purpur
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/inventory/ResultSlot.java b/src/main/java/net/minecraft/world/inventory/ResultSlot.java
|
|
index 46d1f768e4dcc2942ee7af81ee2713df10251731..311c3054c4a44043ddc32b1560b9a4d65d494402 100644
|
|
--- a/src/main/java/net/minecraft/world/inventory/ResultSlot.java
|
|
+++ b/src/main/java/net/minecraft/world/inventory/ResultSlot.java
|
|
@@ -45,7 +45,7 @@ public class ResultSlot extends Slot {
|
|
@Override
|
|
protected void checkTakeAchievements(ItemStack stack) {
|
|
if (this.removeCount > 0) {
|
|
- stack.onCraftedBy(this.player.level(), this.player, this.removeCount);
|
|
+ stack.onCraftedBy(this.player.level(), this.player, stack.getCount()); // DivineMC - Fix MC-65198
|
|
}
|
|
|
|
Container var3 = this.container;
|
|
diff --git a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
|
|
index 9699f97efcfecdc446ca25a6bab42cc484314cbb..6c95f72df1f3b6703c053f894857844abf5767da 100644
|
|
--- a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
|
|
+++ b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
|
|
@@ -257,6 +257,7 @@ public class StonecutterMenu extends AbstractContainerMenu {
|
|
Item item = itemstack1.getItem();
|
|
|
|
itemstack = itemstack1.copy();
|
|
+ ItemStack itemStack2 = itemstack.copy(); // DivineMC - Fix MC-65198
|
|
if (slot == 1) {
|
|
item.onCraftedBy(itemstack1, player.level(), player);
|
|
if (!this.moveItemStackTo(itemstack1, 2, 38, true)) {
|
|
@@ -289,7 +290,7 @@ public class StonecutterMenu extends AbstractContainerMenu {
|
|
return ItemStack.EMPTY;
|
|
}
|
|
|
|
- slot1.onTake(player, itemstack1);
|
|
+ slot1.onTake(player, itemStack2); // DivineMC - Fix MC-65198
|
|
this.broadcastChanges();
|
|
}
|
|
|