def addEntity(self, entityTag):
        '''
        Adds an Entity to the level and sets its position to the values of the 'Pos' tag
        
        :param entityTag: The NBT data of the Entity
        :type entityTag: pymclevel.nbt.TAG_Compound
        '''
        assert isinstance(entityTag, nbt.TAG_Compound)
        x, y, z = map(lambda x: int(floor(x)), Entity.pos(entityTag))

        try:
            chunk = self.getChunk(x >> 4, z >> 4)
        except (ChunkNotPresent, ChunkMalformed):
            return None
            # raise Error, can't find a chunk?
        chunk.addEntity(entityTag)
        chunk.dirty = True

        Adds an Entity to the level and sets its position to the values of the 'Pos' tag
        
        :param entityTag: The NBT data of the Entity
        :type entityTag: pymclevel.nbt.TAG_Compound
        
pymclevel/infiniteworld.py