case model

This commit is contained in:
2026-04-23 00:52:59 +02:00
parent b6afa13e72
commit 6d20d204a6
10 changed files with 57 additions and 2 deletions

View File

@@ -49,11 +49,13 @@ class CaseBlockEntity(blockPos: BlockPos, blockState: BlockState): NodeBlockEnti
override fun encodeDownstreamData(packet: FriendlyByteBuf) {
super.encodeDownstreamData(packet)
packet.writeBoolean(isOn)
packet.writeUtf(err ?: "")
}
override fun syncWithUpstream(packet: FriendlyByteBuf) {
super.syncWithUpstream(packet)
setRunning(packet.readBoolean())
err = packet.readUtf().ifEmpty { null }
}
override fun processScreenInteraction(player: ServerPlayer, packet: FriendlyByteBuf) {