Add state machine for caching items into chests
This commit is contained in:
+4
-8
@@ -120,14 +120,10 @@ class Slot(Type):
|
||||
item_count = Byte.read(file_object) if present else None
|
||||
nbt = TrailingByteArray.read(file_object) if present else None
|
||||
return Slot(present, item_id, item_count, nbt)
|
||||
#a = {}
|
||||
#a['present'] = Boolean.read(file_object)
|
||||
#a['item_id'] = VarInt.read(file_object) if a['present'] else None
|
||||
#a['item_count'] = Byte.read(file_object) if a['present'] else None
|
||||
#a['nbt'] = TrailingByteArray.read(file_object) if a['present'] else None
|
||||
#return a
|
||||
|
||||
@staticmethod
|
||||
def send(value, socket):
|
||||
# TODO
|
||||
pass
|
||||
Boolean.send(value.present, socket)
|
||||
VarInt.send(value.item_id, socket)
|
||||
Byte.send(value.item_count, socket)
|
||||
TrailingByteArray.send(value.nbt, socket)
|
||||
|
||||
Reference in New Issue
Block a user