aboutsummaryrefslogtreecommitdiff
path: root/src/Java/miscutil/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/miscutil/core')
-rw-r--r--src/Java/miscutil/core/common/CommonProxy.java98
-rw-r--r--src/Java/miscutil/core/lib/CORE.java2
-rw-r--r--src/Java/miscutil/core/util/Utils.java7
3 files changed, 79 insertions, 28 deletions
diff --git a/src/Java/miscutil/core/common/CommonProxy.java b/src/Java/miscutil/core/common/CommonProxy.java
index 7471425283..9a288c0e79 100644
--- a/src/Java/miscutil/core/common/CommonProxy.java
+++ b/src/Java/miscutil/core/common/CommonProxy.java
@@ -11,6 +11,7 @@ import miscutil.core.lib.LoadedMods;
import miscutil.core.tileentities.ModTileEntities;
import miscutil.core.util.Utils;
import miscutil.gregtech.init.InitGregtech;
+import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
import cpw.mods.fml.common.event.FMLInitializationEvent;
@@ -91,8 +92,9 @@ public class CommonProxy {
}
public void registerOreDict(){
-
+
Utils.LOG_INFO("Registering Ingots & Plates with OreDict.");
+ //In-house
//Ingots
//OreDictionary.registerOre("ingotBloodSteel", new ItemStack(ModItems.itemIngotBloodSteel));
GT_OreDictUnificator.registerOre("ingotBloodSteel", new ItemStack(ModItems.itemIngotBloodSteel));
@@ -100,49 +102,91 @@ public class CommonProxy {
GT_OreDictUnificator.registerOre("ingotStaballoy", new ItemStack(ModItems.itemIngotStaballoy));
//Plates
+ GT_OreDictUnificator.registerOre("plateBloodSteel", new ItemStack(ModItems.itemPlateBloodSteel));
+ GT_OreDictUnificator.registerOre("plateStaballoy", new ItemStack(ModItems.itemPlateStaballoy));
+
+ //Blocks
+ GT_OreDictUnificator.registerOre("blockStaballoy", new ItemStack(Item.getItemFromBlock(ModBlocks.blockStaballoy)));
+ OreDictionary.registerOre("blockBloodSteel", new ItemStack(ModBlocks.blockBloodSteel));
+
+
//InterMod
if (LoadedMods.Big_Reactors){
- OreDictionary.registerOre("plateBlutonium", new ItemStack(ModItems.itemPlateBlutonium));
- OreDictionary.registerOre("plateCyanite", new ItemStack(ModItems.itemPlateCyanite));
- OreDictionary.registerOre("plateLudicrite", new ItemStack(ModItems.itemPlateLudicrite));
+ GT_OreDictUnificator.registerOre("plateBlutonium", new ItemStack(ModItems.itemPlateBlutonium));
+ GT_OreDictUnificator.registerOre("plateCyanite", new ItemStack(ModItems.itemPlateCyanite));
+ GT_OreDictUnificator.registerOre("plateLudicrite", new ItemStack(ModItems.itemPlateLudicrite));
}
if (LoadedMods.EnderIO){
- OreDictionary.registerOre("plateConductiveIron", new ItemStack(ModItems.itemPlateConductiveIron));
- OreDictionary.registerOre("plateDarkSteel", new ItemStack(ModItems.itemPlateDarkSteel));
- OreDictionary.registerOre("plateElectricalSteel", new ItemStack(ModItems.itemPlateElectricalSteel));
- OreDictionary.registerOre("plateEnergeticAlloy", new ItemStack(ModItems.itemPlateEnergeticAlloy));
- OreDictionary.registerOre("platePulsatingIron", new ItemStack(ModItems.itemPlatePulsatingIron));
- OreDictionary.registerOre("plateRedstoneAlloy", new ItemStack(ModItems.itemPlateRedstoneAlloy));
- OreDictionary.registerOre("plateSoularium", new ItemStack(ModItems.itemPlateSoularium));
- OreDictionary.registerOre("plateVibrantAlloy", new ItemStack(ModItems.itemPlateVibrantAlloy));
+ GT_OreDictUnificator.registerOre("plateConductiveIron", new ItemStack(ModItems.itemPlateConductiveIron));
+ GT_OreDictUnificator.registerOre("plateDarkSteel", new ItemStack(ModItems.itemPlateDarkSteel));
+ GT_OreDictUnificator.registerOre("plateElectricalSteel", new ItemStack(ModItems.itemPlateElectricalSteel));
+ GT_OreDictUnificator.registerOre("plateEnergeticAlloy", new ItemStack(ModItems.itemPlateEnergeticAlloy));
+ GT_OreDictUnificator.registerOre("platePulsatingIron", new ItemStack(ModItems.itemPlatePulsatingIron));
+ GT_OreDictUnificator.registerOre("plateRedstoneAlloy", new ItemStack(ModItems.itemPlateRedstoneAlloy));
+ GT_OreDictUnificator.registerOre("plateSoularium", new ItemStack(ModItems.itemPlateSoularium));
+ GT_OreDictUnificator.registerOre("plateVibrantAlloy", new ItemStack(ModItems.itemPlateVibrantAlloy));
}
if (LoadedMods.Simply_Jetpacks){
- OreDictionary.registerOre("plateEnrichedSoularium", new ItemStack(ModItems.itemPlateEnrichedSoularium));
+ GT_OreDictUnificator.registerOre("plateEnrichedSoularium", new ItemStack(ModItems.itemPlateEnrichedSoularium));
}
if (LoadedMods.RFTools){
- OreDictionary.registerOre("plateDimensionShard", new ItemStack(ModItems.itemPlateDimensionShard));
+ GT_OreDictUnificator.registerOre("plateDimensionShard", new ItemStack(ModItems.itemPlateDimensionShard));
}
if (LoadedMods.Thaumcraft){
- OreDictionary.registerOre("plateVoidMetal", new ItemStack(ModItems.itemPlateVoidMetal));
-
+ try{
+ Item em = null;
+ //Item em1 = GameRegistry.findItem("ThaumCraft", "ItemResource:16");
+ //Item em2 = GameRegistry.findItem("ThaumCraft", "<ItemResource:16>");
+
+ Item em1 = Utils.getItem("Thaumcraft:ItemResource:16");
+ Utils.LOG_WARNING("Found: "+em1.toString());
+ if (!em1.equals(null)){
+ em = em1;
+ }
+ else {
+ em = null;
+ }
+ if (!em.equals(null)){
+ ItemStack voidIngot = new ItemStack(em,1,16);
+ //GT_OreDictUnificator.registerOre("ingotVoidMetal", new ItemStack(em));
+ //GameRegistry.registerCustomItemStack("ingotVoidMetal", voidIngot);
+ GT_OreDictUnificator.registerOre("ingotVoidMetal", voidIngot);
+ }
+ else {
+ Utils.LOG_WARNING("Void Metal Ingot not found.");
+ }
+ } catch (NullPointerException e) {
+ Utils.LOG_ERROR("Void Metal Ingot not found. [NULL]");
+ }
+ GT_OreDictUnificator.registerOre("plateVoidMetal", new ItemStack(ModItems.itemPlateVoidMetal));
+ //System.exit(0);
+
}
if (LoadedMods.Extra_Utils){
- OreDictionary.registerOre("plateBedrockium", new ItemStack(ModItems.itemPlateBedrockium));
+ try {
+ Item em = null;
+ Item em1 = Utils.getItem("ExtraUtilities:bedrockiumIngot");
+ Utils.LOG_WARNING("Found: "+em1.toString());
+ if (!em1.equals(null)){
+ em = em1;
+ }
+ if (!em.equals(null)){
+ GT_OreDictUnificator.registerOre("ingotBedrockium", new ItemStack(em));
+ }
+ else {
+ Utils.LOG_WARNING("Bedrockium Ingot not found.");
+ }
+ } catch (NullPointerException e) {
+ Utils.LOG_ERROR("Bedrockium Ingot not found. [NULL]");
+ }
+
+ GT_OreDictUnificator.registerOre("plateBedrockium", new ItemStack(ModItems.itemPlateBedrockium));
}
if (LoadedMods.PneumaticCraft){
- OreDictionary.registerOre("plateCompressedIron", new ItemStack(ModItems.itemPlateCompressedIron));
+ GT_OreDictUnificator.registerOre("plateCompressedIron", new ItemStack(ModItems.itemPlateCompressedIron));
}
- //In-house
- OreDictionary.registerOre("plateBloodSteel", new ItemStack(ModItems.itemPlateBloodSteel));
- OreDictionary.registerOre("plateStaballoy", new ItemStack(ModItems.itemPlateStaballoy));
-
-
- //Blocks
- //OreDictionary.registerOre("blockBloodSteel", new ItemStack(ModBlocks.blockBloodSteel.ge)));
-
-
//Misc
}
diff --git a/src/Java/miscutil/core/lib/CORE.java b/src/Java/miscutil/core/lib/CORE.java
index 93ff389810..12be9e9a03 100644
--- a/src/Java/miscutil/core/lib/CORE.java
+++ b/src/Java/miscutil/core/lib/CORE.java
@@ -7,7 +7,7 @@ public class CORE {
public static final String name = "Misc. Utils";
public static final String MODID = "miscutils";
public static final String VERSION = "0.9.6";
- public static final boolean DEBUG = false;
+ public static final boolean DEBUG = true;
public static final boolean LOAD_ALL_CONTENT = false;
public static final int GREG_FIRST_ID = 760;
diff --git a/src/Java/miscutil/core/util/Utils.java b/src/Java/miscutil/core/util/Utils.java
index 57c4399708..ab60de8557 100644
--- a/src/Java/miscutil/core/util/Utils.java
+++ b/src/Java/miscutil/core/util/Utils.java
@@ -7,10 +7,12 @@ import java.util.Random;
import miscutil.core.lib.CORE;
import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import cpw.mods.fml.common.FMLLog;
+import cpw.mods.fml.common.registry.GameRegistry;
public class Utils {
@@ -127,6 +129,11 @@ public class Utils {
return FluidRegistry.getFluidStack("ic2steam", (int)aAmount);
}
+ public static Item getItem(String fqrn) // fqrn = fully qualified resource name
+ {
+ String[] fqrnSplit = fqrn.split(":");
+ return GameRegistry.findItem(fqrnSplit[0], fqrnSplit[1]);
+ }
}