} else {
if (y >> 4 >= storageArrays.length || y >> 4 < 0) {
return false;
}
ExtendedBlockStorage ebs = storageArrays[y >> 4];
boolean changedHeightMap = false;
if (ebs == null) {
if (id == 0) {
return false;
}
ebs = storageArrays[y >> 4] = new ExtendedBlockStorage(y >> 4 << 4, !worldObj.provider.hasNoSky);
changedHeightMap = y >= height;
}
int wX = xPosition * 16 + x;
int wZ = zPosition * 16 + z;
Block oldBlock = oldId > 0 ? Block.blocksList[oldId] : null;
if (oldBlock != null && !worldObj.isRemote) {
oldBlock.onBlockPreDestroy(worldObj, wX, y, wZ, oldMeta);
}
ebs.setExtBlockID(x, y & 15, z, id);
if (oldBlock != null) {
if (!worldObj.isRemote) {
oldBlock.breakBlock(worldObj, wX, y, wZ, oldId, oldMeta);
} else if (oldBlock.hasTileEntity(oldMeta)) {
TileEntity te = worldObj.getBlockTileEntity(wX, y, wZ);
if (te != null && te.shouldRefresh(oldId, id, oldMeta, meta, worldObj, wX, y, wZ)) {
worldObj.removeBlockTileEntity(wX, y, wZ);
}
}
}
if (ebs.getExtBlockID(x, y & 15, z) != id) {
return false;
} else {
ebs.setExtBlockMetadata(x, y & 15, z, meta);
if (changedHeightMap) {
generateSkylightMap();
} else {
if (getBlockLightOpacity(x, y, z) > 0) {