def addTileEntity(self, tileEntityTag):
        '''
        Adds an TileEntity to the level and sets its position to the values of the X, Y, and Z tags
        
        :param tileEntityTag: The NBT data of the TileEntity
        :type tileEntityTag: pymclevel.nbt.TAG_Compound
        '''
        assert isinstance(tileEntityTag, nbt.TAG_Compound)
        if 'x' not in tileEntityTag:
            return
        x, y, z = TileEntity.pos(tileEntityTag)

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

        Adds an TileEntity to the level and sets its position to the values of the X, Y, and Z tags
        
        :param tileEntityTag: The NBT data of the TileEntity
        :type tileEntityTag: pymclevel.nbt.TAG_Compound
        
pymclevel/infiniteworld.py