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@9d1d9fd [ci skip] inline import PurpurMC/Purpur@1b5ab0c Updated Upstream (Paper) PurpurMC/Purpur@4b74604 [ci skip] enable caching (#1634)
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, 12 Jan 2025 21:03:27 +0300
|
|
Subject: [PATCH] Fix MC-65198
|
|
|
|
Original post on Mojira: https://bugs.mojang.com/browse/MC-65198
|
|
|
|
diff --git a/net/minecraft/world/inventory/ItemCombinerMenu.java b/net/minecraft/world/inventory/ItemCombinerMenu.java
|
|
index c605bd700fd9f5a6596a2bf9648492786306b025..ae594513799defffa3d3c29ef753fa01337e0df2 100644
|
|
--- a/net/minecraft/world/inventory/ItemCombinerMenu.java
|
|
+++ b/net/minecraft/world/inventory/ItemCombinerMenu.java
|
|
@@ -120,6 +120,7 @@ public abstract class ItemCombinerMenu extends AbstractContainerMenu {
|
|
if (slot != null && slot.hasItem()) {
|
|
ItemStack item = slot.getItem();
|
|
itemStack = item.copy();
|
|
+ ItemStack itemStack2 = itemStack.copy(); // DivineMC - Fix MC-65198
|
|
int inventorySlotStart = this.getInventorySlotStart();
|
|
int useRowEnd = this.getUseRowEnd();
|
|
if (index == this.getResultSlot()) {
|
|
@@ -157,7 +158,7 @@ public abstract class ItemCombinerMenu extends AbstractContainerMenu {
|
|
}
|
|
|
|
this.activeQuickItem = itemStack; // Purpur - Anvil API
|
|
- slot.onTake(player, item);
|
|
+ slot.onTake(player, itemStack2); // DivineMC - Fix MC-65198
|
|
this.activeQuickItem = null; // Purpur - Anvil API
|
|
}
|
|
|
|
diff --git a/net/minecraft/world/inventory/ResultSlot.java b/net/minecraft/world/inventory/ResultSlot.java
|
|
index 01b8d73b1be9b41d6f51d11a0bead37a7bd9023f..d3865b375293e29162f08aa447bd91f90ef27513 100644
|
|
--- a/net/minecraft/world/inventory/ResultSlot.java
|
|
+++ b/net/minecraft/world/inventory/ResultSlot.java
|
|
@@ -49,7 +49,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
|
|
}
|
|
|
|
if (this.container instanceof RecipeCraftingHolder recipeCraftingHolder) {
|
|
diff --git a/net/minecraft/world/inventory/StonecutterMenu.java b/net/minecraft/world/inventory/StonecutterMenu.java
|
|
index d6854d0ebe5cb4205963e879d71eb3940d54de1f..39d00670c4fbfd6646af34cbd598117f07fc41ac 100644
|
|
--- a/net/minecraft/world/inventory/StonecutterMenu.java
|
|
+++ b/net/minecraft/world/inventory/StonecutterMenu.java
|
|
@@ -238,6 +238,7 @@ public class StonecutterMenu extends AbstractContainerMenu {
|
|
ItemStack item = slot.getItem();
|
|
Item item1 = item.getItem();
|
|
itemStack = item.copy();
|
|
+ ItemStack itemStack2 = itemStack.copy(); // DivineMC - Fix MC-65198
|
|
if (index == 1) {
|
|
item1.onCraftedBy(item, player.level(), player);
|
|
if (!this.moveItemStackTo(item, 2, 38, true)) {
|
|
@@ -270,7 +271,7 @@ public class StonecutterMenu extends AbstractContainerMenu {
|
|
return ItemStack.EMPTY;
|
|
}
|
|
|
|
- slot.onTake(player, item);
|
|
+ slot.onTake(player, itemStack2); // DivineMC - Fix MC-65198
|
|
if (index == 1) {
|
|
player.drop(item, false);
|
|
}
|