Example #1
0
    def _load_entity_from_tag(self, tag):
        position = tag["Pos"].tags
        rotation = tag["Rotation"].tags
        location = Location()
        location.pos = Position(position[0].value, position[1].value, position[2].value)
        location.ori = Orientation.from_degs(rotation[0].value, rotation[1].value)

        location.grounded = bool(tag["OnGround"])

        entity = entities[tag["id"].value](location=location)

        self._entity_loaders[entity.name](entity, tag)

        return entity
Example #2
0
    def _load_entity_from_tag(self, tag):
        position = tag["Pos"].tags
        rotation = tag["Rotation"].tags
        location = Location()
        location.pos = Position(position[0].value, position[1].value,
                                position[2].value)
        location.ori = Orientation.from_degs(rotation[0].value,
                                             rotation[1].value)

        location.grounded = bool(tag["OnGround"])

        entity = entities[tag["id"].value](location=location)

        self._entity_loaders[entity.name](entity, tag)

        return entity
Example #3
0
    def _load_entity_from_tag(self, tag):
        location = Location()

        position = tag["Pos"].tags
        rotation = tag["Rotation"].tags
        location.x = position[0].value
        location.y = position[1].value
        location.z = position[2].value
        location.yaw = rotation[0].value
        location.pitch = rotation[1].value
        location.grounded = bool(tag["OnGround"])

        entity = entities[tag["id"].value](location=location)

        self._entity_loaders[entity.name](entity, tag)

        return entity
Example #4
0
    def _load_entity_from_tag(self, tag):
        location = Location()

        position = tag["Pos"].tags
        rotation = tag["Rotation"].tags
        location.x = position[0].value
        location.y = position[1].value
        location.z = position[2].value
        location.yaw = rotation[0].value
        location.pitch = rotation[1].value
        location.grounded = bool(tag["OnGround"])

        entity = entities[tag["id"].value](location=location)

        self._entity_loaders[entity.name](entity, tag)

        return entity