diff options
author | Draknyte1 <Draknyte1@hotmail.com> | 2016-12-27 21:40:27 +1000 |
---|---|---|
committer | Draknyte1 <Draknyte1@hotmail.com> | 2016-12-27 21:40:27 +1000 |
commit | c364c247e74765014d9c6441ebbaf6761e68eb05 (patch) | |
tree | 78e6fba0b3ab93a178d0cc82f1789fdb18dc4719 /src/Java/gtPlusPlus/core | |
parent | d8917c9359495b52aa744c747b4689ca8b94ea79 (diff) | |
download | GT5-Unofficial-c364c247e74765014d9c6441ebbaf6761e68eb05.tar.gz GT5-Unofficial-c364c247e74765014d9c6441ebbaf6761e68eb05.tar.bz2 GT5-Unofficial-c364c247e74765014d9c6441ebbaf6761e68eb05.zip |
+ Added configs for the drop rate of Drained Shards and Fluorite Ore.
+ Gave Fission Fuel plant a better tooltip.
$ Finalized shape of Fission Fuel Processing Plant.
Diffstat (limited to 'src/Java/gtPlusPlus/core')
-rw-r--r-- | src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java | 17 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/core/lib/CORE.java | 4 |
2 files changed, 14 insertions, 7 deletions
diff --git a/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java b/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java index 817cb8828c..340af36ee4 100644 --- a/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java +++ b/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java @@ -1,5 +1,7 @@ package gtPlusPlus.core.handler.events; +import static gtPlusPlus.core.lib.CORE.configSwitches.chanceToDropDrainedShard; +import static gtPlusPlus.core.lib.CORE.configSwitches.chanceToDropFluoriteOre; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.item.ModItems; import gtPlusPlus.core.lib.LoadedMods; @@ -75,9 +77,9 @@ public class BlockEventHandler { public void harvestDrops(BlockEvent.HarvestDropsEvent event) { //Spawn Dull Shards (Can spawn from Tree Logs, Grass or Stone. Stone going to be the most common source.) if ((event.block == Blocks.stone || event.block == Blocks.sandstone || event.block == Blocks.log || event.block == Blocks.log2 || event.block == Blocks.grass) - && !LoadedMods.Thaumcraft) { + && !LoadedMods.Thaumcraft && chanceToDropDrainedShard != 0) { //small chance for one to spawn per stone mined. 1 per 3 stacks~ //TODO MAKE A CONFIG OPTION - if (MathUtils.randInt(1, 196) == 1){ + if (MathUtils.randInt(1, chanceToDropDrainedShard) == 1){ //Let's sort out a lucky charm for the player. int FancyChance = MathUtils.randInt(1, 4); if (MathUtils.randInt(1, 100) < 90){ @@ -101,16 +103,17 @@ public class BlockEventHandler { } } else { - Utils.LOG_INFO("invalid chance"); + Utils.LOG_WARNING("invalid chance"); } } //Spawns Fluorite from Lime Stone + if (chanceToDropFluoriteOre != 0){ if (!oreLimestone.isEmpty() || !blockLimestone.isEmpty()){ if (!oreLimestone.isEmpty()) for (ItemStack temp : oreLimestone){ if (ItemUtils.getSimpleStack(Item.getItemFromBlock(event.block)) == temp) { - if (MathUtils.randInt(1, 32) == 1){ + if (MathUtils.randInt(1, chanceToDropFluoriteOre) == 1){ event.drops.add(fluoriteOre.copy()); } } @@ -118,18 +121,18 @@ public class BlockEventHandler { if (!oreLimestone.isEmpty()) for (ItemStack temp : blockLimestone){ if (ItemUtils.getSimpleStack(Item.getItemFromBlock(event.block)) == temp) { - if (MathUtils.randInt(1, 32) == 1){ + if (MathUtils.randInt(1, chanceToDropFluoriteOre) == 1){ event.drops.add(fluoriteOre.copy()); } } } } if (event.block == Blocks.sandstone){ - if (MathUtils.randInt(1, 640) == 1){ + if (MathUtils.randInt(1, chanceToDropFluoriteOre*20) == 1){ event.drops.add(fluoriteOre.copy()); } } - //} + } } @SubscribeEvent diff --git a/src/Java/gtPlusPlus/core/lib/CORE.java b/src/Java/gtPlusPlus/core/lib/CORE.java index 495b903a10..e87be5a031 100644 --- a/src/Java/gtPlusPlus/core/lib/CORE.java +++ b/src/Java/gtPlusPlus/core/lib/CORE.java @@ -82,6 +82,10 @@ public class CORE { public static boolean enableSkookumChoochers = true; public static boolean enableMultiSizeTools = true; + //Block Drops + public static int chanceToDropDrainedShard = 196; + public static int chanceToDropFluoriteOre = 32; + //Machine Related public static boolean enableAlternativeBatteryAlloy = false; public static boolean enableThaumcraftShardUnification = false; |