diff --git a/src/main/kotlin/net/shadowfacts/phycon/network/block/terminal/TerminalBlockEntity.kt b/src/main/kotlin/net/shadowfacts/phycon/network/block/terminal/TerminalBlockEntity.kt index 6ea62d5..9aeea2d 100644 --- a/src/main/kotlin/net/shadowfacts/phycon/network/block/terminal/TerminalBlockEntity.kt +++ b/src/main/kotlin/net/shadowfacts/phycon/network/block/terminal/TerminalBlockEntity.kt @@ -99,6 +99,7 @@ class TerminalBlockEntity: DeviceBlockEntity(PhyBlockEntities.TERMINAL), Invento override fun onInvChange(inv: Inventory) { if (inv == internalBuffer) { markDirty() + sync() } } @@ -113,6 +114,7 @@ class TerminalBlockEntity: DeviceBlockEntity(PhyBlockEntities.TERMINAL), Invento } override fun toClientTag(tag: CompoundTag): CompoundTag { + tag.put("InternalBuffer", internalBuffer.toTag()) val list = ListTag() tag.put("CachedNetItems", list) for ((stack, amount) in cachedNetItems) { @@ -124,6 +126,7 @@ class TerminalBlockEntity: DeviceBlockEntity(PhyBlockEntities.TERMINAL), Invento } override fun fromClientTag(tag: CompoundTag) { + internalBuffer.fromTag(tag.getList("InternalBuffer", 10)) val list = tag.getList("CachedNetItems", 10) cachedNetItems.clear() for (entryTag in list) {