From 41ec13e3a38d19c6c8e0b6eed505bfc68a79a9a1 Mon Sep 17 00:00:00 2001 From: Alkalus Date: Tue, 19 Sep 2017 18:19:51 +1000 Subject: % Changed how the Area Clearer works slightly. Now only creates glowstone under Y=50. --- src/Java/gtPlusPlus/core/item/general/ItemAreaClear.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/Java/gtPlusPlus') diff --git a/src/Java/gtPlusPlus/core/item/general/ItemAreaClear.java b/src/Java/gtPlusPlus/core/item/general/ItemAreaClear.java index 5a128bf894..e81911d5cb 100644 --- a/src/Java/gtPlusPlus/core/item/general/ItemAreaClear.java +++ b/src/Java/gtPlusPlus/core/item/general/ItemAreaClear.java @@ -63,14 +63,17 @@ public class ItemAreaClear extends CoreItem { for (int j=0; j<10; j++){ for (int i=0; i<25; i++){ if (!world.isAirBlock(pos.xPos+i, pos.yPos+j, pos.zPos) && - world.getBlock(pos.xPos+i, pos.yPos+j, pos.zPos) != Blocks.bedrock && - world.getBlock(pos.xPos+i, pos.yPos+j, pos.zPos) != Blocks.glowstone){ + world.getBlock(pos.xPos+i, pos.yPos+j, pos.zPos) != Blocks.bedrock){ int chance = MathUtils.randInt(0, 100); if (chance <= 0){ - world.setBlock(pos.xPos+i, pos.yPos+j, pos.zPos, Blocks.glowstone); + if (pos.yPos+j <= 50){ + world.setBlock(pos.xPos+i, pos.yPos+j, pos.zPos, Blocks.glowstone); + } } else { - world.setBlock(pos.xPos+i, pos.yPos+j, pos.zPos, Blocks.air); + if ((world.getBlock(pos.xPos+i, pos.yPos+j, pos.zPos) == Blocks.glowstone && ((pos.yPos+j) > 50)) || world.getBlock(pos.xPos+i, pos.yPos+j, pos.zPos) != Blocks.glowstone){ + world.setBlock(pos.xPos+i, pos.yPos+j, pos.zPos, Blocks.air); + } } } } -- cgit