mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Fix colored shulker box contents not dropping when destroyed, supercedes #1594
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user