Skip to content

Commit

Permalink
Fix colored shulker box contents not dropping when destroyed, superce…
Browse files Browse the repository at this point in the history
…des #1594
  • Loading branch information
granny committed Oct 4, 2024
1 parent 51f15ee commit 3d0716d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ Subject: [PATCH] option to disable shulker box items from dropping contents


diff --git a/src/main/java/net/minecraft/world/item/BlockItem.java b/src/main/java/net/minecraft/world/item/BlockItem.java
index 3253361d91e2a2e68d354eaf3dd3e3cd486e191d..2649188930653610b8aaaeb18797c80879cd572a 100644
index 3253361d91e2a2e68d354eaf3dd3e3cd486e191d..a255b76cc1e6cb926585110e5f09ded37da7be20 100644
--- a/src/main/java/net/minecraft/world/item/BlockItem.java
+++ b/src/main/java/net/minecraft/world/item/BlockItem.java
@@ -260,6 +260,7 @@ public class BlockItem extends Item {
ItemContainerContents itemcontainercontents = (ItemContainerContents) entity.getItem().set(DataComponents.CONTAINER, ItemContainerContents.EMPTY);

if (itemcontainercontents != null) {
+ if (entity.level().purpurConfig.shulkerBoxItemDropContentsWhenDestroyed && entity.getItem().is(Items.SHULKER_BOX)) // Purpur
+ if (entity.level().purpurConfig.shulkerBoxItemDropContentsWhenDestroyed && this.getBlock() instanceof ShulkerBoxBlock) // Purpur
ItemUtils.onContainerDestroyed(entity, itemcontainercontents.nonEmptyItemsCopy());
}

Expand Down

0 comments on commit 3d0716d

Please sign in to comment.