- Баллы
- 36
- Имя в Minecraft
- NOTXSK
Нужно заполнить область блоками от location one к location two
Ответ на мой вопрос:
CODE:
minLoc = new Location(world, -50,4,-50);
maxLoc = new Location(world, 50,1,50);
for(int x = minLoc.getBlockX(); x <= maxLoc.getBlockX(); x++) {
for(int y = minLoc.getBlockY(); y <= maxLoc.getBlockY(); y++) {
for(int z = minLoc.getBlockZ(); z <= maxLoc.getBlockZ(); z++) {
Block b = new Location(world, x, y, z).getBlock();
b.setType(Material.DIRT);
}
}
}
Ответ на мой вопрос:
CODE:
minLoc = new Location(world, -50,4,-50);
maxLoc = new Location(world, 50,1,50);
for(int x = minLoc.getBlockX(); x <= maxLoc.getBlockX(); x++) {
for(int y = minLoc.getBlockY(); y <= maxLoc.getBlockY(); y++) {
for(int z = minLoc.getBlockZ(); z <= maxLoc.getBlockZ(); z++) {
Block b = new Location(world, x, y, z).getBlock();
b.setType(Material.DIRT);
}
}
}
Последнее редактирование: