From 24080f04371b8f1bbc0235346940dd7987500c6b Mon Sep 17 00:00:00 2001 From: xtex Date: Sun, 2 Jul 2023 15:30:41 +0800 Subject: [PATCH] fix: presistent inventory --- .../kotlin/quaedam/projection/swarm/ProjectedPersonEntity.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/src/main/kotlin/quaedam/projection/swarm/ProjectedPersonEntity.kt b/common/src/main/kotlin/quaedam/projection/swarm/ProjectedPersonEntity.kt index 03e5aa4..126e8cd 100644 --- a/common/src/main/kotlin/quaedam/projection/swarm/ProjectedPersonEntity.kt +++ b/common/src/main/kotlin/quaedam/projection/swarm/ProjectedPersonEntity.kt @@ -95,11 +95,13 @@ class ProjectedPersonEntity(entityType: EntityType, level: Le override fun addAdditionalSaveData(tag: CompoundTag) { super.addAdditionalSaveData(tag) tag.put(KEY_ENTITY_SHAPE, shapeTag) + writeInventoryToTag(tag) } override fun readAdditionalSaveData(tag: CompoundTag) { super.readAdditionalSaveData(tag) shapeTag = tag.getCompound(KEY_ENTITY_SHAPE) + readInventoryFromTag(tag) } override fun shouldShowName() = true