diff options
author | Alkalus <draknyte1@hotmail.com> | 2017-09-19 18:19:51 +1000 |
---|---|---|
committer | Alkalus <draknyte1@hotmail.com> | 2017-09-19 18:19:51 +1000 |
commit | 41ec13e3a38d19c6c8e0b6eed505bfc68a79a9a1 (patch) | |
tree | d01606042d9c054ded98ddf449ba812c816f664a /src/Java/gtPlusPlus/core/item | |
parent | 0a0366806167aca12e220e20804f84735773b3ed (diff) | |
download | GT5-Unofficial-41ec13e3a38d19c6c8e0b6eed505bfc68a79a9a1.tar.gz GT5-Unofficial-41ec13e3a38d19c6c8e0b6eed505bfc68a79a9a1.tar.bz2 GT5-Unofficial-41ec13e3a38d19c6c8e0b6eed505bfc68a79a9a1.zip |
% Changed how the Area Clearer works slightly. Now only creates glowstone under Y=50.
Diffstat (limited to 'src/Java/gtPlusPlus/core/item')
-rw-r--r-- | src/Java/gtPlusPlus/core/item/general/ItemAreaClear.java | 11 |
1 files changed, 7 insertions, 4 deletions
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); + } } } } |