diff --git a/eco-api/src/main/java/com/willfp/eco/core/data/ExtendedPersistentDataContainer.java b/eco-api/src/main/java/com/willfp/eco/core/data/ExtendedPersistentDataContainer.java index 3a953e28..f843865e 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/data/ExtendedPersistentDataContainer.java +++ b/eco-api/src/main/java/com/willfp/eco/core/data/ExtendedPersistentDataContainer.java @@ -8,6 +8,9 @@ import org.jetbrains.annotations.Nullable; import java.util.Set; +/** + * Persistent data container wrapper that allows for full string (non-namespaced) keys. + */ public interface ExtendedPersistentDataContainer extends PersistentDataContainer { /** * Set a key. diff --git a/eco-core/core-nms/nms-common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/item/EcoFastItemStack.kt b/eco-core/core-nms/nms-common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/item/EcoFastItemStack.kt index 4eaec315..c78002fc 100644 --- a/eco-core/core-nms/nms-common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/item/EcoFastItemStack.kt +++ b/eco-core/core-nms/nms-common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/item/EcoFastItemStack.kt @@ -1,5 +1,6 @@ package com.willfp.eco.internal.spigot.proxy.common.item +import com.willfp.eco.core.data.ExtendedPersistentDataContainer import com.willfp.eco.core.fast.FastItemStack import com.willfp.eco.internal.spigot.proxy.common.NBT_TAG_STRING import com.willfp.eco.internal.spigot.proxy.common.asNMSStack @@ -185,8 +186,8 @@ class EcoFastItemStack( return this.flagBits and bitModifier == bitModifier } - override fun getBaseTag(): PersistentDataContainer = - (if (handle.hasTag()) handle.getTag()!! else CompoundTag()).makePdc(base = true) + override fun getBaseTag(): ExtendedPersistentDataContainer = + ExtendedPersistentDataContainer.wrap((if (handle.hasTag()) handle.getTag()!! else CompoundTag()).makePdc(base = true)) override fun setBaseTag(container: PersistentDataContainer?) { (if (handle.hasTag()) handle.getTag()!! else CompoundTag()).setPdc(container, item = handle)