aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/handler
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-12-27 17:12:35 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-12-27 17:12:35 +1000
commit3cc9e9a347b320374858ee7cf4df89138d7d0941 (patch)
tree6f4b7ec67683b64d82eec37c3d1921e4f9c4b3e4 /src/Java/gtPlusPlus/core/handler
parent2ab81b73b0904665bebb77c323cb486e047d8ab0 (diff)
downloadGT5-Unofficial-3cc9e9a347b320374858ee7cf4df89138d7d0941.tar.gz
GT5-Unofficial-3cc9e9a347b320374858ee7cf4df89138d7d0941.tar.bz2
GT5-Unofficial-3cc9e9a347b320374858ee7cf4df89138d7d0941.zip
+ Made Fluorite Ore drop from Sandstone mining and Limestone mining.
+ Added Ore Blocks. + Gave Ore Blocks an overlay texture. - Removed the old ZrF4 dust.
Diffstat (limited to 'src/Java/gtPlusPlus/core/handler')
-rw-r--r--src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java39
1 files changed, 38 insertions, 1 deletions
diff --git a/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java b/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java
index d01a259aaa..796d9fca77 100644
--- a/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java
+++ b/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java
@@ -1,17 +1,22 @@
package gtPlusPlus.core.handler.events;
+import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.math.MathUtils;
+import java.util.ArrayList;
import java.util.Random;
import net.minecraft.init.Blocks;
+import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.event.entity.living.LivingDropsEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.event.world.BlockEvent;
+import net.minecraftforge.oredict.OreDictionary;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
public class BlockEventHandler {
@@ -52,11 +57,18 @@ public class BlockEventHandler {
}
}*/
}
+
+
@SubscribeEvent
public void onBlockBreak(BlockEvent.BreakEvent event) {
-
+
}
+
+
+ ArrayList<ItemStack> oreLimestone = OreDictionary.getOres("oreLimestone");
+ ArrayList<ItemStack> blockLimestone = OreDictionary.getOres("limestone");
+ ItemStack fluoriteOre = ItemUtils.getSimpleStack(Item.getItemFromBlock(ModBlocks.blockOreFluorite));
//Used to handle Thaumcraft Shards when TC is not installed.
@SubscribeEvent
@@ -92,6 +104,31 @@ public class BlockEventHandler {
Utils.LOG_INFO("invalid chance");
}
}
+
+ //Spawns Fluorite from Lime Stone
+ if (!oreLimestone.isEmpty() || !blockLimestone.isEmpty()){
+ if (!oreLimestone.isEmpty())
+ for (ItemStack temp : oreLimestone){
+ if (ItemUtils.getSimpleStack(Item.getItemFromBlock(event.block)) == temp) {
+ if (MathUtils.randInt(1, 64) == 1){
+ event.drops.add(fluoriteOre.copy());
+ }
+ }
+ }
+ if (!oreLimestone.isEmpty())
+ for (ItemStack temp : blockLimestone){
+ if (ItemUtils.getSimpleStack(Item.getItemFromBlock(event.block)) == temp) {
+ if (MathUtils.randInt(1, 64) == 1){
+ event.drops.add(fluoriteOre.copy());
+ }
+ }
+ }
+ }
+ if (event.block == Blocks.sandstone){
+ if (MathUtils.randInt(1, 640) == 1){
+ event.drops.add(fluoriteOre.copy());
+ }
+ }
//}
}