Exemplo n.º 1
0
    def readEntity(self, f):
        assert readString(f) == 'Items'
        # TODO validate checksum
        readByte(f)

        itemCount = readInt(f)

        # TODO validate checksum
        readByte(f)

        for i in range(itemCount):
            # TODO store parsed items in chest
            readList(f, ChestParser.CHEST_ITEM_DEF)

            readByte(f)

        # TODO store parsed chest attributes in chest
        readList(f, ChestParser.CHEST_ATTR_DEF)
        
        return Chest()
Exemplo n.º 2
0
    def readEntity(self, f):
        obj = readList(f, SheepParser.ENTITY_DEF)

        return Sheep()
Exemplo n.º 3
0
    def readEntity(self, f):
        obj = readList(f, SignParser.ENTITY_DEF)

        return Sign(obj['x'], obj['y'], obj['z'], [obj['Text1'], obj['Text2'], obj['Text3'], obj['Text4']])
Exemplo n.º 4
0
    def readEntity(self, f):
        obj = readList(f, SkeletonParser.ENTITY_DEF)

        return Skeleton()