public void setBlockTileEntity(int par1, int par2, int par3, TileEntity par4TileEntity)
    {
        if (par4TileEntity == null || par4TileEntity.isInvalid())
        {
            return;
        }
        List dest = scanningTileEntities ? addedTileEntityList : loadedTileEntityList;
        if (par4TileEntity.canUpdate())
        {
            dest.add(par4TileEntity);
        }
        Chunk chunk = getChunkFromChunkCoords(par1 >> 4, par3 >> 4);
        if (chunk != null)
        {
            chunk.setChunkBlockTileEntity(par1 & 15, par2, par3 & 15, par4TileEntity);
        }
    }