Fix oversized shulker box dupe

This commit is contained in:
BillyGalbreath
2021-05-29 06:50:07 -05:00
parent e92d259e90
commit 49a0fb907c

View File

@@ -8,6 +8,19 @@ with oversized itemstacks would cause a "chunk ban". This fixes it by always
creating an itemstack using the TileEntity's NBT data (how it handles it for creating an itemstack using the TileEntity's NBT data (how it handles it for
creative players) instead of routing it through the LootableBuilder. creative players) instead of routing it through the LootableBuilder.
diff --git a/src/main/java/net/minecraft/server/level/PlayerInteractManager.java b/src/main/java/net/minecraft/server/level/PlayerInteractManager.java
index 7302554063ac7b5dedaff895cba33b70234008e6..151da6c134f908d9037fddc5b54e71b069680e56 100644
--- a/src/main/java/net/minecraft/server/level/PlayerInteractManager.java
+++ b/src/main/java/net/minecraft/server/level/PlayerInteractManager.java
@@ -440,7 +440,7 @@ public class PlayerInteractManager {
block.postBreak(this.world, blockposition, iblockdata);
}
- if (this.isCreative()) {
+ if (this.isCreative() || (world.purpurConfig.shulkerBoxAllowOversizedStacks && block instanceof net.minecraft.world.level.block.BlockShulkerBox)) { // Purpur
// return true; // CraftBukkit
} 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 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..1083060cc3e0168d362851c34a2f38bf93c6a5fe 100644
--- a/src/main/java/net/minecraft/world/level/block/BlockShulkerBox.java --- a/src/main/java/net/minecraft/world/level/block/BlockShulkerBox.java