public void setBlockTileEntity(int var1, int var2, int var3, TileEntity var4) {
        if (!var4.isInvalid()) {
            if (this.scanningTileEntities) {
                var4.xCoord = var1;
                var4.yCoord = var2;
                var4.zCoord = var3;
                this.addedTileEntityList.add(var4);
            } else {
                this.loadedTileEntityList.add(var4);
                Chunk var5 = this.getChunkFromChunkCoords(var1 >> 4, var3 >> 4);
                if (var5 != null) {
                    var5.setChunkBlockTileEntity(var1 & 15, var2, var3 & 15, var4);
                }
            }
        }

    }