aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-09-11 00:01:38 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-09-11 00:01:38 +1000
commit6d27a6f758e0b897be93fe0e2649cb5f6002ef3b (patch)
tree415e7c18ed88b4c58c98074b6da4285363bbb4db /src/Java/gtPlusPlus/xmod/gregtech
parenta175442fa1fcaf2369e811be8b25ee1d8c4369fc (diff)
downloadGT5-Unofficial-6d27a6f758e0b897be93fe0e2649cb5f6002ef3b.tar.gz
GT5-Unofficial-6d27a6f758e0b897be93fe0e2649cb5f6002ef3b.tar.bz2
GT5-Unofficial-6d27a6f758e0b897be93fe0e2649cb5f6002ef3b.zip
[1.4.6.5-release]
% Cleaned up fluid duplicates. % Cleaned up handling of GT Meta-Tools. % Changed tone of my latest Fluid Cell icons, now it's darker and more defined. - Removed some dead classes that have no use.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java6
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/enums/CustomGtTextures.java91
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java13
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_OreRecipeRegistrator.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java495
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java16
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java11
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingToolHeadChoocher.java58
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/Processing_Block.java107
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/Processing_Ingot1.java68
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/Processing_Plate1.java56
12 files changed, 678 insertions, 250 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java b/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java
index 2217aecab9..c42575ba50 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java
@@ -4,6 +4,8 @@ import gregtech.api.util.GT_Config;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials;
import gtPlusPlus.xmod.gregtech.common.blocks.fluid.GregtechFluidHandler;
import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechItems;
+import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools;
+import gtPlusPlus.xmod.gregtech.loaders.ProcessingToolHeadChoocher;
import gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechConduits;
public class HANDLER_GT {
@@ -15,7 +17,6 @@ public class HANDLER_GT {
if (mMaterialProperties != null){
GT_Materials.init(mMaterialProperties);
GregtechFluidHandler.run();
- //new MetaGeneratedGregtechTools();
//new Processing_Ingot1();
//new Processing_Plate1();
//new Processing_Block();
@@ -27,7 +28,8 @@ public class HANDLER_GT {
//Add Custom Pipes, Wires and Cables.
GregtechConduits.run();
-
+ new ProcessingToolHeadChoocher();
+ new MetaGeneratedGregtechTools();
/*if (Meta_GT_Proxy.mSortToTheEnd) {
new GT_ItemIterator().run();
Meta_GT_Proxy.registerUnificationEntries();
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/CustomGtTextures.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/CustomGtTextures.java
new file mode 100644
index 0000000000..e2af820c16
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/CustomGtTextures.java
@@ -0,0 +1,91 @@
+package gtPlusPlus.xmod.gregtech.api.enums;
+
+import gregtech.api.GregTech_API;
+import gregtech.api.interfaces.IIconContainer;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.objects.GT_RenderedTexture;
+import gtPlusPlus.core.lib.CORE;
+import net.minecraft.client.renderer.texture.TextureMap;
+import net.minecraft.util.IIcon;
+import net.minecraft.util.ResourceLocation;
+
+public class CustomGtTextures {
+ public enum ItemIcons implements IIconContainer, Runnable {
+ VOID // The Empty Texture
+ , RENDERING_ERROR, WRENCH, MORTAR, CROWBAR,
+ JACKHAMMER, WIRE_CUTTER, KNIFE, BUTCHERYKNIFE,
+ SICKLE, SCOOP, GRAFTER, PLUNGER, ROLLING_PIN,
+ HANDLE_SWORD, HANDLE_FILE, HANDLE_SAW,
+ HANDLE_SCREWDRIVER, HANDLE_BUZZSAW,
+ HANDLE_ELECTRIC_SCREWDRIVER, HANDLE_SOLDERING,
+ POWER_UNIT_LV, POWER_UNIT_MV, POWER_UNIT_HV,
+ DURABILITY_BAR_0, DURABILITY_BAR_1, DURABILITY_BAR_2,
+ DURABILITY_BAR_3, DURABILITY_BAR_4, DURABILITY_BAR_5,
+ DURABILITY_BAR_6, DURABILITY_BAR_7, DURABILITY_BAR_8,
+ ENERGY_BAR_0, ENERGY_BAR_1, ENERGY_BAR_2, ENERGY_BAR_3,
+ ENERGY_BAR_4, ENERGY_BAR_5, ENERGY_BAR_6, ENERGY_BAR_7,
+ ENERGY_BAR_8,
+
+ SKOOKUMCHOOCHER, TURBINE_SMALL, TURBINE_LARGE, TURBINE_HUGE;
+
+ public static final ITexture[] ERROR_RENDERING = new ITexture[]{new GT_RenderedTexture(RENDERING_ERROR)};
+
+ protected IIcon mIcon, mOverlay;
+
+ private ItemIcons() {
+ GregTech_API.sGTItemIconload.add(this);
+ }
+
+ @Override
+ public IIcon getIcon() {
+ return mIcon;
+ }
+
+ @Override
+ public IIcon getOverlayIcon() {
+ return mOverlay;
+ }
+
+ @Override
+ public ResourceLocation getTextureFile() {
+ return TextureMap.locationItemsTexture;
+ }
+
+ @Override
+ public void run() {
+ mIcon = GregTech_API.sItemIcons.registerIcon(CORE.RES_PATH_ITEM + "iconsets/" + this);
+ mOverlay = GregTech_API.sItemIcons.registerIcon(CORE.RES_PATH_ITEM + "iconsets/" + this + "_OVERLAY");
+ }
+
+ public static class CustomIcon implements IIconContainer, Runnable {
+ protected IIcon mIcon, mOverlay;
+ protected String mIconName;
+
+ public CustomIcon(String aIconName) {
+ mIconName = aIconName;
+ GregTech_API.sGTItemIconload.add(this);
+ }
+
+ @Override
+ public IIcon getIcon() {
+ return mIcon;
+ }
+
+ @Override
+ public IIcon getOverlayIcon() {
+ return mOverlay;
+ }
+
+ @Override
+ public void run() {
+ mIcon = GregTech_API.sItemIcons.registerIcon(CORE.RES_PATH_ITEM + mIconName);
+ mOverlay = GregTech_API.sItemIcons.registerIcon(CORE.RES_PATH_ITEM + mIconName + "_OVERLAY");
+ }
+
+ @Override
+ public ResourceLocation getTextureFile() {
+ return TextureMap.locationItemsTexture;
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java
index 93ac3463fb..59480b22ea 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java
@@ -102,6 +102,7 @@ public enum GregtechOrePrefixes {
public final long mMaterialAmount;
private final Collection<Materials> mNotGeneratedItems = new HashSet<Materials>(), mIgnoredMaterials = new HashSet<Materials>(), mGeneratedItems = new HashSet<Materials>();
private final ArrayList<Interface_OreRecipeRegistrator> mOreProcessing = new ArrayList<Interface_OreRecipeRegistrator>();
+ private final ArrayList<Interface_OreRecipeRegistrator> mOreProcessingFake = new ArrayList<Interface_OreRecipeRegistrator>();
public ItemStack mContainerItem = null;
public ICondition<ISubTagContainer> mCondition = null;
public byte mDefaultStackSize = 64;
@@ -228,6 +229,7 @@ public enum GregtechOrePrefixes {
return true;
}
+
public boolean contains(ItemStack aStack) {
if (aStack == null) return false;
for (ItemStack tStack : mPrefixedItems)
@@ -267,6 +269,16 @@ public enum GregtechOrePrefixes {
tRegistrator.registerOre(this, aMaterial, aOreDictName, aModName, GT_Utility.copyAmount(1, aStack));
}
}
+
+ //TODO
+ public void processOre(Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) {
+ if (aMaterial != null && (aMaterial != Materials._NULL || mIsSelfReferencing || !mIsMaterialBased) && GT_Utility.isStackValid(aStack))
+ for (Interface_OreRecipeRegistrator tRegistrator : mOreProcessingFake) {
+ if (D2)
+ GT_Log.ore.println("Processing '" + aOreDictName + "' with the Prefix '" + name() + "' and the Material '" + aMaterial.name() + "' at " + GT_Utility.getClassName(tRegistrator));
+ tRegistrator.registerOre(this, aMaterial, aOreDictName, aModName, GT_Utility.copyAmount(1, aStack));
+ }
+ }
public Object get(Object aMaterial) {
if (aMaterial instanceof GT_Materials) return new GregtechItemData(this, (GT_Materials) aMaterial);
@@ -823,4 +835,5 @@ public enum GregtechOrePrefixes {
}
+
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_OreRecipeRegistrator.java b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_OreRecipeRegistrator.java
index f1583764f7..d4e37ee476 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_OreRecipeRegistrator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_OreRecipeRegistrator.java
@@ -1,5 +1,6 @@
package gtPlusPlus.xmod.gregtech.api.interfaces.internal;
+import gregtech.api.enums.Materials;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials;
import net.minecraft.item.ItemStack;
@@ -13,4 +14,6 @@ public interface Interface_OreRecipeRegistrator {
* @param aStack always != null
*/
public void registerOre(GregtechOrePrefixes aPrefix, GT_Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack);
+
+ public void registerOre(GregtechOrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack copyAmount);
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java b/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java
index 64f612ad61..5777e8de03 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java
@@ -5,9 +5,18 @@ import gregtech.api.enums.ConfigCategories;
import gregtech.api.enums.Dyes;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Materials;
+import gregtech.api.enums.OreDictNames;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.SubTag;
+import gregtech.api.enums.TC_Aspects;
+import gregtech.api.enums.ToolDictNames;
+import gregtech.api.objects.ItemData;
+import gregtech.api.objects.MaterialStack;
import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_Log;
+import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_RecipeRegistrator;
import gregtech.api.util.GT_Utility;
import gregtech.common.GT_Proxy.OreDictEventContainer;
import gtPlusPlus.core.lib.CORE;
@@ -19,10 +28,12 @@ import gtPlusPlus.xmod.gregtech.api.util.GregtechOreDictUnificator;
import gtPlusPlus.xmod.gregtech.api.util.GregtechRecipeRegistrator;
import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechItems;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.List;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemBlock;
@@ -39,7 +50,7 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
public class Meta_GT_Proxy {
//Silly Vars
- private static final Collection<String> mIgnoredItems = new HashSet(Arrays.asList(new String[]{"itemGhastTear", "itemFlint", "itemClay", "itemBucketSaltWater",
+ private static final Collection<String> mIgnoredItems = new HashSet<String>(Arrays.asList(new String[]{"itemGhastTear", "itemFlint", "itemClay", "itemBucketSaltWater",
"itemBucketFreshWater", "itemBucketWater", "itemRock", "itemReed", "itemArrow", "itemSaw", "itemKnife", "itemHammer", "itemChisel", "itemRubber",
"itemEssence", "itemIlluminatedPanel", "itemSkull", "itemRawRubber", "itemBacon", "itemJetpackAccelerator", "itemLazurite", "itemIridium",
"itemTear", "itemClaw", "itemFertilizer", "itemTar", "itemSlimeball", "itemCoke", "itemBeeswax", "itemBeeQueen", "itemForcicium", "itemForcillium",
@@ -50,7 +61,7 @@ public class Meta_GT_Proxy {
"itemWhippingCream", "itemGlisteningWhippingCream", "itemCleaver", "itemHerbalMedicineWhippingCream", "itemStrangeWhippingCream",
"itemBlazeCleaver", "itemBakedCakeSponge", "itemMagmaCake", "itemGlisteningCake", "itemOgreCleaver", "itemFishandPumpkinCake",
"itemMagmaWhippingCream", "itemMultimeter", "itemSuperconductor"}));
- private static final Collection<String> mIgnoredNames = new HashSet(Arrays.asList(new String[]{"grubBee", "chainLink", "candyCane", "bRedString", "bVial",
+ private static final Collection<String> mIgnoredNames = new HashSet<String>(Arrays.asList(new String[]{"grubBee", "chainLink", "candyCane", "bRedString", "bVial",
"bFlask", "anorthositeSmooth", "migmatiteSmooth", "slateSmooth", "travertineSmooth", "limestoneSmooth", "orthogneissSmooth", "marbleSmooth",
"honeyDrop", "lumpClay", "honeyEqualssugar", "flourEqualswheat", "bluestoneInsulated", "blockWaterstone", "blockSand", "blockTorch",
"blockPumpkin", "blockClothRock", "blockStainedHardenedClay", "blockQuartzPillar", "blockQuartzChiselled", "blockSpawner", "blockCloth", "mobHead",
@@ -68,7 +79,7 @@ public class Meta_GT_Proxy {
"antiBlock", "burntQuartz", "salmonRaw", "blockHopper", "blockEnderObsidian", "blockIcestone", "blockMagicWood", "blockEnderCore", "blockHeeEndium",
"oreHeeEndPowder", "oreHeeStardust", "oreHeeIgneousRock", "oreHeeInstabilityOrb", "crystalPureFluix", "shardNether", "gemFluorite",
"stickObsidian", "caveCrystal", "shardCrystal", "dyeCrystal","shardFire","shardWater","shardAir","shardEarth","ingotRefinedIron","blockMarble","ingotUnstable"}));
- private static final Collection<String> mInvalidNames = new HashSet(Arrays.asList(new String[]{"diamondShard", "redstoneRoot", "obsidianStick", "bloodstoneOre",
+ private static final Collection<String> mInvalidNames = new HashSet<String>(Arrays.asList(new String[]{"diamondShard", "redstoneRoot", "obsidianStick", "bloodstoneOre",
"universalCable", "bronzeTube", "ironTube", "netherTube", "obbyTube", "infiniteBattery", "eliteBattery", "advancedBattery", "10kEUStore",
"blueDye", "MonazitOre", "quartzCrystal", "whiteLuminiteCrystal", "darkStoneIngot", "invisiumIngot", "demoniteOrb", "enderGem", "starconiumGem",
"osmoniumIngot", "tapaziteGem", "zectiumIngot", "foolsRubyGem", "rubyGem", "meteoriteGem", "adamiteShard", "sapphireGem", "copperIngot",
@@ -83,14 +94,15 @@ public class Meta_GT_Proxy {
"redalloyInsulated", "infusedteslatiteBundled"}));
public static boolean mOreDictActivated = false;
public static boolean mSortToTheEnd = true;
- public final static HashSet<ItemStack> mRegisteredOres = new HashSet(10000);
- public final static Collection<GregtechOreDictEventContainer> mEvents = new HashSet();
+ public final static HashSet<ItemStack> mRegisteredOres = new HashSet<ItemStack>(10000);
+ public final static Collection<GregtechOreDictEventContainer> mEvents = new HashSet<GregtechOreDictEventContainer>();
+ public final static Collection<OreDictEventContainer> mEventsFake = new HashSet<OreDictEventContainer>();
public Meta_GT_Proxy() {
Utils.LOG_INFO("GT_PROXY - initialized.");
for (String tOreName : OreDictionary.getOreNames()) {
ItemStack tOreStack;
- for (Iterator i$ = OreDictionary.getOres(tOreName).iterator(); i$.hasNext(); registerOre(new OreDictionary.OreRegisterEvent(tOreName, tOreStack))) {
+ for (Iterator<?> i$ = OreDictionary.getOres(tOreName).iterator(); i$.hasNext(); registerOre(new OreDictionary.OreRegisterEvent(tOreName, tOreStack))) {
tOreStack = (ItemStack) i$.next();
}
}
@@ -164,7 +176,7 @@ public class Meta_GT_Proxy {
}
@SubscribeEvent
- public static void registerOre(OreDictionary.OreRegisterEvent aEvent) {
+ public static void registerOre2(OreDictionary.OreRegisterEvent aEvent) {
ModContainer tContainer = Loader.instance().activeModContainer();
String aMod = tContainer == null ? "UNKNOWN" : tContainer.getModId();
String aOriginalMod = aMod;
@@ -261,7 +273,7 @@ public class Meta_GT_Proxy {
}
if (aMaterial != GT_Materials._NULL) {
GT_Materials tReRegisteredMaterial;
- for (Iterator i$ = aMaterial.mOreReRegistrations.iterator(); i$.hasNext(); GregtechOreDictUnificator.registerOre(aPrefix,
+ for (Iterator<?> i$ = aMaterial.mOreReRegistrations.iterator(); i$.hasNext(); GregtechOreDictUnificator.registerOre(aPrefix,
tReRegisteredMaterial, aEvent.Ore)) {
tReRegisteredMaterial = (GT_Materials) i$.next();
}
@@ -356,6 +368,8 @@ public class Meta_GT_Proxy {
// System.out.println("Thingy Name: "+ aOre.mEvent.Name+ " !!!Unknown 'Thingy' detected!!! This Object seems to probably not follow a valid OreDictionary Convention, or I missed a Convention. Please report to GregTech Intergalactical for additional compatiblity. This is not an Error, an Issue nor a Lag Source, it is just an Information, which you should pass to me.");
}
}
+
+
public static void registerUnificationEntries() {
GregTech_API.sUnification.mConfig.save();
@@ -392,9 +406,19 @@ public class Meta_GT_Proxy {
public static void activateOreDictHandler() {
mOreDictActivated = true;
GregtechOreDictEventContainer tEvent;
- for (Iterator i$ = mEvents.iterator(); i$.hasNext(); registerRecipes(tEvent)) {
+ if (mEvents.size() == 0){
+ Utils.LOG_INFO("Found nothing to iterate over for use in material addition.");
+ }
+ for (Iterator<GregtechOreDictEventContainer> i$ = mEvents.iterator(); i$.hasNext(); registerRecipes(tEvent)) {
tEvent = (GregtechOreDictEventContainer) i$.next();
}
+ OreDictEventContainer tEvent2;
+ if (mEventsFake.size() == 0){
+ Utils.LOG_INFO("Found nothing to iterate over for use in GT material addition.");
+ }
+ for (Iterator<OreDictEventContainer> i$ = mEventsFake.iterator(); i$.hasNext(); registerRecipes(tEvent2)) {
+ tEvent2 = (OreDictEventContainer) i$.next();
+ }
}
@@ -425,5 +449,458 @@ public class Meta_GT_Proxy {
return false;
}
}
+
+
+
+
+
+
+ @SubscribeEvent
+ public void registerOre(OreDictionary.OreRegisterEvent aEvent) {
+ ModContainer tContainer = Loader.instance().activeModContainer();
+ String aMod = tContainer == null ? "UNKNOWN" : tContainer.getModId();
+ String aOriginalMod = aMod;
+ if (GT_OreDictUnificator.isRegisteringOres()) {
+ aMod = "gregtech";
+ } else if (aMod.equals("gregtech")) {
+ aMod = "UNKNOWN";
+ }
+ if ((aEvent == null) || (aEvent.Ore == null) || (aEvent.Ore.getItem() == null) || (aEvent.Name == null) || (aEvent.Name.isEmpty())
+ || (aEvent.Name.replaceAll("_", "").length() - aEvent.Name.length() == 9)) {
+ if (aOriginalMod.equals("gregtech")) {
+ aOriginalMod = "UNKNOWN";
+ }
+ GT_Log.ore
+ .println(aOriginalMod
+ + " did something very bad! The registration is too invalid to even be shown properly. This happens only if you register null, invalid Items, empty Strings or even nonexisting Events to the OreDict.");
+ throw new IllegalArgumentException(
+ aOriginalMod
+ + " did something very bad! The registration is too invalid to even be shown properly. This happens only if you register null, invalid Items, empty Strings or even nonexisting Events to the OreDict.");
+ }
+ try {
+ aEvent.Ore.stackSize = 1;
+ if (true || aEvent.Ore.getUnlocalizedName().startsWith("item.oreberry")) {
+ if ((aOriginalMod.toLowerCase().contains("xycraft")) || (aOriginalMod.toLowerCase().contains("tconstruct"))
+ || ((aOriginalMod.toLowerCase().contains("natura")) && (!aOriginalMod.toLowerCase().contains("natural")))) {
+ if (GT_Values.D1) {
+ GT_Log.ore.println(aMod + " -> " + aEvent.Name + " is getting ignored, because of racism. :P");
+ }
+ return;
+ }
+ }
+ String tModToName = aMod + " -> " + aEvent.Name;
+ if ((mOreDictActivated) || (GregTech_API.sPostloadStarted) || ((mSortToTheEnd) && (GregTech_API.sLoadFinished))) {
+ tModToName = aOriginalMod + " --Late--> " + aEvent.Name;
+ }
+ if (((aEvent.Ore.getItem() instanceof ItemBlock)) || (GT_Utility.getBlockFromStack(aEvent.Ore) != Blocks.air)) {
+ GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
+ }
+ mRegisteredOres.add(aEvent.Ore);
+ if ((aEvent.Name.startsWith("item")) && (mIgnoredItems.contains(aEvent.Name))) {
+ GT_Log.ore.println(tModToName);
+ if (aEvent.Name.equals("itemCopperWire")) {
+ GT_OreDictUnificator.registerOre(OreDictNames.craftingWireCopper, aEvent.Ore);
+ }
+ if (aEvent.Name.equals("itemRubber")) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.Rubber, aEvent.Ore);
+ }
+ return;
+ }
+ if (mIgnoredNames.contains(aEvent.Name)) {
+ GT_Log.ore.println(tModToName + " is getting ignored via hardcode.");
+ return;
+ }
+ if (aEvent.Name.equals("stone")) {
+ GT_OreDictUnificator.registerOre("stoneSmooth", aEvent.Ore);
+ return;
+ }
+ if (aEvent.Name.equals("cobblestone")) {
+ GT_OreDictUnificator.registerOre("stoneCobble", aEvent.Ore);
+ return;
+ }
+ if ((aEvent.Name.contains("|")) || (aEvent.Name.contains("*")) || (aEvent.Name.contains(":")) || (aEvent.Name.contains("."))
+ || (aEvent.Name.contains("$"))) {
+ GT_Log.ore.println(tModToName + " is using a private Prefix and is therefor getting ignored properly.");
+ return;
+ }
+ if (aEvent.Name.equals("copperWire")) {
+ GT_OreDictUnificator.registerOre(OreDictNames.craftingWireCopper, aEvent.Ore);
+ }
+ if (aEvent.Name.equals("oreHeeEndrium")) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.ore, Materials.Endium, aEvent.Ore);
+ }
+ if (aEvent.Name.equals("sheetPlastic")) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.plate, Materials.Plastic, aEvent.Ore);
+ }
+ if (aEvent.Name.equals("shardAir")) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedAir, aEvent.Ore);
+ return;
+ }
+ if (aEvent.Name.equals("shardWater")) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedWater, aEvent.Ore);
+ return;
+ }
+ if (aEvent.Name.equals("shardFire")) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedFire, aEvent.Ore);
+ return;
+ }
+ if (aEvent.Name.equals("shardEarth")) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedEarth, aEvent.Ore);
+ return;
+ }
+ if (aEvent.Name.equals("shardOrder")) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedOrder, aEvent.Ore);
+ return;
+ }
+ if (aEvent.Name.equals("shardEntropy")) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedEntropy, aEvent.Ore);
+ return;
+ }
+ if (aEvent.Name.equals("fieryIngot")) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.FierySteel, aEvent.Ore);
+ return;
+ }
+ if (aEvent.Name.equals("ironwood")) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.IronWood, aEvent.Ore);
+ return;
+ }
+ if (aEvent.Name.equals("steeleaf")) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.Steeleaf, aEvent.Ore);
+ return;
+ }
+ if (aEvent.Name.equals("knightmetal")) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.Knightmetal, aEvent.Ore);
+ return;
+ }
+ if (aEvent.Name.contains(" ")) {
+ GT_Log.ore.println(tModToName + " is getting re-registered because the OreDict Name containing invalid spaces.");
+ GT_OreDictUnificator.registerOre(aEvent.Name.replaceAll(" ", ""), GT_Utility.copyAmount(1L, new Object[]{aEvent.Ore}));
+ aEvent.Ore.setStackDisplayName("Invalid OreDictionary Tag");
+ return;
+ }
+ if (mInvalidNames.contains(aEvent.Name)) {
+ GT_Log.ore.println(tModToName + " is wrongly registered and therefor getting ignored.");
+
+ return;
+ }
+ OrePrefixes aPrefix = OrePrefixes.getOrePrefix(aEvent.Name);
+ Materials aMaterial = Materials._NULL;
+ if ((aPrefix == OrePrefixes.nugget) && (aMod.equals("Thaumcraft")) && (aEvent.Ore.getItem().getUnlocalizedName().contains("ItemResource"))) {
+ return;
+ }
+ if (aPrefix == null) {
+ if (aEvent.Name.toLowerCase().equals(aEvent.Name)) {
+ GT_Log.ore.println(tModToName + " is invalid due to being solely lowercased.");
+ return;
+ }
+ if (aEvent.Name.toUpperCase().equals(aEvent.Name)) {
+ GT_Log.ore.println(tModToName + " is invalid due to being solely uppercased.");
+ return;
+ }
+ if (Character.isUpperCase(aEvent.Name.charAt(0))) {
+ GT_Log.ore.println(tModToName + " is invalid due to the first character being uppercased.");
+ }
+ } else {
+ if (aPrefix.mDontUnificateActively) {
+ GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
+ }
+ if (aPrefix != aPrefix.mPrefixInto) {
+ String tNewName = aEvent.Name.replaceFirst(aPrefix.toString(), aPrefix.mPrefixInto.toString());
+ if (!GT_OreDictUnificator.isRegisteringOres()) {
+ GT_Log.ore.println(tModToName + " uses a depricated Prefix, and is getting re-registered as " + tNewName);
+ }
+ GT_OreDictUnificator.registerOre(tNewName, aEvent.Ore);
+ return;
+ }
+ String tName = aEvent.Name.replaceFirst(aPrefix.toString(), "");
+ if (tName.length() > 0) {
+ char firstChar = tName.charAt(0);
+ if (Character.isUpperCase(firstChar) || Character.isLowerCase(firstChar) || firstChar == '_') {
+ if (aPrefix.mIsMaterialBased) {
+ aMaterial = Materials.get(tName);
+ if (aMaterial != aMaterial.mMaterialInto) {
+ GT_OreDictUnificator.registerOre(aPrefix, aMaterial.mMaterialInto, aEvent.Ore);
+ if (!GT_OreDictUnificator.isRegisteringOres()) {
+ GT_Log.ore.println(tModToName + " uses a deprecated Material and is getting re-registered as "
+ + aPrefix.get(aMaterial.mMaterialInto));
+ }
+ return;
+ }
+ if (!aPrefix.isIgnored(aMaterial)) {
+ aPrefix.add(GT_Utility.copyAmount(1L, new Object[]{aEvent.Ore}));
+ }
+ if (aMaterial != Materials._NULL) {
+ Materials tReRegisteredMaterial;
+ for (Iterator i$ = aMaterial.mOreReRegistrations.iterator(); i$.hasNext(); GT_OreDictUnificator.registerOre(aPrefix,
+ tReRegisteredMaterial, aEvent.Ore)) {
+ tReRegisteredMaterial = (Materials) i$.next();
+ }
+ aMaterial.add(GT_Utility.copyAmount(1L, new Object[]{aEvent.Ore}));
+ if ((GregTech_API.sThaumcraftCompat != null) && (aPrefix.doGenerateItem(aMaterial)) && (!aPrefix.isIgnored(aMaterial))) {
+ long tAmount = aPrefix.mMaterialAmount < 0L ? 3628800L : aPrefix.mMaterialAmount;
+ List<TC_Aspects.TC_AspectStack> tAspects = new ArrayList();
+ TC_Aspects.TC_AspectStack tAspect;
+ for (Iterator i$ = aPrefix.mAspects.iterator(); i$.hasNext(); tAspect.addToAspectList(tAspects)) {
+ tAspect = (TC_Aspects.TC_AspectStack) i$.next();
+ }
+ tAspect = null;
+ for (Iterator i$ = aMaterial.mAspects.iterator(); i$.hasNext(); tAspect.copy(tAspect.mAmount * tAmount / 3628800L)
+ .addToAspectList(tAspects)) {
+ tAspect = (TC_Aspects.TC_AspectStack) i$.next();
+ }
+ GregTech_API.sThaumcraftCompat.registerThaumcraftAspectsToItem(GT_Utility.copyAmount(1L, new Object[]{aEvent.Ore}),
+ tAspects, aEvent.Name);
+ }
+ switch (aPrefix) {
+ case crystal:
+ if ((aMaterial == Materials.CertusQuartz) || (aMaterial == Materials.NetherQuartz) || (aMaterial == Materials.Fluix)) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.gem, aMaterial, aEvent.Ore);
+ }
+ break;
+ case gem:
+ switch (aMaterial) {
+ case Lapis:
+ case Sodalite:
+ GT_OreDictUnificator.registerOre(Dyes.dyeBlue, aEvent.Ore);
+ break;
+ case Lazurite:
+ GT_OreDictUnificator.registerOre(Dyes.dyeCyan, aEvent.Ore);
+ break;
+ case InfusedAir:
+ case InfusedWater:
+ case InfusedFire:
+ case InfusedEarth:
+ case InfusedOrder:
+ case InfusedEntropy:
+ GT_OreDictUnificator.registerOre(aMaterial.name().replaceFirst("Infused", "shard"), aEvent.Ore);
+ break;
+ case Chocolate:
+ GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
+ break;
+ case CertusQuartz:
+ case NetherQuartz:
+ GT_OreDictUnificator.registerOre(OrePrefixes.item.get(aMaterial), aEvent.Ore);
+ case Fluix:
+ case Quartz:
+ case Quartzite:
+ GT_OreDictUnificator.registerOre(OrePrefixes.crystal, aMaterial, aEvent.Ore);
+ GT_OreDictUnificator.registerOre(OreDictNames.craftingQuartz, aEvent.Ore);
+ default:
+ break;
+ }
+ break;
+ case cableGt01:
+ if (aMaterial == Materials.Tin) {
+ GT_OreDictUnificator.registerOre(OreDictNames.craftingWireTin, aEvent.Ore);
+ }
+ if (aMaterial == Materials.AnyCopper) {
+ GT_OreDictUnificator.registerOre(OreDictNames.craftingWireCopper, aEvent.Ore);
+ }
+ if (aMaterial == Materials.Gold) {
+ GT_OreDictUnificator.registerOre(OreDictNames.craftingWireGold, aEvent.Ore);
+ }
+ if (aMaterial == Materials.AnyIron) {
+ GT_OreDictUnificator.registerOre(OreDictNames.craftingWireIron, aEvent.Ore);
+ }
+ break;
+ case lens:
+ if ((aMaterial.contains(SubTag.TRANSPARENT)) && (aMaterial.mColor != Dyes._NULL)) {
+ GT_OreDictUnificator.registerOre("craftingLens" + aMaterial.mColor.toString().replaceFirst("dye", ""), aEvent.Ore);
+ }
+ break;
+ case plate:
+ if ((aMaterial == Materials.Plastic) || (aMaterial == Materials.Rubber)) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.sheet, aMaterial, aEvent.Ore);
+ }
+ if (aMaterial == Materials.Silicon) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.item, aMaterial, aEvent.Ore);
+ }
+ if (aMaterial == Materials.Wood) {
+ GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
+ GT_OreDictUnificator.registerOre(OrePrefixes.plank, aMaterial, aEvent.Ore);
+ }
+ break;
+ case cell:
+ if (aMaterial == Materials.Empty) {
+ GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
+ }
+ break;
+ case gearGt:
+ GT_OreDictUnificator.registerOre(OrePrefixes.gear, aMaterial, aEvent.Ore);
+ break;
+ case stick:
+ if (!GT_RecipeRegistrator.sRodMaterialList.contains(aMaterial)) {
+ GT_RecipeRegistrator.sRodMaterialList.add(aMaterial);
+ }
+ if (aMaterial == Materials.Wood) {
+ GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
+ }
+ if ((aMaterial == Materials.Tin) || (aMaterial == Materials.Lead) || (aMaterial == Materials.SolderingAlloy)) {
+ GT_OreDictUnificator.registerOre(ToolDictNames.craftingToolSolderingMetal, aEvent.Ore);
+ }
+ break;
+ case dust:
+ if (aMaterial == Materials.Salt) {
+ GT_OreDictUnificator.registerOre("itemSalt", aEvent.Ore);
+ }
+ if (aMaterial == Materials.Wood) {
+ GT_OreDictUnificator.registerOre("pulpWood", aEvent.Ore);
+ }
+ if (aMaterial == Materials.Wheat) {
+ GT_OreDictUnificator.registerOre("foodFlour", aEvent.Ore);
+ }
+ if (aMaterial == Materials.Lapis) {
+ GT_OreDictUnificator.registerOre(Dyes.dyeBlue, aEvent.Ore);
+ }
+ if (aMaterial == Materials.Lazurite) {
+ GT_OreDictUnificator.registerOre(Dyes.dyeCyan, aEvent.Ore);
+ }
+ if (aMaterial == Materials.Sodalite) {
+ GT_OreDictUnificator.registerOre(Dyes.dyeBlue, aEvent.Ore);
+ }
+ if (aMaterial == Materials.Cocoa) {
+ GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
+ GT_OreDictUnificator.registerOre("foodCocoapowder", aEvent.Ore);
+ }
+ if (aMaterial == Materials.Coffee) {
+ GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
+ }
+ if (aMaterial == Materials.BrownLimonite) {
+ GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
+ }
+ if (aMaterial == Materials.YellowLimonite) {
+ GT_OreDictUnificator.registerOre(Dyes.dyeYellow, aEvent.Ore);
+ }
+ break;
+ case ingot:
+ if (aMaterial == Materials.Rubber) {
+ GT_OreDictUnificator.registerOre("itemRubber", aEvent.Ore);
+ }
+ if (aMaterial == Materials.FierySteel) {
+ GT_OreDictUnificator.registerOre("fieryIngot", aEvent.Ore);
+ }
+ if (aMaterial == Materials.IronWood) {
+ GT_OreDictUnificator.registerOre("ironwood", aEvent.Ore);
+ }
+ if (aMaterial == Materials.Steeleaf) {
+ GT_OreDictUnificator.registerOre("steeleaf", aEvent.Ore);
+ }
+ if (aMaterial == Materials.Knightmetal) {
+ GT_OreDictUnificator.registerOre("knightmetal", aEvent.Ore);
+ }
+ if ((aMaterial == Materials.Brass) && (aEvent.Ore.getItemDamage() == 2)
+ && (aEvent.Ore.getUnlocalizedName().equals("item.ingotBrass"))
+ && (new ItemStack(aEvent.Ore.getItem(), 1, 0).getUnlocalizedName().contains("red"))) {
+ GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.RedAlloy, new ItemStack(aEvent.Ore.getItem(), 1, 0));
+ GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.BlueAlloy, new ItemStack(aEvent.Ore.getItem(), 1, 1));
+ GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.Brass, new ItemStack(aEvent.Ore.getItem(), 1, 2));
+ GT_Values.RA.addCutterRecipe(new ItemStack(aEvent.Ore.getItem(), 1, 3), new ItemStack(aEvent.Ore.getItem(), 16, 4),
+ null, 400, 8);
+ }
+ break;
+ default:
+ break;
+ }
+ if (aPrefix.mIsUnificatable && !aMaterial.mUnificatable) {
+ return;
+ }
+ } else {
+ for (Dyes tDye : Dyes.VALUES) {
+ if (aEvent.Name.endsWith(tDye.name().replaceFirst("dye", ""))) {
+ GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
+ GT_Log.ore.println(tModToName + " Oh man, why the fuck would anyone need a OreDictified Color for this, that is even too much for GregTech... do not report this, this is just a random Comment about how ridiculous this is.");
+ return;
+ }
+ }
+ // System.out.println("Material Name: "+aEvent.Name+ " !!!Unknown Material detected!!! Please report to GregTech Intergalactical for additional compatiblity. This is not an Error, an Issue nor a Lag Source, it is just an Information, which you should pass to me.");
+ // GT_Log.ore.println(tModToName + " uses an unknown Material. Report this to GregTech.");
+ return;
+ }
+ } else {
+ aPrefix.add(GT_Utility.copyAmount(1L, new Object[]{aEvent.Ore}));
+ }
+ }
+ } else if (aPrefix.mIsSelfReferencing) {
+ aPrefix.add(GT_Utility.copyAmount(1L, new Object[]{aEvent.Ore}));
+ } else {
+ GT_Log.ore.println(tModToName + " uses a Prefix as full OreDict Name, and is therefor invalid.");
+ aEvent.Ore.setStackDisplayName("Invalid OreDictionary Tag");
+ return;
+ }
+ switch (aPrefix) {
+ case dye:
+ if (GT_Utility.isStringValid(tName)) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.dye, aEvent.Ore);
+ }
+ break;
+ case stoneSmooth:
+ GT_OreDictUnificator.registerOre("stone", aEvent.Ore);
+ break;
+ case stoneCobble:
+ GT_OreDictUnificator.registerOre("cobblestone", aEvent.Or