Как чекнуть измерение?

318
12
Есть код:
Код:
@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);
 }*/
 }
 }
 }
 }
 }
Как чекнуть измерение world конкретно в этом коде?
 
Блин.... Я просто не знаю ид мира world,который просто обычный мир, не ад, не край.
 
Айди края - 1, обычного мира - 0, ада - -1. Достать айди текущего мира можно через world.provider.dimensionId.
 
Назад
Сверху