fix: jank way to store block entities

This commit is contained in:
əlemi 2022-07-03 00:33:08 +02:00
parent d8c62e57d2
commit 0540011bb6
No known key found for this signature in database
GPG key ID: BBCBFE5D7244634E

View file

@ -1,4 +1,5 @@
import asyncio
import json
import uuid
import datetime
import asyncio
@ -43,8 +44,7 @@ class GameWorld(Scaffold):
@self.on_packet(PacketMapChunk)
async def map_chunk_cb(packet:PacketMapChunk):
assert isinstance(packet.bitMap, int)
packet.blockEntities
c = Chunk(packet.x, packet.z, packet.bitMap, packet.groundUp)
c = Chunk(packet.x, packet.z, packet.bitMap, packet.groundUp, json.dumps(packet.blockEntities)) # TODO a solution which is not jank!
c.read(packet.chunkData)
self.world.put(c, packet.x, packet.z, not packet.groundUp)