mirror of
https://github.com/LeavesMC/Leaves.git
synced 2026-01-03 14:22:09 +00:00
Fixed issue #253 caused by stackable Shulker Box feature, functionality restored
This commit is contained in:
@@ -181,7 +181,7 @@ index 845eff7401b811c179dc9dee70eca0d724be5c80..c88b98bd4ebec40649b9cfcf47ca2035
|
||||
|
||||
default SlotAccess getChestVehicleSlot(int slot) {
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
index 961a7193fda00fa62acea9c39fda1c93f7fbe412..7126fd4cf1f27aa75b6876051c3e884b79db8410 100644
|
||||
index 961a7193fda00fa62acea9c39fda1c93f7fbe412..11bb1168f27a3a95b5e88f106e070a482702d50d 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
@@ -456,7 +456,7 @@ public abstract class AbstractContainerMenu {
|
||||
@@ -236,24 +236,22 @@ index 961a7193fda00fa62acea9c39fda1c93f7fbe412..7126fd4cf1f27aa75b6876051c3e884b
|
||||
while (!stack.isEmpty()) {
|
||||
if (fromLast) {
|
||||
if (k < startIndex) {
|
||||
@@ -824,7 +824,7 @@ public abstract class AbstractContainerMenu {
|
||||
@@ -824,6 +824,7 @@ public abstract class AbstractContainerMenu {
|
||||
// Paper end - Add PlayerTradeEvent and PlayerPurchaseEvent
|
||||
if (!itemstack1.isEmpty() && ItemStack.isSameItemSameComponents(stack, itemstack1)) {
|
||||
l = itemstack1.getCount() + stack.getCount();
|
||||
- int i1 = slot.getMaxStackSize(itemstack1);
|
||||
+ int i1 = org.leavesmc.leaves.util.ShulkerBoxUtils.getItemStackMaxCount(itemstack1); // Leaves - stackable shulker boxes
|
||||
+ // int i1 = org.leavesmc.leaves.util.ShulkerBoxUtils.getItemStackMaxCount(itemstack1); // Leaves - stackable shulker boxes // disabled temporarily
|
||||
int i1 = slot.getMaxStackSize(itemstack1);
|
||||
|
||||
if (l <= i1) {
|
||||
stack.setCount(0);
|
||||
@@ -875,7 +875,7 @@ public abstract class AbstractContainerMenu {
|
||||
@@ -875,6 +876,7 @@ public abstract class AbstractContainerMenu {
|
||||
}
|
||||
// Paper end - Add PlayerTradeEvent and PlayerPurchaseEvent
|
||||
if (itemstack1.isEmpty() && slot.mayPlace(stack)) {
|
||||
- l = slot.getMaxStackSize(stack);
|
||||
+ l = org.leavesmc.leaves.util.ShulkerBoxUtils.getItemStackMaxCount(itemstack1); // Leaves - stackable shulker boxes
|
||||
+ // l = org.leavesmc.leaves.util.ShulkerBoxUtils.getItemStackMaxCount(itemstack1); // Leaves - stackable shulker boxes // disabled temporarily
|
||||
l = slot.getMaxStackSize(stack);
|
||||
// Paper start - Add PlayerTradeEvent and PlayerPurchaseEvent
|
||||
if (isCheck) {
|
||||
stack.shrink(Math.min(stack.getCount(), l));
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/MerchantContainer.java b/src/main/java/net/minecraft/world/inventory/MerchantContainer.java
|
||||
index 9140fab07aab32065f7a3b5d13dd17d61dc6d646..210b88b5d87fad641188cf5907c54824d21163ce 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/MerchantContainer.java
|
||||
|
||||
Reference in New Issue
Block a user