int x = arg0.getBlockX();
int z = arg0.getBlockZ();
if(this.world.getMinecraftWorld().blockExists(x, 0, z)) { // blockExists
Chunk chunk = this.world.getMinecraftWorld().getChunkFromBlockCoords(x, z); // Chunk, getChunkFromBlockCoords
if(chunk != null) {
byte[] biomevals = chunk.getBiomeArray(); // getBiomeArray
biomevals[((z & 0xF) << 4 | x & 0xF)] = (byte)biomeId;
// work around for biome data not being updated on client
com.sijobe.spc.wrapper.Minecraft.getMinecraft().thePlayer.worldObj.getChunkFromBlockCoords(x, z).setBiomeArray(biomevals);
} else {
System.err.println("Can't set biome for null chunk.");