Fix empty shulker boxes disappearing when broken

This commit is contained in:
BillyGalbreath
2021-05-31 08:50:20 -05:00
parent afaf8b4f52
commit 6ab7831168

View File

@@ -22,7 +22,7 @@ index 7302554063ac7b5dedaff895cba33b70234008e6..151da6c134f908d9037fddc5b54e71b0
} else {
ItemStack itemstack = this.player.getItemInMainHand();
diff --git a/src/main/java/net/minecraft/world/level/block/BlockShulkerBox.java b/src/main/java/net/minecraft/world/level/block/BlockShulkerBox.java
index 2c1c6562efe8cdc079b4e353144d20c1e46355c5..1083060cc3e0168d362851c34a2f38bf93c6a5fe 100644
index 2c1c6562efe8cdc079b4e353144d20c1e46355c5..af935a03d3677314cd367686d65e89b615af3f4f 100644
--- a/src/main/java/net/minecraft/world/level/block/BlockShulkerBox.java
+++ b/src/main/java/net/minecraft/world/level/block/BlockShulkerBox.java
@@ -110,7 +110,7 @@ public class BlockShulkerBox extends BlockTileEntity {
@@ -30,7 +30,7 @@ index 2c1c6562efe8cdc079b4e353144d20c1e46355c5..1083060cc3e0168d362851c34a2f38bf
TileEntityShulkerBox tileentityshulkerbox = (TileEntityShulkerBox) tileentity;
- if (!world.isClientSide && entityhuman.isCreative() && !tileentityshulkerbox.isEmpty()) {
+ if (!world.isClientSide && (world.purpurConfig.shulkerBoxAllowOversizedStacks || entityhuman.isCreative()) && !tileentityshulkerbox.isEmpty()) {
+ if (!world.isClientSide && (world.purpurConfig.shulkerBoxAllowOversizedStacks || (entityhuman.isCreative() && !tileentityshulkerbox.isEmpty()))) {
ItemStack itemstack = b(this.c());
NBTTagCompound nbttagcompound = tileentityshulkerbox.e(new NBTTagCompound());