mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-20 23:49:31 +00:00
* uwu * reorder * Change author * Sync upstream * Lithium: equipment tracking * Faster CraftServer#getworlds list creation Co-Authored-By: Kobe ⑧ <102713261+HaHaWTH@users.noreply.github.com>
63 lines
3.2 KiB
Diff
63 lines
3.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: HaHaWTH <fsjk947@gmail.com>
|
|
Date: Wed, 13 Mar 2024 03:33:08 +0800
|
|
Subject: [PATCH] Fix MC-65198
|
|
|
|
Mojang issues: 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 b3bd9bbd96efc4784b86c2be6bb857da4db919b8..5b65fade746fee7208719b20164bf944d8e8d3a8 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(); // Leaf - Fix MC-65198
|
|
int j = this.getInventorySlotStart();
|
|
int k = this.getUseRowEnd();
|
|
|
|
@@ -179,7 +180,7 @@ public abstract class ItemCombinerMenu extends AbstractContainerMenu {
|
|
}
|
|
|
|
this.activeQuickItem = itemstack; // Purpur - Anvil API
|
|
- slot1.onTake(player, itemstack1);
|
|
+ slot1.onTake(player, itemStack2); // Leaf - Fix MC-65198
|
|
this.activeQuickItem = null; // Purpur - Anvil API
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/inventory/ResultSlot.java b/src/main/java/net/minecraft/world/inventory/ResultSlot.java
|
|
index 37a89bf79017eb65f82276b054a70ddb5eb5e549..05d0c97966f35a6e8576c975d33990f482d05e12 100644
|
|
--- a/src/main/java/net/minecraft/world/inventory/ResultSlot.java
|
|
+++ b/src/main/java/net/minecraft/world/inventory/ResultSlot.java
|
|
@@ -46,7 +46,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()); // Leaf - Fix MC-65198
|
|
}
|
|
|
|
if (this.container instanceof RecipeCraftingHolder recipeCraftingHolder) {
|
|
diff --git a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
|
|
index 5a0015f761f6a25d7bb7b9cfe7a9b4771a6a37ec..bd056f001e5efc34ad5c8cedc9e891514cfe5853 100644
|
|
--- a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
|
|
+++ b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
|
|
@@ -264,6 +264,7 @@ public class StonecutterMenu extends AbstractContainerMenu {
|
|
Item item = itemstack1.getItem();
|
|
|
|
itemstack = itemstack1.copy();
|
|
+ ItemStack itemStack2 = itemstack.copy(); // Leaf - Fix MC-65198
|
|
if (slot == 1) {
|
|
item.onCraftedBy(itemstack1, player.level(), player);
|
|
if (!this.moveItemStackTo(itemstack1, 2, 38, true)) {
|
|
@@ -296,7 +297,7 @@ public class StonecutterMenu extends AbstractContainerMenu {
|
|
return ItemStack.EMPTY;
|
|
}
|
|
|
|
- slot1.onTake(player, itemstack1);
|
|
+ slot1.onTake(player, itemStack2); // Leaf - Fix MC-65198
|
|
this.broadcastChanges();
|
|
}
|
|
|