- 318
- 12
Есть код:
Как чекнуть измерение world конкретно в этом коде?
Код:
@SubscribeEvent
public void chunkReplaceOnWater(PopulateChunkEvent.Pre event) {
Chunk chunk = event.world.getChunkFromChunkCoords(event.chunkX, event.chunkZ);
ExtendedBlockStorage[] storages = chunk.getBlockStorageArray();
for (int i = 0; i < storages.length; i++) {
if (storages[i] == null) {
storages[i] = new ExtendedBlockStorage(i * 16, true);
}
for (int x = 0; x < 16; ++x) {
for (int y = 0; y < 16; ++y) {
for (int z = 0; z < 16; ++z) {
if (storages[i].getBlockByExtId(x, y, z) == Blocks.air) {
storages[i].func_150818_a(x, y, z, Blocks.water);
}
if (storages[i].getBlockByExtId(x, y, z) == Blocks.snow_layer) {
storages[i].func_150818_a(x, y, z, Blocks.water);
}
if (storages[i].getBlockByExtId(x, y, z) == Blocks.snow) {
storages[i].func_150818_a(x, y, z, Blocks.water);
}
/*if(i*16 + y == 255) {
storages[i].func_150818_a(x, y, z, Blocks.glass);
}*/
}
}
}
}
}