aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/GT_Proxy.java
diff options
context:
space:
mode:
authorRaven Szewczyk <git@eigenraven.me>2022-08-27 10:19:57 +0100
committerGitHub <noreply@github.com>2022-08-27 11:19:57 +0200
commit6f31720697bcc351421a4d86ba3bf749375dd12c (patch)
tree3adf8f318f22c892d74cd7c9d30b6dd3f11f11bd /src/main/java/gregtech/common/GT_Proxy.java
parentc3eac50decd33ee2be8703dfb2ecf9cdc31c2b67 (diff)
downloadGT5-Unofficial-6f31720697bcc351421a4d86ba3bf749375dd12c.tar.gz
GT5-Unofficial-6f31720697bcc351421a4d86ba3bf749375dd12c.tar.bz2
GT5-Unofficial-6f31720697bcc351421a4d86ba3bf749375dd12c.zip
Update buildscript & apply spotless (#1306)
* Update dependencies * Update buildscript, apply spotless
Diffstat (limited to 'src/main/java/gregtech/common/GT_Proxy.java')
-rw-r--r--src/main/java/gregtech/common/GT_Proxy.java1798
1 files changed, 1331 insertions, 467 deletions
diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java
index b222ba1570..0a529cfa3b 100644
--- a/src/main/java/gregtech/common/GT_Proxy.java
+++ b/src/main/java/gregtech/common/GT_Proxy.java
@@ -1,5 +1,14 @@
package gregtech.common;
+import static gregtech.GT_Mod.GT_FML_LOGGER;
+import static gregtech.api.enums.GT_Values.MOD_ID_RC;
+import static gregtech.api.enums.GT_Values.MOD_ID_TC;
+import static gregtech.api.enums.GT_Values.MOD_ID_TE;
+import static gregtech.api.enums.GT_Values.MOD_ID_TF;
+import static gregtech.api.enums.GT_Values.W;
+import static gregtech.api.enums.GT_Values.debugEntityCramming;
+import static gregtech.api.util.GT_Util.LAST_BROKEN_TILEENTITY;
+
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.IFuelHandler;
import cpw.mods.fml.common.Loader;
@@ -60,6 +69,25 @@ import gregtech.common.gui.GT_ContainerVolumetricFlask;
import gregtech.common.gui.GT_GUIContainerVolumetricFlask;
import gregtech.common.items.GT_MetaGenerated_Item_98;
import gregtech.common.items.GT_MetaGenerated_Tool_01;
+import java.io.File;
+import java.lang.reflect.InvocationTargetException;
+import java.text.DateFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Date;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.UUID;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.locks.ReentrantLock;
+import java.util.stream.Collectors;
import net.minecraft.block.Block;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
@@ -110,40 +138,14 @@ import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;
import org.apache.commons.lang3.text.WordUtils;
-import java.io.File;
-import java.lang.reflect.InvocationTargetException;
-import java.text.DateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Date;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.UUID;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.locks.ReentrantLock;
-import java.util.stream.Collectors;
-
-import static gregtech.GT_Mod.GT_FML_LOGGER;
-import static gregtech.api.enums.GT_Values.MOD_ID_RC;
-import static gregtech.api.enums.GT_Values.MOD_ID_TC;
-import static gregtech.api.enums.GT_Values.MOD_ID_TE;
-import static gregtech.api.enums.GT_Values.MOD_ID_TF;
-import static gregtech.api.enums.GT_Values.W;
-import static gregtech.api.enums.GT_Values.debugEntityCramming;
-import static gregtech.api.util.GT_Util.LAST_BROKEN_TILEENTITY;
-
-
public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IGlobalWirelessEnergy {
- private static final EnumSet<OreGenEvent.GenerateMinable.EventType> PREVENTED_ORES = EnumSet.of(OreGenEvent.GenerateMinable.EventType.COAL,
- OreGenEvent.GenerateMinable.EventType.IRON, OreGenEvent.GenerateMinable.EventType.GOLD,
- OreGenEvent.GenerateMinable.EventType.DIAMOND, OreGenEvent.GenerateMinable.EventType.REDSTONE, OreGenEvent.GenerateMinable.EventType.LAPIS,
+ private static final EnumSet<OreGenEvent.GenerateMinable.EventType> PREVENTED_ORES = EnumSet.of(
+ OreGenEvent.GenerateMinable.EventType.COAL,
+ OreGenEvent.GenerateMinable.EventType.IRON,
+ OreGenEvent.GenerateMinable.EventType.GOLD,
+ OreGenEvent.GenerateMinable.EventType.DIAMOND,
+ OreGenEvent.GenerateMinable.EventType.REDSTONE,
+ OreGenEvent.GenerateMinable.EventType.LAPIS,
OreGenEvent.GenerateMinable.EventType.QUARTZ);
public final HashSet<ItemStack> mRegisteredOres = new HashSet<>(10000);
public final ArrayList<String> mSoundNames = new ArrayList<>();
@@ -151,48 +153,343 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
public final ArrayList<Integer> mSoundCounts = new ArrayList<>();
private final Collection<OreDictEventContainer> mEvents = new HashSet<>();
private final Collection<String> mIgnoredItems = new HashSet<>(Arrays.asList(
- "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",
- "itemRoyalJelly", "itemHoneydew", "itemHoney", "itemPollen", "itemReedTypha", "itemSulfuricAcid", "itemPotash", "itemCompressedCarbon",
- "itemBitumen", "itemBioFuel", "itemCokeSugar", "itemCokeCactus", "itemCharcoalSugar", "itemCharcoalCactus", "itemSludge", "itemEnrichedAlloy",
- "itemQuicksilver", "itemMercury", "itemOsmium", "itemUltimateCircuit", "itemEnergizedStar", "itemAntimatterMolecule", "itemAntimatterGlob",
- "itemCoal", "itemBoat", "itemHerbalMedicineCake", "itemCakeSponge", "itemFishandPumpkinCakeSponge", "itemSoulCleaver", "itemInstantCake",
- "itemWhippingCream", "itemGlisteningWhippingCream", "itemCleaver", "itemHerbalMedicineWhippingCream", "itemStrangeWhippingCream",
- "itemBlazeCleaver", "itemBakedCakeSponge", "itemMagmaCake", "itemGlisteningCake", "itemOgreCleaver", "itemFishandPumpkinCake",
- "itemMagmaWhippingCream", "itemMultimeter", "itemSuperconductor"));
- private final Collection<String> mIgnoredNames = new HashSet<>(Arrays.asList("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",
- "mobEgg", "enderFlower", "enderChest", "clayHardened", "dayGemMaterial", "nightGemMaterial", "snowLayer", "bPlaceholder", "hardenedClay",
- "eternalLifeEssence", "sandstone", "wheatRice", "transdimBlock", "bambooBasket", "lexicaBotania", "livingwoodTwig", "redstoneCrystal",
- "pestleAndMortar", "glowstone", "whiteStone", "stoneSlab", "transdimBlock", "clayBowl", "clayPlate", "ceramicBowl", "ceramicPlate", "ovenRack",
- "clayCup", "ceramicCup", "batteryBox", "transmutationStone", "torchRedstoneActive", "coal", "charcoal", "cloth", "cobblestoneSlab",
- "stoneBrickSlab", "cobblestoneWall", "stoneBrickWall", "cobblestoneStair", "stoneBrickStair", "blockCloud", "blockDirt", "blockTyrian",
- "blockCarpet", "blockFft", "blockLavastone", "blockHolystone", "blockConcrete", "sunnariumPart", "brSmallMachineCyaniteProcessor", "meteoriteCoal",
- "blockCobble", "pressOreProcessor", "crusherOreProcessor", "grinderOreProcessor", "blockRubber", "blockHoney", "blockHoneydew", "blockPeat",
- "blockRadioactive", "blockSlime", "blockCocoa", "blockSugarCane", "blockLeather", "blockClayBrick", "solarPanelHV", "cableRedNet", "stoneBowl",
- "crafterWood", "taintedSoil", "brickXyEngineering", "breederUranium", "wireMill", "chunkLazurite", "aluminumNatural", "aluminiumNatural",
- "naturalAluminum", "naturalAluminium", "antimatterMilligram", "antimatterGram", "strangeMatter", "coalGenerator", "electricFurnace",
- "unfinishedTank", "valvePart", "aquaRegia", "leatherSeal", "leatherSlimeSeal", "hambone", "slimeball", "clay", "enrichedUranium", "camoPaste",
- "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 final Collection<String> mInvalidNames = new HashSet<>(Arrays.asList("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",
- "ironStick", "goldStick", "diamondStick", "reinforcedStick", "draconicStick", "emeraldStick", "copperStick", "tinStick", "silverStick",
- "bronzeStick", "steelStick", "leadStick", "manyullynStick", "arditeStick", "cobaltStick", "aluminiumStick", "alumiteStick", "oilsandsOre",
- "copperWire", "superconductorWire", "sulfuricAcid", "conveyorBelt", "ironWire", "aluminumWire", "aluminiumWire", "silverWire", "tinWire",
- "dustSiliconSmall", "AluminumOre", "plateHeavyT2", "blockWool", "alloyPlateEnergizedHardened", "gasWood", "alloyPlateEnergized", "SilverOre",
- "LeadOre", "TinOre", "CopperOre", "silverOre", "leadOre", "tinOre", "copperOre", "bauxiteOre", "HSLivingmetalIngot", "oilMoving", "oilStill",
- "oilBucket", "petroleumOre", "dieselFuel", "diamondNugget", "planks", "wood", "stick", "sticks", "naquadah", "obsidianRod", "stoneRod",
- "thaumiumRod", "steelRod", "netherrackRod", "woodRod", "ironRod", "cactusRod", "flintRod", "copperRod", "cobaltRod", "alumiteRod", "blueslimeRod",
- "arditeRod", "manyullynRod", "bronzeRod", "boneRod", "slimeRod", "redalloyBundled", "bluestoneBundled", "infusedteslatiteInsulated",
- "redalloyInsulated", "infusedteslatiteBundled"));
+ "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",
+ "itemRoyalJelly",
+ "itemHoneydew",
+ "itemHoney",
+ "itemPollen",
+ "itemReedTypha",
+ "itemSulfuricAcid",
+ "itemPotash",
+ "itemCompressedCarbon",
+ "itemBitumen",
+ "itemBioFuel",
+ "itemCokeSugar",
+ "itemCokeCactus",
+ "itemCharcoalSugar",
+ "itemCharcoalCactus",
+ "itemSludge",
+ "itemEnrichedAlloy",
+ "itemQuicksilver",
+ "itemMercury",
+ "itemOsmium",
+ "itemUltimateCircuit",
+ "itemEnergizedStar",
+ "itemAntimatterMolecule",
+ "itemAntimatterGlob",
+ "itemCoal",
+ "itemBoat",
+ "itemHerbalMedicineCake",
+ "itemCakeSponge",
+ "itemFishandPumpkinCakeSponge",
+ "itemSoulCleaver",
+ "itemInstantCake",
+ "itemWhippingCream",
+ "itemGlisteningWhippingCream",
+ "itemCleaver",
+ "itemHerbalMedicineWhippingCream",
+ "itemStrangeWhippingCream",
+ "itemBlazeCleaver",
+ "itemBakedCakeSponge",
+ "itemMagmaCake",
+ "itemGlisteningCake",
+ "itemOgreCleaver",
+ "itemFishandPumpkinCake",
+ "itemMagmaWhippingCream",
+ "itemMultimeter",
+ "itemSuperconductor"));
+ private final Collection<String> mIgnoredNames = new HashSet<>(Arrays.asList(
+ "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",
+ "mobEgg",
+ "enderFlower",
+ "enderChest",
+ "clayHardened",
+ "dayGemMaterial",
+ "nightGemMaterial",
+ "snowLayer",
+ "bPlaceholder",
+ "hardenedClay",
+ "eternalLifeEssence",
+ "sandstone",
+ "wheatRice",
+ "transdimBlock",
+ "bambooBasket",
+ "lexicaBotania",
+ "livingwoodTwig",
+ "redstoneCrystal",
+ "pestleAndMortar",
+ "glowstone",
+ "whiteStone",
+ "stoneSlab",
+ "transdimBlock",
+ "clayBowl",
+ "clayPlate",
+ "ceramicBowl",
+ "ceramicPlate",
+ "ovenRack",
+ "clayCup",
+ "ceramicCup",
+ "batteryBox",
+ "transmutationStone",
+ "torchRedstoneActive",
+ "coal",
+ "charcoal",
+ "cloth",
+ "cobblestoneSlab",
+ "stoneBrickSlab",
+ "cobblestoneWall",
+ "stoneBrickWall",
+ "cobblestoneStair",
+ "stoneBrickStair",
+ "blockCloud",
+ "blockDirt",
+ "blockTyrian",
+ "blockCarpet",
+ "blockFft",
+ "blockLavastone",
+ "blockHolystone",
+ "blockConcrete",
+ "sunnariumPart",
+ "brSmallMachineCyaniteProcessor",
+ "meteoriteCoal",
+ "blockCobble",
+ "pressOreProcessor",
+ "crusherOreProcessor",
+ "grinderOreProcessor",
+ "blockRubber",
+ "blockHoney",
+ "blockHoneydew",
+ "blockPeat",
+ "blockRadioactive",
+ "blockSlime",
+ "blockCocoa",
+ "blockSugarCane",
+ "blockLeather",
+ "blockClayBrick",
+ "solarPanelHV",
+ "cableRedNet",
+ "stoneBowl",
+ "crafterWood",
+ "taintedSoil",
+ "brickXyEngineering",
+ "breederUranium",
+ "wireMill",
+ "chunkLazurite",
+ "aluminumNatural",
+ "aluminiumNatural",
+ "naturalAluminum",
+ "naturalAluminium",
+ "antimatterMilligram",
+ "antimatterGram",
+ "strangeMatter",
+ "coalGenerator",
+ "electricFurnace",
+ "unfinishedTank",
+ "valvePart",
+ "aquaRegia",
+ "leatherSeal",
+ "leatherSlimeSeal",
+ "hambone",
+ "slimeball",
+ "clay",
+ "enrichedUranium",
+ "camoPaste",
+ "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 final Collection<String> mInvalidNames = new HashSet<>(Arrays.asList(
+ "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",
+ "ironStick",
+ "goldStick",
+ "diamondStick",
+ "reinforcedStick",
+ "draconicStick",
+ "emeraldStick",
+ "copperStick",
+ "tinStick",
+ "silverStick",
+ "bronzeStick",
+ "steelStick",
+ "leadStick",
+ "manyullynStick",
+ "arditeStick",
+ "cobaltStick",
+ "aluminiumStick",
+ "alumiteStick",
+ "oilsandsOre",
+ "copperWire",
+ "superconductorWire",
+ "sulfuricAcid",
+ "conveyorBelt",
+ "ironWire",
+ "aluminumWire",
+ "aluminiumWire",
+ "silverWire",
+ "tinWire",
+ "dustSiliconSmall",
+ "AluminumOre",
+ "plateHeavyT2",
+ "blockWool",
+ "alloyPlateEnergizedHardened",
+ "gasWood",
+ "alloyPlateEnergized",
+ "SilverOre",
+ "LeadOre",
+ "TinOre",
+ "CopperOre",
+ "silverOre",
+ "leadOre",
+ "tinOre",
+ "copperOre",
+ "bauxiteOre",
+ "HSLivingmetalIngot",
+ "oilMoving",
+ "oilStill",
+ "oilBucket",
+ "petroleumOre",
+ "dieselFuel",
+ "diamondNugget",
+ "planks",
+ "wood",
+ "stick",
+ "sticks",
+ "naquadah",
+ "obsidianRod",
+ "stoneRod",
+ "thaumiumRod",
+ "steelRod",
+ "netherrackRod",
+ "woodRod",
+ "ironRod",
+ "cactusRod",
+ "flintRod",
+ "copperRod",
+ "cobaltRod",
+ "alumiteRod",
+ "blueslimeRod",
+ "arditeRod",
+ "manyullynRod",
+ "bronzeRod",
+ "boneRod",
+ "slimeRod",
+ "redalloyBundled",
+ "bluestoneBundled",
+ "infusedteslatiteInsulated",
+ "redalloyInsulated",
+ "infusedteslatiteBundled"));
private final DateFormat mDateFormat = DateFormat.getInstance();
public ArrayList<String> mBufferedPlayerActivity = new ArrayList<>();
public final GT_BlockMap<Boolean> mCTMBlockCache = new GT_BlockMap<>();
@@ -222,7 +519,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
private boolean isFirstServerWorldTick = true;
private boolean isFirstWorldTick = true;
private boolean mOreDictActivated = false;
- public boolean mChangeHarvestLevels=false;
+ public boolean mChangeHarvestLevels = false;
public boolean mNerfedCombs = true;
public boolean mNerfedCrops = true;
public boolean mGTBees = true;
@@ -236,9 +533,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
public int mFlintChance = 30;
public int mItemDespawnTime = 6000;
public int mUpgradeCount = 4;
- public int[] mHarvestLevel= new int[1000];
- public int mGraniteHavestLevel=3;
- public int mMaxHarvestLevel=7;
+ public int[] mHarvestLevel = new int[1000];
+ public int mGraniteHavestLevel = 3;
+ public int mMaxHarvestLevel = 7;
public int mWireHeatingTicks = 4;
public int mPollutionSmogLimit = 550000;
public int mPollutionPoisonLimit = 750000;
@@ -255,7 +552,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
public int mPollutionLargeSteelBoilerPerSecond = 2000;
public int mPollutionLargeTitaniumBoilerPerSecond = 3000;
public int mPollutionLargeTungstenSteelBoilerPerSecond = 4000;
- public double mPollutionReleasedByThrottle = 1.0/24.0; // divided by 24 because 24 circuit conf
+ public double mPollutionReleasedByThrottle = 1.0 / 24.0; // divided by 24 because 24 circuit conf
public int mPollutionLargeGasTurbinePerSecond = 300;
public int mPollutionMultiSmelterPerSecond = 400;
public int mPollutionPyrolyseOvenPerSecond = 300;
@@ -263,9 +560,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
public int mPollutionHighPressureLavaBoilerPerSecond = 20;
public int mPollutionHighPressureCoalBoilerPerSecond = 30;
public int mPollutionBaseDieselGeneratorPerSecond = 200;
- public double[] mPollutionDieselGeneratorReleasedByTier = new double[]{0.1, 1.0, 0.9, 0.8};
+ public double[] mPollutionDieselGeneratorReleasedByTier = new double[] {0.1, 1.0, 0.9, 0.8};
public int mPollutionBaseGasTurbinePerSecond = 200;
- public double[] mPollutionGasTurbineReleasedByTier = new double[]{0.1, 1.0, 0.9, 0.8};
+ public double[] mPollutionGasTurbineReleasedByTier = new double[] {0.1, 1.0, 0.9, 0.8};
public final GT_UO_DimensionList mUndergroundOil = new GT_UO_DimensionList();
public int mTicksUntilNextCraftSound = 0;
public double mMagneticraftBonusOutputPercent = 0d;
@@ -436,29 +733,31 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
oreDictBurnTimes.put("dustTinyDiamond", 11378);
}
-
-
public GT_Proxy() {
GameRegistry.registerFuelHandler(this);
MinecraftForge.EVENT_BUS.register(this);
MinecraftForge.ORE_GEN_BUS.register(this);
FMLCommonHandler.instance().bus().register(this);
- GregTech_API.sThaumcraftCompat = (IThaumcraftCompat) GT_Utility.callConstructor("gregtech.common.GT_ThaumcraftCompat", 0, null, GT_Values.D1,
- new Object[0]);
- for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) {
+ GregTech_API.sThaumcraftCompat = (IThaumcraftCompat)
+ GT_Utility.callConstructor("gregtech.common.GT_ThaumcraftCompat", 0, null, GT_Values.D1, new Object[0]);
+ for (FluidContainerRegistry.FluidContainerData tData :
+ FluidContainerRegistry.getRegisteredFluidContainerData()) {
onFluidContainerRegistration(new FluidContainerRegistry.FluidContainerRegisterEvent(tData));
}
try {
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();
}
}
- } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
+ } catch (Throwable e) {
+ e.printStackTrace(GT_Log.err);
+ }
}
-
public void onPreLoad() {
GT_Log.out.println("GT_Mod: Preload-Phase started!");
GT_Log.ore.println("GT_Mod: Preload-Phase started!");
@@ -467,7 +766,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
this.mIgnoreTcon = GregTech_API.sOPStuff.get(ConfigCategories.general, "ignoreTConstruct", true);
this.mWireHeatingTicks = GregTech_API.sOPStuff.get(ConfigCategories.general, "WireHeatingTicks", 4);
NetworkRegistry.INSTANCE.registerGuiHandler(GT_Values.GT, this);
- for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) {
+ for (FluidContainerRegistry.FluidContainerData tData :
+ FluidContainerRegistry.getRegisteredFluidContainerData()) {
if ((tData.filledContainer.getItem() == Items.potionitem) && (tData.filledContainer.getItemDamage() == 0)) {
tData.fluid.amount = 0;
break;
@@ -515,7 +815,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
ItemList.FR_Bee_Drone.set(GT_ModHandler.getModItem(aTextForestry, "beeDroneGE", 1L));
ItemList.FR_Bee_Princess.set(GT_ModHandler.getModItem(aTextForestry, "beePrincessGE", 1L));
ItemList.FR_Bee_Queen.set(GT_ModHandler.getModItem(aTextForestry, "beeQueenGE", 1L));
- ItemList.FR_Tree_Sapling.set(GT_ModHandler.getModItem(aTextForestry, "sapling", 1L, GT_ModHandler.getModItem(aTextForestry, "saplingGE", 1L)));
+ ItemList.FR_Tree_Sapling.set(GT_ModHandler.getModItem(
+ aTextForestry, "sapling", 1L, GT_ModHandler.getModItem(aTextForestry, "saplingGE", 1L)));
ItemList.FR_Butterfly.set(GT_ModHandler.getModItem(aTextForestry, "butterflyGE", 1L));
ItemList.FR_Larvae.set(GT_ModHandler.getModItem(aTextForestry, "beeLarvaeGE", 1L));
ItemList.FR_Serum.set(GT_ModHandler.getModItem(aTextForestry, "serumGE", 1L));
@@ -529,10 +830,12 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
ItemList.Bottle_Empty.set(new ItemStack(Items.glass_bottle, 1));
ItemList.Cell_Universal_Fluid.set(GT_ModHandler.getIC2Item("FluidCell", 1L));
- ItemList.Cell_Empty.set(GT_ModHandler.getIC2Item("cell", 1L, GT_ModHandler.getIC2Item("cellEmpty", 1L, GT_ModHandler.getIC2Item("emptyCell", 1L))));
+ ItemList.Cell_Empty.set(GT_ModHandler.getIC2Item(
+ "cell", 1L, GT_ModHandler.getIC2Item("cellEmpty", 1L, GT_ModHandler.getIC2Item("emptyCell", 1L))));
ItemList.Cell_Water.set(GT_ModHandler.getIC2Item("waterCell", 1L, GT_ModHandler.getIC2Item("cellWater", 1L)));
ItemList.Cell_Lava.set(GT_ModHandler.getIC2Item("lavaCell", 1L, GT_ModHandler.getIC2Item("cellLava", 1L)));
- ItemList.Cell_Air.set(GT_ModHandler.getIC2Item("airCell", 1L, GT_ModHandler.getIC2Item("cellAir", 1L, GT_ModHandler.getIC2Item("cellOxygen", 1L))));
+ ItemList.Cell_Air.set(GT_ModHandler.getIC2Item(
+ "airCell", 1L, GT_ModHandler.getIC2Item("cellAir", 1L, GT_ModHandler.getIC2Item("cellOxygen", 1L))));
ItemList.IC2_Item_Casing_Iron.set(GT_ModHandler.getIC2Item("casingiron", 1L));
ItemList.IC2_Item_Casing_Gold.set(GT_ModHandler.getIC2Item("casinggold", 1L));
@@ -542,7 +845,10 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
ItemList.IC2_Item_Casing_Lead.set(GT_ModHandler.getIC2Item("casinglead", 1L));
ItemList.IC2_Item_Casing_Steel.set(GT_ModHandler.getIC2Item("casingadviron", 1L));
ItemList.IC2_Spray_WeedEx.set(GT_ModHandler.getIC2Item("weedEx", 1L));
- ItemList.IC2_Fuel_Can_Empty.set(GT_ModHandler.getIC2Item("fuelCan", 1L, GT_ModHandler.getIC2Item("fuelCanEmpty", 1L, GT_ModHandler.getIC2Item("emptyFuelCan", 1L))));
+ ItemList.IC2_Fuel_Can_Empty.set(GT_ModHandler.getIC2Item(
+ "fuelCan",
+ 1L,
+ GT_ModHandler.getIC2Item("fuelCanEmpty", 1L, GT_ModHandler.getIC2Item("emptyFuelCan", 1L))));
ItemList.IC2_Fuel_Can_Filled.set(GT_ModHandler.getIC2Item("filledFuelCan", 1L));
ItemList.IC2_Mixed_Metal_Ingot.set(GT_ModHandler.getIC2Item("mixedMetalIngot", 1L));
ItemList.IC2_Fertilizer.set(GT_ModHandler.getIC2Item("fertilizer", 1L));
@@ -551,7 +857,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
ItemList.IC2_Hops.set(GT_ModHandler.getIC2Item("hops", 1L));
ItemList.IC2_Resin.set(GT_ModHandler.getIC2Item("resin", 1L));
ItemList.IC2_Plantball.set(GT_ModHandler.getIC2Item("plantBall", 1L));
- ItemList.IC2_PlantballCompressed.set(GT_ModHandler.getIC2Item("compressedPlantBall", 1L, ItemList.IC2_Plantball.get(1L)));
+ ItemList.IC2_PlantballCompressed.set(
+ GT_ModHandler.getIC2Item("compressedPlantBall", 1L, ItemList.IC2_Plantball.get(1L)));
ItemList.IC2_Crop_Seeds.set(GT_ModHandler.getIC2Item("cropSeed", 1L));
ItemList.IC2_Grin_Powder.set(GT_ModHandler.getIC2Item("grinPowder", 1L));
ItemList.IC2_Energium_Dust.set(GT_ModHandler.getIC2Item("energiumDust", 1L));
@@ -561,7 +868,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
ItemList.IC2_Food_Can_Empty.set(GT_ModHandler.getIC2Item("tinCan", 1L));
ItemList.IC2_Food_Can_Filled.set(GT_ModHandler.getIC2Item("filledTinCan", 1L, 0));
ItemList.IC2_Food_Can_Spoiled.set(GT_ModHandler.getIC2Item("filledTinCan", 1L, 1));
- ItemList.IC2_Industrial_Diamond.set(GT_ModHandler.getIC2Item("industrialDiamond", 1L, new ItemStack(Items.diamond, 1)));
+ ItemList.IC2_Industrial_Diamond.set(
+ GT_ModHandler.getIC2Item("industrialDiamond", 1L, new ItemStack(Items.diamond, 1)));
ItemList.IC2_Compressed_Coal_Ball.set(GT_ModHandler.getIC2Item("compressedCoalBall", 1L));
ItemList.IC2_Compressed_Coal_Chunk.set(GT_ModHandler.getIC2Item("coalChunk", 1L));
ItemList.IC2_ShaftIron.set(GT_ModHandler.getIC2Item("ironshaft", 1L));
@@ -606,8 +914,6 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
OrePrefixes.cellMolten.mContainerItem = ItemList.Cell_Empty.get(1L);
OrePrefixes.cell.mContainerItem = ItemList.Cell_Empty.get(1L);
-
-
GT_ModHandler.sNonReplaceableItems.add(new ItemStack(Items.bow, 1, 32767));
GT_ModHandler.sNonReplaceableItems.add(new ItemStack(Items.fishing_rod, 1, 32767));
GT_ModHandler.sNonReplaceableItems.add(ItemList.IC2_ForgeHammer.getWithDamage(1L, 32767L));
@@ -630,7 +936,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getIC2Item("orangePainter", 1L, 32767));
GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getIC2Item("whitePainter", 1L, 32767));
GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getIC2Item("cfPack", 1L, 32767));
- //GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getIC2Item("jetpack", 1L, 32767));
+ // GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getIC2Item("jetpack", 1L, 32767));
GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getIC2Item("treetap", 1L, 32767));
GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getIC2Item("weedEx", 1L, 32767));
GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getIC2Item("staticBoots", 1L, 32767));
@@ -655,8 +961,10 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(MOD_ID_TF, "item.yetiPlate", 1L, 32767));
GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(MOD_ID_TF, "item.yetiLegs", 1L, 32767));
GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(MOD_ID_TF, "item.yetiBoots", 1L, 32767));
- GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem("appliedenergistics2", "item.ToolCertusQuartzCuttingKnife", 1L, 32767));
- GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem("appliedenergistics2", "item.ToolNetherQuartzCuttingKnife", 1L, 32767));
+ GT_ModHandler.sNonReplaceableItems.add(
+ GT_ModHandler.getModItem("appliedenergistics2", "item.ToolCertusQuartzCuttingKnife", 1L, 32767));
+ GT_ModHandler.sNonReplaceableItems.add(
+ GT_ModHandler.getModItem("appliedenergistics2", "item.ToolNetherQuartzCuttingKnife", 1L, 32767));
GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(aTextForestry, "apiaristHelmet", 1L, 32767));
GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(aTextForestry, "apiaristChest", 1L, 32767));
GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(aTextForestry, "apiaristLegs", 1L, 32767));
@@ -665,11 +973,21 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(aTextForestry, "frameImpregnated", 1L, 32767));
GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(aTextForestry, "frameProven", 1L, 32767));
GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem(aTextForestry, "waxCast", 1L, 32767));
- GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem("GalacticraftCore", "item.sensorGlasses", 1L, 32767));
- GT_ModHandler.sNonReplaceableItems.add(GT_ModHandler.getModItem("IC2NuclearControl", "ItemToolThermometer", 1L, 32767));
-
- RecipeSorter.register("gregtech:shaped", GT_Shaped_Recipe.class, RecipeSorter.Category.SHAPED, "after:minecraft:shaped before:minecraft:shapeless");
- RecipeSorter.register("gregtech:shapeless", GT_Shapeless_Recipe.class, RecipeSorter.Category.SHAPELESS, "after:minecraft:shapeless");
+ GT_ModHandler.sNonReplaceableItems.add(
+ GT_ModHandler.getModItem("GalacticraftCore", "item.sensorGlasses", 1L, 32767));
+ GT_ModHandler.sNonReplaceableItems.add(
+ GT_ModHandler.getModItem("IC2NuclearControl", "ItemToolThermometer", 1L, 32767));
+
+ RecipeSorter.register(
+ "gregtech:shaped",
+ GT_Shaped_Recipe.class,
+ RecipeSorter.Category.SHAPED,
+ "after:minecraft:shaped before:minecraft:shapeless");
+ RecipeSorter.register(
+ "gregtech:shapeless",
+ GT_Shapeless_Recipe.class,
+ RecipeSorter.Category.SHAPELESS,
+ "after:minecraft:shapeless");
// Register chunk manager with Forge
GT_ChunkManager.init();
@@ -678,24 +996,39 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
public void onLoad() {
GT_Log.out.println("GT_Mod: Beginning Load-Phase.");
GT_Log.ore.println("GT_Mod: Beginning Load-Phase.");
- GT_OreDictUnificator.registerOre("cropChilipepper", GT_ModHandler.getModItem("magicalcrops", "magicalcrops_CropProduce", 1L, 2));
- GT_OreDictUnificator.registerOre("cropTomato", GT_ModHandler.getModItem("magicalcrops", "magicalcrops_CropProduce", 1L, 8));
- GT_OreDictUnificator.registerOre("cropGrape", GT_ModHandler.getModItem("magicalcrops", "magicalcrops_CropProduce", 1L, 4));
+ GT_OreDictUnificator.registerOre(
+ "cropChilipepper", GT_ModHandler.getModItem("magicalcrops", "magicalcrops_CropProduce", 1L, 2));
+ GT_OreDictUnificator.registerOre(
+ "cropTomato", GT_ModHandler.getModItem("magicalcrops", "magicalcrops_CropProduce", 1L, 8));
+ GT_OreDictUnificator.registerOre(
+ "cropGrape", GT_ModHandler.getModItem("magicalcrops", "magicalcrops_CropProduce", 1L, 4));
GT_OreDictUnificator.registerOre("cropTea", GT_ModHandler.getModItem("ganyssurface", "teaLeaves", 1L, 0));
// Clay buckets, which don't get registered until Iguana Tweaks pre-init
if (Loader.isModLoaded("IguanaTweaksTConstruct")) {
- OrePrefixes.bucketClay.mContainerItem = GT_ModHandler.getModItem("IguanaTweaksTConstruct", "clayBucketFired", 1L, 0);
- GT_OreDictUnificator.set(OrePrefixes.bucketClay, Materials.Empty, GT_ModHandler.getModItem("IguanaTweaksTConstruct", "clayBucketFired", 1L, 0));
- GT_OreDictUnificator.set(OrePrefixes.bucketClay, Materials.Water, GT_ModHandler.getModItem("IguanaTweaksTConstruct", "clayBucketWater", 1L, 0));
- GT_OreDictUnificator.set(OrePrefixes.bucketClay, Materials.Lava, GT_ModHandler.getModItem("IguanaTweaksTConstruct", "clayBucketLava", 1L, 0));
- GT_OreDictUnificator.set(OrePrefixes.bucketClay, Materials.Milk, GT_ModHandler.getModItem("IguanaTweaksTConstruct", "clayBucketMilk", 1L, 0));
-
- FluidContainerRegistry.registerFluidContainer(
- new FluidContainerRegistry.FluidContainerData(
- Materials.Milk.getFluid(1000L),
- GT_OreDictUnificator.get(OrePrefixes.bucketClay, Materials.Milk, 1L),
- GT_OreDictUnificator.get(OrePrefixes.bucketClay, Materials.Empty, 1L)));
+ OrePrefixes.bucketClay.mContainerItem =
+ GT_ModHandler.getModItem("IguanaTweaksTConstruct", "clayBucketFired", 1L, 0);
+ GT_OreDictUnificator.set(
+ OrePrefixes.bucketClay,
+ Materials.Empty,
+ GT_ModHandler.getModItem("IguanaTweaksTConstruct", "clayBucketFired", 1L, 0));
+ GT_OreDictUnificator.set(
+ OrePrefixes.bucketClay,
+ Materials.Water,
+ GT_ModHandler.getModItem("IguanaTweaksTConstruct", "clayBucketWater", 1L, 0));
+ GT_OreDictUnificator.set(
+ OrePrefixes.bucketClay,
+ Materials.Lava,
+ GT_ModHandler.getModItem("IguanaTweaksTConstruct", "clayBucketLava", 1L, 0));
+ GT_OreDictUnificator.set(
+ OrePrefixes.bucketClay,
+ Materials.Milk,
+ GT_ModHandler.getModItem("IguanaTweaksTConstruct", "clayBucketMilk", 1L, 0));
+
+ FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(
+ Materials.Milk.getFluid(1000L),
+ GT_OreDictUnificator.get(OrePrefixes.bucketClay, Materials.Milk, 1L),
+ GT_OreDictUnificator.get(OrePrefixes.bucketClay, Materials.Empty, 1L)));
}
// IC2 Hazmat
@@ -712,7 +1045,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
addFullHazmatToIC2Item("quantumLeggings");
addFullHazmatToIC2Item("quantumBoots");
- //GraviSuite Hazmat
+ // GraviSuite Hazmat
addFullHazmatToGeneralItem("GraviSuite", "graviChestPlate", 1L);
addFullHazmatToGeneralItem("GraviSuite", "advNanoChestPlate", 1L);
@@ -736,12 +1069,12 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
addFullHazmatToGeneralItem("DraconicEvolution", "wyvernLeggs", 1L, 0);
addFullHazmatToGeneralItem("DraconicEvolution", "wyvernChest", 1L, 0);
- //AdvancedSolarPanel
+ // AdvancedSolarPanel
addFullHazmatToGeneralItem("AdvancedSolarPanel", "advanced_solar_helmet", 1L);
addFullHazmatToGeneralItem("AdvancedSolarPanel", "hybrid_solar_helmet", 1L);
addFullHazmatToGeneralItem("AdvancedSolarPanel", "ultimate_solar_helmet", 1L);
- //TaintedMagic Hazmat
+ // TaintedMagic Hazmat
addFullHazmatToGeneralItem("TaintedMagic", "ItemVoidwalkerBoots", 1L);
addFullHazmatToGeneralItem("TaintedMagic", "ItemShadowFortressHelmet", 1L);
addFullHazmatToGeneralItem("TaintedMagic", "ItemShadowFortressChestplate", 1L);
@@ -751,19 +1084,19 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
addFullHazmatToGeneralItem("TaintedMagic", "ItemVoidFortressLeggings", 1L);
addFullHazmatToGeneralItem("TaintedMagic", "ItemVoidmetalGoggles", 1L);
- //WitchingGadgets Hazmat
+ // WitchingGadgets Hazmat
addFullHazmatToGeneralItem("WitchingGadgets", "item.WG_PrimordialHelm", 1L);
addFullHazmatToGeneralItem("WitchingGadgets", "item.WG_PrimordialChest", 1L);
addFullHazmatToGeneralItem("WitchingGadgets", "item.WG_PrimordialLegs", 1L);
addFullHazmatToGeneralItem("WitchingGadgets", "item.WG_PrimordialBoots", 1L);
- //ThaumicTinkerer Hazmat
+ // ThaumicTinkerer Hazmat
addFullHazmatToGeneralItem("ThaumicTinkerer", "ichorclothChestGem", 1L);
addFullHazmatToGeneralItem("ThaumicTinkerer", "ichorclothBootsGem", 1L);
addFullHazmatToGeneralItem("ThaumicTinkerer", "ichorclothHelmGem", 1L);
addFullHazmatToGeneralItem("ThaumicTinkerer", "ichorclothLegsGem", 1L);
- //GalaxySpace Hazmat
+ // GalaxySpace Hazmat
addFullHazmatToGeneralItem("GalaxySpace", "item.spacesuit_helmet", 1L);
addFullHazmatToGeneralItem("GalaxySpace", "item.spacesuit_helmetglasses", 1L);
addFullHazmatToGeneralItem("GalaxySpace", "item.spacesuit_plate", 1L);
@@ -772,20 +1105,21 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
addFullHazmatToGeneralItem("GalaxySpace", "item.spacesuit_boots", 1L);
addFullHazmatToGeneralItem("GalaxySpace", "item.spacesuit_gravityboots", 1L);
- //Extra Hazmat
+ // Extra Hazmat
GregTech_API.sElectroHazmatList.add(new ItemStack(Items.chainmail_helmet, 1, W));
GregTech_API.sElectroHazmatList.add(new ItemStack(Items.chainmail_chestplate, 1, W));
GregTech_API.sElectroHazmatList.add(new ItemStack(Items.chainmail_leggings, 1, W));
GregTech_API.sElectroHazmatList.add(new ItemStack(Items.chainmail_boots, 1, W));
- //Infinity Hazmat
+ // Infinity Hazmat
addFullHazmatToGeneralItem("Avaritia", "Infinity_Helm", 1L);
addFullHazmatToGeneralItem("Avaritia", "Infinity_Chest", 1L);
addFullHazmatToGeneralItem("Avaritia", "Infinity_Pants", 1L);
addFullHazmatToGeneralItem("Avaritia", "Infinity_Shoes", 1L);
GregTech_API.sLoadStarted = true;
- for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) {
+ for (FluidContainerRegistry.FluidContainerData tData :
+ FluidContainerRegistry.getRegisteredFluidContainerData()) {
if ((tData.filledContainer.getItem() == Items.potionitem) && (tData.filledContainer.getItemDamage() == 0)) {
tData.fluid.amount = 0;
break;
@@ -794,7 +1128,11 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
GT_LanguageManager.writePlaceholderStrings();
}
- public static long tBits = GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.ONLY_ADD_IF_RESULT_IS_NOT_NULL | GT_ModHandler.RecipeBits.NOT_REMOVABLE;
+ public static long tBits = GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS
+ | GT_ModHandler.RecipeBits.BUFFERED
+ | GT_ModHandler.RecipeBits.ONLY_ADD_IF_RESULT_IS_NOT_NULL
+ | GT_ModHandler.RecipeBits.NOT_REMOVABLE;
+
public void onPostLoad() {
GT_Log.out.println("GT_Mod: Beginning PostLoad-Phase.");
GT_Log.ore.println("GT_Mod: Beginning PostLoad-Phase.");
@@ -808,8 +1146,10 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
GT_MetaGenerated_Item_98.init();
GT_OreDictUnificator.addItemData(new ItemStack(Items.iron_door, 1), new ItemData(Materials.Iron, 21772800L));
- GT_OreDictUnificator.addItemData(new ItemStack(Items.wooden_door, 1, 32767), new ItemData(Materials.Wood, 21772800L));
- for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) {
+ GT_OreDictUnificator.addItemData(
+ new ItemStack(Items.wooden_door, 1, 32767), new ItemData(Materials.Wood, 21772800L));
+ for (FluidContainerRegistry.FluidContainerData tData :
+ FluidContainerRegistry.getRegisteredFluidContainerData()) {
if ((tData.filledContainer.getItem() == Items.potionitem) && (tData.filledContainer.getItemDamage() == 0)) {
tData.fluid.amount = 0;
break;
@@ -824,44 +1164,74 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
}
}
}
- } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
+ } catch (Throwable e) {
+ e.printStackTrace(GT_Log.err);
+ }
GT_Log.out.println("GT_Mod: Adding Tool Usage Crafting Recipes for OreDict Items.");
for (Materials aMaterial : Materials.values()) {
if ((aMaterial.mUnificatable) && (aMaterial.mMaterialInto == aMaterial)) {
- GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), tBits, new Object[]{"h", "X",
- 'X', OrePrefixes.crushedCentrifuged.get(aMaterial)});
- GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), tBits, new Object[]{"h", "X",
- 'X', OrePrefixes.crystalline.get(aMaterial)});
- GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), tBits, new Object[]{"h", "X",
- 'X', OrePrefixes.crystal.get(aMaterial)});
- GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustPure, aMaterial.mMacerateInto, 1L), tBits, new Object[]{"h", "X",
- 'X', OrePrefixes.crushedPurified.get(aMaterial)});
- GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustPure, aMaterial.mMacerateInto, 1L), tBits, new Object[]{"h", "X",
- 'X', OrePrefixes.cleanGravel.get(aMaterial)});
- GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustPure, aMaterial.mMacerateInto, 1L), tBits, new Object[]{"h", "X",
- 'X', OrePrefixes.reduced.get(aMaterial)});
- GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, 1L), tBits, new Object[]{"h", "X",
- 'X', OrePrefixes.clump.get(aMaterial)});
- GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, 1L), tBits, new Object[]{"h", "X",
- 'X', OrePrefixes.shard.get(aMaterial)});
- GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, 1L), tBits, new Object[]{"h", "X",
- 'X', OrePrefixes.crushed.get(aMaterial)});
- GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, 1L), tBits, new Object[]{"h", "X",
- 'X', OrePrefixes.dirtyGravel.get(aMaterial)});
- GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 4L), tBits,
- new Object[]{" X ", 'X', OrePrefixes.dust.get(aMaterial)});
- GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 9L), tBits,
- new Object[]{"X ", 'X', OrePrefixes.dust.get(aMaterial)});
- GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), tBits,
- new Object[]{"XX", "XX", 'X', OrePrefixes.dustSmall.get(aMaterial)});
- GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), tBits,
- new Object[]{"XXX", "XXX", "XXX", 'X', OrePrefixes.dustTiny.get(aMaterial)});
+ GT_ModHandler.addCraftingRecipe(
+ GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L),
+ tBits,
+ new Object[] {"h", "X", 'X', OrePrefixes.crushedCentrifuged.get(aMaterial)});
+ GT_ModHandler.addCraftingRecipe(
+ GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L),
+ tBits,
+ new Object[] {"h", "X", 'X', OrePrefixes.crystalline.get(aMaterial)});
+ GT_ModHandler.addCraftingRecipe(
+ GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L),
+ tBits,
+ new Object[] {"h", "X", 'X', OrePrefixes.crystal.get(aMaterial)});
+ GT_ModHandler.addCraftingRecipe(
+ GT_OreDictUnificator.get(OrePrefixes.dustPure, aMaterial.mMacerateInto, 1L),
+ tBits,
+ new Object[] {"h", "X", 'X', OrePrefixes.crushedPurified.get(aMaterial)});
+ GT_ModHandler.addCraftingRecipe(
+ GT_OreDictUnificator.get(OrePrefixes.dustPure, aMaterial.mMacerateInto, 1L),
+ tBits,
+ new Object[] {"h", "X", 'X', OrePrefixes.cleanGravel.get(aMaterial)});
+ GT_ModHandler.addCraftingRecipe(
+ GT_OreDictUnificator.get(OrePrefixes.dustPure, aMaterial.mMacerateInto, 1L),
+ tBits,
+ new Object[] {"h", "X", 'X', OrePrefixes.reduced.get(aMaterial)});
+ GT_ModHandler.addCraftingRecipe(
+ GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, 1L),
+ tBits,
+ new Object[] {"h", "X", 'X', OrePrefixes.clump.get(aMaterial)});
+ GT_ModHandler.addCraftingRecipe(
+ GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, 1L),
+ tBits,
+ new Object[] {"h", "X", 'X', OrePrefixes.shard.get(aMaterial)});
+ GT_ModHandler.addCraftingRecipe(
+ GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, 1L),
+ tBits,
+ new Object[] {"h", "X", 'X', OrePrefixes.crushed.get(aMaterial)});
+ GT_ModHandler.addCraftingRecipe(
+ GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, 1L),
+ tBits,
+ new Object[] {"h", "X", 'X', OrePrefixes.dirtyGravel.get(aMaterial)});
+ GT_ModHandler.addCraftingRecipe(
+ GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 4L),
+ tBits,
+ new Object[] {" X ", 'X', OrePrefixes.dust.get(aMaterial)});
+ GT_ModHandler.addCraftingRecipe(
+ GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 9L),
+ tBits,
+ new Object[] {"X ", 'X', OrePrefixes.dust.get(aMaterial)});
+ GT_ModHandler.addCraftingRecipe(
+ GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L),
+ tBits,
+ new Object[] {"XX", "XX", 'X', OrePrefixes.dustSmall.get(aMaterial)});
+ GT_ModHandler.addCraftingRecipe(
+ GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L),
+ tBits,
+ new Object[] {"XXX", "XXX", "XXX", 'X', OrePrefixes.dustTiny.get(aMaterial)});
}
}
}
- public void onServerAboutToStart(){
- dimensionWisePollution.clear();//!!! IMPORTANT for map switching...
+ public void onServerAboutToStart() {
+ dimensionWisePollution.clear(); // !!! IMPORTANT for map switching...
GT_ChunkAssociatedData.clearAll();
}
@@ -871,7 +1241,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
this.mUniverse = null;
this.isFirstServerWorldTick = true;
- for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) {
+ for (FluidContainerRegistry.FluidContainerData tData :
+ FluidContainerRegistry.getRegisteredFluidContainerData()) {
if ((tData.filledContainer.getItem() == Items.potionitem) && (tData.filledContainer.getItemDamage() == 0)) {
tData.fluid.amount = 0;
break;
@@ -885,14 +1256,17 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
}
}
}
- } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
+ } catch (Throwable e) {
+ e.printStackTrace(GT_Log.err);
+ }
}
public void onServerStarted() {
GregTech_API.sWirelessRedstone.clear();
GT_FluidStack.fixAllThoseFuckingFluidIDs();
- GT_Log.out.println("GT_Mod: Cleaning up all OreDict Crafting Recipes, which have an empty List in them, since they are never meeting any Condition.");
+ GT_Log.out.println(
+ "GT_Mod: Cleaning up all OreDict Crafting Recipes, which have an empty List in them, since they are never meeting any Condition.");
List tList = CraftingManager.getInstance().getRecipeList();
for (int i = 0; i < tList.size(); i++) {
if ((tList.get(i) instanceof ShapedOreRecipe)) {
@@ -927,16 +1301,17 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
}
}
}
- } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
+ } catch (Throwable e) {
+ e.printStackTrace(GT_Log.err);
+ }
}
this.mUniverse = null;
- //GT_ChunkAssociatedData.saveAll(); todo: figure out if this is needed
+ // GT_ChunkAssociatedData.saveAll(); todo: figure out if this is needed
}
@SubscribeEvent
- public void onClientConnectedToServerEvent(FMLNetworkEvent.ClientConnectedToServerEvent aEvent) {
- }
+ public void onClientConnectedToServerEvent(FMLNetworkEvent.ClientConnectedToServerEvent aEvent) {}
public int getReloadCount() {
return 0;
@@ -944,9 +1319,11 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
@SubscribeEvent
public void onArrowNockEvent(ArrowNockEvent aEvent) {
- if ((!aEvent.isCanceled()) && (GT_Utility.isStackValid(aEvent.result))
+ if ((!aEvent.isCanceled())
+ && (GT_Utility.isStackValid(aEvent.result))
&& (GT_Utility.getProjectile(SubTag.PROJECTILE_ARROW, aEvent.entityPlayer.inventory) != null)) {
- aEvent.entityPlayer.setItemInUse(aEvent.result, aEvent.result.getItem().getMaxItemUseDuration(aEvent.result));
+ aEvent.entityPlayer.setItemInUse(
+ aEvent.result, aEvent.result.getItem().getMaxItemUseDuration(aEvent.result));
aEvent.setCanceled(true);
}
}
@@ -954,7 +1331,10 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
@SubscribeEvent
public void onArrowLooseEvent(ArrowLooseEvent aEvent) {
ItemStack aArrow = GT_Utility.getProjectile(SubTag.PROJECTILE_ARROW, aEvent.entityPlayer.inventory);
- if ((!aEvent.isCanceled()) && (GT_Utility.isStackValid(aEvent.bow)) && (aArrow != null) && ((aEvent.bow.getItem() instanceof ItemBow))) {
+ if ((!aEvent.isCanceled())
+ && (GT_Utility.isStackValid(aEvent.bow))
+ && (aArrow != null)
+ && ((aEvent.bow.getItem() instanceof ItemBow))) {
float tSpeed = aEvent.charge / 20.0F;
tSpeed = (tSpeed * tSpeed + tSpeed * 2.0F) / 3.0F;
if (tSpeed < 0.1D) {
@@ -963,8 +1343,13 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
if (tSpeed > 1.0D) {
tSpeed = 1.0F;
}
- EntityArrow tArrowEntity = ((IProjectileItem) aArrow.getItem()).getProjectile(SubTag.PROJECTILE_ARROW, aArrow, aEvent.entityPlayer.worldObj,
- aEvent.entityPlayer, tSpeed * 2.0F);
+ EntityArrow tArrowEntity = ((IProjectileItem) aArrow.getItem())
+ .getProjectile(
+ SubTag.PROJECTILE_ARROW,
+ aArrow,
+ aEvent.entityPlayer.worldObj,
+ aEvent.entityPlayer,
+ tSpeed * 2.0F);
if (tSpeed >= 1.0F) {
tArrowEntity.setIsCritical(true);
}
@@ -1007,7 +1392,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
@SubscribeEvent
public void onEndermanTeleportEvent(EnderTeleportEvent aEvent) {
- if (((aEvent.entityLiving instanceof EntityEnderman)) && (aEvent.entityLiving.getActivePotionEffect(Potion.weakness) != null)) {
+ if (((aEvent.entityLiving instanceof EntityEnderman))
+ && (aEvent.entityLiving.getActivePotionEffect(Potion.weakness) != null)) {
aEvent.setCanceled(true);
}
}
@@ -1016,13 +1402,17 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
public void onEntitySpawningEvent(EntityJoinWorldEvent aEvent) {
if ((aEvent.entity != null) && (!aEvent.entity.worldObj.isRemote)) {
if ((aEvent.entity instanceof EntityItem)) {
- ((EntityItem) aEvent.entity).setEntityItemStack(GT_OreDictUnificator.get(((EntityItem) aEvent.entity).getEntityItem()));
+ ((EntityItem) aEvent.entity)
+ .setEntityItemStack(GT_OreDictUnificator.get(((EntityItem) aEvent.entity).getEntityItem()));
}
- if ((this.mSkeletonsShootGTArrows > 0) && (aEvent.entity.getClass() == EntityArrow.class)
+ if ((this.mSkeletonsShootGTArrows > 0)
+ && (aEvent.entity.getClass() == EntityArrow.class)
&& (aEvent.entity.worldObj.rand.nextInt(this.mSkeletonsShootGTArrows) == 0)
&& ((((EntityArrow) aEvent.entity).shootingEntity instanceof EntitySkeleton))) {
- aEvent.entity.worldObj.spawnEntityInWorld(new GT_Entity_Arrow((EntityArrow) aEvent.entity, OrePrefixes.arrowGtWood.mPrefixedItems
- .get(aEvent.entity.worldObj.rand.nextInt(OrePrefixes.arrowGtWood.mPrefixedItems.size()))));
+ aEvent.entity.worldObj.spawnEntityInWorld(new GT_Entity_Arrow(
+ (EntityArrow) aEvent.entity,
+ OrePrefixes.arrowGtWood.mPrefixedItems.get(
+ aEvent.entity.worldObj.rand.nextInt(OrePrefixes.arrowGtWood.mPrefixedItems.size()))));
aEvent.entity.setDead();
}
}
@@ -1030,7 +1420,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
@SubscribeEvent
public void onOreGenEvent(OreGenEvent.GenerateMinable aGenerator) {
- if ((this.mDisableVanillaOres) && ((aGenerator.generator instanceof WorldGenMinable)) && (PREVENTED_ORES.contains(aGenerator.type))) {
+ if ((this.mDisableVanillaOres)
+ && ((aGenerator.generator instanceof WorldGenMinable))
+ && (PREVENTED_ORES.contains(aGenerator.type))) {
aGenerator.setResult(Result.DENY);
}
}
@@ -1041,18 +1433,28 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
@SubscribeEvent
public void onPlayerInteraction(PlayerInteractEvent aEvent) {
- if ((aEvent.entityPlayer == null) || (aEvent.entityPlayer.worldObj == null) || (aEvent.action == null) || (aEvent.world.provider == null)) {
+ if ((aEvent.entityPlayer == null)
+ || (aEvent.entityPlayer.worldObj == null)
+ || (aEvent.action == null)
+ || (aEvent.world.provider == null)) {
return;
}
- if ((!aEvent.entityPlayer.worldObj.isRemote) && (aEvent.action != PlayerInteractEvent.Action.RIGHT_CLICK_AIR)
+ if ((!aEvent.entityPlayer.worldObj.isRemote)
+ && (aEvent.action != PlayerInteractEvent.Action.RIGHT_CLICK_AIR)
&& (GT_Log.pal != null)) {
- this.mBufferedPlayerActivity.add(getDataAndTime() + ";" + aEvent.action.name() + ";" + aEvent.entityPlayer.getDisplayName() + ";DIM:"
- + aEvent.world.provider.dimensionId + ";" + aEvent.x + ";" + aEvent.y + ";" + aEvent.z + ";|;" + aEvent.x / 10 + ";" + aEvent.y / 10 + ";"
- + aEvent.z / 10);
+ this.mBufferedPlayerActivity.add(
+ getDataAndTime() + ";" + aEvent.action.name() + ";" + aEvent.entityPlayer.getDisplayName() + ";DIM:"
+ + aEvent.world.provider.dimensionId + ";" + aEvent.x + ";" + aEvent.y + ";" + aEvent.z
+ + ";|;" + aEvent.x / 10 + ";" + aEvent.y / 10 + ";"
+ + aEvent.z / 10);
}
ItemStack aStack = aEvent.entityPlayer.getCurrentEquippedItem();
- if ((aStack != null) && (aEvent.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) && (aStack.getItem() == Items.flint_and_steel)) {
- if ((!aEvent.world.isRemote) && (!aEvent.entityPlayer.capabilities.isCreativeMode) && (aEvent.world.rand.nextInt(100) >= this.mFlintChance)) {
+ if ((aStack != null)
+ && (aEvent.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK)
+ && (aStack.getItem() == Items.flint_and_steel)) {
+ if ((!aEvent.world.isRemote)
+ && (!aEvent.entityPlayer.capabilities.isCreativeMode)
+ && (aEvent.world.rand.nextInt(100) >= this.mFlintChance)) {
aEvent.setCanceled(true);
aStack.damageItem(1, aEvent.entityPlayer);
if (aStack.getItemDamage() >= aStack.getMaxDamage()) {
@@ -1070,15 +1472,28 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
public void onBlockHarvestingEvent(BlockEvent.HarvestDropsEvent aEvent) {
if (aEvent.harvester != null) {
if ((!aEvent.world.isRemote) && (GT_Log.pal != null)) {
- this.mBufferedPlayerActivity.add(getDataAndTime() + ";HARVEST_BLOCK;" + aEvent.harvester.getDisplayName() + ";DIM:"
- + aEvent.world.provider.dimensionId + ";" + aEvent.x + ";" + aEvent.y + ";" + aEvent.z + ";|;" + aEvent.x / 10 + ";" + aEvent.y / 10
- + ";" + aEvent.z / 10);
+ this.mBufferedPlayerActivity.add(
+ getDataAndTime() + ";HARVEST_BLOCK;" + aEvent.harvester.getDisplayName() + ";DIM:"
+ + aEvent.world.provider.dimensionId + ";" + aEvent.x + ";" + aEvent.y + ";" + aEvent.z
+ + ";|;" + aEvent.x / 10 + ";" + aEvent.y / 10
+ + ";" + aEvent.z / 10);
}
ItemStack aStack = aEvent.harvester.getCurrentEquippedItem();
if (aStack != null) {
if ((aStack.getItem() instanceof GT_MetaGenerated_Tool)) {
- ((GT_MetaGenerated_Tool) aStack.getItem()).onHarvestBlockEvent(aEvent.drops, aStack, aEvent.harvester, aEvent.block, aEvent.x, aEvent.y,
- aEvent.z, (byte) aEvent.blockMetadata, aEvent.fortuneLevel, aEvent.isSilkTouching, aEvent);
+ ((GT_MetaGenerated_Tool) aStack.getItem())
+ .onHarvestBlockEvent(
+ aEvent.drops,
+ aStack,
+ aEvent.harvester,
+ aEvent.block,
+ aEvent.x,
+ aEvent.y,
+ aEvent.z,
+ (byte) aEvent.blockMetadata,
+ aEvent.fortuneLevel,
+ aEvent.isSilkTouching,
+ aEvent);
}
if (EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, aStack) > 2) {
try {
@@ -1090,7 +1505,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
GT_Utility.setStack(tDrop, tSmeltingOutput);
}
}
- } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
+ } catch (Throwable e) {
+ e.printStackTrace(GT_Log.err);
+ }
}
}
}
@@ -1106,13 +1523,17 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
} else if (aMod.equals("gregtech")) {
aMod = "UNKNOWN";
}
- if ((aEvent == null) || (aEvent.Ore == null) || (aEvent.Ore.getItem() == null) || (aEvent.Name == null) || (aEvent.Name.isEmpty())
+ 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
+ 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
@@ -1121,8 +1542,10 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
try {
aEvent.Ore.stackSize = 1;
if (this.mIgnoreTcon || aEvent.Ore.getUnlocalizedName().startsWith("item.oreberry")) {
- if ((aOriginalMod.toLowerCase(Locale.ENGLISH).contains("xycraft")) || (aOriginalMod.toLowerCase(Locale.ENGLISH).contains("tconstruct"))
- || ((aOriginalMod.toLowerCase(Locale.ENGLISH).contains("natura")) && (!aOriginalMod.toLowerCase(Locale.ENGLISH).contains("natural")))) {
+ if ((aOriginalMod.toLowerCase(Locale.ENGLISH).contains("xycraft"))
+ || (aOriginalMod.toLowerCase(Locale.ENGLISH).contains("tconstruct"))
+ || ((aOriginalMod.toLowerCase(Locale.ENGLISH).contains("natura"))
+ && (!aOriginalMod.toLowerCase(Locale.ENGLISH).contains("natural")))) {
if (GT_Values.D1) {
GT_Log.ore.println(aMod + " -> " + aEvent.Name + " is getting ignored, because of racism. :P");
}
@@ -1130,10 +1553,13 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
}
}
String tModToName = aMod + " -> " + aEvent.Name;
- if ((this.mOreDictActivated) || (GregTech_API.sPostloadStarted) || ((this.mSortToTheEnd) && (GregTech_API.sLoadFinished))) {
+ if ((this.mOreDictActivated)
+ || (GregTech_API.sPostloadStarted)
+ || ((this.mSortToTheEnd) && (GregTech_API.sLoadFinished))) {
tModToName = aOriginalMod + " --Late--> " + aEvent.Name;
}
- if (((aEvent.Ore.getItem() instanceof ItemBlock)) || (GT_Utility.getBlockFromStack(aEvent.Ore) != Blocks.air)) {
+ if (((aEvent.Ore.getItem() instanceof ItemBlock))
+ || (GT_Utility.getBlockFromStack(aEvent.Ore) != Blocks.air)) {
GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
}
this.mRegisteredOres.add(aEvent.Ore);
@@ -1148,98 +1574,87 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
}
return;
}
- }else if(this.mIgnoredNames.contains(aEvent.Name)){
+ } else if (this.mIgnoredNames.contains(aEvent.Name)) {
GT_Log.ore.println(tModToName + " is getting ignored via hardcode.");
return;
- }
- else if (aEvent.Name.equals("stone")) {
+ } else if (aEvent.Name.equals("stone")) {
GT_OreDictUnificator.registerOre("stoneSmooth", aEvent.Ore);
return;
- }
- else if (aEvent.Name.equals("cobblestone")) {
+ } else if (aEvent.Name.equals("cobblestone")) {
GT_OreDictUnificator.registerOre("stoneCobble", aEvent.Ore);
return;
- }
- else if ((aEvent.Name.contains("|")) || (aEvent.Name.contains("*")) || (aEvent.Name.contains(":")) || (aEvent.Name.contains("."))
+ } else 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;
- }
- else if (aEvent.Name.equals("copperWire")) {
+ } else if (aEvent.Name.equals("copperWire")) {
GT_OreDictUnificator.registerOre(OreDictNames.craftingWireCopper, aEvent.Ore);
- }
- else if (aEvent.Name.equals("oreHeeEndrium")) {
+ } else if (aEvent.Name.equals("oreHeeEndrium")) {
GT_OreDictUnificator.registerOre(OrePrefixes.ore, Materials.HeeEndium, aEvent.Ore);
- }
- else if (aEvent.Name.equals("sheetPlastic")) {
+ } else if (aEvent.Name.equals("sheetPlastic")) {
GT_OreDictUnificator.registerOre(OrePrefixes.plate, Materials.Plastic, aEvent.Ore);
- }
- else if (aEvent.Name.startsWith("shard")) {
+ } else if (aEvent.Name.startsWith("shard")) {
if (aEvent.Name.equals("shardAir")) {
GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedAir, aEvent.Ore);
return;
- }
- else if (aEvent.Name.equals("shardWater")) {
+ } else if (aEvent.Name.equals("shardWater")) {
GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedWater, aEvent.Ore);
return;
- }
- else if (aEvent.Name.equals("shardFire")) {
+ } else if (aEvent.Name.equals("shardFire")) {
GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedFire, aEvent.Ore);
return;
- }
- else if (aEvent.Name.equals("shardEarth")) {
+ } else if (aEvent.Name.equals("shardEarth")) {
GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedEarth, aEvent.Ore);
return;
- }
- else if (aEvent.Name.equals("shardOrder")) {
+ } else if (aEvent.Name.equals("shardOrder")) {
GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedOrder, aEvent.Ore);
return;
- }
- else if (aEvent.Name.equals("shardEntropy")) {
+ } else if (aEvent.Name.equals("shardEntropy")) {
GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedEntropy, aEvent.Ore);
return;
}
} else if (aEvent.Name.equals("fieryIngot")) {
GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.FierySteel, aEvent.Ore);
return;
- }
- else if (aEvent.Name.equals("ironwood")) {
+ } else if (aEvent.Name.equals("ironwood")) {
GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.IronWood, aEvent.Ore);
return;
- }
- else if (aEvent.Name.equals("steeleaf")) {
+ } else if (aEvent.Name.equals("steeleaf")) {
GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.Steeleaf, aEvent.Ore);
return;
- }
- else if (aEvent.Name.equals("knightmetal")) {
+ } else if (aEvent.Name.equals("knightmetal")) {
GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.Knightmetal, aEvent.Ore);
return;
- }
- else if (aEvent.Name.equals("compressedAluminum")) {
+ } else if (aEvent.Name.equals("compressedAluminum")) {
GT_OreDictUnificator.registerOre(OrePrefixes.compressed, Materials.Aluminium, aEvent.Ore);
return;
- }
- else 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, aEvent.Ore));
+ } else 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, aEvent.Ore));
aEvent.Ore.setStackDisplayName("Invalid OreDictionary Tag");
return;
- }
- else if (this.mInvalidNames.contains(aEvent.Name)) {
+ } else if (this.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"))) {
+ 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;
- }else if (aEvent.Name.toUpperCase().equals(aEvent.Name)) {
+ } else if (aEvent.Name.toUpperCase().equals(aEvent.Name)) {
GT_Log.ore.println(tModToName + " is invalid due to being solely uppercased.");
return;
} else if (Character.isUpperCase(aEvent.Name.charAt(0))) {
@@ -1252,7 +1667,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
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_Log.ore.println(
+ tModToName + " uses a depricated Prefix, and is getting re-registered as " + tNewName);
}
GT_OreDictUnificator.registerOre(tNewName, aEvent.Ore);
return;
@@ -1260,14 +1676,18 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
String tName = aEvent.Name.replaceFirst(aPrefix.toString(), "");
if (tName.length() > 0) {
char firstChar = tName.charAt(0);
- if (Character.isUpperCase(firstChar) || Character.isLowerCase(firstChar) || firstChar == '_' || Character.isDigit(firstChar)) {
+ if (Character.isUpperCase(firstChar)
+ || Character.isLowerCase(firstChar)
+ || firstChar == '_'
+ || Character.isDigit(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));
+ GT_Log.ore.println(
+ tModToName + " uses a deprecated Material and is getting re-registered as "
+ + aPrefix.get(aMaterial.mMaterialInto));
}
return;
}
@@ -1276,22 +1696,30 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
}
if (aMaterial != Materials._NULL) {
Materials tReRegisteredMaterial;
- for (Iterator i$ = aMaterial.mOreReRegistrations.iterator(); i$.hasNext(); GT_OreDictUnificator.registerOre(aPrefix,
- tReRegisteredMaterial, aEvent.Ore)) {
+ 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, aEvent.Ore));
- if (GregTech_API.sThaumcraftCompat != null && aPrefix.doGenerateItem(aMaterial) && !aPrefix.isIgnored(aMaterial)) {
+ if (GregTech_API.sThaumcraftCompat != null
+ && aPrefix.doGenerateItem(aMaterial)
+ && !aPrefix.isIgnored(aMaterial)) {
List<TC_AspectStack> tAspects = new ArrayList<>();
for (TC_AspectStack tAspect : aPrefix.mAspects) tAspect.addToAspectList(tAspects);
- if (aPrefix.mMaterialAmount >= 3628800 || aPrefix.mMaterialAmount < 0) for (TC_AspectStack tAspect : aMaterial.mAspects) tAspect.addToAspectList(tAspects);
- GregTech_API.sThaumcraftCompat.registerThaumcraftAspectsToItem(GT_Utility.copyAmount(1, aEvent.Ore), tAspects, aEvent.Name);
+ if (aPrefix.mMaterialAmount >= 3628800 || aPrefix.mMaterialAmount < 0)
+ for (TC_AspectStack tAspect : aMaterial.mAspects)
+ tAspect.addToAspectList(tAspects);
+ GregTech_API.sThaumcraftCompat.registerThaumcraftAspectsToItem(
+ GT_Utility.copyAmount(1, aEvent.Ore), tAspects, aEvent.Name);
}
switch (aPrefix) {
case crystal:
- if ((aMaterial == Materials.CertusQuartz) || (aMaterial == Materials.NetherQuartz) || (aMaterial == Materials.Fluix)) {
+ if ((aMaterial == Materials.CertusQuartz)
+ || (aMaterial == Materials.NetherQuartz)
+ || (aMaterial == Materials.Fluix)) {
GT_OreDictUnificator.registerOre(OrePrefixes.gem, aMaterial, aEvent.Ore);
}
break;
@@ -1300,16 +1728,28 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
GT_OreDictUnificator.registerOre(Dyes.dyeBlue, aEvent.Ore);
} else if (aMaterial == Materials.Lazurite) {
GT_OreDictUnificator.registerOre(Dyes.dyeCyan, aEvent.Ore);
- } else if (aMaterial == Materials.InfusedAir || aMaterial == Materials.InfusedWater || aMaterial == Materials.InfusedFire || aMaterial == Materials.InfusedEarth || aMaterial == Materials.InfusedOrder || aMaterial == Materials.InfusedEntropy) {
- GT_OreDictUnificator.registerOre(aMaterial.mName.replaceFirst("Infused", "shard"), aEvent.Ore);
+ } else if (aMaterial == Materials.InfusedAir
+ || aMaterial == Materials.InfusedWater
+ || aMaterial == Materials.InfusedFire
+ || aMaterial == Materials.InfusedEarth
+ || aMaterial == Materials.InfusedOrder
+ || aMaterial == Materials.InfusedEntropy) {
+ GT_OreDictUnificator.registerOre(
+ aMaterial.mName.replaceFirst("Infused", "shard"), aEvent.Ore);
} else if (aMaterial == Materials.Chocolate) {
GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
- } else if (aMaterial == Materials.CertusQuartz || aMaterial == Materials.NetherQuartz) {
- GT_OreDictUnificator.registerOre(OrePrefixes.item.get(aMaterial), aEvent.Ore);
- GT_OreDictUnificator.registerOre(OrePrefixes.crystal, aMaterial, aEvent.Ore);
+ } else if (aMaterial == Materials.CertusQuartz
+ || aMaterial == Materials.NetherQuartz) {
+ GT_OreDictUnificator.registerOre(
+ OrePrefixes.item.get(aMaterial), aEvent.Ore);
+ GT_OreDictUnificator.registerOre(
+ OrePrefixes.crystal, aMaterial, aEvent.Ore);
GT_OreDictUnificator.registerOre(OreDictNames.craftingQuartz, aEvent.Ore);
- } else if (aMaterial == Materials.Fluix || aMaterial == Materials.Quartz || aMaterial == Materials.Quartzite) {
- GT_OreDictUnificator.registerOre(OrePrefixes.crystal, aMaterial, aEvent.Ore);
+ } else if (aMaterial == Materials.Fluix
+ || aMaterial == Materials.Quartz
+ || aMaterial == Materials.Quartzite) {
+ GT_OreDictUnificator.registerOre(
+ OrePrefixes.crystal, aMaterial, aEvent.Ore);
GT_OreDictUnificator.registerOre(OreDictNames.craftingQuartz, aEvent.Ore);
}
break;
@@ -1317,7 +1757,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
if (aMaterial == Materials.Tin) {
GT_OreDictUnificator.registerOre(OreDictNames.craftingWireTin, aEvent.Ore);
} else if (aMaterial == Materials.AnyCopper) {
- GT_OreDictUnificator.registerOre(OreDictNames.craftingWireCopper, aEvent.Ore);
+ GT_OreDictUnificator.registerOre(
+ OreDictNames.craftingWireCopper, aEvent.Ore);
} else if (aMaterial == Materials.Gold) {
GT_OreDictUnificator.registerOre(OreDictNames.craftingWireGold, aEvent.Ore);
} else if (aMaterial == Materials.AnyIron) {
@@ -1325,8 +1766,15 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
}
break;
case lens:
- if ((aMaterial.contains(SubTag.TRANSPARENT)) && (aMaterial.mColor != Dyes._NULL)) {
- GT_OreDictUnificator.registerOre("craftingLens" + aMaterial.mColor.toString().replaceFirst("dye", ""), aEvent.Ore);
+ if ((aMaterial.contains(SubTag.TRANSPARENT))
+ && (aMaterial.mColor != Dyes._NULL)) {
+ GT_OreDictUnificator.registerOre(
+ "craftingLens"
+ + aMaterial
+ .mColor
+ .toString()
+ .replaceFirst("dye", ""),
+ aEvent.Ore);
}
break;
case plate:
@@ -1352,8 +1800,11 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
GT_RecipeRegistrator.sRodMaterialList.add(aMaterial);
} else if (aMaterial == Materials.Wood) {
GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
- } else if ((aMaterial == Materials.Tin) || (aMaterial == Materials.Lead) || (aMaterial == Materials.SolderingAlloy)) {
- GT_OreDictUnificator.registerOre(ToolDictNames.craftingToolSolderingMetal, aEvent.Ore);
+ } else if ((aMaterial == Materials.Tin)
+ || (aMaterial == Materials.Lead)
+ || (aMaterial == Materials.SolderingAlloy)) {
+ GT_OreDictUnificator.registerOre(
+ ToolDictNames.craftingToolSolderingMetal, aEvent.Ore);
}
break;
case dust:
@@ -1391,20 +1842,44 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
GT_OreDictUnificator.registerOre("steeleaf", aEvent.Ore);
} else if (aMaterial == Materials.Knightmetal) {
GT_OreDictUnificator.registerOre("knightmetal", aEvent.Ore);
- } else 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));
+ } else 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));
if (!mDisableIC2Cables) {
- GT_Values.RA.addWiremillRecipe(GT_ModHandler.getIC2Item("copperCableItem", 3L), new ItemStack(aEvent.Ore.getItem(), 1,
- 8), 400, 1);
- GT_Values.RA.addWiremillRecipe(GT_ModHandler.getIC2Item("ironCableItem", 6L),
- new ItemStack(aEvent.Ore.getItem(), 1, 9), 400, 2);
+ GT_Values.RA.addWiremillRecipe(
+ GT_ModHandler.getIC2Item("copperCableItem", 3L),
+ new ItemStack(aEvent.Ore.getItem(), 1, 8),
+ 400,
+ 1);
+ GT_Values.RA.addWiremillRecipe(
+ GT_ModHandler.getIC2Item("ironCableItem", 6L),
+ new ItemStack(aEvent.Ore.getItem(), 1, 9),
+ 400,
+ 2);
}
- GT_Values.RA.addCutterRecipe(new ItemStack(aEvent.Ore.getItem(), 1, 3), new ItemStack(aEvent.Ore.getItem(), 16, 4),
- null, 400, 8);
+ GT_Values.RA.addCutterRecipe(
+ new ItemStack(aEvent.Ore.getItem(), 1, 3),
+ new ItemStack(aEvent.Ore.getItem(), 16, 4),
+ null,
+ 400,
+ 8);
}
break;
default:
@@ -1417,12 +1892,18 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
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.");
+ 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;
}
}
-// GT_FML_LOGGER.info("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.");
+ // GT_FML_LOGGER.info("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 {
@@ -1505,16 +1986,19 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
}
@SuppressWarnings("deprecated")
- public static void stepMaterialsVanilla(Collection<GT_Proxy.OreDictEventContainer> mEvents, ProgressManager.ProgressBar progressBar){
+ public static void stepMaterialsVanilla(
+ Collection<GT_Proxy.OreDictEventContainer> mEvents, ProgressManager.ProgressBar progressBar) {
int size = 5;
int sizeStep = mEvents.size() / 20 - 1;
GT_Proxy.OreDictEventContainer tEvent;
- for (Iterator<GT_Proxy.OreDictEventContainer> i$ = mEvents.iterator(); i$.hasNext(); GT_Proxy.registerRecipes(tEvent)) {
+ for (Iterator<GT_Proxy.OreDictEventContainer> i$ = mEvents.iterator();
+ i$.hasNext();
+ GT_Proxy.registerRecipes(tEvent)) {
tEvent = i$.next();
sizeStep--;
- if(sizeStep == 0) {
+ if (sizeStep == 0) {
GT_FML_LOGGER.info("Baking : " + size + "%", new Object[0]);
- sizeStep = mEvents.size()/20-1;
+ sizeStep = mEvents.size() / 20 - 1;
size += 5;
}
progressBar.step(tEvent.mMaterial == null ? "" : tEvent.mMaterial.toString());
@@ -1525,15 +2009,19 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
@SubscribeEvent
public void onLivingUpdate(LivingUpdateEvent aEvent) {
if (aEvent.entityLiving.onGround) {
- int tX = MathHelper.floor_double(aEvent.entityLiving.posX), tY = MathHelper.floor_double(aEvent.entityLiving.boundingBox.minY-0.001F), tZ = MathHelper.floor_double(aEvent.entityLiving.posZ);
+ int tX = MathHelper.floor_double(aEvent.entityLiving.posX),
+ tY = MathHelper.floor_double(aEvent.entityLiving.boundingBox.minY - 0.001F),
+ tZ = MathHelper.floor_double(aEvent.entityLiving.posZ);
Block tBlock = aEvent.entityLiving.worldObj.getBlock(tX, tY, tZ);
- if (tBlock instanceof IBlockOnWalkOver) ((IBlockOnWalkOver)tBlock).onWalkOver(aEvent.entityLiving, aEvent.entityLiving.worldObj, tX, tY, tZ);
+ if (tBlock instanceof IBlockOnWalkOver)
+ ((IBlockOnWalkOver) tBlock).onWalkOver(aEvent.entityLiving, aEvent.entityLiving.worldObj, tX, tY, tZ);
}
}
@SubscribeEvent
public void onFluidContainerRegistration(FluidContainerRegistry.FluidContainerRegisterEvent aFluidEvent) {
- if ((aFluidEvent.data.filledContainer.getItem() == Items.potionitem) && (aFluidEvent.data.filledContainer.getItemDamage() == 0)) {
+ if ((aFluidEvent.data.filledContainer.getItem() == Items.potionitem)
+ && (aFluidEvent.data.filledContainer.getItemDamage() == 0)) {
aFluidEvent.data.fluid.amount = 0;
}
GT_OreDictUnificator.addToBlacklist(aFluidEvent.data.emptyContainer);
@@ -1553,18 +2041,14 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
// Making sure it is being freed up in order to prevent exploits or Garbage Collection mishaps.
LAST_BROKEN_TILEENTITY.set(null);
-
}
-
}
@SubscribeEvent
public void onWorldTickEvent(TickEvent.WorldTickEvent aEvent) {
- if(aEvent.world.provider.dimensionId == 0)
- mTicksUntilNextCraftSound--;
+ if (aEvent.world.provider.dimensionId == 0) mTicksUntilNextCraftSound--;
if (isFirstWorldTick) {
- for (Runnable runnable : GregTech_API.sFirstWorldTick)
- runnable.run();
+ for (Runnable runnable : GregTech_API.sFirstWorldTick) runnable.run();
isFirstWorldTick = false;
GT_Values.worldTickHappened = true;
}
@@ -1582,23 +2066,32 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
tMetaTileEntity.onWorldLoad(tSaveDiretory);
}
}
- } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
+ } catch (Throwable e) {
+ e.printStackTrace(GT_Log.err);
+ }
}
}
- if ((aEvent.world.getTotalWorldTime() % 100L == 0L) && ((this.mItemDespawnTime != 6000) || (this.mMaxEqualEntitiesAtOneSpot > 0))) {
+ if ((aEvent.world.getTotalWorldTime() % 100L == 0L)
+ && ((this.mItemDespawnTime != 6000) || (this.mMaxEqualEntitiesAtOneSpot > 0))) {
long startTime = System.nanoTime();
- double oldX=0, oldY=0, oldZ=0;
- if (debugEntityCramming && (aEvent.world.loadedEntityList.size()!=0)) {
+ double oldX = 0, oldY = 0, oldZ = 0;
+ if (debugEntityCramming && (aEvent.world.loadedEntityList.size() != 0)) {
GT_Log.out.println("CRAM: Entity list size " + aEvent.world.loadedEntityList.size());
}
for (int i = 0; i < aEvent.world.loadedEntityList.size(); i++) {
if ((aEvent.world.loadedEntityList.get(i) instanceof Entity)) {
Entity tEntity = (Entity) aEvent.world.loadedEntityList.get(i);
- if (((tEntity instanceof EntityItem)) && (this.mItemDespawnTime != 6000) && (((EntityItem) tEntity).lifespan == 6000)) {
+ if (((tEntity instanceof EntityItem))
+ && (this.mItemDespawnTime != 6000)
+ && (((EntityItem) tEntity).lifespan == 6000)) {
((EntityItem) tEntity).lifespan = this.mItemDespawnTime;
- } else if (((tEntity instanceof EntityLivingBase)) && (this.mMaxEqualEntitiesAtOneSpot > 0) && (!(tEntity instanceof EntityPlayer))
- && (tEntity.canBePushed()) && (((EntityLivingBase) tEntity).getHealth() > 0.0F)) {
- List tList = tEntity.worldObj.getEntitiesWithinAABBExcludingEntity(tEntity,
+ } else if (((tEntity instanceof EntityLivingBase))
+ && (this.mMaxEqualEntitiesAtOneSpot > 0)
+ && (!(tEntity instanceof EntityPlayer))
+ && (tEntity.canBePushed())
+ && (((EntityLivingBase) tEntity).getHealth() > 0.0F)) {
+ List tList = tEntity.worldObj.getEntitiesWithinAABBExcludingEntity(
+ tEntity,
tEntity.boundingBox.expand(0.20000000298023224D, 0.0D, 0.20000000298023224D));
Class tClass = tEntity.getClass();
int tEntityCount = 1;
@@ -1613,22 +2106,23 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
if (debugEntityCramming) {
// Cheeseball way of not receiving a bunch of spam caused by 1 location
// obviously fails if there are crammed entities in more than one spot.
- if( tEntity.posX != oldX
- && tEntity.posY != oldY
- && tEntity.posZ != oldZ ) {
- GT_Log.out.println("CRAM: Excess entities: " + tEntityCount + " at X " + tEntity.posX + " Y " + tEntity.posY + " Z " + tEntity.posZ);
+ if (tEntity.posX != oldX && tEntity.posY != oldY && tEntity.posZ != oldZ) {
+ GT_Log.out.println("CRAM: Excess entities: " + tEntityCount + " at X "
+ + tEntity.posX + " Y " + tEntity.posY + " Z " + tEntity.posZ);
oldX = tEntity.posX;
oldY = tEntity.posY;
oldZ = tEntity.posZ;
}
}
- tEntity.attackEntityFrom(DamageSource.inWall, tEntityCount - this.mMaxEqualEntitiesAtOneSpot);
+ tEntity.attackEntityFrom(
+ DamageSource.inWall, tEntityCount - this.mMaxEqualEntitiesAtOneSpot);
}
}
}
}
- if(debugEntityCramming && (aEvent.world.loadedEntityList.size()!=0)) {
- GT_Log.out.println("CRAM: Time spent checking " + (System.nanoTime() - startTime )/1000 + " microseconds" );
+ if (debugEntityCramming && (aEvent.world.loadedEntityList.size() != 0)) {
+ GT_Log.out.println(
+ "CRAM: Time spent checking " + (System.nanoTime() - startTime) / 1000 + " microseconds");
}
}
@@ -1645,24 +2139,43 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
}
if (aOre.mPrefix != null) {
if (!aOre.mPrefix.isIgnored(aOre.mMaterial)) {
- aOre.mPrefix.processOre(aOre.mMaterial == null ? Materials._NULL : aOre.mMaterial, aOre.mEvent.Name, aOre.mModID, GT_Utility.copyAmount(1L, aOre.mEvent.Ore));
+ aOre.mPrefix.processOre(
+ aOre.mMaterial == null ? Materials._NULL : aOre.mMaterial,
+ aOre.mEvent.Name,
+ aOre.mModID,
+ GT_Utility.copyAmount(1L, aOre.mEvent.Ore));
}
} else {
-// GT_FML_LOGGER.info("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.");
+ // GT_FML_LOGGER.info("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.");
}
}
@SubscribeEvent
public void onPlayerTickEventServer(TickEvent.PlayerTickEvent aEvent) {
if ((aEvent.side.isServer()) && (aEvent.phase == TickEvent.Phase.END) && (!aEvent.player.isDead)) {
- if ((aEvent.player.ticksExisted % 200 == 0) && (aEvent.player.capabilities.allowEdit) && (!aEvent.player.capabilities.isCreativeMode)
+ if ((aEvent.player.ticksExisted % 200 == 0)
+ && (aEvent.player.capabilities.allowEdit)
+ && (!aEvent.player.capabilities.isCreativeMode)
&& (this.mSurvivalIntoAdventure)) {
aEvent.player.setGameType(GameType.ADVENTURE);
aEvent.player.capabilities.allowEdit = false;
if (this.mAxeWhenAdventure) {
- GT_Utility.sendChatToPlayer(aEvent.player, GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_097", "It's dangerous to go alone! Take this.", false));
- aEvent.player.worldObj.spawnEntityInWorld(new EntityItem(aEvent.player.worldObj, aEvent.player.posX, aEvent.player.posY,
- aEvent.player.posZ, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.AXE, 1, Materials.Flint, Materials.Wood, null)));
+ GT_Utility.sendChatToPlayer(
+ aEvent.player,
+ GT_LanguageManager.addStringLocalization(
+ "Interaction_DESCRIPTION_Index_097",
+ "It's dangerous to go alone! Take this.",
+ false));
+ aEvent.player.worldObj.spawnEntityInWorld(new EntityItem(
+ aEvent.player.worldObj,
+ aEvent.player.posX,
+ aEvent.player.posY,
+ aEvent.player.posZ,
+ GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(
+ GT_MetaGenerated_Tool_01.AXE, 1, Materials.Flint, Materials.Wood, null)));
}
}
boolean tHungerEffect = (this.mHungerEffect) && (aEvent.player.ticksExisted % 2400 == 1200);
@@ -1672,7 +2185,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
ItemStack tStack;
if ((tStack = aEvent.player.inventory.getStackInSlot(i)) != null) {
if (!aEvent.player.capabilities.isCreativeMode) {
- GT_Utility.applyRadioactivity(aEvent.player, GT_Utility.getRadioactivityLevel(tStack), tStack.stackSize);
+ GT_Utility.applyRadioactivity(
+ aEvent.player, GT_Utility.getRadioactivityLevel(tStack), tStack.stackSize);
float tHeat = GT_Utility.getHeatDamageFromItem(tStack);
if (tHeat != 0.0F) {
if (tHeat > 0.0F) {
@@ -1687,24 +2201,33 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
}
if (this.mInventoryUnification) {
- if (tStack.getTagCompound()!= null && (tStack.getTagCompound().getTag("Mate")!= null || tStack.getTagCompound().getTag("Genome")!= null )) {
+ if (tStack.getTagCompound() != null
+ && (tStack.getTagCompound().getTag("Mate") != null
+ || tStack.getTagCompound().getTag("Genome") != null)) {
String orgMate = "";
- if(tStack.getTagCompound().getTag("Mate")!= null)
- orgMate = (tStack.getTagCompound().getCompoundTag("Mate")).getTagList("Chromosomes",10).getCompoundTagAt(0).getString("UID1");
+ if (tStack.getTagCompound().getTag("Mate") != null)
+ orgMate = (tStack.getTagCompound().getCompoundTag("Mate"))
+ .getTagList("Chromosomes", 10)
+ .getCompoundTagAt(0)
+ .getString("UID1");
String orgGen = orgMate;
- if(tStack.getTagCompound().getTag("Genome")!= null)
- orgGen = (tStack.getTagCompound().getCompoundTag("Genome")).getTagList("Chromosomes",10).getCompoundTagAt(0).getString("UID1");
+ if (tStack.getTagCompound().getTag("Genome") != null)
+ orgGen = (tStack.getTagCompound().getCompoundTag("Genome"))
+ .getTagList("Chromosomes", 10)
+ .getCompoundTagAt(0)
+ .getString("UID1");
- final boolean[] yn = {orgMate.contains("gendustry"),orgGen.contains("gendustry")};
+ final boolean[] yn = {orgMate.contains("gendustry"), orgGen.contains("gendustry")};
if (yn[0] || yn[1]) {
- final NBTTagCompound NBTTAGCOMPOUND = (NBTTagCompound) tStack.getTagCompound().copy();
+ final NBTTagCompound NBTTAGCOMPOUND = (NBTTagCompound)
+ tStack.getTagCompound().copy();
- //MATE
+ // MATE
if (yn[0]) {
final NBTTagCompound MATE = NBTTAGCOMPOUND.getCompoundTag("Mate");
final NBTTagList chromosomesMate = MATE.getTagList("Chromosomes", 10);
@@ -1712,17 +2235,17 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
String ident1 = species.getString("UID1");
final String[] split = ident1.split("[.]");
- ident1 = "gregtech.bee.species" + WordUtils.capitalize(split[2].toLowerCase(Locale.ENGLISH));
+ ident1 = "gregtech.bee.species"
+ + WordUtils.capitalize(split[2].toLowerCase(Locale.ENGLISH));
- if (AlleleManager.alleleRegistry.getAllele(ident1) == null)
- return;
+ if (AlleleManager.alleleRegistry.getAllele(ident1) == null) return;
String ident2 = species.getString("UID0");
final String[] split2 = ident2.split("[.]");
- ident2 = "gregtech.bee.species"+WordUtils.capitalize(split2[2].toLowerCase(Locale.ENGLISH));
+ ident2 = "gregtech.bee.species"
+ + WordUtils.capitalize(split2[2].toLowerCase(Locale.ENGLISH));
- if (AlleleManager.alleleRegistry.getAllele(ident2) == null)
- return;
+ if (AlleleManager.alleleRegistry.getAllele(ident2) == null) return;
final NBTTagCompound nuspeciesmate = new NBTTagCompound();
nuspeciesmate.setString("UID1", ident1);
@@ -1742,24 +2265,24 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
NBTTAGCOMPOUND.setTag("Mate", nuMate2);
}
if (yn[1]) {
- //Genome
+ // Genome
final NBTTagCompound genome = NBTTAGCOMPOUND.getCompoundTag("Genome");
final NBTTagList chromosomesGenome = genome.getTagList("Chromosomes", 10);
final NBTTagCompound speciesGenome = chromosomesGenome.getCompoundTagAt(0);
String ident1Genome = speciesGenome.getString("UID1");
final String[] splitGenome = ident1Genome.split("[.]");
- ident1Genome = "gregtech.bee.species" + WordUtils.capitalize(splitGenome[2].toLowerCase(Locale.ENGLISH));
+ ident1Genome = "gregtech.bee.species"
+ + WordUtils.capitalize(splitGenome[2].toLowerCase(Locale.ENGLISH));
- if (AlleleManager.alleleRegistry.getAllele(ident1Genome) == null)
- return;
+ if (AlleleManager.alleleRegistry.getAllele(ident1Genome) == null) return;
String ident2Genome = speciesGenome.getString("UID0");
final String[] splitGenome2 = ident2Genome.split("[.]");
- ident2Genome = "gregtech.bee.species" + WordUtils.capitalize(splitGenome2[2].toLowerCase(Locale.ENGLISH));
+ ident2Genome = "gregtech.bee.species"
+ + WordUtils.capitalize(splitGenome2[2].toLowerCase(Locale.ENGLISH));
- if (AlleleManager.alleleRegistry.getAllele(ident2Genome) == null)
- return;
+ if (AlleleManager.alleleRegistry.getAllele(ident2Genome) == null) return;
final NBTTagCompound nuspeciesgenome = new NBTTagCompound();
nuspeciesgenome.setString("UID1", ident1Genome);
@@ -1780,8 +2303,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
}
tStack.setTagCompound(new NBTTagCompound());
tStack.setTagCompound(NBTTAGCOMPOUND);
- }
- else return;
+ } else return;
}
GT_OreDictUnificator.setStack(true, tStack);
@@ -1792,7 +2314,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
ItemStack tStack;
if ((tStack = aEvent.player.inventory.armorInventory[i]) != null) {
if (!aEvent.player.capabilities.isCreativeMode) {
- GT_Utility.applyRadioactivity(aEvent.player, GT_Utility.getRadioactivityLevel(tStack), tStack.stackSize);
+ GT_Utility.applyRadioactivity(
+ aEvent.player, GT_Utility.getRadioactivityLevel(tStack), tStack.stackSize);
float tHeat = GT_Utility.getHeatDamageFromItem(tStack);
if (tHeat != 0.0F) {
if (tHeat > 0.0F) {
@@ -1824,8 +2347,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
@Override
public Object getServerGuiElement(int aID, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) {
- if(aID>=1000){
- int ID = aID-1000;
+ if (aID >= 1000) {
+ int ID = aID - 1000;
if (ID == 10) {
return new GT_ContainerVolumetricFlask(aPlayer.inventory);
}
@@ -1833,7 +2356,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
}
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
if ((tTileEntity instanceof IGregTechTileEntity)) {
- if (GUI_ID_COVER_SIDE_BASE <= aID && aID < GUI_ID_COVER_SIDE_BASE+6) {
+ if (GUI_ID_COVER_SIDE_BASE <= aID && aID < GUI_ID_COVER_SIDE_BASE + 6) {
return null;
}
IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity();
@@ -1846,8 +2369,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
@Override
public Object getClientGuiElement(int aID, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) {
- if(aID>=1000){
- int ID = aID-1000;
+ if (aID >= 1000) {
+ int ID = aID - 1000;
if (ID == 10) {
return new GT_GUIContainerVolumetricFlask(new GT_ContainerVolumetricFlask(aPlayer.inventory));
}
@@ -1857,12 +2380,18 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
if ((tTileEntity instanceof IGregTechTileEntity)) {
IGregTechTileEntity tile = (IGregTechTileEntity) tTileEntity;
- if (GUI_ID_COVER_SIDE_BASE <= aID && aID < GUI_ID_COVER_SIDE_BASE+6) {
+ if (GUI_ID_COVER_SIDE_BASE <= aID && aID < GUI_ID_COVER_SIDE_BASE + 6) {
byte side = (byte) (aID - GT_Proxy.GUI_ID_COVER_SIDE_BASE);
GT_CoverBehaviorBase<?> cover = tile.getCoverBehaviorAtSideNew(side);
if (cover.hasCoverGUI()) {
- return cover.getClientGUI(side, tile.getCoverIDAtSide(side), tile.getComplexCoverDataAtSide(side), tile, aPlayer, aWorld);
+ return cover.getClientGUI(
+ side,
+ tile.getCoverIDAtSide(side),
+ tile.getComplexCoverDataAtSide(side),
+ tile,
+ aPlayer,
+ aWorld);
}
return null;
}
@@ -1875,10 +2404,11 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
}
private static List<String> getOreDictNames(ItemStack stack) {
- return Arrays.stream(OreDictionary.getOreIDs(stack)).mapToObj(OreDictionary::getOreName).collect(Collectors.toList());
+ return Arrays.stream(OreDictionary.getOreIDs(stack))
+ .mapToObj(OreDictionary::getOreName)
+ .collect(Collectors.toList());
}
-
@Override
public int getBurnTime(ItemStack aFuel) {
if ((aFuel == null) || (aFuel.getItem() == null)) {
@@ -1898,64 +2428,113 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
rFuelValue = Math.max(rFuelValue, tValue);
} else {
// If not check the ore dict
- rFuelValue = Math.max(rFuelValue, getOreDictNames(aFuel).stream().mapToInt(f -> oreDictBurnTimes.getOrDefault(f, 0)).max().orElse(0));
+ rFuelValue = Math.max(
+ rFuelValue,
+ getOreDictNames(aFuel).stream()
+ .mapToInt(f -> oreDictBurnTimes.getOrDefault(f, 0))
+ .max()
+ .orElse(0));
}
// If we have something from the GT MetaGenerated_Item, ItemFuelValue, or OreDict return
if (rFuelValue > 0) return rFuelValue;
// Otherwise, a few more checks
- if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Blocks.wooden_button, 1))) return 150;
- else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Blocks.ladder, 1))) return 100;
- else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Items.sign, 1))) return 600;
- else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Items.wooden_door, 1))) return 600;
- else if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_MSSFUEL.get(1))) return 150000;
- else if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_SSFUEL.get(1))) return 100000;
+ if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Blocks.wooden_button, 1))) return 150;
+ else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Blocks.ladder, 1))) return 100;
+ else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Items.sign, 1))) return 600;
+ else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Items.wooden_door, 1))) return 600;
+ else if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_MSSFUEL.get(1))) return 150000;
+ else if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_SSFUEL.get(1))) return 100000;
return 0;
}
-
// ------------------------ Adds all fluids corresponding to materials ------------------------
- public Fluid addAutoGeneratedCorrespondingFluid(Materials aMaterial){
+ public Fluid addAutoGeneratedCorrespondingFluid(Materials aMaterial) {
// If the fluid is registered as custom inside the Material's constructor then to add custom fluid
- // textures go to blocks/fluids and place the .png. File should be called fluid.fluid.{unlocalised_name}.png. All lower case.
- String fluidTexture = aMaterial.mIconSet.is_custom ? ("fluid." + aMaterial.mName.toLowerCase()) : "autogenerated";
- return addFluid(aMaterial.mName.toLowerCase(Locale.ENGLISH), fluidTexture, aMaterial.mDefaultLocalName, aMaterial,
- aMaterial.mRGBa, 1, aMaterial.getLiquidTemperature(), GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), ItemList.Cell_Empty.get(1L), 1000);
- }
+ // textures go to blocks/fluids and place the .png. File should be called fluid.fluid.{unlocalised_name}.png.
+ // All lower case.
+ String fluidTexture =
+ aMaterial.mIconSet.is_custom ? ("fluid." + aMaterial.mName.toLowerCase()) : "autogenerated";
+ return addFluid(
+ aMaterial.mName.toLowerCase(Locale.ENGLISH),
+ fluidTexture,
+ aMaterial.mDefaultLocalName,
+ aMaterial,
+ aMaterial.mRGBa,
+ 1,
+ aMaterial.getLiquidTemperature(),
+ GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L),
+ ItemList.Cell_Empty.get(1L),
+ 1000);
+ }
public Fluid addAutoGeneratedCorrespondingGas(Materials aMaterial) {
// If the fluid is registered as custom inside the Material's constructor then to add custom fluid
- // textures go to blocks/fluids and place the .png. File should be called fluid.gas.{unlocalised_name}.png. All lower case.
+ // textures go to blocks/fluids and place the .png. File should be called fluid.gas.{unlocalised_name}.png. All
+ // lower case.
String fluidTexture = aMaterial.mIconSet.is_custom ? ("gas." + aMaterial.mName.toLowerCase()) : "autogenerated";
- return addFluid(aMaterial.mName.toLowerCase(Locale.ENGLISH), fluidTexture, aMaterial.mDefaultLocalName, aMaterial,
- aMaterial.mRGBa, 2, aMaterial.getGasTemperature(), GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), ItemList.Cell_Empty.get(1L), 1000);
+ return addFluid(
+ aMaterial.mName.toLowerCase(Locale.ENGLISH),
+ fluidTexture,
+ aMaterial.mDefaultLocalName,
+ aMaterial,
+ aMaterial.mRGBa,
+ 2,
+ aMaterial.getGasTemperature(),
+ GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L),
+ ItemList.Cell_Empty.get(1L),
+ 1000);
}
public Fluid addAutogeneratedPlasmaFluid(Materials aMaterial) {
// If the fluid is registered as custom inside the Material's constructor then to add custom fluid
- // textures go to blocks/fluids and place the .png. File should be called fluid.plasma.{unlocalised_name}.png. All lower case.
- String fluidTexture = aMaterial.mIconSet.is_custom ? ("plasma." + aMaterial.mName.toLowerCase()) : "plasma.autogenerated";
- return addFluid("plasma." + aMaterial.mName.toLowerCase(Locale.ENGLISH), fluidTexture, aMaterial.mDefaultLocalName + " Plasma", aMaterial,
- aMaterial.mMoltenRGBa, 3, 10000, GT_OreDictUnificator.get(OrePrefixes.cellPlasma, aMaterial, 1L), ItemList.Cell_Empty.get(1L), aMaterial.getMolten(1) != null ? 144 : 1000);
+ // textures go to blocks/fluids and place the .png. File should be called fluid.plasma.{unlocalised_name}.png.
+ // All lower case.
+ String fluidTexture =
+ aMaterial.mIconSet.is_custom ? ("plasma." + aMaterial.mName.toLowerCase()) : "plasma.autogenerated";
+ return addFluid(
+ "plasma." + aMaterial.mName.toLowerCase(Locale.ENGLISH),
+ fluidTexture,
+ aMaterial.mDefaultLocalName + " Plasma",
+ aMaterial,
+ aMaterial.mMoltenRGBa,
+ 3,
+ 10000,
+ GT_OreDictUnificator.get(OrePrefixes.cellPlasma, aMaterial, 1L),
+ ItemList.Cell_Empty.get(1L),
+ aMaterial.getMolten(1) != null ? 144 : 1000);
}
public Fluid addAutogeneratedMoltenFluid(Materials aMaterial) {
// If the fluid is registered as custom inside the Material's constructor then to add custom fluid
- // textures go to blocks/fluids and place the .png. File should be called fluid.molten.{unlocalised_name}.png. All lower case.
- String fluidTexture = aMaterial.mIconSet.is_custom ? ("molten." + aMaterial.mName.toLowerCase()) : "molten.autogenerated";
- return addFluid("molten." + aMaterial.mName.toLowerCase(Locale.ENGLISH), fluidTexture, "Molten " + aMaterial.mDefaultLocalName, aMaterial,
- aMaterial.mMoltenRGBa, 4, aMaterial.mMeltingPoint < 0 ? 1000 : aMaterial.mMeltingPoint, GT_OreDictUnificator.get(OrePrefixes.cellMolten, aMaterial, 1L), ItemList.Cell_Empty.get(1L), 144);
+ // textures go to blocks/fluids and place the .png. File should be called fluid.molten.{unlocalised_name}.png.
+ // All lower case.
+ String fluidTexture =
+ aMaterial.mIconSet.is_custom ? ("molten." + aMaterial.mName.toLowerCase()) : "molten.autogenerated";
+ return addFluid(
+ "molten." + aMaterial.mName.toLowerCase(Locale.ENGLISH),
+ fluidTexture,
+ "Molten " + aMaterial.mDefaultLocalName,
+ aMaterial,
+ aMaterial.mMoltenRGBa,
+ 4,
+ aMaterial.mMeltingPoint < 0 ? 1000 : aMaterial.mMeltingPoint,
+ GT_OreDictUnificator.get(OrePrefixes.cellMolten, aMaterial, 1L),
+ ItemList.Cell_Empty.get(1L),
+ 144);
}
// ------------------------------------------------------------------------------------------------------------
- public void addAutoGeneratedHydroCrackedFluids(Materials aMaterial){
+ public void addAutoGeneratedHydroCrackedFluids(Materials aMaterial) {
Fluid[] crackedFluids = new Fluid[3];
- String[] namePrefixes = { "lightlyhydrocracked.", "moderatelyhydrocracked.", "severelyhydrocracked." };
- OrePrefixes[] orePrefixes = { OrePrefixes.cellHydroCracked1, OrePrefixes.cellHydroCracked2, OrePrefixes.cellHydroCracked3 };
+ String[] namePrefixes = {"lightlyhydrocracked.", "moderatelyhydrocracked.", "severelyhydrocracked."};
+ OrePrefixes[] orePrefixes = {
+ OrePrefixes.cellHydroCracked1, OrePrefixes.cellHydroCracked2, OrePrefixes.cellHydroCracked3
+ };
GT_Fluid uncrackedFluid = null;
if (aMaterial.mFluid != null) {
uncrackedFluid = (GT_Fluid) aMaterial.mFluid;
@@ -1964,27 +2543,51 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
}
for (int i = 0; i < 3; i++) {
crackedFluids[i] = addFluid(
- namePrefixes[i] + aMaterial.mName.toLowerCase(Locale.ENGLISH), uncrackedFluid.mTextureName,
+ namePrefixes[i] + aMaterial.mName.toLowerCase(Locale.ENGLISH),
+ uncrackedFluid.mTextureName,
orePrefixes[i].mLocalizedMaterialPre + aMaterial.mDefaultLocalName,
- null, aMaterial.mRGBa, 2, 775,
+ null,
+ aMaterial.mRGBa,
+ 2,
+ 775,
GT_OreDictUnificator.get(orePrefixes[i], aMaterial, 1L),
- ItemList.Cell_Empty.get(1L), 1000);
+ ItemList.Cell_Empty.get(1L),
+ 1000);
int hydrogenAmount = 2 * i + 2;
- GT_Values.RA.addCrackingRecipe(i + 1, new FluidStack(uncrackedFluid, 1000), Materials.Hydrogen.getGas(hydrogenAmount * 800),
- new FluidStack(crackedFluids[i], 1000), 20 + 20 * i, 240);
- GT_Values.RA.addChemicalRecipe(Materials.Hydrogen.getCells(hydrogenAmount), GT_Utility.getIntegratedCircuit(i + 1), new FluidStack(uncrackedFluid, 1000),
- new FluidStack(crackedFluids[i], 800), Materials.Empty.getCells(hydrogenAmount), 160 + 80 * i, 30);
- GT_Values.RA.addChemicalRecipe(aMaterial.getCells(1), GT_Utility.getIntegratedCircuit(i + 1), Materials.Hydrogen.getGas(hydrogenAmount * 1000),
- new FluidStack(crackedFluids[i], 800), Materials.Empty.getCells(1), 160 + 80 * i, 30);
+ GT_Values.RA.addCrackingRecipe(
+ i + 1,
+ new FluidStack(uncrackedFluid, 1000),
+ Materials.Hydrogen.getGas(hydrogenAmount * 800),
+ new FluidStack(crackedFluids[i], 1000),
+ 20 + 20 * i,
+ 240);
+ GT_Values.RA.addChemicalRecipe(
+ Materials.Hydrogen.getCells(hydrogenAmount),
+ GT_Utility.getIntegratedCircuit(i + 1),
+ new FluidStack(uncrackedFluid, 1000),
+ new FluidStack(crackedFluids[i], 800),
+ Materials.Empty.getCells(hydrogenAmount),
+ 160 + 80 * i,
+ 30);
+ GT_Values.RA.addChemicalRecipe(
+ aMaterial.getCells(1),
+ GT_Utility.getIntegratedCircuit(i + 1),
+ Materials.Hydrogen.getGas(hydrogenAmount * 1000),
+ new FluidStack(crackedFluids[i], 800),
+ Materials.Empty.getCells(1),
+ 160 + 80 * i,
+ 30);
}
aMaterial.setHydroCrackedFluids(crackedFluids);
}
- public void addAutoGeneratedSteamCrackedFluids(Materials aMaterial){
+ public void addAutoGeneratedSteamCrackedFluids(Materials aMaterial) {
Fluid[] crackedFluids = new Fluid[3];
- String[] namePrefixes = { "lightlysteamcracked.", "moderatelysteamcracked.", "severelysteamcracked." };
- OrePrefixes[] orePrefixes = { OrePrefixes.cellSteamCracked1, OrePrefixes.cellSteamCracked2, OrePrefixes.cellSteamCracked3 };
+ String[] namePrefixes = {"lightlysteamcracked.", "moderatelysteamcracked.", "severelysteamcracked."};
+ OrePrefixes[] orePrefixes = {
+ OrePrefixes.cellSteamCracked1, OrePrefixes.cellSteamCracked2, OrePrefixes.cellSteamCracked3
+ };
GT_Fluid uncrackedFluid = null;
if (aMaterial.mFluid != null) {
uncrackedFluid = (GT_Fluid) aMaterial.mFluid;
@@ -1993,18 +2596,40 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
}
for (int i = 0; i < 3; i++) {
crackedFluids[i] = addFluid(
- namePrefixes[i] + aMaterial.mName.toLowerCase(Locale.ENGLISH), uncrackedFluid.mTextureName,
+ namePrefixes[i] + aMaterial.mName.toLowerCase(Locale.ENGLISH),
+ uncrackedFluid.mTextureName,
orePrefixes[i].mLocalizedMaterialPre + aMaterial.mDefaultLocalName,
- null, aMaterial.mRGBa, 2, 775,
+ null,
+ aMaterial.mRGBa,
+ 2,
+ 775,
GT_OreDictUnificator.get(orePrefixes[i], aMaterial, 1L),
- ItemList.Cell_Empty.get(1L), 1000);
-
- GT_Values.RA.addCrackingRecipe(i + 1, new FluidStack(uncrackedFluid, 1000), GT_ModHandler.getSteam(1000),
- new FluidStack(crackedFluids[i], 1200), 20 + 20 * i, 240);
- GT_Values.RA.addChemicalRecipe(GT_ModHandler.getIC2Item("steamCell", 1L), GT_Utility.getIntegratedCircuit(i + 1), new FluidStack(uncrackedFluid, 1000),
- new FluidStack(crackedFluids[i], 800), Materials.Empty.getCells(1), 160 + 80 * i, 30);
- GT_Values.RA.addChemicalRecipe(aMaterial.getCells(1), GT_Utility.getIntegratedCircuit(i + 1), GT_ModHandler.getSteam(1000),
- new FluidStack(crackedFluids[i], 800), Materials.Empty.getCells(1), 160 + 80 * i, 30);
+ ItemList.Cell_Empty.get(1L),
+ 1000);
+
+ GT_Values.RA.addCrackingRecipe(
+ i + 1,
+ new FluidStack(uncrackedFluid, 1000),
+ GT_ModHandler.getSteam(1000),
+ new FluidStack(crackedFluids[i], 1200),
+ 20 + 20 * i,
+ 240);
+ GT_Values.RA.addChemicalRecipe(
+ GT_ModHandler.getIC2Item("steamCell", 1L),
+ GT_Utility.getIntegratedCircuit(i + 1),
+ new FluidStack(uncrackedFluid, 1000),
+ new FluidStack(crackedFluids[i], 800),
+ Materials.Empty.getCells(1),
+ 160 + 80 * i,
+ 30);
+ GT_Values.RA.addChemicalRecipe(
+ aMaterial.getCells(1),
+ GT_Utility.getIntegratedCircuit(i + 1),
+ GT_ModHandler.getSteam(1000),
+ new FluidStack(crackedFluids[i], 800),
+ Materials.Empty.getCells(1),
+ 160 + 80 * i,
+ 30);
}
aMaterial.setSteamCrackedFluids(crackedFluids);
}
@@ -2013,13 +2638,39 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
return addFluid(aName, aLocalized, aMaterial, aState, aTemperatureK, null, null, 0);
}
- public Fluid addFluid(String aName, String aLocalized, Materials aMaterial, int aState, int aTemperatureK, ItemStack aFullContainer,
- ItemStack aEmptyContainer, int aFluidAmount) {
- return addFluid(aName, aName.toLowerCase(Locale.ENGLISH), aLocalized, aMaterial, null, aState, aTemperatureK, aFullContainer, aEmptyContainer, aFluidAmount);
+ public Fluid addFluid(
+ String aName,
+ String aLocalized,
+ Materials aMaterial,
+ int aState,
+ int aTemperatureK,
+ ItemStack aFullContainer,
+ ItemStack aEmptyContainer,
+ int aFluidAmount) {
+ return addFluid(
+ aName,
+ aName.toLowerCase(Locale.ENGLISH),
+ aLocalized,
+ aMaterial,
+ null,
+ aState,
+ aTemperatureK,
+ aFullContainer,
+ aEmptyContainer,
+ aFluidAmount);
}
- public Fluid addFluid(String aName, String aTexture, String aLocalized, Materials aMaterial, short[] aRGBa, int aState, int aTemperatureK,
- ItemStack aFullContainer, ItemStack aEmptyContainer, int aFluidAmount) {
+ public Fluid addFluid(
+ String aName,
+ String aTexture,
+ String aLocalized,
+ Materials aMaterial,
+ short[] aRGBa,
+ int aState,
+ int aTemperatureK,
+ ItemStack aFullContainer,
+ ItemStack aEmptyContainer,
+ int aFluidAmount) {
aName = aName.toLowerCase(Locale.ENGLISH);
Fluid rFluid = new GT_Fluid(aName, aTexture, aRGBa != null ? aRGBa : Dyes._NULL.getRGBA());
@@ -2070,9 +2721,15 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
aMaterial.mStandardMoltenFluid = rFluid;
}
}
- if ((aFullContainer != null) && (aEmptyContainer != null)
- && (!FluidContainerRegistry.registerFluidContainer(new FluidStack(rFluid, aFluidAmount), aFullContainer, aEmptyContainer))) {
- GT_Values.RA.addFluidCannerRecipe(aFullContainer, GT_Utility.getContainerItem(aFullContainer, false), null, new FluidStack(rFluid, aFluidAmount));
+ if ((aFullContainer != null)
+ && (aEmptyContainer != null)
+ && (!FluidContainerRegistry.registerFluidContainer(
+ new FluidStack(rFluid, aFluidAmount), aFullContainer, aEmptyContainer))) {
+ GT_Values.RA.addFluidCannerRecipe(
+ aFullContainer,
+ GT_Utility.getContainerItem(aFullContainer, false),
+ null,
+ new FluidStack(rFluid, aFluidAmount));
}
return rFluid;
}
@@ -2086,61 +2743,255 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
GregTech_API.sUnification.mConfig.load();
GT_OreDictUnificator.resetUnificationEntries();
for (OreDictEventContainer tOre : this.mEvents) {
- if ((!(tOre.mEvent.Ore.getItem() instanceof GT_MetaGenerated_Item)) && (tOre.mPrefix != null) && (tOre.mPrefix.mIsUnificatable) && (tOre.mMaterial != null)) {
+ if ((!(tOre.mEvent.Ore.getItem() instanceof GT_MetaGenerated_Item))
+ && (tOre.mPrefix != null)
+ && (tOre.mPrefix.mIsUnificatable)
+ && (tOre.mMaterial != null)) {
boolean chkmi = tOre.mModID != null;
if (chkmi) {
- if (tOre.mModID.equalsIgnoreCase("enderio") && tOre.mPrefix == OrePrefixes.ingot && tOre.mMaterial == Materials.DarkSteel) {
+ if (tOre.mModID.equalsIgnoreCase("enderio")
+ && tOre.mPrefix == OrePrefixes.ingot
+ && tOre.mMaterial == Materials.DarkSteel) {
GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
- GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(new StringBuilder().append(ConfigCategories.specialunificationtargets).append(".").append(tOre.mModID).toString(), tOre.mEvent.Name, true)), true);continue;
- } else if (tOre.mModID.equalsIgnoreCase("thermalfoundation") && tOre.mPrefix == OrePrefixes.dust && tOre.mMaterial == Materials.Blizz) {
+ GT_OreDictUnificator.set(
+ tOre.mPrefix,
+ tOre.mMaterial,
+ tOre.mEvent.Ore,
+ (GregTech_API.sUnification.get(
+ new StringBuilder()
+ .append(ConfigCategories.specialunificationtargets)
+ .append(".")
+ .append(tOre.mModID)
+ .toString(),
+ tOre.mEvent.Name,
+ true)),
+ true);
+ continue;
+ } else if (tOre.mModID.equalsIgnoreCase("thermalfoundation")
+ && tOre.mPrefix == OrePrefixes.dust
+ && tOre.mMaterial == Materials.Blizz) {
GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
- GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(new StringBuilder().append(ConfigCategories.specialunificationtargets).append(".").append(tOre.mModID).toString(), tOre.mEvent.Name, true)), true);continue;
- } else if (tOre.mModID.equalsIgnoreCase("thermalfoundation") && tOre.mPrefix == OrePrefixes.dust && tOre.mMaterial == Materials.Pyrotheum) {
+ GT_OreDictUnificator.set(
+ tOre.mPrefix,
+ tOre.mMaterial,
+ tOre.mEvent.Ore,
+ (GregTech_API.sUnification.get(
+ new StringBuilder()
+ .append(ConfigCategories.specialunificationtargets)
+ .append(".")
+ .append(tOre.mModID)
+ .toString(),
+ tOre.mEvent.Name,
+ true)),
+ true);
+ continue;
+ } else if (tOre.mModID.equalsIgnoreCase("thermalfoundation")
+ && tOre.mPrefix == OrePrefixes.dust
+ && tOre.mMaterial == Materials.Pyrotheum) {
GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
- GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(new StringBuilder().append(ConfigCategories.specialunificationtargets).append(".").append(tOre.mModID).toString(), tOre.mEvent.Name, true)), true);continue;
- } else if (tOre.mModID.equalsIgnoreCase(aTextArsmagica2) && tOre.mPrefix == OrePrefixes.dust && tOre.mMaterial == Materials.Vinteum) {
+ GT_OreDictUnificator.set(
+ tOre.mPrefix,
+ tOre.mMaterial,
+ tOre.mEvent.Ore,
+ (GregTech_API.sUnification.get(
+ new StringBuilder()
+ .append(ConfigCategories.specialunificationtargets)
+ .append(".")
+ .append(tOre.mModID)
+ .toString(),
+ tOre.mEvent.Name,
+ true)),
+ true);
+ continue;
+ } else if (tOre.mModID.equalsIgnoreCase(aTextArsmagica2)
+ && tOre.mPrefix == OrePrefixes.dust
+ && tOre.mMaterial == Materials.Vinteum) {
GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
- GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(new StringBuilder().append(ConfigCategories.specialunificationtargets).append(".").append(tOre.mModID).toString(), tOre.mEvent.Name, true)), true);continue;
- } else if (tOre.mModID.equalsIgnoreCase(aTextArsmagica2) && tOre.mPrefix == OrePrefixes.gem && tOre.mMaterial == Materials.BlueTopaz) {
+ GT_OreDictUnificator.set(
+ tOre.mPrefix,
+ tOre.mMaterial,
+ tOre.mEvent.Ore,
+ (GregTech_API.sUnification.get(
+ new StringBuilder()
+ .append(ConfigCategories.specialunificationtargets)
+ .append(".")
+ .append(tOre.mModID)
+ .toString(),
+ tOre.mEvent.Name,
+ true)),
+ true);
+ continue;
+ } else if (tOre.mModID.equalsIgnoreCase(aTextArsmagica2)
+ && tOre.mPrefix == OrePrefixes.gem
+ && tOre.mMaterial == Materials.BlueTopaz) {
GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
- GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(new StringBuilder().append(ConfigCategories.specialunificationtargets).append(".").append(tOre.mModID).toString(), tOre.mEvent.Name, true)), true);continue;
- } else if (tOre.mModID.equalsIgnoreCase(aTextArsmagica2) && tOre.mPrefix == OrePrefixes.gem && tOre.mMaterial == Materials.Chimerite) {
+ GT_OreDictUnificator.set(
+ tOre.mPrefix,
+ tOre.mMaterial,
+ tOre.mEvent.Ore,
+ (GregTech_API.sUnification.get(
+ new StringBuilder()
+ .append(ConfigCategories.specialunificationtargets)
+ .append(".")
+ .append(tOre.mModID)
+ .toString(),
+ tOre.mEvent.Name,
+ true)),
+ true);
+ continue;
+ } else if (tOre.mModID.equalsIgnoreCase(aTextArsmagica2)
+ && tOre.mPrefix == OrePrefixes.gem
+ && tOre.mMaterial == Materials.Chimerite) {
GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
- GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(new StringBuilder().append(ConfigCategories.specialunificationtargets).append(".").append(tOre.mModID).toString(), tOre.mEvent.Name, true)), true);continue;
- } else if (tOre.mModID.equalsIgnoreCase(aTextArsmagica2) && tOre.mPrefix == OrePrefixes.gem && tOre.mMaterial == Materials.Moonstone) {
+ GT_OreDictUnificator.set(
+ tOre.mPrefix,
+ tOre.mMaterial,
+ tOre.mEvent.Ore,
+ (GregTech_API.sUnification.get(
+ new StringBuilder()
+ .append(ConfigCategories.specialunificationtargets)
+ .append(".")
+ .append(tOre.mModID)
+ .toString(),
+ tOre.mEvent.Name,
+ true)),
+ true);
+ continue;
+ } else if (tOre.mModID.equalsIgnoreCase(aTextArsmagica2)
+ && tOre.mPrefix == OrePrefixes.gem
+ && tOre.mMaterial == Materials.Moonstone) {
GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
- GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(new StringBuilder().append(ConfigCategories.specialunificationtargets).append(".").append(tOre.mModID).toString(), tOre.mEvent.Name, true)), true);continue;
- } else if (tOre.mModID.equalsIgnoreCase(aTextArsmagica2) && tOre.mPrefix == OrePrefixes.gem && tOre.mMaterial == Materials.Sunstone) {
+ GT_OreDictUnificator.set(
+ tOre.mPrefix,
+ tOre.mMaterial,
+ tOre.mEvent.Ore,
+ (GregTech_API.sUnification.get(
+ new StringBuilder()
+ .append(ConfigCategories.specialunificationtargets)
+ .append(".")
+ .append(tOre.mModID)
+ .toString(),
+ tOre.mEvent.Name,
+ true)),
+ true);
+ continue;
+ } else if (tOre.mModID.equalsIgnoreCase(aTextArsmagica2)
+ && tOre.mPrefix == OrePrefixes.gem
+ && tOre.mMaterial == Materials.Sunstone) {
GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
- GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(new StringBuilder().append(ConfigCategories.specialunificationtargets).append(".").append(tOre.mModID).toString(), tOre.mEvent.Name, true)), true);continue;
- } else if (tOre.mModID.equalsIgnoreCase("rotarycraft") && tOre.mPrefix == OrePrefixes.ingot && tOre.mMaterial == Materials.HSLA) {
+ GT_OreDictUnificator.set(
+ tOre.mPrefix,
+ tOre.mMaterial,
+ tOre.mEvent.Ore,
+ (GregTech_API.sUnification.get(
+ new StringBuilder()
+ .append(ConfigCategories.specialunificationtargets)
+ .append(".")
+ .append(tOre.mModID)
+ .toString(),
+ tOre.mEvent.Name,
+ true)),
+ true);
+ continue;
+ } else if (tOre.mModID.equalsIgnoreCase("rotarycraft")
+ && tOre.mPrefix == OrePrefixes.ingot
+ && tOre.mMaterial == Materials.HSLA) {
GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
- GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(new StringBuilder().append(ConfigCategories.specialunificationtargets).append(".").append(tOre.mModID).toString(), tOre.mEvent.Name, true)), true);continue;
- } else if (tOre.mModID.equalsIgnoreCase("appliedenergistics2") && tOre.mPrefix == OrePrefixes.gem && tOre.mMaterial == Materials.CertusQuartz) {
+ GT_OreDictUnificator.set(
+ tOre.mPrefix,
+ tOre.mMaterial,
+ tOre.mEvent.Ore,
+ (GregTech_API.sUnification.get(
+ new StringBuilder()
+ .append(ConfigCategories.specialunificationtargets)
+ .append(".")
+ .append(tOre.mModID)
+ .toString(),
+ tOre.mEvent.Name,
+ true)),
+ true);
+ continue;
+ } else if (tOre.mModID.equalsIgnoreCase("appliedenergistics2")
+ && tOre.mPrefix == OrePrefixes.gem
+ && tOre.mMaterial == Materials.CertusQuartz) {
GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
- GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(new StringBuilder().append(ConfigCategories.specialunificationtargets).append(".").append(tOre.mModID).toString(), tOre.mEvent.Name, true)), true);continue;
- } else if (tOre.mModID.equalsIgnoreCase("appliedenergistics2") && tOre.mPrefix == OrePrefixes.dust && tOre.mMaterial == Materials.CertusQuartz) {
+ GT_OreDictUnificator.set(
+ tOre.mPrefix,
+ tOre.mMaterial,
+ tOre.mEvent.Ore,
+ (GregTech_API.sUnification.get(
+ new StringBuilder()
+ .append(ConfigCategories.specialunificationtargets)
+ .append(".")
+ .append(tOre.mModID)
+ .toString(),
+ tOre.mEvent.Name,
+ true)),
+ true);
+ continue;
+ } else if (tOre.mModID.equalsIgnoreCase("appliedenergistics2")
+ && tOre.mPrefix == OrePrefixes.dust
+ && tOre.mMaterial == Materials.CertusQuartz) {
GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
- GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(new StringBuilder().append(ConfigCategories.specialunificationtargets).append(".").append(tOre.mModID).toString(), tOre.mEvent.Name, true)), true);continue;
+ GT_OreDictUnificator.set(
+ tOre.mPrefix,
+ tOre.mMaterial,
+ tOre.mEvent.Ore,
+ (GregTech_API.sUnification.get(
+ new StringBuilder()
+ .append(ConfigCategories.specialunificationtargets)
+ .append(".")
+ .append(tOre.mModID)
+ .toString(),
+ tOre.mEvent.Name,
+ true)),
+ true);
+ continue;
}
}
if (GT_OreDictUnificator.isBlacklisted(tOre.mEvent.Ore)) {
GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, true);
} else {
GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
- GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (chkmi) && (GregTech_API.sUnification.get(new StringBuilder().append(ConfigCategories.specialunificationtargets).append(".").append(tOre.mModID).toString(), tOre.mEvent.Name, false)), true);
+ GT_OreDictUnificator.set(
+ tOre.mPrefix,
+ tOre.mMaterial,
+ tOre.mEvent.Ore,
+ (chkmi)
+ && (GregTech_API.sUnification.get(
+ new StringBuilder()
+ .append(ConfigCategories.specialunificationtargets)
+ .append(".")
+ .append(tOre.mModID)
+ .toString(),
+ tOre.mEvent.Name,
+ false)),
+ true);
}
}
}
for (OreDictEventContainer tOre : this.mEvents) {
- if (((tOre.mEvent.Ore.getItem() instanceof GT_MetaGenerated_Item)) && (tOre.mPrefix != null) && (tOre.mPrefix.mIsUnificatable)
+ if (((tOre.mEvent.Ore.getItem() instanceof GT_MetaGenerated_Item))
+ && (tOre.mPrefix != null)
+ && (tOre.mPrefix.mIsUnificatable)
&& (tOre.mMaterial != null)) {
if (GT_OreDictUnificator.isBlacklisted(tOre.mEvent.Ore)) {
GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, true);
} else {
GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
- GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (tOre.mModID != null) &&
- (GregTech_API.sUnification.get(new StringBuilder().append(ConfigCategories.specialunificationtargets).append(".").append(tOre.mModID), tOre.mEvent.Name, false)), true);
+ GT_OreDictUnificator.set(
+ tOre.mPrefix,
+ tOre.mMaterial,
+ tOre.mEvent.Ore,
+ (tOre.mModID != null)
+ && (GregTech_API.sUnification.get(
+ new StringBuilder()
+ .append(ConfigCategories.specialunificationtargets)
+ .append(".")
+ .append(tOre.mModID),
+ tOre.mEvent.Name,
+ false)),
+ true);
}
}
}
@@ -2154,32 +3005,38 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
this.mOreDictActivated = true;
ProgressManager.ProgressBar progressBar = ProgressManager.push("Register materials", mEvents.size());
- if (Loader.isModLoaded("betterloadingscreen")){
+ if (Loader.isModLoaded("betterloadingscreen")) {
GT_Values.cls_enabled = true;
try {
GT_CLS_Compat.stepMaterialsCLS(mEvents, progressBar);
} catch (IllegalAccessException | InvocationTargetException e) {
GT_FML_LOGGER.catching(e);
}
- }
- else
- GT_Proxy.stepMaterialsVanilla(this.mEvents,progressBar);
-
+ } else GT_Proxy.stepMaterialsVanilla(this.mEvents, progressBar);
}
@Deprecated
- public static final HashMap<Integer,HashMap<ChunkCoordIntPair,int []>> dimensionWiseChunkData = new HashMap<>(16);//stores chunk data that is loaded/saved
- public static final HashMap<Integer,GT_Pollution> dimensionWisePollution = new HashMap<>(16);//stores GT_Polluttors objects
- public static final byte GTOIL=3,GTOILFLUID=2,GTPOLLUTION=1,GTMETADATA=0,NOT_LOADED=0,LOADED=1;//consts
-
- //TO get default's fast
+ public static final HashMap<Integer, HashMap<ChunkCoordIntPair, int[]>> dimensionWiseChunkData =
+ new HashMap<>(16); // stores chunk data that is loaded/saved
+
+ public static final HashMap<Integer, GT_Pollution> dimensionWisePollution =
+ new HashMap<>(16); // stores GT_Polluttors objects
+ public static final byte GTOIL = 3,
+ GTOILFLUID = 2,
+ GTPOLLUTION = 1,
+ GTMETADATA = 0,
+ NOT_LOADED = 0,
+ LOADED = 1; // consts
+
+ // TO get default's fast
@Deprecated
- public static int[] getDefaultChunkDataOnCreation(){
- return new int[]{NOT_LOADED,0,-1,-1};
+ public static int[] getDefaultChunkDataOnCreation() {
+ return new int[] {NOT_LOADED, 0, -1, -1};
}
+
@Deprecated
- public static int[] getDefaultChunkDataOnLoad(){
- return new int[]{LOADED,0,-1,-1};
+ public static int[] getDefaultChunkDataOnLoad() {
+ return new int[] {LOADED, 0, -1, -1};
}
@SubscribeEvent
@@ -2189,18 +3046,25 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
}
@SubscribeEvent
- public void onBlockBreakSpeedEvent(PlayerEvent.BreakSpeed aEvent)
- {
- if (aEvent.newSpeed > 0.0F)
- {
- if (aEvent.entityPlayer != null)
- {
- ItemStack aStack = aEvent.entityPlayer.getCurrentEquippedItem();
- if ((aStack != null) && ((aStack.getItem() instanceof GT_MetaGenerated_Tool))) {
- aEvent.newSpeed = ((GT_MetaGenerated_Tool)aStack.getItem()).onBlockBreakSpeedEvent(aEvent.newSpeed, aStack, aEvent.entityPlayer, aEvent.block, aEvent.x, aEvent.y, aEvent.z, (byte)aEvent.metadata, aEvent);
- }
+ public void onBlockBreakSpeedEvent(PlayerEvent.BreakSpeed aEvent) {
+ if (aEvent.newSpeed > 0.0F) {
+ if (aEvent.entityPlayer != null) {
+ ItemStack aStack = aEvent.entityPlayer.getCurrentEquippedItem();
+ if ((aStack != null) && ((aStack.getItem() instanceof GT_MetaGenerated_Tool))) {
+ aEvent.newSpeed = ((GT_MetaGenerated_Tool) aStack.getItem())
+ .onBlockBreakSpeedEvent(
+ aEvent.newSpeed,
+ aStack,
+ aEvent.entityPlayer,
+ aEvent.block,
+ aEvent.x,
+ aEvent.y,
+ aEvent.z,
+ (byte) aEvent.metadata,
+ aEvent);
+ }
+ }
}
- }
}
public static class OreDictEventContainer {
@@ -2209,7 +3073,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
public final Materials mMaterial;
public final String mModID;
- public OreDictEventContainer(OreDictionary.OreRegisterEvent aEvent, OrePrefixes aPrefix, Materials aMaterial, String aModID) {
+ public OreDictEventContainer(
+ OreDictionary.OreRegisterEvent aEvent, OrePrefixes aPrefix, Materials aMaterial, String aModID) {
this.mEvent = aEvent;
this.mPrefix = aPrefix;
this.mMaterial = aMaterial;
@@ -2218,27 +3083,27 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
}
@SubscribeEvent
- public void onBlockEvent(BlockEvent event) {
+ public void onBlockEvent(BlockEvent event) {
if (event.block.getUnlocalizedName().equals("blockAlloyGlass"))
GregTech_API.causeMachineUpdate(event.world, event.x, event.y, event.z);
}
- public static void addFullHazmatToGeneralItem(String aModID, String aItem, long aAmount, int aMeta){
+ public static void addFullHazmatToGeneralItem(String aModID, String aItem, long aAmount, int aMeta) {
ItemStack item = GT_ModHandler.getModItem(aModID, aItem, aAmount, aMeta);
addItemToHazmatLists(item);
}
- public static void addFullHazmatToGeneralItem(String aModID, String aItem, long aAmount){
+ public static void addFullHazmatToGeneralItem(String aModID, String aItem, long aAmount) {
ItemStack item = GT_ModHandler.getModItem(aModID, aItem, aAmount, W);
addItemToHazmatLists(item);
}
- public static void addFullHazmatToIC2Item(String aItem){
+ public static void addFullHazmatToIC2Item(String aItem) {
ItemStack item = GT_ModHandler.getIC2Item(aItem, 1L, W);
addItemToHazmatLists(item);
}
- private static void addItemToHazmatLists(ItemStack item){
+ private static void addItemToHazmatLists(ItemStack item) {
GregTech_API.sGasHazmatList.add(item);
GregTech_API.sBioHazmatList.add(item);
GregTech_API.sFrostHazmatList.add(item);
@@ -2247,7 +3112,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
GregTech_API.sElectroHazmatList.add(item);
}
- public static boolean providesProtection(ItemStack aStack){
+ public static boolean providesProtection(ItemStack aStack) {
boolean isGas = GT_Utility.isStackInList(aStack, GregTech_API.sGasHazmatList);
boolean isBio = GT_Utility.isStackInList(aStack, GregTech_API.sBioHazmatList);
boolean isFrost = GT_Utility.isStackInList(aStack, GregTech_API.sFrostHazmatList);
@@ -2261,8 +3126,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG
public void onItemTooltip(ItemTooltipEvent event) {
if (event.itemStack == null) {
return;
- }
- else {
+ } else {
ItemStack aStackTemp = event.itemStack;
GT_ItemStack aStack = new GT_ItemStack(aStackTemp);
if (providesProtection(aStackTemp)) {