From 4f74b39fdc2ff2faa239c508eb6787781184240d Mon Sep 17 00:00:00 2001 From: jdrueckert Date: Fri, 29 May 2020 22:58:38 +0200 Subject: [PATCH] feat: add `addToBlockBasedItem` annotation to `InventoryComponent` (#17) - when trying to nest items in another item (e.g. chest) before ever having placed the chest, it doesn't have an `InventoryComponent` because this annotation is missing --- .../org/terasology/logic/inventory/InventoryComponent.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/terasology/logic/inventory/InventoryComponent.java b/src/main/java/org/terasology/logic/inventory/InventoryComponent.java index 0a984078f4..9bdc88ffd2 100644 --- a/src/main/java/org/terasology/logic/inventory/InventoryComponent.java +++ b/src/main/java/org/terasology/logic/inventory/InventoryComponent.java @@ -24,14 +24,15 @@ import org.terasology.network.ReplicationCheck; import org.terasology.reflection.metadata.FieldMetadata; import org.terasology.world.block.ForceBlockActive; +import org.terasology.world.block.items.AddToBlockBasedItem; import java.util.List; /** * Allows an entity to store items. - * */ @ForceBlockActive +@AddToBlockBasedItem public final class InventoryComponent implements Component, ReplicationCheck { public boolean privateToOwner = true;