aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java1198
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java67
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java52
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java217
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java9
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java40
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java78
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java339
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java125
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java105
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java791
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java802
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java901
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java285
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java77
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java965
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java26
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java76
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Prospecting_Ex.java194
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java726
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractTerminal.java628
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Solar.java267
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java255
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java156
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java253
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java234
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySuperCondensor.java212
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityChunkLoader.java253
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java329
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_AlloyBlastSmelter.java434
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCentrifuge.java351
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCokeOven.java476
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialElectrolyzer.java347
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialMacerator.java346
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialPlatePress.java284
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialSinter.java327
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWireMill.java289
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IronBlastFurnace.java778
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MassFabricator.java528
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MultiTank.java602
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_PowerSubStationController.java274
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java258
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Base.java152
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java315
44 files changed, 8595 insertions, 6826 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java b/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java
index 1d6ba126b6..dde081e520 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java
@@ -29,199 +29,267 @@ import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
public class Meta_GT_Proxy {
-
- //Store Some MetaTileEntity Data here, why not?
- public static final IMetaTileEntity[] METATILEENTITIES = new IMetaTileEntity[GregTech_API.MAXIMUM_METATILE_IDS];
- public static List<Runnable> GT_BlockIconload = new ArrayList<Runnable>();
- public static List<Runnable> GT_ItemIconload = new ArrayList<Runnable>();
-
-
-
+ // Dunno
+ public static class GregtechOreDictEventContainer {
+ public final OreDictionary.OreRegisterEvent mEvent;
+ public final GregtechOrePrefixes mPrefix;
+ public final GT_Materials mMaterial;
+ public final String mModID;
+
+ public GregtechOreDictEventContainer(final OreDictionary.OreRegisterEvent aEvent,
+ final GregtechOrePrefixes aPrefix, final GT_Materials aMaterial, final String aModID) {
+ this.mEvent = aEvent;
+ this.mPrefix = aPrefix;
+ this.mMaterial = aMaterial;
+ this.mModID = aModID == null || aModID.equals("UNKNOWN") ? null : aModID;
+ }
+ }
+
+ // Store Some MetaTileEntity Data here, why not?
+ public static final IMetaTileEntity[] METATILEENTITIES = new IMetaTileEntity[GregTech_API.MAXIMUM_METATILE_IDS];
+ public static List<Runnable> GT_BlockIconload = new ArrayList<Runnable>();
+
+ public static List<Runnable> GT_ItemIconload = new ArrayList<Runnable>();
+
@SideOnly(Side.CLIENT)
- public static IIconRegister sBlockIcons, sItemIcons;
+ public static IIconRegister sBlockIcons, sItemIcons;
+ // Silly Vars
+ private static final Collection<String> mIgnoredItems = new HashSet<String>(
+ Arrays.asList(new String[] {
+ "itemGhastTear", "itemFlint", "itemClay", "itemBucketSaltWater", "itemBucketFreshWater",
+ "itemBucketWater", "itemRock", "itemReed", "itemArrow", "itemSaw", "itemKnife", "itemHammer",
+ "itemChisel", "itemRubber", "itemEssence", "itemIlluminatedPanel", "itemSkull", "itemRawRubber",
+ "itemBacon", "itemJetpackAccelerator", "itemLazurite", "itemIridium", "itemTear", "itemClaw",
+ "itemFertilizer", "itemTar", "itemSlimeball", "itemCoke", "itemBeeswax", "itemBeeQueen",
+ "itemForcicium", "itemForcillium", "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 static final Collection<String> mIgnoredNames = new HashSet<String>(
+ Arrays.asList(new String[] {
+ "grubBee", "chainLink", "candyCane", "bRedString", "bVial", "bFlask", "anorthositeSmooth",
+ "migmatiteSmooth", "slateSmooth", "travertineSmooth", "limestoneSmooth", "orthogneissSmooth",
+ "marbleSmooth", "honeyDrop", "lumpClay", "honeyEqualssugar", "flourEqualswheat",
+ "bluestoneInsulated", "blockWaterstone", "blockSand", "blockTorch", "blockPumpkin",
+ "blockClothRock", "blockStainedHardenedClay", "blockQuartzPillar", "blockQuartzChiselled",
+ "blockSpawner", "blockCloth", "mobHead", "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 static final Collection<String> mInvalidNames = new HashSet<String>(
+ Arrays.asList(new String[] {
+ "diamondShard", "redstoneRoot", "obsidianStick", "bloodstoneOre", "universalCable", "bronzeTube",
+ "ironTube", "netherTube", "obbyTube", "infiniteBattery", "eliteBattery", "advancedBattery",
+ "10kEUStore", "blueDye", "MonazitOre", "quartzCrystal", "whiteLuminiteCrystal", "darkStoneIngot",
+ "invisiumIngot", "demoniteOrb", "enderGem", "starconiumGem", "osmoniumIngot", "tapaziteGem",
+ "zectiumIngot", "foolsRubyGem", "rubyGem", "meteoriteGem", "adamiteShard", "sapphireGem",
+ "copperIngot", "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"
+ }));
+ public static boolean mOreDictActivated = false;
+ public static boolean mSortToTheEnd = true;
+ public final static HashSet<ItemStack> mRegisteredOres = new HashSet<ItemStack>(10000);
+ public final static Collection<GregtechOreDictEventContainer> mEvents = new HashSet<GregtechOreDictEventContainer>();
- //Silly Vars
- private static final Collection<String> mIgnoredItems = new HashSet<String>(Arrays.asList(new String[]{"itemGhastTear", "itemFlint", "itemClay", "itemBucketSaltWater",
- "itemBucketFreshWater", "itemBucketWater", "itemRock", "itemReed", "itemArrow", "itemSaw", "itemKnife", "itemHammer", "itemChisel", "itemRubber",
- "itemEssence", "itemIlluminatedPanel", "itemSkull", "itemRawRubber", "itemBacon", "itemJetpackAccelerator", "itemLazurite", "itemIridium",
- "itemTear", "itemClaw", "itemFertilizer", "itemTar", "itemSlimeball", "itemCoke", "itemBeeswax", "itemBeeQueen", "itemForcicium", "itemForcillium",
- "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 static final Collection<String> mIgnoredNames = new HashSet<String>(Arrays.asList(new String[]{"grubBee", "chainLink", "candyCane", "bRedString", "bVial",
- "bFlask", "anorthositeSmooth", "migmatiteSmooth", "slateSmooth", "travertineSmooth", "limestoneSmooth", "orthogneissSmooth", "marbleSmooth",
- "honeyDrop", "lumpClay", "honeyEqualssugar", "flourEqualswheat", "bluestoneInsulated", "blockWaterstone", "blockSand", "blockTorch",
- "blockPumpkin", "blockClothRock", "blockStainedHardenedClay", "blockQuartzPillar", "blockQuartzChiselled", "blockSpawner", "blockCloth", "mobHead",
- "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 static final Collection<String> mInvalidNames = new HashSet<String>(Arrays.asList(new String[]{"diamondShard", "redstoneRoot", "obsidianStick", "bloodstoneOre",
- "universalCable", "bronzeTube", "ironTube", "netherTube", "obbyTube", "infiniteBattery", "eliteBattery", "advancedBattery", "10kEUStore",
- "blueDye", "MonazitOre", "quartzCrystal", "whiteLuminiteCrystal", "darkStoneIngot", "invisiumIngot", "demoniteOrb", "enderGem", "starconiumGem",
- "osmoniumIngot", "tapaziteGem", "zectiumIngot", "foolsRubyGem", "rubyGem", "meteoriteGem", "adamiteShard", "sapphireGem", "copperIngot",
- "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"}));
- public static boolean mOreDictActivated = false;
- public static boolean mSortToTheEnd = true;
- public final static HashSet<ItemStack> mRegisteredOres = new HashSet<ItemStack>(10000);
- public final static Collection<GregtechOreDictEventContainer> mEvents = new HashSet<GregtechOreDictEventContainer>();
- public final static Collection<OreDictEventContainer> mEventsFake = new HashSet<OreDictEventContainer>();
+ public final static Collection<OreDictEventContainer> mEventsFake = new HashSet<OreDictEventContainer>();
- public Meta_GT_Proxy() {
- Utils.LOG_INFO("GT_PROXY - initialized.");
- for (String tOreName : OreDictionary.getOreNames()) {
- ItemStack tOreStack;
- for (Iterator<?> i$ = OreDictionary.getOres(tOreName).iterator(); i$.hasNext(); registerOre(new OreDictionary.OreRegisterEvent(tOreName, tOreStack))) {
- tOreStack = (ItemStack) i$.next();
- }
+ /*
+ * public static Fluid addFluid(String aName, String aLocalized,
+ * GT_Materials aMaterial, int aState, int aTemperatureK) { return
+ * addFluid(aName, aLocalized, aMaterial, aState, aTemperatureK, null, null,
+ * 0); }
+ *
+ * public static Fluid addFluid(String aName, String aLocalized,
+ * GT_Materials aMaterial, int aState, int aTemperatureK, ItemStack
+ * aFullContainer, ItemStack aEmptyContainer, int aFluidAmount) { return
+ * addFluid(aName, aName.toLowerCase(), aLocalized, aMaterial, null, aState,
+ * aTemperatureK, aFullContainer, aEmptyContainer, aFluidAmount); }
+ *
+ * public static Fluid addFluid(String aName, String aTexture, String
+ * aLocalized, GT_Materials aMaterial, short[] aRGBa, int aState, int
+ * aTemperatureK, ItemStack aFullContainer, ItemStack aEmptyContainer, int
+ * aFluidAmount) { aName = aName.toLowerCase(); Fluid rFluid = new
+ * GregtechFluid(aName, aTexture, aRGBa != null ? aRGBa :
+ * Dyes._NULL.getRGBA());
+ * GT_LanguageManager.addStringLocalization(rFluid.getUnlocalizedName(),
+ * aLocalized == null ? aName : aLocalized); if
+ * (FluidRegistry.registerFluid(rFluid)) { switch (aState) { case 0:
+ * rFluid.setGaseous(false); rFluid.setViscosity(10000); break; case 1: case
+ * 4: rFluid.setGaseous(false); rFluid.setViscosity(1000); break; case 2:
+ * rFluid.setGaseous(true); rFluid.setDensity(-100);
+ * rFluid.setViscosity(200); break; case 3: rFluid.setGaseous(true);
+ * rFluid.setDensity(55536); rFluid.setViscosity(10);
+ * rFluid.setLuminosity(15); } } else { rFluid =
+ * FluidRegistry.getFluid(aName); } if (rFluid.getTemperature() == new
+ * Fluid("test").getTemperature()) { rFluid.setTemperature(aTemperatureK); }
+ * if (aMaterial != null) { switch (aState) { case 0: aMaterial.mSolid =
+ * rFluid; break; case 1: aMaterial.mFluid = rFluid; break; case 2:
+ * aMaterial.mGas = rFluid; break; case 3: aMaterial.mPlasma = rFluid;
+ * break; case 4: 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)); } return rFluid; }
+ */
+
+ /**
+ * This gives you a new BaseMetaTileEntity. As some Interfaces are not
+ * always loaded (Buildcraft, Univeral Electricity) I have to use Invocation
+ * at the Constructor of the BaseMetaTileEntity
+ */
+ private static Class<BaseMetaTileEntity> sBaseMetaTileEntityClass = null;
+
+ public static void activateOreDictHandler() {
+ Meta_GT_Proxy.mOreDictActivated = true;
+ GregtechOreDictEventContainer tEvent;
+ if (Meta_GT_Proxy.mEvents.size() == 0) {
+ Utils.LOG_INFO("Found nothing to iterate over for use in material addition.");
+ }
+ for (final Iterator<GregtechOreDictEventContainer> i$ = Meta_GT_Proxy.mEvents.iterator(); i$
+ .hasNext(); Meta_GT_Proxy.registerRecipes(tEvent)) {
+ tEvent = i$.next();
+ }
+ OreDictEventContainer tEvent2;
+ if (Meta_GT_Proxy.mEventsFake.size() == 0) {
+ Utils.LOG_INFO("Found nothing to iterate over for use in GT material addition.");
+ }
+ for (final Iterator<OreDictEventContainer> i$ = Meta_GT_Proxy.mEventsFake.iterator(); i$
+ .hasNext(); Meta_GT_Proxy.registerRecipes(tEvent2)) {
+ tEvent2 = i$.next();
}
}
- /*public static Fluid addFluid(String aName, String aLocalized, GT_Materials aMaterial, int aState, int aTemperatureK) {
- return addFluid(aName, aLocalized, aMaterial, aState, aTemperatureK, null, null, 0);
+ public static boolean areWeUsingGregtech5uExperimental() {
+ final int version = GregTech_API.VERSION;
+ if (version == 508 || version == 507) {
+ return false;
+ }
+ else if (version == 509) {
+ return true;
+ }
+ else {
+ return false;
+ }
}
- public static Fluid addFluid(String aName, String aLocalized, GT_Materials aMaterial, int aState, int aTemperatureK, ItemStack aFullContainer,
- ItemStack aEmptyContainer, int aFluidAmount) {
- return addFluid(aName, aName.toLowerCase(), aLocalized, aMaterial, null, aState, aTemperatureK, aFullContainer, aEmptyContainer, aFluidAmount);
- }
+ public static BaseMetaTileEntity constructBaseMetaTileEntity() {
+ if (Meta_GT_Proxy.sBaseMetaTileEntityClass == null) {
+ try {
+ return (Meta_GT_Proxy.sBaseMetaTileEntityClass = BaseMetaTileEntity.class).newInstance();
+ }
+ catch (final Throwable e) {
+ /* Do nothing */}
+ }
- public static Fluid addFluid(String aName, String aTexture, String aLocalized, GT_Materials aMaterial, short[] aRGBa, int aState, int aTemperatureK,
- ItemStack aFullContainer, ItemStack aEmptyContainer, int aFluidAmount) {
- aName = aName.toLowerCase();
- Fluid rFluid = new GregtechFluid(aName, aTexture, aRGBa != null ? aRGBa : Dyes._NULL.getRGBA());
- GT_LanguageManager.addStringLocalization(rFluid.getUnlocalizedName(), aLocalized == null ? aName : aLocalized);
- if (FluidRegistry.registerFluid(rFluid)) {
- switch (aState) {
- case 0:
- rFluid.setGaseous(false);
- rFluid.setViscosity(10000);
- break;
- case 1:
- case 4:
- rFluid.setGaseous(false);
- rFluid.setViscosity(1000);
- break;
- case 2:
- rFluid.setGaseous(true);
- rFluid.setDensity(-100);
- rFluid.setViscosity(200);
- break;
- case 3:
- rFluid.setGaseous(true);
- rFluid.setDensity(55536);
- rFluid.setViscosity(10);
- rFluid.setLuminosity(15);
- }
- } else {
- rFluid = FluidRegistry.getFluid(aName);
- }
- if (rFluid.getTemperature() == new Fluid("test").getTemperature()) {
- rFluid.setTemperature(aTemperatureK);
- }
- if (aMaterial != null) {
- switch (aState) {
- case 0:
- aMaterial.mSolid = rFluid;
- break;
- case 1:
- aMaterial.mFluid = rFluid;
- break;
- case 2:
- aMaterial.mGas = rFluid;
- break;
- case 3:
- aMaterial.mPlasma = rFluid;
- break;
- case 4:
- 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));
- }
- return rFluid;
- }*/
+ try {
+ return Meta_GT_Proxy.sBaseMetaTileEntityClass.newInstance();
+ }
+ catch (final Throwable e) {
+ Utils.LOG_INFO("Fatal Error ocurred while initializing TileEntities, crashing Minecraft.");
+ e.printStackTrace(GT_Log.err);
+ throw new RuntimeException(e);
+ }
+ }
@SubscribeEvent
- public static void registerOre2(OreDictionary.OreRegisterEvent aEvent) {
- ModContainer tContainer = Loader.instance().activeModContainer();
+ public static void registerOre2(final OreDictionary.OreRegisterEvent aEvent) {
+ final ModContainer tContainer = Loader.instance().activeModContainer();
String aMod = tContainer == null ? "UNKNOWN" : tContainer.getModId();
String aOriginalMod = aMod;
if (GregtechOreDictUnificator.isRegisteringOres()) {
aMod = CORE.MODID;
- } else if (aMod.equals(CORE.MODID)) {
+ }
+ else if (aMod.equals(CORE.MODID)) {
aMod = "UNKNOWN";
}
- if ((aEvent == null) || (aEvent.Ore == null) || (aEvent.Ore.getItem() == null) || (aEvent.Name == null) || (aEvent.Name.isEmpty())
- || (aEvent.Name.replaceAll("_", "").length() - aEvent.Name.length() == 9)) {
+ if (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(CORE.MODID)) {
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
+ throw new IllegalArgumentException(aOriginalMod
+ " did something very bad! The registration is too invalid to even be shown properly. This happens only if you register null, invalid Items, empty Strings or even nonexisting Events to the OreDict.");
}
try {
aEvent.Ore.stackSize = 1;
String tModToName = aMod + " -> " + aEvent.Name;
- if ((mOreDictActivated) || (GregTech_API.sPostloadStarted) || ((mSortToTheEnd) && (GregTech_API.sLoadFinished))) {
+ if (Meta_GT_Proxy.mOreDictActivated || GregTech_API.sPostloadStarted
+ || Meta_GT_Proxy.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) {
GregtechOreDictUnificator.addToBlacklist(aEvent.Ore);
}
- mRegisteredOres.add(aEvent.Ore);
- if (mIgnoredNames.contains(aEvent.Name)) {
+ Meta_GT_Proxy.mRegisteredOres.add(aEvent.Ore);
+ if (Meta_GT_Proxy.mIgnoredNames.contains(aEvent.Name)) {
GT_Log.ore.println(tModToName + " is getting ignored via hardcode.");
return;
}
- if ((aEvent.Name.contains("|")) || (aEvent.Name.contains("*")) || (aEvent.Name.contains(":")) || (aEvent.Name.contains("."))
- || (aEvent.Name.contains("$"))) {
+ if (aEvent.Name.contains("|") || aEvent.Name.contains("*") || aEvent.Name.contains(":")
+ || aEvent.Name.contains(".") || aEvent.Name.contains("$")) {
GT_Log.ore.println(tModToName + " is using a private Prefix and is therefor getting ignored properly.");
return;
}
if (aEvent.Name.contains(" ")) {
- GT_Log.ore.println(tModToName + " is getting re-registered because the OreDict Name containing invalid spaces.");
- GregtechOreDictUnificator.registerOre(aEvent.Name.replaceAll(" ", ""), GT_Utility.copyAmount(1L, new Object[]{aEvent.Ore}));
+ GT_Log.ore.println(
+ tModToName + " is getting re-registered because the OreDict Name containing invalid spaces.");
+ GregtechOreDictUnificator.registerOre(aEvent.Name.replaceAll(" ", ""),
+ GT_Utility.copyAmount(1L, new Object[] {
+ aEvent.Ore
+ }));
aEvent.Ore.setStackDisplayName("Invalid OreDictionary Tag");
return;
}
- if (mInvalidNames.contains(aEvent.Name)) {
+ if (Meta_GT_Proxy.mInvalidNames.contains(aEvent.Name)) {
GT_Log.ore.println(tModToName + " is wrongly registered and therefor getting ignored.");
return;
}
- GregtechOrePrefixes aPrefix = GregtechOrePrefixes.getOrePrefix(aEvent.Name);
- GT_Materials aMaterial = GT_Materials._NULL;
+ final GregtechOrePrefixes aPrefix = GregtechOrePrefixes.getOrePrefix(aEvent.Name);
+ GT_Materials aMaterial = GT_Materials._NULL;
if (aPrefix == null) {
if (aEvent.Name.toLowerCase().equals(aEvent.Name)) {
GT_Log.ore.println(tModToName + " is invalid due to being solely lowercased.");
@@ -234,101 +302,129 @@ public class Meta_GT_Proxy {
if (Character.isUpperCase(aEvent.Name.charAt(0))) {
GT_Log.ore.println(tModToName + " is invalid due to the first character being uppercased.");
}
- } else {
+ }
+ else {
if (aPrefix.mDontUnificateActively) {
GregtechOreDictUnificator.addToBlacklist(aEvent.Ore);
}
if (aPrefix != aPrefix.mPrefixInto) {
- String tNewName = aEvent.Name.replaceFirst(aPrefix.toString(), aPrefix.mPrefixInto.toString());
+ final String tNewName = aEvent.Name.replaceFirst(aPrefix.toString(),
+ aPrefix.mPrefixInto.toString());
if (!GregtechOreDictUnificator.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);
}
GregtechOreDictUnificator.registerOre(tNewName, aEvent.Ore);
return;
}
- String tName = aEvent.Name.replaceFirst(aPrefix.toString(), "");
+ final String tName = aEvent.Name.replaceFirst(aPrefix.toString(), "");
if (tName.length() > 0) {
- char firstChar = tName.charAt(0);
+ final char firstChar = tName.charAt(0);
if (Character.isUpperCase(firstChar) || Character.isLowerCase(firstChar) || firstChar == '_') {
if (aPrefix.mIsMaterialBased) {
aMaterial = GT_Materials.get(tName);
if (aMaterial != aMaterial.mMaterialInto) {
GregtechOreDictUnificator.registerOre(aPrefix, aMaterial.mMaterialInto, aEvent.Ore);
if (!GregtechOreDictUnificator.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;
}
if (!aPrefix.isIgnored(aMaterial)) {
- aPrefix.add(GT_Utility.copyAmount(1L, new Object[]{aEvent.Ore}));
+ aPrefix.add(GT_Utility.copyAmount(1L, new Object[] {
+ aEvent.Ore
+ }));
}
if (aMaterial != GT_Materials._NULL) {
GT_Materials tReRegisteredMaterial;
- for (Iterator<?> i$ = aMaterial.mOreReRegistrations.iterator(); i$.hasNext(); GregtechOreDictUnificator.registerOre(aPrefix,
- tReRegisteredMaterial, aEvent.Ore)) {
+ for (final Iterator<?> i$ = aMaterial.mOreReRegistrations.iterator(); i$
+ .hasNext(); GregtechOreDictUnificator.registerOre(aPrefix,
+ tReRegisteredMaterial, aEvent.Ore)) {
tReRegisteredMaterial = (GT_Materials) i$.next();
}
- aMaterial.add(GT_Utility.copyAmount(1L, new Object[]{aEvent.Ore}));
- switch (aPrefix) {
- case gem:
- break;
- case plate:
- break;
- case stick:
- if (!GregtechRecipeRegistrator.sRodMaterialList.contains(aMaterial)) {
- GregtechRecipeRegistrator.sRodMaterialList.add(aMaterial);
- }
- break;
- case dust:
- break;
- case ingot:
- break;
+ aMaterial.add(GT_Utility.copyAmount(1L, new Object[] {
+ aEvent.Ore
+ }));
+ switch (aPrefix) {
+ case gem:
+ break;
+ case plate:
+ break;
+ case stick:
+ if (!GregtechRecipeRegistrator.sRodMaterialList.contains(aMaterial)) {
+ GregtechRecipeRegistrator.sRodMaterialList.add(aMaterial);
+ }
+ break;
+ case dust:
+ break;
+ case ingot:
+ break;
}
if (aPrefix.mIsUnificatable && !aMaterial.mUnificatable) {
return;
}
- } else {
- for (Dyes tDye : Dyes.VALUES) {
+ }
+ else {
+ for (final Dyes tDye : Dyes.VALUES) {
if (aEvent.Name.endsWith(tDye.name().replaceFirst("dye", ""))) {
GregtechOreDictUnificator.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;
}
}
- // System.out.println("Material Name: "+aEvent.Name+ " !!!Unknown Material detected!!! Please report to GregTech Intergalactical for additional compatiblity. This is not an Error, an Issue nor a Lag Source, it is just an Information, which you should pass to me.");
- // GT_Log.ore.println(tModToName + " uses an unknown Material. Report this to GregTech.");
+ // System.out.println("Material Name:
+ // "+aEvent.Name+ " !!!Unknown Material
+ // detected!!! Please report to GregTech
+ // Intergalactical for additional compatiblity.
+ // This is not an Error, an Issue nor a Lag
+ // Source, it is just an Information, which you
+ // should pass to me.");
+ // GT_Log.ore.println(tModToName + " uses an
+ // unknown Material. Report this to GregTech.");
return;
}
- } else {
- aPrefix.add(GT_Utility.copyAmount(1L, new Object[]{aEvent.Ore}));
+ }
+ else {
+ aPrefix.add(GT_Utility.copyAmount(1L, new Object[] {
+ aEvent.Ore
+ }));
}
}
- } else if (aPrefix.mIsSelfReferencing) {
- aPrefix.add(GT_Utility.copyAmount(1L, new Object[]{aEvent.Ore}));
- } else {
+ }
+ else if (aPrefix.mIsSelfReferencing) {
+ aPrefix.add(GT_Utility.copyAmount(1L, new Object[] {
+ aEvent.Ore
+ }));
+ }
+ else {
GT_Log.ore.println(tModToName + " uses a Prefix as full OreDict Name, and is therefor invalid.");
aEvent.Ore.setStackDisplayName("Invalid OreDictionary Tag");
return;
}
}
GT_Log.ore.println(tModToName);
- GregtechOreDictEventContainer tOre = new GregtechOreDictEventContainer(aEvent, aPrefix, aMaterial, aMod);
- if ((!mOreDictActivated) || (!GregTech_API.sUnificationEntriesRegistered)) {
- mEvents.add(tOre);
- } else {
- mEvents.clear();
+ final GregtechOreDictEventContainer tOre = new GregtechOreDictEventContainer(aEvent, aPrefix, aMaterial,
+ aMod);
+ if (!Meta_GT_Proxy.mOreDictActivated || !GregTech_API.sUnificationEntriesRegistered) {
+ Meta_GT_Proxy.mEvents.add(tOre);
+ }
+ else {
+ Meta_GT_Proxy.mEvents.clear();
}
- if (mOreDictActivated) {
- registerRecipes(tOre);
+ if (Meta_GT_Proxy.mOreDictActivated) {
+ Meta_GT_Proxy.registerRecipes(tOre);
}
- } catch (Throwable e) {
+ }
+ catch (final Throwable e) {
e.printStackTrace(GT_Log.err);
}
}
- private static final void registerRecipes(GregtechOreDictEventContainer tOre) {
- if ((tOre.mEvent.Ore == null) || (tOre.mEvent.Ore.getItem() == null)) {
+ private static final void registerRecipes(final GregtechOreDictEventContainer tOre) {
+ if (tOre.mEvent.Ore == null || tOre.mEvent.Ore.getItem() == null) {
return;
}
if (tOre.mEvent.Ore.stackSize != 1) {
@@ -336,16 +432,25 @@ public class Meta_GT_Proxy {
}
if (tOre.mPrefix != null) {
if (!tOre.mPrefix.isIgnored(tOre.mMaterial)) {
- tOre.mPrefix.processOre((GT_Materials) (tOre.mMaterial == null ? GT_Materials._NULL : tOre.mMaterial), tOre.mEvent.Name, tOre.mModID,
- GT_Utility.copyAmount(1L, new Object[]{tOre.mEvent.Ore}));
+ tOre.mPrefix.processOre(tOre.mMaterial == null ? GT_Materials._NULL : tOre.mMaterial, tOre.mEvent.Name,
+ tOre.mModID, GT_Utility.copyAmount(1L, new Object[] {
+ tOre.mEvent.Ore
+ }));
}
- } else {
- // System.out.println("Thingy Name: "+ aOre.mEvent.Name+ " !!!Unknown 'Thingy' detected!!! This Object seems to probably not follow a valid OreDictionary Convention, or I missed a Convention. Please report to GregTech Intergalactical for additional compatiblity. This is not an Error, an Issue nor a Lag Source, it is just an Information, which you should pass to me.");
+ }
+ else {
+ // System.out.println("Thingy Name: "+ aOre.mEvent.Name+ "
+ // !!!Unknown 'Thingy' detected!!! This Object seems to probably not
+ // follow a valid OreDictionary Convention, or I missed a
+ // Convention. Please report to GregTech Intergalactical for
+ // additional compatiblity. This is not an Error, an Issue nor a Lag
+ // Source, it is just an Information, which you should pass to
+ // me.");
}
}
- private static final void registerRecipes(OreDictEventContainer aOre) {
- if ((aOre.mEvent.Ore == null) || (aOre.mEvent.Ore.getItem() == null)) {
+ private static final void registerRecipes(final OreDictEventContainer aOre) {
+ if (aOre.mEvent.Ore == null || aOre.mEvent.Ore.getItem() == null) {
return;
}
if (aOre.mEvent.Ore.stackSize != 1) {
@@ -353,40 +458,56 @@ public class Meta_GT_Proxy {
}
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, new Object[]{aOre.mEvent.Ore}));
+ aOre.mPrefix.processOre(aOre.mMaterial == null ? Materials._NULL : aOre.mMaterial, aOre.mEvent.Name,
+ aOre.mModID, GT_Utility.copyAmount(1L, new Object[] {
+ aOre.mEvent.Ore
+ }));
}
- } else {
- // System.out.println("Thingy Name: "+ aOre.mEvent.Name+ " !!!Unknown 'Thingy' detected!!! This Object seems to probably not follow a valid OreDictionary Convention, or I missed a Convention. Please report to GregTech Intergalactical for additional compatiblity. This is not an Error, an Issue nor a Lag Source, it is just an Information, which you should pass to me.");
+ }
+ else {
+ // System.out.println("Thingy Name: "+ aOre.mEvent.Name+ "
+ // !!!Unknown 'Thingy' detected!!! This Object seems to probably not
+ // follow a valid OreDictionary Convention, or I missed a
+ // Convention. Please report to GregTech Intergalactical for
+ // additional compatiblity. This is not an Error, an Issue nor a Lag
+ // Source, it is just an Information, which you should pass to
+ // me.");
}
}
-
-
public static void registerUnificationEntries() {
GregTech_API.sUnification.mConfig.save();
GregTech_API.sUnification.mConfig.load();
GregtechOreDictUnificator.resetUnificationEntries();
- for (GregtechOreDictEventContainer tOre : mEvents) {
- if ((!(tOre.mEvent.Ore.getItem() instanceof MetaGeneratedGregtechItems)) && (tOre.mPrefix != null) && (tOre.mPrefix.mIsUnificatable)
- && (tOre.mMaterial != null)) {
+ for (final GregtechOreDictEventContainer tOre : Meta_GT_Proxy.mEvents) {
+ if (!(tOre.mEvent.Ore.getItem() instanceof MetaGeneratedGregtechItems) && tOre.mPrefix != null
+ && tOre.mPrefix.mIsUnificatable && tOre.mMaterial != null) {
if (GregtechOreDictUnificator.isBlacklisted(tOre.mEvent.Ore)) {
GregtechOreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, true);
- } else {
+ }
+ else {
GregtechOreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
- GregtechOreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (tOre.mModID != null) && (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, false)), true);
+ GregtechOreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore,
+ tOre.mModID != null && GregTech_API.sUnification.get(
+ ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name,
+ false),
+ true);
}
}
}
- for (GregtechOreDictEventContainer tOre : mEvents) {
- if (((tOre.mEvent.Ore.getItem() instanceof MetaGeneratedGregtechItems)) && (tOre.mPrefix != null) && (tOre.mPrefix.mIsUnificatable)
- && (tOre.mMaterial != null)) {
+ for (final GregtechOreDictEventContainer tOre : Meta_GT_Proxy.mEvents) {
+ if (tOre.mEvent.Ore.getItem() instanceof MetaGeneratedGregtechItems && tOre.mPrefix != null
+ && tOre.mPrefix.mIsUnificatable && tOre.mMaterial != null) {
if (GregtechOreDictUnificator.isBlacklisted(tOre.mEvent.Ore)) {
GregtechOreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, true);
- } else {
+ }
+ else {
GregtechOreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
- GregtechOreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (tOre.mModID != null) &&
- (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, false)), true);
+ GregtechOreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore,
+ tOre.mModID != null && GregTech_API.sUnification.get(
+ ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name,
+ false),
+ true);
}
}
}
@@ -395,85 +516,44 @@ public class Meta_GT_Proxy {
GT_Recipe.reInit();
}
- public static void activateOreDictHandler() {
- mOreDictActivated = true;
- GregtechOreDictEventContainer tEvent;
- if (mEvents.size() == 0){
- Utils.LOG_INFO("Found nothing to iterate over for use in material addition.");
- }
- for (Iterator<GregtechOreDictEventContainer> i$ = mEvents.iterator(); i$.hasNext(); registerRecipes(tEvent)) {
- tEvent = (GregtechOreDictEventContainer) i$.next();
- }
- OreDictEventContainer tEvent2;
- if (mEventsFake.size() == 0){
- Utils.LOG_INFO("Found nothing to iterate over for use in GT material addition.");
- }
- for (Iterator<OreDictEventContainer> i$ = mEventsFake.iterator(); i$.hasNext(); registerRecipes(tEvent2)) {
- tEvent2 = (OreDictEventContainer) i$.next();
- }
- }
-
-
- //Dunno
- public static class GregtechOreDictEventContainer {
- public final OreDictionary.OreRegisterEvent mEvent;
- public final GregtechOrePrefixes mPrefix;
- public final GT_Materials mMaterial;
- public final String mModID;
-
- public GregtechOreDictEventContainer(OreDictionary.OreRegisterEvent aEvent, GregtechOrePrefixes aPrefix, GT_Materials aMaterial, String aModID) {
- this.mEvent = aEvent;
- this.mPrefix = aPrefix;
- this.mMaterial = aMaterial;
- this.mModID = ((aModID == null) || (aModID.equals("UNKNOWN")) ? null : aModID);
+ public Meta_GT_Proxy() {
+ Utils.LOG_INFO("GT_PROXY - initialized.");
+ for (final String tOreName : OreDictionary.getOreNames()) {
+ ItemStack tOreStack;
+ for (final Iterator<?> i$ = OreDictionary.getOres(tOreName).iterator(); i$.hasNext(); this
+ .registerOre(new OreDictionary.OreRegisterEvent(tOreName, tOreStack))) {
+ tOreStack = (ItemStack) i$.next();
+ }
}
}
- public static boolean areWeUsingGregtech5uExperimental(){
- int version = GregTech_API.VERSION;
- if (version == 508 || version == 507){
- return false;
- }
- else if (version == 509){
- return true;
- }
- else {
- return false;
- }
- }
-
-
-
-
-
-
@SubscribeEvent
- public void registerOre(OreDictionary.OreRegisterEvent aEvent) {
- ModContainer tContainer = Loader.instance().activeModContainer();
+ public void registerOre(final OreDictionary.OreRegisterEvent aEvent) {
+ final ModContainer tContainer = Loader.instance().activeModContainer();
String aMod = tContainer == null ? "UNKNOWN" : tContainer.getModId();
String aOriginalMod = aMod;
if (GT_OreDictUnificator.isRegisteringOres()) {
aMod = "gregtech";
- } else if (aMod.equals("gregtech")) {
+ }
+ else if (aMod.equals("gregtech")) {
aMod = "UNKNOWN";
}
- if ((aEvent == null) || (aEvent.Ore == null) || (aEvent.Ore.getItem() == null) || (aEvent.Name == null) || (aEvent.Name.isEmpty())
- || (aEvent.Name.replaceAll("_", "").length() - aEvent.Name.length() == 9)) {
+ if (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
+ throw new IllegalArgumentException(aOriginalMod
+ " did something very bad! The registration is too invalid to even be shown properly. This happens only if you register null, invalid Items, empty Strings or even nonexisting Events to the OreDict.");
}
try {
aEvent.Ore.stackSize = 1;
if (true || aEvent.Ore.getUnlocalizedName().startsWith("item.oreberry")) {
- if ((aOriginalMod.toLowerCase().contains("xycraft")) || (aOriginalMod.toLowerCase().contains("tconstruct"))
- || ((aOriginalMod.toLowerCase().contains("natura")) && (!aOriginalMod.toLowerCase().contains("natural")))) {
+ if (aOriginalMod.toLowerCase().contains("xycraft") || aOriginalMod.toLowerCase().contains("tconstruct")
+ || aOriginalMod.toLowerCase().contains("natura")
+ && !aOriginalMod.toLowerCase().contains("natural")) {
if (GT_Values.D1) {
GT_Log.ore.println(aMod + " -> " + aEvent.Name + " is getting ignored, because of racism. :P");
}
@@ -481,14 +561,15 @@ public class Meta_GT_Proxy {
}
}
String tModToName = aMod + " -> " + aEvent.Name;
- if ((mOreDictActivated) || (GregTech_API.sPostloadStarted) || ((mSortToTheEnd) && (GregTech_API.sLoadFinished))) {
+ if (Meta_GT_Proxy.mOreDictActivated || GregTech_API.sPostloadStarted
+ || Meta_GT_Proxy.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);
}
- mRegisteredOres.add(aEvent.Ore);
- if ((aEvent.Name.startsWith("item")) && (mIgnoredItems.contains(aEvent.Name))) {
+ Meta_GT_Proxy.mRegisteredOres.add(aEvent.Ore);
+ if (aEvent.Name.startsWith("item") && Meta_GT_Proxy.mIgnoredItems.contains(aEvent.Name)) {
GT_Log.ore.println(tModToName);
if (aEvent.Name.equals("itemCopperWire")) {
GT_OreDictUnificator.registerOre(OreDictNames.craftingWireCopper, aEvent.Ore);
@@ -498,7 +579,7 @@ public class Meta_GT_Proxy {
}
return;
}
- if (mIgnoredNames.contains(aEvent.Name)) {
+ if (Meta_GT_Proxy.mIgnoredNames.contains(aEvent.Name)) {
GT_Log.ore.println(tModToName + " is getting ignored via hardcode.");
return;
}
@@ -510,8 +591,8 @@ public class Meta_GT_Proxy {
GT_OreDictUnificator.registerOre("stoneCobble", aEvent.Ore);
return;
}
- if ((aEvent.Name.contains("|")) || (aEvent.Name.contains("*")) || (aEvent.Name.contains(":")) || (aEvent.Name.contains("."))
- || (aEvent.Name.contains("$"))) {
+ 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;
}
@@ -565,19 +646,24 @@ public class Meta_GT_Proxy {
return;
}
if (aEvent.Name.contains(" ")) {
- GT_Log.ore.println(tModToName + " is getting re-registered because the OreDict Name containing invalid spaces.");
- GT_OreDictUnificator.registerOre(aEvent.Name.replaceAll(" ", ""), GT_Utility.copyAmount(1L, new Object[]{aEvent.Ore}));
+ GT_Log.ore.println(
+ tModToName + " is getting re-registered because the OreDict Name containing invalid spaces.");
+ GT_OreDictUnificator.registerOre(aEvent.Name.replaceAll(" ", ""),
+ GT_Utility.copyAmount(1L, new Object[] {
+ aEvent.Ore
+ }));
aEvent.Ore.setStackDisplayName("Invalid OreDictionary Tag");
return;
}
- if (mInvalidNames.contains(aEvent.Name)) {
+ if (Meta_GT_Proxy.mInvalidNames.contains(aEvent.Name)) {
GT_Log.ore.println(tModToName + " is wrongly registered and therefor getting ignored.");
return;
}
- OrePrefixes aPrefix = OrePrefixes.getOrePrefix(aEvent.Name);
+ final 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) {
@@ -592,326 +678,354 @@ public class Meta_GT_Proxy {
if (Character.isUpperCase(aEvent.Name.charAt(0))) {
GT_Log.ore.println(tModToName + " is invalid due to the first character being uppercased.");
}
- } else {
+ }
+ else {
if (aPrefix.mDontUnificateActively) {
GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
}
if (aPrefix != aPrefix.mPrefixInto) {
- String tNewName = aEvent.Name.replaceFirst(aPrefix.toString(), aPrefix.mPrefixInto.toString());
+ final 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;
}
- String tName = aEvent.Name.replaceFirst(aPrefix.toString(), "");
+ final String tName = aEvent.Name.replaceFirst(aPrefix.toString(), "");
if (tName.length() > 0) {
- char firstChar = tName.charAt(0);
+ final char firstChar = tName.charAt(0);
if (Character.isUpperCase(firstChar) || Character.isLowerCase(firstChar) || firstChar == '_') {
if (aPrefix.mIsMaterialBased) {
aMaterial = Materials.get(tName);
if (aMaterial != aMaterial.mMaterialInto) {
GT_OreDictUnificator.registerOre(aPrefix, aMaterial.mMaterialInto, aEvent.Ore);
if (!GT_OreDictUnificator.isRegisteringOres()) {
- GT_Log.ore.println(tModToName + " uses a deprecated Material and is getting re-registered as "
- + aPrefix.get(aMaterial.mMaterialInto));
+ GT_Log.ore.println(
+ tModToName + " uses a deprecated Material and is getting re-registered as "
+ + aPrefix.get(aMaterial.mMaterialInto));
}
return;
}
if (!aPrefix.isIgnored(aMaterial)) {
- aPrefix.add(GT_Utility.copyAmount(1L, new Object[]{aEvent.Ore}));
+ aPrefix.add(GT_Utility.copyAmount(1L, new Object[] {
+ aEvent.Ore
+ }));
}
if (aMaterial != Materials._NULL) {
Materials tReRegisteredMaterial;
- for (Iterator i$ = aMaterial.mOreReRegistrations.iterator(); i$.hasNext(); GT_OreDictUnificator.registerOre(aPrefix,
- tReRegisteredMaterial, aEvent.Ore)) {
+ for (final Iterator i$ = aMaterial.mOreReRegistrations.iterator(); i$
+ .hasNext(); GT_OreDictUnificator.registerOre(aPrefix, tReRegisteredMaterial,
+ aEvent.Ore)) {
tReRegisteredMaterial = (Materials) i$.next();
}
- aMaterial.add(GT_Utility.copyAmount(1L, new Object[]{aEvent.Ore}));
- if ((GregTech_API.sThaumcraftCompat != null) && (aPrefix.doGenerateItem(aMaterial)) && (!aPrefix.isIgnored(aMaterial))) {
- long tAmount = aPrefix.mMaterialAmount < 0L ? 3628800L : aPrefix.mMaterialAmount;
- List<TC_Aspects.TC_AspectStack> tAspects = new ArrayList();
+ aMaterial.add(GT_Utility.copyAmount(1L, new Object[] {
+ aEvent.Ore
+ }));
+ if (GregTech_API.sThaumcraftCompat != null && aPrefix.doGenerateItem(aMaterial)
+ && !aPrefix.isIgnored(aMaterial)) {
+ final long tAmount = aPrefix.mMaterialAmount < 0L ? 3628800L
+ : aPrefix.mMaterialAmount;
+ final List<TC_Aspects.TC_AspectStack> tAspects = new ArrayList();
TC_Aspects.TC_AspectStack tAspect;
- for (Iterator i$ = aPrefix.mAspects.iterator(); i$.hasNext(); tAspect.addToAspectList(tAspects)) {
+ for (final Iterator i$ = aPrefix.mAspects.iterator(); i$.hasNext(); tAspect
+ .addToAspectList(tAspects)) {
tAspect = (TC_Aspects.TC_AspectStack) i$.next();
}
tAspect = null;
- for (Iterator i$ = aMaterial.mAspects.iterator(); i$.hasNext(); tAspect.copy(tAspect.mAmount * tAmount / 3628800L)
- .addToAspectList(tAspects)) {
+ for (final Iterator i$ = aMaterial.mAspects.iterator(); i$.hasNext(); tAspect
+ .copy(tAspect.mAmount * tAmount / 3628800L).addToAspectList(tAspects)) {
tAspect = (TC_Aspects.TC_AspectStack) i$.next();
}
- GregTech_API.sThaumcraftCompat.registerThaumcraftAspectsToItem(GT_Utility.copyAmount(1L, new Object[]{aEvent.Ore}),
- tAspects, aEvent.Name);
+ GregTech_API.sThaumcraftCompat
+ .registerThaumcraftAspectsToItem(GT_Utility.copyAmount(1L, new Object[] {
+ aEvent.Ore
+ }), tAspects, aEvent.Name);
}
switch (aPrefix) {
- case crystal:
- if ((aMaterial == Materials.CertusQuartz) || (aMaterial == Materials.NetherQuartz) || (aMaterial == Materials.Fluix)) {
- GT_OreDictUnificator.registerOre(OrePrefixes.gem, aMaterial, aEvent.Ore);
- }
- break;
- case gem:
- switch (aMaterial) {
- case Lapis:
- case Sodalite:
- GT_OreDictUnificator.registerOre(Dyes.dyeBlue, aEvent.Ore);
+ case crystal:
+ if (aMaterial == Materials.CertusQuartz || aMaterial == Materials.NetherQuartz
+ || aMaterial == Materials.Fluix) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.gem, aMaterial, aEvent.Ore);
+ }
+ break;
+ case gem:
+ switch (aMaterial) {
+ case Lapis:
+ case Sodalite:
+ GT_OreDictUnificator.registerOre(Dyes.dyeBlue, aEvent.Ore);
+ break;
+ case Lazurite:
+ GT_OreDictUnificator.registerOre(Dyes.dyeCyan, aEvent.Ore);
+ break;
+ case InfusedAir:
+ case InfusedWater:
+ case InfusedFire:
+ case InfusedEarth:
+ case InfusedOrder:
+ case InfusedEntropy:
+ GT_OreDictUnificator.registerOre(
+ aMaterial.name().replaceFirst("Infused", "shard"), aEvent.Ore);
+ break;
+ case Chocolate:
+ GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
+ break;
+ case CertusQuartz:
+ case NetherQuartz:
+ GT_OreDictUnificator.registerOre(OrePrefixes.item.get(aMaterial),
+ aEvent.Ore);
+ case Fluix:
+ case Quartz:
+ case Quartzite:
+ GT_OreDictUnificator.registerOre(OrePrefixes.crystal, aMaterial,
+ aEvent.Ore);
+ GT_OreDictUnificator.registerOre(OreDictNames.craftingQuartz,
+ aEvent.Ore);
+ default:
+ break;
+ }
+ break;
+ case cableGt01:
+ if (aMaterial == Materials.Tin) {
+ GT_OreDictUnificator.registerOre(OreDictNames.craftingWireTin, aEvent.Ore);
+ }
+ if (aMaterial == Materials.AnyCopper) {
+ GT_OreDictUnificator.registerOre(OreDictNames.craftingWireCopper,
+ aEvent.Ore);
+ }
+ if (aMaterial == Materials.Gold) {
+ GT_OreDictUnificator.registerOre(OreDictNames.craftingWireGold, aEvent.Ore);
+ }
+ if (aMaterial == Materials.AnyIron) {
+ GT_OreDictUnificator.registerOre(OreDictNames.craftingWireIron, aEvent.Ore);
+ }
break;
- case Lazurite:
- GT_OreDictUnificator.registerOre(Dyes.dyeCyan, aEvent.Ore);
+ case lens:
+ if (aMaterial.contains(SubTag.TRANSPARENT) && aMaterial.mColor != Dyes._NULL) {
+ GT_OreDictUnificator.registerOre(
+ "craftingLens"
+ + aMaterial.mColor.toString().replaceFirst("dye", ""),
+ aEvent.Ore);
+ }
break;
- case InfusedAir:
- case InfusedWater:
- case InfusedFire:
- case InfusedEarth:
- case InfusedOrder:
- case InfusedEntropy:
- GT_OreDictUnificator.registerOre(aMaterial.name().replaceFirst("Infused", "shard"), aEvent.Ore);
+ case plate:
+ if (aMaterial == Materials.Plastic || aMaterial == Materials.Rubber) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.sheet, aMaterial, aEvent.Ore);
+ }
+ if (aMaterial == Materials.Silicon) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.item, aMaterial, aEvent.Ore);
+ }
+ if (aMaterial == Materials.Wood) {
+ GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
+ GT_OreDictUnificator.registerOre(OrePrefixes.plank, aMaterial, aEvent.Ore);
+ }
break;
- case Chocolate:
- GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
+ case cell:
+ if (aMaterial == Materials.Empty) {
+ GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
+ }
+ break;
+ case gearGt:
+ GT_OreDictUnificator.registerOre(OrePrefixes.gear, aMaterial, aEvent.Ore);
+ break;
+ case stick:
+ if (!GT_RecipeRegistrator.sRodMaterialList.contains(aMaterial)) {
+ GT_RecipeRegistrator.sRodMaterialList.add(aMaterial);
+ }
+ if (aMaterial == Materials.Wood) {
+ GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
+ }
+ if (aMaterial == Materials.Tin || aMaterial == Materials.Lead
+ || aMaterial == Materials.SolderingAlloy) {
+ GT_OreDictUnificator.registerOre(ToolDictNames.craftingToolSolderingMetal,
+ aEvent.Ore);
+ }
+ break;
+ case dust:
+ if (aMaterial == Materials.Salt) {
+ GT_OreDictUnificator.registerOre("itemSalt", aEvent.Ore);
+ }
+ if (aMaterial == Materials.Wood) {
+ GT_OreDictUnificator.registerOre("pulpWood", aEvent.Ore);
+ }
+ if (aMaterial == Materials.Wheat) {
+ GT_OreDictUnificator.registerOre("foodFlour", aEvent.Ore);
+ }
+ if (aMaterial == Materials.Lapis) {
+ GT_OreDictUnificator.registerOre(Dyes.dyeBlue, aEvent.Ore);
+ }
+ if (aMaterial == Materials.Lazurite) {
+ GT_OreDictUnificator.registerOre(Dyes.dyeCyan, aEvent.Ore);
+ }
+ if (aMaterial == Materials.Sodalite) {
+ GT_OreDictUnificator.registerOre(Dyes.dyeBlue, aEvent.Ore);
+ }
+ if (aMaterial == Materials.Cocoa) {
+ GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
+ GT_OreDictUnificator.registerOre("foodCocoapowder", aEvent.Ore);
+ }
+ if (aMaterial == Materials.Coffee) {
+ GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
+ }
+ if (aMaterial == Materials.BrownLimonite) {
+ GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
+ }
+ if (aMaterial == Materials.YellowLimonite) {
+ GT_OreDictUnificator.registerOre(Dyes.dyeYellow, aEvent.Ore);
+ }
+ break;
+ case ingot:
+ if (aMaterial == Materials.Rubber) {
+ GT_OreDictUnificator.registerOre("itemRubber", aEvent.Ore);
+ }
+ if (aMaterial == Materials.FierySteel) {
+ GT_OreDictUnificator.registerOre("fieryIngot", aEvent.Ore);
+ }
+ if (aMaterial == Materials.IronWood) {
+ GT_OreDictUnificator.registerOre("ironwood", aEvent.Ore);
+ }
+ if (aMaterial == Materials.Steeleaf) {
+ GT_OreDictUnificator.registerOre("steeleaf", aEvent.Ore);
+ }
+ if (aMaterial == Materials.Knightmetal) {
+ GT_OreDictUnificator.registerOre("knightmetal", aEvent.Ore);
+ }
+ if (aMaterial == Materials.Brass && aEvent.Ore.getItemDamage() == 2
+ && aEvent.Ore.getUnlocalizedName().equals("item.ingotBrass")
+ && new ItemStack(aEvent.Ore.getItem(), 1, 0).getUnlocalizedName()
+ .contains("red")) {
+ GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.RedAlloy,
+ new ItemStack(aEvent.Ore.getItem(), 1, 0));
+ GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.BlueAlloy,
+ new ItemStack(aEvent.Ore.getItem(), 1, 1));
+ GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.Brass,
+ new ItemStack(aEvent.Ore.getItem(), 1, 2));
+ GT_Values.RA.addCutterRecipe(new ItemStack(aEvent.Ore.getItem(), 1, 3),
+ new ItemStack(aEvent.Ore.getItem(), 16, 4), null, 400, 8);
+ }
break;
- case CertusQuartz:
- case NetherQuartz:
- GT_OreDictUnificator.registerOre(OrePrefixes.item.get(aMaterial), aEvent.Ore);
- case Fluix:
- case Quartz:
- case Quartzite:
- GT_OreDictUnificator.registerOre(OrePrefixes.crystal, aMaterial, aEvent.Ore);
- GT_OreDictUnificator.registerOre(OreDictNames.craftingQuartz, aEvent.Ore);
default:
break;
- }
- break;
- case cableGt01:
- if (aMaterial == Materials.Tin) {
- GT_OreDictUnificator.registerOre(OreDictNames.craftingWireTin, aEvent.Ore);
- }
- if (aMaterial == Materials.AnyCopper) {
- GT_OreDictUnificator.registerOre(OreDictNames.craftingWireCopper, aEvent.Ore);
- }
- if (aMaterial == Materials.Gold) {
- GT_OreDictUnificator.registerOre(OreDictNames.craftingWireGold, aEvent.Ore);
- }
- if (aMaterial == Materials.AnyIron) {
- GT_OreDictUnificator.registerOre(OreDictNames.craftingWireIron, aEvent.Ore);
- }
- break;
- case lens:
- if ((aMaterial.contains(SubTag.TRANSPARENT)) && (aMaterial.mColor != Dyes._NULL)) {
- GT_OreDictUnificator.registerOre("craftingLens" + aMaterial.mColor.toString().replaceFirst("dye", ""), aEvent.Ore);
- }
- break;
- case plate:
- if ((aMaterial == Materials.Plastic) || (aMaterial == Materials.Rubber)) {
- GT_OreDictUnificator.registerOre(OrePrefixes.sheet, aMaterial, aEvent.Ore);
- }
- if (aMaterial == Materials.Silicon) {
- GT_OreDictUnificator.registerOre(OrePrefixes.item, aMaterial, aEvent.Ore);
- }
- if (aMaterial == Materials.Wood) {
- GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
- GT_OreDictUnificator.registerOre(OrePrefixes.plank, aMaterial, aEvent.Ore);
- }
- break;
- case cell:
- if (aMaterial == Materials.Empty) {
- GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
- }
- break;
- case gearGt:
- GT_OreDictUnificator.registerOre(OrePrefixes.gear, aMaterial, aEvent.Ore);
- break;
- case stick:
- if (!GT_RecipeRegistrator.sRodMaterialList.contains(aMaterial)) {
- GT_RecipeRegistrator.sRodMaterialList.add(aMaterial);
- }
- if (aMaterial == Materials.Wood) {
- GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
- }
- if ((aMaterial == Materials.Tin) || (aMaterial == Materials.Lead) || (aMaterial == Materials.SolderingAlloy)) {
- GT_OreDictUnificator.registerOre(ToolDictNames.craftingToolSolderingMetal, aEvent.Ore);
- }
- break;
- case dust:
- if (aMaterial == Materials.Salt) {
- GT_OreDictUnificator.registerOre("itemSalt", aEvent.Ore);
- }
- if (aMaterial == Materials.Wood) {
- GT_OreDictUnificator.registerOre("pulpWood", aEvent.Ore);
- }
- if (aMaterial == Materials.Wheat) {
- GT_OreDictUnificator.registerOre("foodFlour", aEvent.Ore);
- }
- if (aMaterial == Materials.Lapis) {
- GT_OreDictUnificator.registerOre(Dyes.dyeBlue, aEvent.Ore);
- }
- if (aMaterial == Materials.Lazurite) {
- GT_OreDictUnificator.registerOre(Dyes.dyeCyan, aEvent.Ore);
- }
- if (aMaterial == Materials.Sodalite) {
- GT_OreDictUnificator.registerOre(Dyes.dyeBlue, aEvent.Ore);
- }
- if (aMaterial == Materials.Cocoa) {
- GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
- GT_OreDictUnificator.registerOre("foodCocoapowder", aEvent.Ore);
- }
- if (aMaterial == Materials.Coffee) {
- GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
- }
- if (aMaterial == Materials.BrownLimonite) {
- GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
- }
- if (aMaterial == Materials.YellowLimonite) {
- GT_OreDictUnificator.registerOre(Dyes.dyeYellow, aEvent.Ore);
- }
- break;
- case ingot:
- if (aMaterial == Materials.Rubber) {
- GT_OreDictUnificator.registerOre("itemRubber", aEvent.Ore);
- }
- if (aMaterial == Materials.FierySteel) {
- GT_OreDictUnificator.registerOre("fieryIngot", aEvent.Ore);
- }
- if (aMaterial == Materials.IronWood) {
- GT_OreDictUnificator.registerOre("ironwood", aEvent.Ore);
- }
- if (aMaterial == Materials.Steeleaf) {
- GT_OreDictUnificator.registerOre("steeleaf", aEvent.Ore);
- }
- if (aMaterial == Materials.Knightmetal) {
- GT_OreDictUnificator.registerOre("knightmetal", aEvent.Ore);
- }
- if ((aMaterial == Materials.Brass) && (aEvent.Ore.getItemDamage() == 2)
- && (aEvent.Ore.getUnlocalizedName().equals("item.ingotBrass"))
- && (new ItemStack(aEvent.Ore.getItem(), 1, 0).getUnlocalizedName().contains("red"))) {
- GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.RedAlloy, new ItemStack(aEvent.Ore.getItem(), 1, 0));
- GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.BlueAlloy, new ItemStack(aEvent.Ore.getItem(), 1, 1));
- GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.Brass, new ItemStack(aEvent.Ore.getItem(), 1, 2));
- GT_Values.RA.addCutterRecipe(new ItemStack(aEvent.Ore.getItem(), 1, 3), new ItemStack(aEvent.Ore.getItem(), 16, 4),
- null, 400, 8);
- }
- break;
- default:
- break;
}
if (aPrefix.mIsUnificatable && !aMaterial.mUnificatable) {
return;
}
- } else {
- for (Dyes tDye : Dyes.VALUES) {
+ }
+ else {
+ for (final 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;
}
}
- // System.out.println("Material Name: "+aEvent.Name+ " !!!Unknown Material detected!!! Please report to GregTech Intergalactical for additional compatiblity. This is not an Error, an Issue nor a Lag Source, it is just an Information, which you should pass to me.");
- // GT_Log.ore.println(tModToName + " uses an unknown Material. Report this to GregTech.");
+ // System.out.println("Material Name:
+ // "+aEvent.Name+ " !!!Unknown Material
+ // detected!!! Please report to GregTech
+ // Intergalactical for additional compatiblity.
+ // This is not an Error, an Issue nor a Lag
+ // Source, it is just an Information, which you
+ // should pass to me.");
+ // GT_Log.ore.println(tModToName + " uses an
+ // unknown Material. Report this to GregTech.");
return;
}
- } else {
- aPrefix.add(GT_Utility.copyAmount(1L, new Object[]{aEvent.Ore}));
+ }
+ else {
+ aPrefix.add(GT_Utility.copyAmount(1L, new Object[] {
+ aEvent.Ore
+ }));
}
}
- } else if (aPrefix.mIsSelfReferencing) {
- aPrefix.add(GT_Utility.copyAmount(1L, new Object[]{aEvent.Ore}));
- } else {
+ }
+ else if (aPrefix.mIsSelfReferencing) {
+ aPrefix.add(GT_Utility.copyAmount(1L, new Object[] {
+ aEvent.Ore
+ }));
+ }
+ else {
GT_Log.ore.println(tModToName + " uses a Prefix as full OreDict Name, and is therefor invalid.");
aEvent.Ore.setStackDisplayName("Invalid OreDictionary Tag");
return;
}
switch (aPrefix) {
- case dye:
- if (GT_Utility.isStringValid(tName)) {
- GT_OreDictUnificator.registerOre(OrePrefixes.dye, aEvent.Ore);
- }
- break;
- case stoneSmooth:
- GT_OreDictUnificator.registerOre("stone", aEvent.Ore);
- break;
- case stoneCobble:
- GT_OreDictUnificator.registerOre("cobblestone", aEvent.Ore);
- break;
- case plank:
- if (tName.equals("Wood")) {
- GT_OreDictUnificator.addItemData(aEvent.Ore, new ItemData(Materials.Wood, 3628800L, new MaterialStack[0]));
- }
- break;
- case slab:
- if (tName.equals("Wood")) {
- GT_OreDictUnificator.addItemData(aEvent.Ore, new ItemData(Materials.Wood, 1814400L, new MaterialStack[0]));
- }
- break;
- case sheet:
- if (tName.equals("Plastic")) {
- GT_OreDictUnificator.registerOre(OrePrefixes.plate, Materials.Plastic, aEvent.Ore);
- }
- if (tName.equals("Rubber")) {
- GT_OreDictUnificator.registerOre(OrePrefixes.plate, Materials.Rubber, aEvent.Ore);
- }
- break;
- case crafting:
- if (tName.equals("ToolSolderingMetal")) {
- GregTech_API.registerSolderingMetal(aEvent.Ore);
- }
- if (tName.equals("IndustrialDiamond")) {
- GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
- }
- if (tName.equals("WireCopper")) {
- GT_OreDictUnificator.registerOre(OrePrefixes.wire, Materials.Copper, aEvent.Ore);
- }
- break;
- case wood:
- if (tName.equals("Rubber")) {
- GT_OreDictUnificator.registerOre("logRubber", aEvent.Ore);
- }
- break;
- case food:
- if (tName.equals("Cocoapowder")) {
- GT_OreDictUnificator.registerOre(OrePrefixes.dust, Materials.Cocoa, aEvent.Ore);
- }
- break;
- default:
- break;
+ case dye:
+ if (GT_Utility.isStringValid(tName)) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.dye, aEvent.Ore);
+ }
+ break;
+ case stoneSmooth:
+ GT_OreDictUnificator.registerOre("stone", aEvent.Ore);
+ break;
+ case stoneCobble:
+ GT_OreDictUnificator.registerOre("cobblestone", aEvent.Ore);
+ break;
+ case plank:
+ if (tName.equals("Wood")) {
+ GT_OreDictUnificator.addItemData(aEvent.Ore,
+ new ItemData(Materials.Wood, 3628800L, new MaterialStack[0]));
+ }
+ break;
+ case slab:
+ if (tName.equals("Wood")) {
+ GT_OreDictUnificator.addItemData(aEvent.Ore,
+ new ItemData(Materials.Wood, 1814400L, new MaterialStack[0]));
+ }
+ break;
+ case sheet:
+ if (tName.equals("Plastic")) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.plate, Materials.Plastic, aEvent.Ore);
+ }
+ if (tName.equals("Rubber")) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.plate, Materials.Rubber, aEvent.Ore);
+ }
+ break;
+ case crafting:
+ if (tName.equals("ToolSolderingMetal")) {
+ GregTech_API.registerSolderingMetal(aEvent.Ore);
+ }
+ if (tName.equals("IndustrialDiamond")) {
+ GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
+ }
+ if (tName.equals("WireCopper")) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.wire, Materials.Copper, aEvent.Ore);
+ }
+ break;
+ case wood:
+ if (tName.equals("Rubber")) {
+ GT_OreDictUnificator.registerOre("logRubber", aEvent.Ore);
+ }
+ break;
+ case food:
+ if (tName.equals("Cocoapowder")) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.dust, Materials.Cocoa, aEvent.Ore);
+ }
+ break;
+ default:
+ break;
}
}
GT_Log.ore.println(tModToName);
- //GregtechOreDictEventContainer tOre = new GregtechOreDictEventContainer(aEvent, aPrefix, aMaterial, aMod);
- OreDictEventContainer tOreFake = new OreDictEventContainer(aEvent, aPrefix, aMaterial, aMod);
- if ((!mOreDictActivated) || (!GregTech_API.sUnificationEntriesRegistered)) {
- mEventsFake.add(tOreFake);
- } else {
- mEventsFake.clear();
+ // GregtechOreDictEventContainer tOre = new
+ // GregtechOreDictEventContainer(aEvent, aPrefix, aMaterial, aMod);
+ final OreDictEventContainer tOreFake = new OreDictEventContainer(aEvent, aPrefix, aMaterial, aMod);
+ if (!Meta_GT_Proxy.mOreDictActivated || !GregTech_API.sUnificationEntriesRegistered) {
+ Meta_GT_Proxy.mEventsFake.add(tOreFake);
}
- if (mOreDictActivated) {
- registerRecipes(tOreFake);
+ else {
+ Meta_GT_Proxy.mEventsFake.clear();
}
- } catch (Throwable e) {
+ if (Meta_GT_Proxy.mOreDictActivated) {
+ Meta_GT_Proxy.registerRecipes(tOreFake);
+ }
+ }
+ catch (final Throwable e) {
e.printStackTrace(GT_Log.err);
}
-
- }
-
-
- /**
- * This gives you a new BaseMetaTileEntity. As some Interfaces are not always loaded (Buildcraft, Univeral Electricity) I have to use Invocation at the Constructor of the BaseMetaTileEntity
- */
- private static Class<BaseMetaTileEntity> sBaseMetaTileEntityClass = null;
-
- public static BaseMetaTileEntity constructBaseMetaTileEntity() {
- if (sBaseMetaTileEntityClass == null) {
- try {
- return (BaseMetaTileEntity) (sBaseMetaTileEntityClass = BaseMetaTileEntity.class).newInstance();
- } catch (Throwable e) {/*Do nothing*/}
- }
- try {
- return (BaseMetaTileEntity) (sBaseMetaTileEntityClass.newInstance());
- } catch (Throwable e) {
- Utils.LOG_INFO("Fatal Error ocurred while initializing TileEntities, crashing Minecraft.");
- e.printStackTrace(GT_Log.err);
- throw new RuntimeException(e);
- }
- }
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java
index 448f525823..71026d46c5 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java
@@ -12,34 +12,37 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
-public class GregtechMetaCasingBlocks
-extends GregtechMetaCasingBlocksAbstract {
+public class GregtechMetaCasingBlocks extends GregtechMetaCasingBlocksAbstract {
- public final static int GTID = 57;
-
- CasingTextureHandler TextureHandler = new CasingTextureHandler();
+ public final static int GTID = 57;
+
+ CasingTextureHandler TextureHandler = new CasingTextureHandler();
public GregtechMetaCasingBlocks() {
super(GregtechMetaCasingItems.class, "miscutils.blockcasings", GT_Material_Casings.INSTANCE);
for (byte i = 0; i < 16; i = (byte) (i + 1)) {
- Textures.BlockIcons.CASING_BLOCKS[GTID + i] = new GT_CopiedBlockTexture(this, 6, i);
+ Textures.BlockIcons.CASING_BLOCKS[GregtechMetaCasingBlocks.GTID + i] = new GT_CopiedBlockTexture(this, 6,
+ i);
}
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Centrifuge Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Structural Coke Oven Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Heat Resistant Coke Oven Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Heat Proof Coke Oven Casing"); //60
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Material Press Machine Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Electrolyzer Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Wire Factory Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Maceration Stack Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Matter Generation Coil"); //65
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "Matter Fabricator Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Iron Plated Bricks");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Multitank Exterior Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Hastelloy-N Reactor Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Zeron-100 Reactor Shielding");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Blast Smelter Heat Containment Coil ");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Blast Smelter Casing Block");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Centrifuge Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Structural Coke Oven Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name",
+ "Heat Resistant Coke Oven Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Heat Proof Coke Oven Casing"); // 60
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name",
+ "Material Press Machine Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Electrolyzer Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Wire Factory Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Maceration Stack Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Matter Generation Coil"); // 65
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Matter Fabricator Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Iron Plated Bricks");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Multitank Exterior Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "Hastelloy-N Reactor Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Zeron-100 Reactor Shielding");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name",
+ "Blast Smelter Heat Containment Coil ");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Blast Smelter Casing Block");
GregtechItemList.Casing_Centrifuge1.set(new ItemStack(this, 1, 0));
GregtechItemList.Casing_CokeOven.set(new ItemStack(this, 1, 1));
GregtechItemList.Casing_CokeOven_Coil1.set(new ItemStack(this, 1, 2));
@@ -55,22 +58,22 @@ extends GregtechMetaCasingBlocksAbstract {
GregtechItemList.Casing_Reactor_I.set(new ItemStack(this, 1, 12));
GregtechItemList.Casing_Reactor_II.set(new ItemStack(this, 1, 13));
GregtechItemList.Casing_Coil_BlastSmelter.set(new ItemStack(this, 1, 14));
- GregtechItemList.Casing_BlastSmelter.set(new ItemStack(this, 1, 15));
+ GregtechItemList.Casing_BlastSmelter.set(new ItemStack(this, 1, 15));
}
@Override
- public IIcon getIcon(int aSide, int aMeta) { //Texture ID's. case 0 == ID[57]
- return TextureHandler.getIcon(aSide, aMeta);
+ @SideOnly(Side.CLIENT)
+ public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
+ final int aSide) {
+ final GregtechMetaCasingBlocks i = this;
+ return CasingTextureHandler.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, i);
}
-
-
@Override
- @SideOnly(Side.CLIENT)
- public IIcon getIcon(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, int aSide) {
- GregtechMetaCasingBlocks i = this;
- return TextureHandler.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, i);
+ public IIcon getIcon(final int aSide, final int aMeta) { // Texture ID's.
+ // case 0 ==
+ // ID[57]
+ return CasingTextureHandler.getIcon(aSide, aMeta);
}
-
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java
index 7bc98b91ec..5527a0315f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java
@@ -9,34 +9,34 @@ import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler2;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
-public class GregtechMetaCasingBlocks2
-extends GregtechMetaCasingBlocksAbstract {
+public class GregtechMetaCasingBlocks2 extends GregtechMetaCasingBlocksAbstract {
- public final static int GTID = 73;
-
- CasingTextureHandler2 TextureHandler = new CasingTextureHandler2();
+ public final static int GTID = 73;
+
+ CasingTextureHandler2 TextureHandler = new CasingTextureHandler2();
public GregtechMetaCasingBlocks2() {
super(GregtechMetaCasingItems.class, "gtplusplus.blockcasings.2", GT_Material_Casings.INSTANCE);
for (byte i = 0; i < 16; i = (byte) (i + 1)) {
- Textures.BlockIcons.CASING_BLOCKS[GTID + i] = new GT_CopiedBlockTexture(this, 6, i);
+ Textures.BlockIcons.CASING_BLOCKS[GregtechMetaCasingBlocks2.GTID + i] = new GT_CopiedBlockTexture(this, 6,
+ i);
}
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Strctural Glass Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Placeholder Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Placeholder Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Placeholder Casing"); //60
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Placeholder Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Placeholder Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Incoloy Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Placeholder Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Incoloy Casing"); //65
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "Placeholder Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Placeholder Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Placeholder Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Placeholder Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Placeholder Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Placeholder Casing ");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Placeholder Casing ");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Strctural Glass Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Placeholder Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Placeholder Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Placeholder Casing"); // 60
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Placeholder Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Placeholder Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Incoloy Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Placeholder Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Incoloy Casing"); // 65
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Placeholder Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Placeholder Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Placeholder Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "Placeholder Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Placeholder Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", "Placeholder Casing ");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Placeholder Casing ");
GregtechItemList.Casing_StructuralGlass.set(new ItemStack(this, 1, 0));
GregtechItemList.Casing_PlaceHolder1.set(new ItemStack(this, 1, 1));
GregtechItemList.Casing_PlaceHolder2.set(new ItemStack(this, 1, 2));
@@ -52,11 +52,13 @@ extends GregtechMetaCasingBlocksAbstract {
GregtechItemList.Casing_PlaceHolder12.set(new ItemStack(this, 1, 12));
GregtechItemList.Casing_PlaceHolder13.set(new ItemStack(this, 1, 13));
GregtechItemList.Casing_PlaceHolder14.set(new ItemStack(this, 1, 14));
- GregtechItemList.Casing_PlaceHolder15.set(new ItemStack(this, 1, 15));
+ GregtechItemList.Casing_PlaceHolder15.set(new ItemStack(this, 1, 15));
}
@Override
- public IIcon getIcon(int aSide, int aMeta) { //Texture ID's. case 0 == ID[57]
- return TextureHandler.getIcon(aSide, aMeta);
+ public IIcon getIcon(final int aSide, final int aMeta) { // Texture ID's.
+ // case 0 ==
+ // ID[57]
+ return CasingTextureHandler2.getIcon(aSide, aMeta);
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java
index df742efa17..09fa9d2f5f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java
@@ -21,120 +21,123 @@ import net.minecraft.util.StatCollector;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
-public abstract class GregtechMetaCasingBlocksAbstract
- extends GT_Block_Casings_Abstract {
- public GregtechMetaCasingBlocksAbstract(Class<? extends ItemBlock> aItemClass, String aName, Material aMaterial) {
- super(aItemClass, aName, aMaterial);
- setStepSound(soundTypeMetal);
- setCreativeTab(AddToCreativeTab.tabMachines);
- GregTech_API.registerMachineBlock(this, -1);
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + 32767 + ".name", "Any Sub Block of this");
- }
-
- @Override
- public String getHarvestTool(int aMeta) {
- return "wrench";
- }
-
- @Override
- public int getHarvestLevel(int aMeta) {
- return 2;
- }
-
- @Override
- public float getBlockHardness(World aWorld, int aX, int aY, int aZ) {
- return Blocks.iron_block.getBlockHardness(aWorld, aX, aY, aZ);
- }
-
- @Override
- public float getExplosionResistance(Entity aTNT) {
- return Blocks.iron_block.getExplosionResistance(aTNT);
- }
-
- @Override
+public abstract class GregtechMetaCasingBlocksAbstract extends GT_Block_Casings_Abstract {
+ public GregtechMetaCasingBlocksAbstract(final Class<? extends ItemBlock> aItemClass, final String aName,
+ final Material aMaterial) {
+ super(aItemClass, aName, aMaterial);
+ this.setStepSound(Block.soundTypeMetal);
+ this.setCreativeTab(AddToCreativeTab.tabMachines);
+ GregTech_API.registerMachineBlock(this, -1);
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + "." + 32767 + ".name",
+ "Any Sub Block of this");
+ }
+
+ @Override
+ public void breakBlock(final World aWorld, final int aX, final int aY, final int aZ, final Block aBlock,
+ final int aMetaData) {
+ if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) {
+ GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ);
+ }
+ }
+
+ @Override
+ public boolean canBeReplacedByLeaves(final IBlockAccess aWorld, final int aX, final int aY, final int aZ) {
+ return false;
+ }
+
+ @Override
+ public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y,
+ final int z) {
+ return false;
+ }
+
+ @Override
protected boolean canSilkHarvest() {
- return false;
- }
-
- @Override
- public void onBlockAdded(World aWorld, int aX, int aY, int aZ) {
- if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) {
- GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ);
- }
- }
-
- @Override
- public String getUnlocalizedName() {
- return this.mUnlocalizedName;
- }
-
- @Override
+ return false;
+ }
+
+ @Override
+ public int damageDropped(final int par1) {
+ return par1;
+ }
+
+ @Override
+ public float getBlockHardness(final World aWorld, final int aX, final int aY, final int aZ) {
+ return Blocks.iron_block.getBlockHardness(aWorld, aX, aY, aZ);
+ }
+
+ @Override
+ public int getDamageValue(final World par1World, final int par2, final int par3, final int par4) {
+ return par1World.getBlockMetadata(par2, par3, par4);
+ }
+
+ @Override
+ public float getExplosionResistance(final Entity aTNT) {
+ return Blocks.iron_block.getExplosionResistance(aTNT);
+ }
+
+ @Override
+ public int getHarvestLevel(final int aMeta) {
+ return 2;
+ }
+
+ @Override
+ public String getHarvestTool(final int aMeta) {
+ return "wrench";
+ }
+
+ @Override
+ public Item getItemDropped(final int par1, final Random par2Random, final int par3) {
+ return Item.getItemFromBlock(this);
+ }
+
+ @Override
public String getLocalizedName() {
- return StatCollector.translateToLocal(this.mUnlocalizedName + ".name");
- }
+ return StatCollector.translateToLocal(this.mUnlocalizedName + ".name");
+ }
- @Override
- public boolean canBeReplacedByLeaves(IBlockAccess aWorld, int aX, int aY, int aZ) {
- return false;
- }
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void getSubBlocks(final Item aItem, final CreativeTabs par2CreativeTabs, final List aList) {
+ for (int i = 0; i < 16; i++) {
+ aList.add(new ItemStack(aItem, 1, i));
+ }
+ }
- @Override
- public boolean isNormalCube(IBlockAccess aWorld, int aX, int aY, int aZ) {
- return true;
- }
+ @Override
+ public String getUnlocalizedName() {
+ return this.mUnlocalizedName;
+ }
- @Override
- public boolean renderAsNormalBlock() {
- return true;
- }
+ @Override
+ public boolean isNormalCube(final IBlockAccess aWorld, final int aX, final int aY, final int aZ) {
+ return true;
+ }
- @Override
+ @Override
public boolean isOpaqueCube() {
- return true;
- }
-
- @Override
- public void breakBlock(World aWorld, int aX, int aY, int aZ, Block aBlock, int aMetaData) {
- if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) {
- GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ);
- }
- }
-
- @Override
- public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) {
- return false;
- }
-
- @Override
- public int damageDropped(int par1) {
- return par1;
- }
-
- @Override
- public int getDamageValue(World par1World, int par2, int par3, int par4) {
- return par1World.getBlockMetadata(par2, par3, par4);
- }
-
- @Override
- public int quantityDropped(Random par1Random) {
- return 1;
- }
-
- @Override
- public Item getItemDropped(int par1, Random par2Random, int par3) {
- return Item.getItemFromBlock(this);
- }
-
- @Override
+ return true;
+ }
+
+ @Override
+ public void onBlockAdded(final World aWorld, final int aX, final int aY, final int aZ) {
+ if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) {
+ GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ);
+ }
+ }
+
+ @Override
+ public int quantityDropped(final Random par1Random) {
+ return 1;
+ }
+
+ @Override
@SideOnly(Side.CLIENT)
- public void registerBlockIcons(IIconRegister aIconRegister) {
- }
+ public void registerBlockIcons(final IIconRegister aIconRegister) {
+ }
- @Override
- @SideOnly(Side.CLIENT)
- public void getSubBlocks(Item aItem, CreativeTabs par2CreativeTabs, List aList) {
- for (int i = 0; i < 16; i++) {
- aList.add(new ItemStack(aItem, 1, i));
- }
- }
+ @Override
+ public boolean renderAsNormalBlock() {
+ return true;
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java
index 957a12bc14..5ac4086a61 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java
@@ -2,9 +2,8 @@ package gtPlusPlus.xmod.gregtech.common.blocks;
import net.minecraft.block.Block;
-public class GregtechMetaCasingItems
- extends GregtechMetaItemCasingsAbstract {
- public GregtechMetaCasingItems(Block par1) {
- super(par1);
- }
+public class GregtechMetaCasingItems extends GregtechMetaItemCasingsAbstract {
+ public GregtechMetaCasingItems(final Block par1) {
+ super(par1);
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java
index 02ef1b9ca6..e160459c55 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java
@@ -6,31 +6,31 @@ import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
-public class GregtechMetaItemCasings1
-extends GregtechMetaItemCasingsAbstract {
- public GregtechMetaItemCasings1(Block par1) {
+public class GregtechMetaItemCasings1 extends GregtechMetaItemCasingsAbstract {
+ public GregtechMetaItemCasings1(final Block par1) {
super(par1);
}
@Override
- public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) {
+ public void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, final List aList,
+ final boolean aF3_H) {
super.addInformation(aStack, aPlayer, aList, aF3_H);
- switch (getDamage(aStack)) {
- case 0:
- aList.add(this.mCasing_Centrifuge);
- break;
- case 1:
- aList.add(this.mCasing_CokeOven);
- break;
- case 2:
- aList.add(this.mCasing_CokeCoil1);
- break;
- case 3:
- aList.add(this.mCasing_CokeCoil2);
- break;
- default:
- aList.add(this.mCasing_CokeCoil2);
- break;
+ switch (this.getDamage(aStack)) {
+ case 0:
+ aList.add(this.mCasing_Centrifuge);
+ break;
+ case 1:
+ aList.add(this.mCasing_CokeOven);
+ break;
+ case 2:
+ aList.add(this.mCasing_CokeCoil1);
+ break;
+ case 3:
+ aList.add(this.mCasing_CokeCoil2);
+ break;
+ default:
+ aList.add(this.mCasing_CokeCoil2);
+ break;
}
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java
index 7547c76b1e..a4c4faeb6c 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java
@@ -8,53 +8,59 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
-public abstract class GregtechMetaItemCasingsAbstract
-extends ItemBlock {
+public abstract class GregtechMetaItemCasingsAbstract extends ItemBlock {
- protected final String mCasing_Centrifuge = GT_LanguageManager.addStringLocalization("mu.centrifugecasing", "Warning! Standing in the Centrifuge not recommended");
- protected final String mCasing_CokeOven = GT_LanguageManager.addStringLocalization("mu.cokeoven", "Sturdy and Strong");
- protected final String mCasing_CokeCoil1 = GT_LanguageManager.addStringLocalization("mu.coil01tooltip", "Base Heating Capacity = 1350 Kelvin");
- protected final String mCasing_CokeCoil2 = GT_LanguageManager.addStringLocalization("mu.coil02tooltip", "Base Heating Capacity = 2275 Kelvin");
- protected final String mNoMobsToolTip = GT_LanguageManager.addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block");
- protected final String mNoTileEntityToolTip = GT_LanguageManager.addStringLocalization("gt.notileentityinthisblock", "This is NOT a TileEntity!");
+ protected final String mCasing_Centrifuge = GT_LanguageManager.addStringLocalization("mu.centrifugecasing",
+ "Warning! Standing in the Centrifuge not recommended");
+ protected final String mCasing_CokeOven = GT_LanguageManager.addStringLocalization("mu.cokeoven",
+ "Sturdy and Strong");
+ protected final String mCasing_CokeCoil1 = GT_LanguageManager.addStringLocalization("mu.coil01tooltip",
+ "Base Heating Capacity = 1350 Kelvin");
+ protected final String mCasing_CokeCoil2 = GT_LanguageManager.addStringLocalization("mu.coil02tooltip",
+ "Base Heating Capacity = 2275 Kelvin");
+ protected final String mNoMobsToolTip = GT_LanguageManager
+ .addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block");
+ protected final String mNoTileEntityToolTip = GT_LanguageManager
+ .addStringLocalization("gt.notileentityinthisblock", "This is NOT a TileEntity!");
- public GregtechMetaItemCasingsAbstract(Block par1) {
+ public GregtechMetaItemCasingsAbstract(final Block par1) {
super(par1);
- setMaxDamage(0);
- setHasSubtypes(true);
- //setCreativeTab(AddToCreativeTab.tabMachines);
+ this.setMaxDamage(0);
+ this.setHasSubtypes(true);
+ // setCreativeTab(AddToCreativeTab.tabMachines);
}
@Override
- public int getMetadata(int aMeta) {
- return aMeta;
+ public void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, final List aList,
+ final boolean aF3_H) {
+ super.addInformation(aStack, aPlayer, aList, aF3_H);
+ switch (this.getDamage(aStack)) {
+ case 0:
+ aList.add(this.mCasing_Centrifuge);
+ break;
+ case 1:
+ aList.add(this.mCasing_CokeOven);
+ break;
+ case 2:
+ aList.add(this.mCasing_CokeCoil1);
+ break;
+ case 3:
+ aList.add(this.mCasing_CokeCoil2);
+ break;
+ default:
+ break;
+ }
+ aList.add(this.mNoMobsToolTip);
+ aList.add(this.mNoTileEntityToolTip);
}
@Override
- public String getUnlocalizedName(ItemStack aStack) {
- return this.field_150939_a.getUnlocalizedName() + "." + getDamage(aStack);
+ public int getMetadata(final int aMeta) {
+ return aMeta;
}
@Override
- public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) {
- super.addInformation(aStack, aPlayer, aList, aF3_H);
- switch (getDamage(aStack)) {
- case 0:
- aList.add(this.mCasing_Centrifuge);
- break;
- case 1:
- aList.add(this.mCasing_CokeOven);
- break;
- case 2:
- aList.add(this.mCasing_CokeCoil1);
- break;
- case 3:
- aList.add(this.mCasing_CokeCoil2);
- break;
- default:
- break;
- }
- aList.add(this.mNoMobsToolTip);
- aList.add(this.mNoTileEntityToolTip);
+ public String getUnlocalizedName(final ItemStack aStack) {
+ return this.field_150939_a.getUnlocalizedName() + "." + this.getDamage(aStack);
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java
index a6a4212351..29012b8b98 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java
@@ -13,179 +13,218 @@ public class GregtechFluidHandler {
protected static int cellID = 0;
- public static void run(){
- start();
+ private static void generateIC2FluidCell(final String fluidNameWithCaps) {
+ Utils.LOG_INFO("Adding a Cell for " + fluidNameWithCaps);
+ if (LoadedMods.IndustrialCraft2) {
+ Utils.createInternalNameAndFluidCell(fluidNameWithCaps);
+ }
+ }
+
+ public static void run() {
+ GregtechFluidHandler.start();
}
- private static void start(){
-
- /* Meta_GT_Proxy.addFluid("lubricant", "Lubricant", Materials.Lubricant, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Lubricant, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
- Meta_GT_Proxy.addFluid("creosote", "Creosote Oil", Materials.Creosote, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Creosote, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
- Meta_GT_Proxy.addFluid("seedoil", "Seed Oil", Materials.SeedOil, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SeedOil, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
- Meta_GT_Proxy.addFluid("fishoil", "Fish Oil", Materials.FishOil, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.FishOil, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
- Meta_GT_Proxy.addFluid("oil", "Oil", Materials.Oil, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oil, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
- Meta_GT_Proxy.addFluid("fuel", "Diesel", Materials.Fuel, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fuel, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
- Meta_GT_Proxy.addFluid("for.honey", "Honey", Materials.Honey, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Honey, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
- Meta_GT_Proxy.addFluid("biomass", "Biomass", Materials.Biomass, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Biomass, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
- Meta_GT_Proxy.addFluid("bioethanol", "Bio Ethanol", Materials.Ethanol, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ethanol, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
- Meta_GT_Proxy.addFluid("sulfuricacid", "Sulfuric Acid", Materials.SulfuricAcid, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricAcid, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
- Meta_GT_Proxy.addFluid("milk", "Milk", Materials.Milk, 1, 290, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Milk, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
- Meta_GT_Proxy.addFluid("mcguffium", "Mc Guffium 239", Materials.McGuffium239, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.McGuffium239, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
- Meta_GT_Proxy.addFluid("glue", "Glue", Materials.Glue, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Glue, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ private static void start() {
+
+ /*
+ * Meta_GT_Proxy.addFluid("lubricant", "Lubricant", Materials.Lubricant,
+ * 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell,
+ * Materials.Lubricant, 1L), ItemList.Cell_Empty.get(1L, new Object[0]),
+ * 1000); Meta_GT_Proxy.addFluid("creosote", "Creosote Oil",
+ * Materials.Creosote, 1, 295,
+ * GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Creosote, 1L),
+ * ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ * Meta_GT_Proxy.addFluid("seedoil", "Seed Oil", Materials.SeedOil, 1,
+ * 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SeedOil,
+ * 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ * Meta_GT_Proxy.addFluid("fishoil", "Fish Oil", Materials.FishOil, 1,
+ * 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.FishOil,
+ * 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ * Meta_GT_Proxy.addFluid("oil", "Oil", Materials.Oil, 1, 295,
+ * GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oil, 1L),
+ * ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ * Meta_GT_Proxy.addFluid("fuel", "Diesel", Materials.Fuel, 1, 295,
+ * GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fuel, 1L),
+ * ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ * Meta_GT_Proxy.addFluid("for.honey", "Honey", Materials.Honey, 1, 295,
+ * GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Honey, 1L),
+ * ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ * Meta_GT_Proxy.addFluid("biomass", "Biomass", Materials.Biomass, 1,
+ * 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Biomass,
+ * 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ * Meta_GT_Proxy.addFluid("bioethanol", "Bio Ethanol",
+ * Materials.Ethanol, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell,
+ * Materials.Ethanol, 1L), ItemList.Cell_Empty.get(1L, new Object[0]),
+ * 1000); Meta_GT_Proxy.addFluid("sulfuricacid", "Sulfuric Acid",
+ * Materials.SulfuricAcid, 1, 295,
+ * GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricAcid,
+ * 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ * Meta_GT_Proxy.addFluid("milk", "Milk", Materials.Milk, 1, 290,
+ * GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Milk, 1L),
+ * ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ * Meta_GT_Proxy.addFluid("mcguffium", "Mc Guffium 239",
+ * Materials.McGuffium239, 1, 295,
+ * GT_OreDictUnificator.get(OrePrefixes.cell, Materials.McGuffium239,
+ * 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ * Meta_GT_Proxy.addFluid("glue", "Glue", Materials.Glue, 1, 295,
+ * GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Glue, 1L),
+ * ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
*/
- if (!LoadedMods.ThermalFoundation){
+ if (!LoadedMods.ThermalFoundation) {
- Utils.LOG_INFO("Adding in our own GT versions of Thermal Foundation Fluids");
- FluidUtils.addFluid("cryotheum", "Gelid Cryotheum", GT_Materials.Cryotheum, 4, -1200, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.Cryotheum, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
- FluidUtils.addFluid("pyrotheum", "Blazing Pyrotheum", GT_Materials.Pyrotheum, 4, 4000, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.Pyrotheum, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ Utils.LOG_INFO("Adding in our own GT versions of Thermal Foundation Fluids");
+ FluidUtils.addFluid("cryotheum", "Gelid Cryotheum", GT_Materials.Cryotheum, 4, -1200,
+ GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.Cryotheum, 1L),
+ ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ FluidUtils.addFluid("pyrotheum", "Blazing Pyrotheum", GT_Materials.Pyrotheum, 4, 4000,
+ GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.Pyrotheum, 1L),
+ ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
}
- if (LoadedMods.IndustrialCraft2){
- Utils.LOG_INFO("Adding in GT Fluids for various nuclear related content.");
-
- FluidUtils.addFluid("hydrofluoricAcid", "Hydrofluoric Acid", GT_Materials.HydrofluoricAcid, 1, 120, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.HydrofluoricAcid, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
- generateIC2FluidCell("HydrofluoricAcid");
-
- FluidUtils.addFluid("sulfurDioxide", "Sulfur Dioxide", GT_Materials.SulfurDioxide, 4, -100, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.SulfurDioxide, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
- generateIC2FluidCell("SulfurDioxide");
-
- FluidUtils.addFluid("sulfurousAcid", "Sulfurous Acid", GT_Materials.SulfurousAcid, 4, 75, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.SulfurousAcid, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
- generateIC2FluidCell("SulfurousAcid");
-
- FluidUtils.addFluid("sulfuricApatite", "Sulfuric Apatite Mix", GT_Materials.SulfuricApatite, 4, 500, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.SulfuricApatite, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
- generateIC2FluidCell("SulfuricApatite");
-
- FluidUtils.addFluid("uraniumHexafluoride", "Uranium Hexafluoride", GT_Materials.UraniumHexaFluoride, 4, 200, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.UraniumHexaFluoride, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
- generateIC2FluidCell("UraniumHexaFluoride");
-
- FluidUtils.addFluid("uraniumTetrafluoride", "Uranium Tetrafluoride", GT_Materials.UraniumTetraFluoride, 4, 950, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.UraniumTetraFluoride, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
- generateIC2FluidCell("UraniumTetraFluoride");
-
- FluidUtils.addFluid("thoriumTetrafluoride", "Thorium Tetrafluoride", GT_Materials.ThoriumTetraFluoride, 4, 1250, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.ThoriumTetraFluoride, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
- generateIC2FluidCell("ThoriumTetraFluoride");
-
-
- //Check for IHL Hydrogen Chloride
- if (!LoadedMods.IHL || ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogenChloride", 1) == null){
- if (FluidUtils.getFluidStack("hydrogenchloride", 1) == null){
- if (LoadedMods.IHL){
- Utils.LOG_INFO("IHL Loaded but hydrogen chloride could not be found for some reason. How about we add our own.");
+ if (LoadedMods.IndustrialCraft2) {
+ Utils.LOG_INFO("Adding in GT Fluids for various nuclear related content.");
+
+ FluidUtils.addFluid("hydrofluoricAcid", "Hydrofluoric Acid", GT_Materials.HydrofluoricAcid, 1, 120,
+ GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.HydrofluoricAcid, 1L),
+ ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ GregtechFluidHandler.generateIC2FluidCell("HydrofluoricAcid");
+
+ FluidUtils.addFluid("sulfurDioxide", "Sulfur Dioxide", GT_Materials.SulfurDioxide, 4, -100,
+ GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.SulfurDioxide, 1L),
+ ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ GregtechFluidHandler.generateIC2FluidCell("SulfurDioxide");
+
+ FluidUtils.addFluid("sulfurousAcid", "Sulfurous Acid", GT_Materials.SulfurousAcid, 4, 75,
+ GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.SulfurousAcid, 1L),
+ ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ GregtechFluidHandler.generateIC2FluidCell("SulfurousAcid");
+
+ FluidUtils.addFluid("sulfuricApatite", "Sulfuric Apatite Mix", GT_Materials.SulfuricApatite, 4, 500,
+ GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.SulfuricApatite, 1L),
+ ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ GregtechFluidHandler.generateIC2FluidCell("SulfuricApatite");
+
+ FluidUtils.addFluid("uraniumHexafluoride", "Uranium Hexafluoride", GT_Materials.UraniumHexaFluoride, 4, 200,
+ GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.UraniumHexaFluoride, 1L),
+ ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ GregtechFluidHandler.generateIC2FluidCell("UraniumHexaFluoride");
+
+ FluidUtils.addFluid("uraniumTetrafluoride", "Uranium Tetrafluoride", GT_Materials.UraniumTetraFluoride, 4,
+ 950, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.UraniumTetraFluoride, 1L),
+ ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ GregtechFluidHandler.generateIC2FluidCell("UraniumTetraFluoride");
+
+ FluidUtils.addFluid("thoriumTetrafluoride", "Thorium Tetrafluoride", GT_Materials.ThoriumTetraFluoride, 4,
+ 1250, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.ThoriumTetraFluoride, 1L),
+ ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ GregtechFluidHandler.generateIC2FluidCell("ThoriumTetraFluoride");
+
+ // Check for IHL Hydrogen Chloride
+ if (!LoadedMods.IHL || ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogenChloride", 1) == null) {
+ if (FluidUtils.getFluidStack("hydrogenchloride", 1) == null) {
+ if (LoadedMods.IHL) {
+ Utils.LOG_INFO(
+ "IHL Loaded but hydrogen chloride could not be found for some reason. How about we add our own.");
}
else {
Utils.LOG_INFO("No Suitable versions of Hydrogen Chloride available, adding our own.");
}
- FluidUtils.addFluid("hydrogenChloride", "Hydrogen Chloride", GT_Materials.HydrogenChloride, 4, 75, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.HydrogenChloride, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
- generateIC2FluidCell("HydrogenChloride");
+ FluidUtils.addFluid("hydrogenChloride", "Hydrogen Chloride", GT_Materials.HydrogenChloride, 4, 75,
+ GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.HydrogenChloride, 1L),
+ ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ GregtechFluidHandler.generateIC2FluidCell("HydrogenChloride");
}
}
-
-
- FluidUtils.addFluid("sulfuricLithium", "Sulfuric Lithium Mix", GT_Materials.SulfuricLithium, 4, 280, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.SulfuricLithium, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
- generateIC2FluidCell("SulfuricLithium");
-
- FluidUtils.addFluid("lithiumHydroxide", "Lithium Hydroxide", GT_Materials.LithiumHydroxide, 4, 500, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.LithiumHydroxide, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
- generateIC2FluidCell("SulfuricApatite");
-
- /*Meta_GT_Proxy.addFluid("sulfuricApatite", "Sulfuric Apatite", GT_Materials.SulfuricApatite, 4, 500, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.SulfuricApatite, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
- generateIC2FluidCell("SulfuricApatite");
-
- Meta_GT_Proxy.addFluid("sulfuricApatite", "Sulfuric Apatite", GT_Materials.SulfuricApatite, 4, 500, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.SulfuricApatite, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
- generateIC2FluidCell("SulfuricApatite");
-
- Meta_GT_Proxy.addFluid("sulfuricApatite", "Sulfuric Apatite", GT_Materials.SulfuricApatite, 4, 500, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.SulfuricApatite, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
- generateIC2FluidCell("SulfuricApatite");*/
-
-
- //Chemical Bath Recipes
- GT_Values.RA.addChemicalRecipe(
- ItemUtils.getItemStackOfAmountFromOreDict("dustApatite", 16),
- null,
- FluidUtils.getFluidStack("sulfuricacid", 144*32),
- FluidUtils.getFluidStack("sulfuricapatite", 144*4),
- ItemUtils.getItemStackOfAmountFromOreDict("dustSmallSulfur", 1),
- 20*20);
-
- /*GT_Values.RA.addChemicalRecipe(
- UtilsItems.getItemStackOfAmountFromOreDict("dustLithium", 8),
- null,
- FluidUtils.getFluidStack("sulfuricacid", 133*32),
- FluidUtils.getFluidStack("sulfuriclithium", 133*4),
- UtilsItems.getItemStackOfAmountFromOreDict("dustSmallLithium", 2),
- 20*20);*/
-
- GT_Values.RA.addChemicalRecipe(
- ItemUtils.getItemStackOfAmountFromOreDict("cellOxygen", 1),
+
+ FluidUtils.addFluid("sulfuricLithium", "Sulfuric Lithium Mix", GT_Materials.SulfuricLithium, 4, 280,
+ GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.SulfuricLithium, 1L),
+ ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ GregtechFluidHandler.generateIC2FluidCell("SulfuricLithium");
+
+ FluidUtils.addFluid("lithiumHydroxide", "Lithium Hydroxide", GT_Materials.LithiumHydroxide, 4, 500,
+ GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.LithiumHydroxide, 1L),
+ ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
+ GregtechFluidHandler.generateIC2FluidCell("SulfuricApatite");
+
+ /*
+ * Meta_GT_Proxy.addFluid("sulfuricApatite", "Sulfuric Apatite",
+ * GT_Materials.SulfuricApatite, 4, 500,
+ * GT_OreDictUnificator.get(OrePrefixes.cell,
+ * GT_Materials.SulfuricApatite, 1L), ItemList.Cell_Empty.get(1L,
+ * new Object[0]), 1000); generateIC2FluidCell("SulfuricApatite");
+ *
+ * Meta_GT_Proxy.addFluid("sulfuricApatite", "Sulfuric Apatite",
+ * GT_Materials.SulfuricApatite, 4, 500,
+ * GT_OreDictUnificator.get(OrePrefixes.cell,
+ * GT_Materials.SulfuricApatite, 1L), ItemList.Cell_Empty.get(1L,
+ * new Object[0]), 1000); generateIC2FluidCell("SulfuricApatite");
+ *
+ * Meta_GT_Proxy.addFluid("sulfuricApatite", "Sulfuric Apatite",
+ * GT_Materials.SulfuricApatite, 4, 500,
+ * GT_OreDictUnificator.get(OrePrefixes.cell,
+ * GT_Materials.SulfuricApatite, 1L), ItemList.Cell_Empty.get(1L,
+ * new Object[0]), 1000); generateIC2FluidCell("SulfuricApatite");
+ */
+
+ // Chemical Bath Recipes
+ GT_Values.RA.addChemicalRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustApatite", 16), null,
+ FluidUtils.getFluidStack("sulfuricacid", 144 * 32),
+ FluidUtils.getFluidStack("sulfuricapatite", 144 * 4),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustSmallSulfur", 1), 20 * 20);
+
+ /*
+ * GT_Values.RA.addChemicalRecipe(
+ * UtilsItems.getItemStackOfAmountFromOreDict("dustLithium", 8),
+ * null, FluidUtils.getFluidStack("sulfuricacid", 133*32),
+ * FluidUtils.getFluidStack("sulfuriclithium", 133*4),
+ * UtilsItems.getItemStackOfAmountFromOreDict("dustSmallLithium",
+ * 2), 20*20);
+ */
+
+ GT_Values.RA.addChemicalRecipe(ItemUtils.getItemStackOfAmountFromOreDict("cellOxygen", 1),
ItemUtils.getItemStackOfAmountFromOreDict("dustLithium", 16),
- FluidUtils.getFluidStack("water", 1000),
- FluidUtils.getFluidStack("lithiumhydroxide", 144*4),
- null,
- 300*20);
-
-
-
-
-
-
-
-
- //Mixer Recipes
- GT_Values.RA.addMixerRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustSulfur", 1), null, null, null, FluidUtils.getFluidStack("oxygen", 288), FluidUtils.getFluidStack("sulfurdioxide", 432), null, 600, 60);
- GT_Values.RA.addMixerRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustUranium235", 1), ItemUtils.getItemStackOfAmountFromOreDict("dustUranium235", 1), null, null, FluidUtils.getFluidStack("hydrofluoricacid", 2000), FluidUtils.getFluidStack("uraniumtetrafluoride", 288), null, 3000, 500);
- GT_Values.RA.addMixerRecipe(ItemUtils.getItemStackOfAmountFromOreDict("cellFluorine", 1), ItemUtils.getItemStackOfAmountFromOreDict("cellFluorine", 1), null, null, FluidUtils.getFluidStack("uraniumtetrafluoride", 720), FluidUtils.getFluidStack("uraniumhexafluoride", 288), null, 5000, 2000);
-
-
-
-
-
-
-
- //Apatite Distillation
+ FluidUtils.getFluidStack("water", 1000), FluidUtils.getFluidStack("lithiumhydroxide", 144 * 4),
+ null, 300 * 20);
+
+ // Mixer Recipes
+ GT_Values.RA.addMixerRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustSulfur", 1), null, null, null,
+ FluidUtils.getFluidStack("oxygen", 288), FluidUtils.getFluidStack("sulfurdioxide", 432), null, 600,
+ 60);
+ GT_Values.RA.addMixerRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustUranium235", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustUranium235", 1), null, null,
+ FluidUtils.getFluidStack("hydrofluoricacid", 2000),
+ FluidUtils.getFluidStack("uraniumtetrafluoride", 288), null, 3000, 500);
+ GT_Values.RA.addMixerRecipe(ItemUtils.getItemStackOfAmountFromOreDict("cellFluorine", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("cellFluorine", 1), null, null,
+ FluidUtils.getFluidStack("uraniumtetrafluoride", 720),
+ FluidUtils.getFluidStack("uraniumhexafluoride", 288), null, 5000, 2000);
+
+ // Apatite Distillation
/*
- * so if you dissolve aparite in sulphuric acid
- * you'll get a mixture of SO2, H2O, HF and HCl
+ * so if you dissolve aparite in sulphuric acid you'll get a mixture
+ * of SO2, H2O, HF and HCl
*/
- FluidStack[] apatiteOutput = {
- FluidUtils.getFluidStack("sulfurousacid", 3800),
- FluidUtils.getFluidStack("hydrogenchloride", 1000),
+ final FluidStack[] apatiteOutput = {
+ FluidUtils.getFluidStack("sulfurousacid", 3800), FluidUtils.getFluidStack("hydrogenchloride", 1000),
FluidUtils.getFluidStack("hydrofluoricacid", 400)
};
- GT_Values.RA.addDistillationTowerRecipe(
- FluidUtils.getFluidStack("sulfuricapatite", 5200),
- apatiteOutput,
- null,
- 45*20,
- 256);
-
- FluidStack[] sulfurousacidOutput = {
- FluidUtils.getFluidStack("sulfurdioxide", 500),
- FluidUtils.getFluidStack("water", 500)
- };
- GT_Values.RA.addDistillationTowerRecipe(
- FluidUtils.getFluidStack("sulfurousacid", 1000),
- sulfurousacidOutput,
- null,
- 10*20,
- 60);
+ GT_Values.RA.addDistillationTowerRecipe(FluidUtils.getFluidStack("sulfuricapatite", 5200), apatiteOutput,
+ null, 45 * 20, 256);
- FluidStack[] sulfurdioxideOutput = {
- FluidUtils.getFluidStack("oxygen", 144*2)
+ final FluidStack[] sulfurousacidOutput = {
+ FluidUtils.getFluidStack("sulfurdioxide", 500), FluidUtils.getFluidStack("water", 500)
};
- GT_Values.RA.addDistillationTowerRecipe(
- FluidUtils.getFluidStack("sulfurdioxide", 144*3),
- sulfurdioxideOutput,
- ItemUtils.getItemStackOfAmountFromOreDict("dustSulfur", 1),
- 5*20,
- 30);
+ GT_Values.RA.addDistillationTowerRecipe(FluidUtils.getFluidStack("sulfurousacid", 1000),
+ sulfurousacidOutput, null, 10 * 20, 60);
- }
- }
+ final FluidStack[] sulfurdioxideOutput = {
+ FluidUtils.getFluidStack("oxygen", 144 * 2)
+ };
+ GT_Values.RA.addDistillationTowerRecipe(FluidUtils.getFluidStack("sulfurdioxide", 144 * 3),
+ sulfurdioxideOutput, ItemUtils.getItemStackOfAmountFromOreDict("dustSulfur", 1), 5 * 20, 30);
- private static void generateIC2FluidCell(String fluidNameWithCaps){
- Utils.LOG_INFO("Adding a Cell for "+fluidNameWithCaps);
- if (LoadedMods.IndustrialCraft2){
- Utils.createInternalNameAndFluidCell(fluidNameWithCaps);
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java
index 5b4571b057..20df668ab2 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java
@@ -7,74 +7,81 @@ import net.minecraft.world.IBlockAccess;
public class CasingTextureHandler {
- //private static final TexturesGregtech59 gregtech59 = new TexturesGregtech59();
- //private static final TexturesGregtech58 gregtech58 = new TexturesGregtech58();
+ // private static final TexturesGregtech59 gregtech59 = new
+ // TexturesGregtech59();
+ // private static final TexturesGregtech58 gregtech58 = new
+ // TexturesGregtech58();
private static final TexturesCentrifugeMultiblock gregtechX = new TexturesCentrifugeMultiblock();
- public static IIcon getIcon(int aSide, int aMeta) { //Texture ID's. case 0 == ID[57]
- if ((aMeta >= 0) && (aMeta < 16)) {
+ public static IIcon getIcon(final int aSide, final int aMeta) { // Texture
+ // ID's.
+ // case 0 ==
+ // ID[57]
+ if (aMeta >= 0 && aMeta < 16) {
switch (aMeta) {
- //Centrifuge
- case 0:
- return TexturesGtBlock.Casing_Material_MaragingSteel.getIcon();
- //Coke Oven Frame
- case 1:
- return TexturesGtBlock.Casing_Material_Tantalloy61.getIcon();
- //Coke Oven Casing Tier 1
- case 2:
- return Textures.BlockIcons.MACHINE_CASING_FIREBOX_BRONZE.getIcon();
- //Coke Oven Casing Tier 2
- case 3:
- return Textures.BlockIcons.MACHINE_CASING_FIREBOX_STEEL.getIcon();
- //Material Press Casings
- case 4:
- return Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon();
- //Electrolyzer Casings
- case 5:
- return TexturesGtBlock.Casing_Material_Potin.getIcon();
- //Broken Blue Fusion Casings
- case 6:
- return Textures.BlockIcons.MACHINE_CASING_FUSION.getIcon();
- //Maceration Stack Casings
- case 7:
- return TexturesGtBlock.Casing_Material_Tumbaga.getIcon();
- //Broken Pink Fusion Casings
- case 8:
- return Textures.BlockIcons.MACHINE_CASING_FUSION_2.getIcon();
- //Matter Fabricator Casings
- case 9:
- return TexturesGtBlock.Casing_Machine_Dimensional_Adv.getIcon();
- //Iron Blast Fuance Textures
- case 10:
- return TexturesGtBlock.Casing_Machine_Simple_Top.getIcon();
- //Multitank Exterior Casing
- case 11:
- return TexturesGtBlock.Casing_Material_Grisium.getIcon();
- //Reactor Casing I
- case 12:
- return TexturesGtBlock.Casing_Material_Stellite.getIcon();
- //Reactor Casing II
- case 13:
- return TexturesGtBlock.Casing_Material_Zeron100.getIcon();
- case 14:
- return TexturesGtBlock.Casing_Staballoy_Firebox.getIcon();
- case 15:
- return TexturesGtBlock.Casing_Material_ZirconiumCarbide.getIcon();
+ // Centrifuge
+ case 0:
+ return TexturesGtBlock.Casing_Material_MaragingSteel.getIcon();
+ // Coke Oven Frame
+ case 1:
+ return TexturesGtBlock.Casing_Material_Tantalloy61.getIcon();
+ // Coke Oven Casing Tier 1
+ case 2:
+ return Textures.BlockIcons.MACHINE_CASING_FIREBOX_BRONZE.getIcon();
+ // Coke Oven Casing Tier 2
+ case 3:
+ return Textures.BlockIcons.MACHINE_CASING_FIREBOX_STEEL.getIcon();
+ // Material Press Casings
+ case 4:
+ return Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon();
+ // Electrolyzer Casings
+ case 5:
+ return TexturesGtBlock.Casing_Material_Potin.getIcon();
+ // Broken Blue Fusion Casings
+ case 6:
+ return Textures.BlockIcons.MACHINE_CASING_FUSION.getIcon();
+ // Maceration Stack Casings
+ case 7:
+ return TexturesGtBlock.Casing_Material_Tumbaga.getIcon();
+ // Broken Pink Fusion Casings
+ case 8:
+ return Textures.BlockIcons.MACHINE_CASING_FUSION_2.getIcon();
+ // Matter Fabricator Casings
+ case 9:
+ return TexturesGtBlock.Casing_Machine_Dimensional_Adv.getIcon();
+ // Iron Blast Fuance Textures
+ case 10:
+ return TexturesGtBlock.Casing_Machine_Simple_Top.getIcon();
+ // Multitank Exterior Casing
+ case 11:
+ return TexturesGtBlock.Casing_Material_Grisium.getIcon();
+ // Reactor Casing I
+ case 12:
+ return TexturesGtBlock.Casing_Material_Stellite.getIcon();
+ // Reactor Casing II
+ case 13:
+ return TexturesGtBlock.Casing_Material_Zeron100.getIcon();
+ case 14:
+ return TexturesGtBlock.Casing_Staballoy_Firebox.getIcon();
+ case 15:
+ return TexturesGtBlock.Casing_Material_ZirconiumCarbide.getIcon();
- default:
- return Textures.BlockIcons.MACHINE_CASING_RADIOACTIVEHAZARD.getIcon();
+ default:
+ return Textures.BlockIcons.MACHINE_CASING_RADIOACTIVEHAZARD.getIcon();
}
}
return Textures.BlockIcons.MACHINE_CASING_GEARBOX_TUNGSTENSTEEL.getIcon();
}
-
- public static IIcon handleCasingsGT(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, int aSide, GregtechMetaCasingBlocks thisBlock) {
- /*if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){
- return gregtech59.handleCasingsGT59(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);
- }
- return gregtech58.handleCasingsGT58(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);*/
- return gregtechX.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);
+ public static IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
+ final int aSide, final GregtechMetaCasingBlocks thisBlock) {
+ /*
+ * if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ return
+ * gregtech59.handleCasingsGT59(aWorld, xCoord, yCoord, zCoord, aSide,
+ * thisBlock); } return gregtech58.handleCasingsGT58(aWorld, xCoord,
+ * yCoord, zCoord, aSide, thisBlock);
+ */
+ return CasingTextureHandler.gregtechX.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);
}
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java
index 526f048b76..0a62cece67 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java
@@ -5,62 +5,65 @@ import net.minecraft.util.IIcon;
public class CasingTextureHandler2 {
- public static IIcon getIcon(int aSide, int aMeta) { //Texture ID's. case 0 == ID[57]
- if ((aMeta >= 0) && (aMeta < 16)) {
+ public static IIcon getIcon(final int aSide, final int aMeta) { // Texture
+ // ID's.
+ // case 0 ==
+ // ID[57]
+ if (aMeta >= 0 && aMeta < 16) {
switch (aMeta) {
- //Centrifuge
- case 0:
- return TexturesGtBlock.Casing_Machine_Dimensional_Adv.getIcon();
- //Coke Oven Frame
- case 1:
- return TexturesGtBlock.Casing_Material_Tantalloy61.getIcon();
- //Coke Oven Casing Tier 1
- case 2:
- return Textures.BlockIcons.MACHINE_CASING_FIREBOX_BRONZE.getIcon();
- //Coke Oven Casing Tier 2
- case 3:
- return Textures.BlockIcons.MACHINE_CASING_FIREBOX_STEEL.getIcon();
- //Material Press Casings
- case 4:
- return Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon();
- //Electrolyzer Casings
- case 5:
- return TexturesGtBlock.Casing_Material_Potin.getIcon();
- //Broken Blue Fusion Casings
- case 6:
- return TexturesGtBlock.Casing_Material_IncoloyMA956.getIcon();
- //Maceration Stack Casings
- case 7:
- return TexturesGtBlock.Casing_Material_Tumbaga.getIcon();
- //Broken Pink Fusion Casings
- case 8:
- return TexturesGtBlock.Casing_Material_IncoloyDS.getIcon();
- //Matter Fabricator Casings
- case 9:
- return TexturesGtBlock.Casing_Machine_Dimensional_Adv.getIcon();
- //Iron Blast Fuance Textures
- case 10:
- return TexturesGtBlock.Casing_Machine_Simple_Top.getIcon();
- //Multitank Exterior Casing
- case 11:
- return Textures.BlockIcons.MACHINE_CASING_GRATE.getIcon();
- //Reactor Casing I
- case 12:
- return TexturesGtBlock.Casing_Material_Stellite.getIcon();
- //Reactor Casing II
- case 13:
- return TexturesGtBlock.Casing_Material_Zeron100.getIcon();
- case 14:
- return TexturesGtBlock.Casing_Staballoy_Firebox.getIcon();
- case 15:
- return TexturesGtBlock.Casing_Material_ZirconiumCarbide.getIcon();
+ // Centrifuge
+ case 0:
+ return TexturesGtBlock.Casing_Machine_Dimensional_Adv.getIcon();
+ // Coke Oven Frame
+ case 1:
+ return TexturesGtBlock.Casing_Material_Tantalloy61.getIcon();
+ // Coke Oven Casing Tier 1
+ case 2:
+ return Textures.BlockIcons.MACHINE_CASING_FIREBOX_BRONZE.getIcon();
+ // Coke Oven Casing Tier 2
+ case 3:
+ return Textures.BlockIcons.MACHINE_CASING_FIREBOX_STEEL.getIcon();
+ // Material Press Casings
+ case 4:
+ return Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon();
+ // Electrolyzer Casings
+ case 5:
+ return TexturesGtBlock.Casing_Material_Potin.getIcon();
+ // Broken Blue Fusion Casings
+ case 6:
+ return TexturesGtBlock.Casing_Material_IncoloyMA956.getIcon();
+ // Maceration Stack Casings
+ case 7:
+ return TexturesGtBlock.Casing_Material_Tumbaga.getIcon();
+ // Broken Pink Fusion Casings
+ case 8:
+ return TexturesGtBlock.Casing_Material_IncoloyDS.getIcon();
+ // Matter Fabricator Casings
+ case 9:
+ return TexturesGtBlock.Casing_Machine_Dimensional_Adv.getIcon();
+ // Iron Blast Fuance Textures
+ case 10:
+ return TexturesGtBlock.Casing_Machine_Simple_Top.getIcon();
+ // Multitank Exterior Casing
+ case 11:
+ return Textures.BlockIcons.MACHINE_CASING_GRATE.getIcon();
+ // Reactor Casing I
+ case 12:
+ return TexturesGtBlock.Casing_Material_Stellite.getIcon();
+ // Reactor Casing II
+ case 13:
+ return TexturesGtBlock.Casing_Material_Zeron100.getIcon();
+ case 14:
+ return TexturesGtBlock.Casing_Staballoy_Firebox.getIcon();
+ case 15:
+ return TexturesGtBlock.Casing_Material_ZirconiumCarbide.getIcon();
- default:
- return Textures.BlockIcons.MACHINE_CASING_RADIOACTIVEHAZARD.getIcon();
+ default:
+ return Textures.BlockIcons.MACHINE_CASING_RADIOACTIVEHAZARD.getIcon();
}
}
return Textures.BlockIcons.MACHINE_CASING_GEARBOX_TUNGSTENSTEEL.getIcon();
}
-
+
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java
index c23824913e..8d79d38614 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java
@@ -11,431 +11,502 @@ import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
public class TexturesCentrifugeMultiblock {
-
- private static CustomIcon GT8_1_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE1");
- private static CustomIcon GT8_1 = new CustomIcon("iconsets/LARGECENTRIFUGE1");
- private static CustomIcon GT8_2_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE2");
- private static CustomIcon GT8_2 = new CustomIcon("iconsets/LARGECENTRIFUGE2");
- private static CustomIcon GT8_3_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE3");
- private static CustomIcon GT8_3 = new CustomIcon("iconsets/LARGECENTRIFUGE3");
- private static CustomIcon GT8_4_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE4");
- private static CustomIcon GT8_4 = new CustomIcon("iconsets/LARGECENTRIFUGE4");
- private static CustomIcon GT8_5_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE5");
- private static CustomIcon GT8_5 = new CustomIcon("iconsets/LARGECENTRIFUGE5");
- private static CustomIcon GT8_6_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE6");
- private static CustomIcon GT8_6 = new CustomIcon("iconsets/LARGECENTRIFUGE6");
- private static CustomIcon GT8_7_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE7");
- private static CustomIcon GT8_7 = new CustomIcon("iconsets/LARGECENTRIFUGE7");
- private static CustomIcon GT8_8_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE8");
- private static CustomIcon GT8_8 = new CustomIcon("iconsets/LARGECENTRIFUGE8");
- private static CustomIcon GT8_9_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE9");
- private static CustomIcon GT8_9 = new CustomIcon("iconsets/LARGECENTRIFUGE9");
- private static CustomIcon frontFace_0 = (GT8_1);
- private static CustomIcon frontFaceActive_0 = (GT8_1_Active);
- private static CustomIcon frontFace_1 = (GT8_2);
- private static CustomIcon frontFaceActive_1 = (GT8_2_Active);
- private static CustomIcon frontFace_2 = (GT8_3);
- private static CustomIcon frontFaceActive_2 = (GT8_3_Active);
- private static CustomIcon frontFace_3 = (GT8_4);
- private static CustomIcon frontFaceActive_3 = (GT8_4_Active);
- private static CustomIcon frontFace_4 = (GT8_5);
- private static CustomIcon frontFaceActive_4 = (GT8_5_Active);
- private static CustomIcon frontFace_5 = (GT8_6);
- private static CustomIcon frontFaceActive_5 = (GT8_6_Active);
- private static CustomIcon frontFace_6 = (GT8_7);
- private static CustomIcon frontFaceActive_6 = (GT8_7_Active);
- private static CustomIcon frontFace_7 = (GT8_8);
- private static CustomIcon frontFaceActive_7 = (GT8_8_Active);
- private static CustomIcon frontFace_8 = (GT8_9);
- private static CustomIcon frontFaceActive_8 = (GT8_9_Active);
+ private static CustomIcon GT8_1_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE1");
+ private static CustomIcon GT8_1 = new CustomIcon("iconsets/LARGECENTRIFUGE1");
+ private static CustomIcon GT8_2_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE2");
+ private static CustomIcon GT8_2 = new CustomIcon("iconsets/LARGECENTRIFUGE2");
+ private static CustomIcon GT8_3_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE3");
+ private static CustomIcon GT8_3 = new CustomIcon("iconsets/LARGECENTRIFUGE3");
+ private static CustomIcon GT8_4_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE4");
+ private static CustomIcon GT8_4 = new CustomIcon("iconsets/LARGECENTRIFUGE4");
+ private static CustomIcon GT8_5_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE5");
+ private static CustomIcon GT8_5 = new CustomIcon("iconsets/LARGECENTRIFUGE5");
+ private static CustomIcon GT8_6_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE6");
+ private static CustomIcon GT8_6 = new CustomIcon("iconsets/LARGECENTRIFUGE6");
+ private static CustomIcon GT8_7_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE7");
+ private static CustomIcon GT8_7 = new CustomIcon("iconsets/LARGECENTRIFUGE7");
+ private static CustomIcon GT8_8_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE8");
+ private static CustomIcon GT8_8 = new CustomIcon("iconsets/LARGECENTRIFUGE8");
+ private static CustomIcon GT8_9_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE9");
+ private static CustomIcon GT8_9 = new CustomIcon("iconsets/LARGECENTRIFUGE9");
- CustomIcon[] CENTRIFUGE = new CustomIcon[]{
- frontFace_0,
- frontFace_1,
- frontFace_2,
- frontFace_3,
- frontFace_4,
- frontFace_5,
- frontFace_6,
- frontFace_7,
- frontFace_8
+ private static CustomIcon frontFace_0 = TexturesCentrifugeMultiblock.GT8_1;
+ private static CustomIcon frontFaceActive_0 = TexturesCentrifugeMultiblock.GT8_1_Active;
+ private static CustomIcon frontFace_1 = TexturesCentrifugeMultiblock.GT8_2;
+ private static CustomIcon frontFaceActive_1 = TexturesCentrifugeMultiblock.GT8_2_Active;
+ private static CustomIcon frontFace_2 = TexturesCentrifugeMultiblock.GT8_3;
+ private static CustomIcon frontFaceActive_2 = TexturesCentrifugeMultiblock.GT8_3_Active;
+ private static CustomIcon frontFace_3 = TexturesCentrifugeMultiblock.GT8_4;
+ private static CustomIcon frontFaceActive_3 = TexturesCentrifugeMultiblock.GT8_4_Active;
+ private static CustomIcon frontFace_4 = TexturesCentrifugeMultiblock.GT8_5;
+ private static CustomIcon frontFaceActive_4 = TexturesCentrifugeMultiblock.GT8_5_Active;
+ private static CustomIcon frontFace_5 = TexturesCentrifugeMultiblock.GT8_6;
+ private static CustomIcon frontFaceActive_5 = TexturesCentrifugeMultiblock.GT8_6_Active;
+ private static CustomIcon frontFace_6 = TexturesCentrifugeMultiblock.GT8_7;
+ private static CustomIcon frontFaceActive_6 = TexturesCentrifugeMultiblock.GT8_7_Active;
+ private static CustomIcon frontFace_7 = TexturesCentrifugeMultiblock.GT8_8;
+ private static CustomIcon frontFaceActive_7 = TexturesCentrifugeMultiblock.GT8_8_Active;
+ private static CustomIcon frontFace_8 = TexturesCentrifugeMultiblock.GT8_9;
+ private static CustomIcon frontFaceActive_8 = TexturesCentrifugeMultiblock.GT8_9_Active;
+
+ CustomIcon[] CENTRIFUGE = new CustomIcon[] {
+ TexturesCentrifugeMultiblock.frontFace_0, TexturesCentrifugeMultiblock.frontFace_1,
+ TexturesCentrifugeMultiblock.frontFace_2, TexturesCentrifugeMultiblock.frontFace_3,
+ TexturesCentrifugeMultiblock.frontFace_4, TexturesCentrifugeMultiblock.frontFace_5,
+ TexturesCentrifugeMultiblock.frontFace_6, TexturesCentrifugeMultiblock.frontFace_7,
+ TexturesCentrifugeMultiblock.frontFace_8
};
- CustomIcon[] CENTRIFUGE_ACTIVE = new CustomIcon[]{
- frontFaceActive_0,
- frontFaceActive_1,
- frontFaceActive_2,
- frontFaceActive_3,
- frontFaceActive_4,
- frontFaceActive_5,
- frontFaceActive_6,
- frontFaceActive_7,
- frontFaceActive_8
- };
-
- public IIcon handleCasingsGT(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, int aSide, GregtechMetaCasingBlocks thisBlock) {
- return handleCasingsGT58(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);
- }
+ CustomIcon[] CENTRIFUGE_ACTIVE = new CustomIcon[] {
+ TexturesCentrifugeMultiblock.frontFaceActive_0, TexturesCentrifugeMultiblock.frontFaceActive_1,
+ TexturesCentrifugeMultiblock.frontFaceActive_2, TexturesCentrifugeMultiblock.frontFaceActive_3,
+ TexturesCentrifugeMultiblock.frontFaceActive_4, TexturesCentrifugeMultiblock.frontFaceActive_5,
+ TexturesCentrifugeMultiblock.frontFaceActive_6, TexturesCentrifugeMultiblock.frontFaceActive_7,
+ TexturesCentrifugeMultiblock.frontFaceActive_8
+ };
+ public IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
+ final int aSide, final GregtechMetaCasingBlocks thisBlock) {
+ return this.handleCasingsGT58(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);
+ }
- public IIcon handleCasingsGT58(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, int aSide, GregtechMetaCasingBlocks thisBlock) {
- int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord);
- if (((tMeta != 6) && (tMeta != 8) && (tMeta != 0))) {
+ public IIcon handleCasingsGT58(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
+ final int aSide, final GregtechMetaCasingBlocks thisBlock) {
+ final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord);
+ if (tMeta != 6 && tMeta != 8 && tMeta != 0) {
return CasingTextureHandler.getIcon(aSide, tMeta);
}
- int tStartIndex = tMeta == 6 ? 1 : 13;
+ final int tStartIndex = tMeta == 6 ? 1 : 13;
if (tMeta == 0) {
- if ((aSide == 2) || (aSide == 3)) {
+ if (aSide == 2 || aSide == 3) {
TileEntity tTileEntity;
IMetaTileEntity tMetaTileEntity;
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord - 1, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[0].getIcon();
+ return this.CENTRIFUGE_ACTIVE[0].getIcon();
}
- return CENTRIFUGE[0].getIcon();
+ return this.CENTRIFUGE[0].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[3].getIcon();
+ return this.CENTRIFUGE_ACTIVE[3].getIcon();
}
- return CENTRIFUGE[3].getIcon();
+ return this.CENTRIFUGE[3].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord + 1, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[6].getIcon();
+ return this.CENTRIFUGE_ACTIVE[6].getIcon();
}
- return CENTRIFUGE[6].getIcon();
+ return this.CENTRIFUGE[6].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[1].getIcon();
+ return this.CENTRIFUGE_ACTIVE[1].getIcon();
}
- return CENTRIFUGE[1].getIcon();
+ return this.CENTRIFUGE[1].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[7].getIcon();
+ return this.CENTRIFUGE_ACTIVE[7].getIcon();
}
- return CENTRIFUGE[7].getIcon();
+ return this.CENTRIFUGE[7].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord + 1, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[8].getIcon();
+ return this.CENTRIFUGE_ACTIVE[8].getIcon();
}
- return CENTRIFUGE[8].getIcon();
+ return this.CENTRIFUGE[8].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[5].getIcon();
+ return this.CENTRIFUGE_ACTIVE[5].getIcon();
}
- return CENTRIFUGE[5].getIcon();
+ return this.CENTRIFUGE[5].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord - 1, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[2].getIcon();
+ return this.CENTRIFUGE_ACTIVE[2].getIcon();
}
- return CENTRIFUGE[2].getIcon();
+ return this.CENTRIFUGE[2].getIcon();
}
- } else if ((aSide == 4) || (aSide == 5)) {
+ }
+ else if (aSide == 4 || aSide == 5) {
TileEntity tTileEntity;
Object tMetaTileEntity;
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 4 ? 1 : -1)))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[0].getIcon();
+ return this.CENTRIFUGE_ACTIVE[0].getIcon();
}
- return CENTRIFUGE[0].getIcon();
+ return this.CENTRIFUGE[0].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 4 ? 1 : -1)))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[3].getIcon();
+ return this.CENTRIFUGE_ACTIVE[3].getIcon();
}
- return CENTRIFUGE[3].getIcon();
+ return this.CENTRIFUGE[3].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 4 ? 1 : -1)))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[6].getIcon();
+ return this.CENTRIFUGE_ACTIVE[6].getIcon();
}
- return CENTRIFUGE[6].getIcon();
+ return this.CENTRIFUGE[6].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[1].getIcon();
+ return this.CENTRIFUGE_ACTIVE[1].getIcon();
}
- return CENTRIFUGE[1].getIcon();
+ return this.CENTRIFUGE[1].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[7].getIcon();
+ return this.CENTRIFUGE_ACTIVE[7].getIcon();
}
- return CENTRIFUGE[7].getIcon();
+ return this.CENTRIFUGE[7].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 5 ? 1 : -1)))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[8].getIcon();
+ return this.CENTRIFUGE_ACTIVE[8].getIcon();
}
- return CENTRIFUGE[8].getIcon();
+ return this.CENTRIFUGE[8].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 5 ? 1 : -1)))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[5].getIcon();
+ return this.CENTRIFUGE_ACTIVE[5].getIcon();
}
- return CENTRIFUGE[5].getIcon();
+ return this.CENTRIFUGE[5].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 5 ? 1 : -1)))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[2].getIcon();
+ return this.CENTRIFUGE_ACTIVE[2].getIcon();
}
- return CENTRIFUGE[2].getIcon();
+ return this.CENTRIFUGE[2].getIcon();
}
}
return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon();
}
- boolean[] tConnectedSides = {(aWorld.getBlock(xCoord, yCoord - 1, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord - 1, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord + 1, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord + 1, zCoord) == tMeta), (aWorld.getBlock(xCoord + 1, yCoord, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord + 1, yCoord, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord, zCoord + 1) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord + 1) == tMeta), (aWorld.getBlock(xCoord - 1, yCoord, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta)};
+ final boolean[] tConnectedSides = {
+ aWorld.getBlock(xCoord, yCoord - 1, zCoord) == thisBlock
+ && aWorld.getBlockMetadata(xCoord, yCoord - 1, zCoord) == tMeta,
+ aWorld.getBlock(xCoord, yCoord + 1, zCoord) == thisBlock
+ && aWorld.getBlockMetadata(xCoord, yCoord + 1, zCoord) == tMeta,
+ aWorld.getBlock(xCoord + 1, yCoord, zCoord) == thisBlock
+ && aWorld.getBlockMetadata(xCoord + 1, yCoord, zCoord) == tMeta,
+ aWorld.getBlock(xCoord, yCoord, zCoord + 1) == thisBlock
+ && aWorld.getBlockMetadata(xCoord, yCoord, zCoord + 1) == tMeta,
+ aWorld.getBlock(xCoord - 1, yCoord, zCoord) == thisBlock
+ && aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta,
+ aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock
+ && aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta
+ };
switch (aSide) {
- case 0:
- if (tConnectedSides[0]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[4]) && (!tConnectedSides[2])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
- }
- if ((!tConnectedSides[5]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- case 1:
- if (tConnectedSides[1]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[4])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
- }
- if ((!tConnectedSides[3]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- case 2:
- if (tConnectedSides[5]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[4])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- case 3:
- if (tConnectedSides[3]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[4])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- case 4:
- if (tConnectedSides[4]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- if ((!tConnectedSides[3]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
- }
- case 5:
- if (tConnectedSides[2]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- if ((!tConnectedSides[3]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
- }
- break;
+ case 0:
+ if (tConnectedSides[0]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 6].getIcon();
+ }
+ if (!tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 2].getIcon();
+ }
+ if (tConnectedSides[4] && !tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 3].getIcon();
+ }
+ if (tConnectedSides[4] && tConnectedSides[5] && !tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 4].getIcon();
+ }
+ if (tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && !tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 5].getIcon();
+ }
+ if (!tConnectedSides[4] && !tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 8].getIcon();
+ }
+ if (tConnectedSides[4] && !tConnectedSides[5] && !tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 9].getIcon();
+ }
+ if (tConnectedSides[4] && tConnectedSides[5] && !tConnectedSides[2] && !tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 10].getIcon();
+ }
+ if (!tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && !tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 11].getIcon();
+ }
+ if (!tConnectedSides[4] && !tConnectedSides[5] && !tConnectedSides[2] && !tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (!tConnectedSides[4] && !tConnectedSides[2]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 1].getIcon();
+ }
+ if (!tConnectedSides[5] && !tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 0].getIcon();
+ }
+ case 1:
+ if (tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 6].getIcon();
+ }
+ if (!tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 2].getIcon();
+ }
+ if (tConnectedSides[4] && !tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 3].getIcon();
+ }
+ if (tConnectedSides[4] && tConnectedSides[5] && !tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 4].getIcon();
+ }
+ if (tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && !tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 5].getIcon();
+ }
+ if (!tConnectedSides[4] && !tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 8].getIcon();
+ }
+ if (tConnectedSides[4] && !tConnectedSides[5] && !tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 9].getIcon();
+ }
+ if (tConnectedSides[4] && tConnectedSides[5] && !tConnectedSides[2] && !tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 10].getIcon();
+ }
+ if (!tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && !tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 11].getIcon();
+ }
+ if (!tConnectedSides[4] && !tConnectedSides[5] && !tConnectedSides[2] && !tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (!tConnectedSides[2] && !tConnectedSides[4]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 1].getIcon();
+ }
+ if (!tConnectedSides[3] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 0].getIcon();
+ }
+ case 2:
+ if (tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 6].getIcon();
+ }
+ if (!tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 2].getIcon();
+ }
+ if (tConnectedSides[2] && !tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 5].getIcon();
+ }
+ if (tConnectedSides[2] && tConnectedSides[0] && !tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 4].getIcon();
+ }
+ if (tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 3].getIcon();
+ }
+ if (!tConnectedSides[2] && !tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 11].getIcon();
+ }
+ if (tConnectedSides[2] && !tConnectedSides[0] && !tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 10].getIcon();
+ }
+ if (tConnectedSides[2] && tConnectedSides[0] && !tConnectedSides[4] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 9].getIcon();
+ }
+ if (!tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 8].getIcon();
+ }
+ if (!tConnectedSides[2] && !tConnectedSides[0] && !tConnectedSides[4] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (!tConnectedSides[2] && !tConnectedSides[4]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 1].getIcon();
+ }
+ if (!tConnectedSides[0] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 0].getIcon();
+ }
+ case 3:
+ if (tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 6].getIcon();
+ }
+ if (!tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 4].getIcon();
+ }
+ if (tConnectedSides[2] && !tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 5].getIcon();
+ }
+ if (tConnectedSides[2] && tConnectedSides[0] && !tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 2].getIcon();
+ }
+ if (tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 3].getIcon();
+ }
+ if (!tConnectedSides[2] && !tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 10].getIcon();
+ }
+ if (tConnectedSides[2] && !tConnectedSides[0] && !tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 11].getIcon();
+ }
+ if (tConnectedSides[2] && tConnectedSides[0] && !tConnectedSides[4] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 8].getIcon();
+ }
+ if (!tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 9].getIcon();
+ }
+ if (!tConnectedSides[2] && !tConnectedSides[0] && !tConnectedSides[4] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (!tConnectedSides[2] && !tConnectedSides[4]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 1].getIcon();
+ }
+ if (!tConnectedSides[0] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 0].getIcon();
+ }
+ case 4:
+ if (tConnectedSides[4]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 6].getIcon();
+ }
+ if (!tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 5].getIcon();
+ }
+ if (tConnectedSides[0] && !tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 4].getIcon();
+ }
+ if (tConnectedSides[0] && tConnectedSides[3] && !tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 3].getIcon();
+ }
+ if (tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 2].getIcon();
+ }
+ if (!tConnectedSides[0] && !tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 10].getIcon();
+ }
+ if (tConnectedSides[0] && !tConnectedSides[3] && !tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 9].getIcon();
+ }
+ if (tConnectedSides[0] && tConnectedSides[3] && !tConnectedSides[1] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 8].getIcon();
+ }
+ if (!tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 11].getIcon();
+ }
+ if (!tConnectedSides[0] && !tConnectedSides[3] && !tConnectedSides[1] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (!tConnectedSides[0] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 0].getIcon();
+ }
+ if (!tConnectedSides[3] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 1].getIcon();
+ }
+ case 5:
+ if (tConnectedSides[2]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 6].getIcon();
+ }
+ if (!tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 5].getIcon();
+ }
+ if (tConnectedSides[0] && !tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 2].getIcon();
+ }
+ if (tConnectedSides[0] && tConnectedSides[3] && !tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 3].getIcon();
+ }
+ if (tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 4].getIcon();
+ }
+ if (!tConnectedSides[0] && !tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 11].getIcon();
+ }
+ if (tConnectedSides[0] && !tConnectedSides[3] && !tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 8].getIcon();
+ }
+ if (tConnectedSides[0] && tConnectedSides[3] && !tConnectedSides[1] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 9].getIcon();
+ }
+ if (!tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 10].getIcon();
+ }
+ if (!tConnectedSides[0] && !tConnectedSides[3] && !tConnectedSides[1] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (!tConnectedSides[0] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 0].getIcon();
+ }
+ if (!tConnectedSides[3] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 1].getIcon();
+ }
+ break;
}
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
}
-
+
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java
index 2fdfc0587c..eef82777e7 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java
@@ -11,431 +11,517 @@ import net.minecraft.world.IBlockAccess;
public class TexturesGregtech58 {
- private static Textures.BlockIcons.CustomIcon GT8_1_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE1");
- private static Textures.BlockIcons.CustomIcon GT8_1 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE1");
- private static Textures.BlockIcons.CustomIcon GT8_2_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE2");
- private static Textures.BlockIcons.CustomIcon GT8_2 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE2");
- private static Textures.BlockIcons.CustomIcon GT8_3_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE3");
- private static Textures.BlockIcons.CustomIcon GT8_3 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE3");
- private static Textures.BlockIcons.CustomIcon GT8_4_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE4");
- private static Textures.BlockIcons.CustomIcon GT8_4 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE4");
- private static Textures.BlockIcons.CustomIcon GT8_5_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE5");
- private static Textures.BlockIcons.CustomIcon GT8_5 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE5");
- private static Textures.BlockIcons.CustomIcon GT8_6_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE6");
- private static Textures.BlockIcons.CustomIcon GT8_6 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE6");
- private static Textures.BlockIcons.CustomIcon GT8_7_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE7");
- private static Textures.BlockIcons.CustomIcon GT8_7 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE7");
- private static Textures.BlockIcons.CustomIcon GT8_8_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE8");
- private static Textures.BlockIcons.CustomIcon GT8_8 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE8");
- private static Textures.BlockIcons.CustomIcon GT8_9_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE9");
- private static Textures.BlockIcons.CustomIcon GT8_9 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE9");
+ private static Textures.BlockIcons.CustomIcon GT8_1_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ACTIVE1");
+ private static Textures.BlockIcons.CustomIcon GT8_1 = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE1");
+ private static Textures.BlockIcons.CustomIcon GT8_2_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ACTIVE2");
+ private static Textures.BlockIcons.CustomIcon GT8_2 = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE2");
+ private static Textures.BlockIcons.CustomIcon GT8_3_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ACTIVE3");
+ private static Textures.BlockIcons.CustomIcon GT8_3 = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE3");
+ private static Textures.BlockIcons.CustomIcon GT8_4_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ACTIVE4");
+ private static Textures.BlockIcons.CustomIcon GT8_4 = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE4");
+ private static Textures.BlockIcons.CustomIcon GT8_5_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ACTIVE5");
+ private static Textures.BlockIcons.CustomIcon GT8_5 = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE5");
+ private static Textures.BlockIcons.CustomIcon GT8_6_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ACTIVE6");
+ private static Textures.BlockIcons.CustomIcon GT8_6 = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE6");
+ private static Textures.BlockIcons.CustomIcon GT8_7_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ACTIVE7");
+ private static Textures.BlockIcons.CustomIcon GT8_7 = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE7");
+ private static Textures.BlockIcons.CustomIcon GT8_8_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ACTIVE8");
+ private static Textures.BlockIcons.CustomIcon GT8_8 = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE8");
+ private static Textures.BlockIcons.CustomIcon GT8_9_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ACTIVE9");
+ private static Textures.BlockIcons.CustomIcon GT8_9 = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE9");
- private static Textures.BlockIcons.CustomIcon frontFace_0 = (GT8_1);
- private static Textures.BlockIcons.CustomIcon frontFaceActive_0 = (GT8_1_Active);
- private static Textures.BlockIcons.CustomIcon frontFace_1 = (GT8_2);
- private static Textures.BlockIcons.CustomIcon frontFaceActive_1 = (GT8_2_Active);
- private static Textures.BlockIcons.CustomIcon frontFace_2 = (GT8_3);
- private static Textures.BlockIcons.CustomIcon frontFaceActive_2 = (GT8_3_Active);
- private static Textures.BlockIcons.CustomIcon frontFace_3 = (GT8_4);
- private static Textures.BlockIcons.CustomIcon frontFaceActive_3 = (GT8_4_Active);
- private static Textures.BlockIcons.CustomIcon frontFace_4 = (GT8_5);
- private static Textures.BlockIcons.CustomIcon frontFaceActive_4 = (GT8_5_Active);
- private static Textures.BlockIcons.CustomIcon frontFace_5 = (GT8_6);
- private static Textures.BlockIcons.CustomIcon frontFaceActive_5 = (GT8_6_Active);
- private static Textures.BlockIcons.CustomIcon frontFace_6 = (GT8_7);
- private static Textures.BlockIcons.CustomIcon frontFaceActive_6 = (GT8_7_Active);
- private static Textures.BlockIcons.CustomIcon frontFace_7 = (GT8_8);
- private static Textures.BlockIcons.CustomIcon frontFaceActive_7 = (GT8_8_Active);
- private static Textures.BlockIcons.CustomIcon frontFace_8 = (GT8_9);
- private static Textures.BlockIcons.CustomIcon frontFaceActive_8 = (GT8_9_Active);
+ private static Textures.BlockIcons.CustomIcon frontFace_0 = TexturesGregtech58.GT8_1;
+ private static Textures.BlockIcons.CustomIcon frontFaceActive_0 = TexturesGregtech58.GT8_1_Active;
+ private static Textures.BlockIcons.CustomIcon frontFace_1 = TexturesGregtech58.GT8_2;
+ private static Textures.BlockIcons.CustomIcon frontFaceActive_1 = TexturesGregtech58.GT8_2_Active;
+ private static Textures.BlockIcons.CustomIcon frontFace_2 = TexturesGregtech58.GT8_3;
+ private static Textures.BlockIcons.CustomIcon frontFaceActive_2 = TexturesGregtech58.GT8_3_Active;
+ private static Textures.BlockIcons.CustomIcon frontFace_3 = TexturesGregtech58.GT8_4;
+ private static Textures.BlockIcons.CustomIcon frontFaceActive_3 = TexturesGregtech58.GT8_4_Active;
+ private static Textures.BlockIcons.CustomIcon frontFace_4 = TexturesGregtech58.GT8_5;
+ private static Textures.BlockIcons.CustomIcon frontFaceActive_4 = TexturesGregtech58.GT8_5_Active;
+ private static Textures.BlockIcons.CustomIcon frontFace_5 = TexturesGregtech58.GT8_6;
+ private static Textures.BlockIcons.CustomIcon frontFaceActive_5 = TexturesGregtech58.GT8_6_Active;
+ private static Textures.BlockIcons.CustomIcon frontFace_6 = TexturesGregtech58.GT8_7;
+ private static Textures.BlockIcons.CustomIcon frontFaceActive_6 = TexturesGregtech58.GT8_7_Active;
+ private static Textures.BlockIcons.CustomIcon frontFace_7 = TexturesGregtech58.GT8_8;
+ private static Textures.BlockIcons.CustomIcon frontFaceActive_7 = TexturesGregtech58.GT8_8_Active;
+ private static Textures.BlockIcons.CustomIcon frontFace_8 = TexturesGregtech58.GT8_9;
+ private static Textures.BlockIcons.CustomIcon frontFaceActive_8 = TexturesGregtech58.GT8_9_Active;
- Textures.BlockIcons.CustomIcon[] TURBINE = new Textures.BlockIcons.CustomIcon[]{
- frontFace_0,
- frontFace_1,
- frontFace_2,
- frontFace_3,
- frontFace_4,
- frontFace_5,
- frontFace_6,
- frontFace_7,
- frontFace_8
+ Textures.BlockIcons.CustomIcon[] TURBINE = new Textures.BlockIcons.CustomIcon[] {
+ TexturesGregtech58.frontFace_0, TexturesGregtech58.frontFace_1, TexturesGregtech58.frontFace_2,
+ TexturesGregtech58.frontFace_3, TexturesGregtech58.frontFace_4, TexturesGregtech58.frontFace_5,
+ TexturesGregtech58.frontFace_6, TexturesGregtech58.frontFace_7, TexturesGregtech58.frontFace_8
};
- Textures.BlockIcons.CustomIcon[] TURBINE_ACTIVE = new Textures.BlockIcons.CustomIcon[]{
- frontFaceActive_0,
- frontFaceActive_1,
- frontFaceActive_2,
- frontFaceActive_3,
- frontFaceActive_4,
- frontFaceActive_5,
- frontFaceActive_6,
- frontFaceActive_7,
- frontFaceActive_8
- };
-
+ Textures.BlockIcons.CustomIcon[] TURBINE_ACTIVE = new Textures.BlockIcons.CustomIcon[] {
+ TexturesGregtech58.frontFaceActive_0, TexturesGregtech58.frontFaceActive_1,
+ TexturesGregtech58.frontFaceActive_2, TexturesGregtech58.frontFaceActive_3,
+ TexturesGregtech58.frontFaceActive_4, TexturesGregtech58.frontFaceActive_5,
+ TexturesGregtech58.frontFaceActive_6, TexturesGregtech58.frontFaceActive_7,
+ TexturesGregtech58.frontFaceActive_8
+ };
- public IIcon handleCasingsGT(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, int aSide, GregtechMetaCasingBlocks thisBlock) {
- return handleCasingsGT58(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);
+ public IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
+ final int aSide, final GregtechMetaCasingBlocks thisBlock) {
+ return this.handleCasingsGT58(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);
}
-
- public IIcon handleCasingsGT58(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, int aSide, GregtechMetaCasingBlocks thisBlock) {
- int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord);
- if (((tMeta != 6) && (tMeta != 8) && (tMeta != 0))) {
+ public IIcon handleCasingsGT58(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
+ final int aSide, final GregtechMetaCasingBlocks thisBlock) {
+ final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord);
+ if (tMeta != 6 && tMeta != 8 && tMeta != 0) {
return CasingTextureHandler.getIcon(aSide, tMeta);
}
- int tStartIndex = tMeta == 6 ? 1 : 13;
+ final int tStartIndex = tMeta == 6 ? 1 : 13;
if (tMeta == 0) {
- if ((aSide == 2) || (aSide == 3)) {
+ if (aSide == 2 || aSide == 3) {
TileEntity tTileEntity;
IMetaTileEntity tMetaTileEntity;
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord - 1, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[0].getIcon();
+ return this.TURBINE_ACTIVE[0].getIcon();
}
- return TURBINE[0].getIcon();
+ return this.TURBINE[0].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[3].getIcon();
+ return this.TURBINE_ACTIVE[3].getIcon();
}
- return TURBINE[3].getIcon();
+ return this.TURBINE[3].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord + 1, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[6].getIcon();
+ return this.TURBINE_ACTIVE[6].getIcon();
}
- return TURBINE[6].getIcon();
+ return this.TURBINE[6].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[1].getIcon();
+ return this.TURBINE_ACTIVE[1].getIcon();
}
- return TURBINE[1].getIcon();
+ return this.TURBINE[1].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[7].getIcon();
+ return this.TURBINE_ACTIVE[7].getIcon();
}
- return TURBINE[7].getIcon();
+ return this.TURBINE[7].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord + 1, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[8].getIcon();
+ return this.TURBINE_ACTIVE[8].getIcon();
}
- return TURBINE[8].getIcon();
+ return this.TURBINE[8].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[5].getIcon();
+ return this.TURBINE_ACTIVE[5].getIcon();
}
- return TURBINE[5].getIcon();
+ return this.TURBINE[5].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord - 1, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[2].getIcon();
+ return this.TURBINE_ACTIVE[2].getIcon();
}
- return TURBINE[2].getIcon();
+ return this.TURBINE[2].getIcon();
}
- } else if ((aSide == 4) || (aSide == 5)) {
+ }
+ else if (aSide == 4 || aSide == 5) {
TileEntity tTileEntity;
Object tMetaTileEntity;
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 4 ? 1 : -1)))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[0].getIcon();
+ return this.TURBINE_ACTIVE[0].getIcon();
}
- return TURBINE[0].getIcon();
+ return this.TURBINE[0].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 4 ? 1 : -1)))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[3].getIcon();
+ return this.TURBINE_ACTIVE[3].getIcon();
}
- return TURBINE[3].getIcon();
+ return this.TURBINE[3].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 4 ? 1 : -1)))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[6].getIcon();
+ return this.TURBINE_ACTIVE[6].getIcon();
}
- return TURBINE[6].getIcon();
+ return this.TURBINE[6].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[1].getIcon();
+ return this.TURBINE_ACTIVE[1].getIcon();
}
- return TURBINE[1].getIcon();
+ return this.TURBINE[1].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[7].getIcon();
+ return this.TURBINE_ACTIVE[7].getIcon();
}
- return TURBINE[7].getIcon();
+ return this.TURBINE[7].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 5 ? 1 : -1)))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[8].getIcon();
+ return this.TURBINE_ACTIVE[8].getIcon();
}
- return TURBINE[8].getIcon();
+ return this.TURBINE[8].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 5 ? 1 : -1)))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[5].getIcon();
+ return this.TURBINE_ACTIVE[5].getIcon();
}
- return TURBINE[5].getIcon();
+ return this.TURBINE[5].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 5 ? 1 : -1)))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[2].getIcon();
+ return this.TURBINE_ACTIVE[2].getIcon();
}
- return TURBINE[2].getIcon();
+ return this.TURBINE[2].getIcon();
}
}
return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon();
}
- boolean[] tConnectedSides = {(aWorld.getBlock(xCoord, yCoord - 1, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord - 1, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord + 1, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord + 1, zCoord) == tMeta), (aWorld.getBlock(xCoord + 1, yCoord, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord + 1, yCoord, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord, zCoord + 1) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord + 1) == tMeta), (aWorld.getBlock(xCoord - 1, yCoord, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta)};
+ final boolean[] tConnectedSides = {
+ aWorld.getBlock(xCoord, yCoord - 1, zCoord) == thisBlock
+ && aWorld.getBlockMetadata(xCoord, yCoord - 1, zCoord) == tMeta,
+ aWorld.getBlock(xCoord, yCoord + 1, zCoord) == thisBlock
+ && aWorld.getBlockMetadata(xCoord, yCoord + 1, zCoord) == tMeta,
+ aWorld.getBlock(xCoord + 1, yCoord, zCoord) == thisBlock
+ && aWorld.getBlockMetadata(xCoord + 1, yCoord, zCoord) == tMeta,
+ aWorld.getBlock(xCoord, yCoord, zCoord + 1) == thisBlock
+ && aWorld.getBlockMetadata(xCoord, yCoord, zCoord + 1) == tMeta,
+ aWorld.getBlock(xCoord - 1, yCoord, zCoord) == thisBlock
+ && aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta,
+ aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock
+ && aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta
+ };
switch (aSide) {
- case 0:
- if (tConnectedSides[0]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[4]) && (!tConnectedSides[2])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
- }
- if ((!tConnectedSides[5]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- case 1:
- if (tConnectedSides[1]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[4])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
- }
- if ((!tConnectedSides[3]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- case 2:
- if (tConnectedSides[5]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[4])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- case 3:
- if (tConnectedSides[3]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[4])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- case 4:
- if (tConnectedSides[4]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- if ((!tConnectedSides[3]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
- }
- case 5:
- if (tConnectedSides[2]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- if ((!tConnectedSides[3]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
- }
- break;
+ case 0:
+ if (tConnectedSides[0]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 6].getIcon();
+ }
+ if (!tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 2].getIcon();
+ }
+ if (tConnectedSides[4] && !tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 3].getIcon();
+ }
+ if (tConnectedSides[4] && tConnectedSides[5] && !tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 4].getIcon();
+ }
+ if (tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && !tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 5].getIcon();
+ }
+ if (!tConnectedSides[4] && !tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 8].getIcon();
+ }
+ if (tConnectedSides[4] && !tConnectedSides[5] && !tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 9].getIcon();
+ }
+ if (tConnectedSides[4] && tConnectedSides[5] && !tConnectedSides[2] && !tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 10].getIcon();
+ }
+ if (!tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && !tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 11].getIcon();
+ }
+ if (!tConnectedSides[4] && !tConnectedSides[5] && !tConnectedSides[2] && !tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (!tConnectedSides[4] && !tConnectedSides[2]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 1].getIcon();
+ }
+ if (!tConnectedSides[5] && !tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 0].getIcon();
+ }
+ case 1:
+ if (tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 6].getIcon();
+ }
+ if (!tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 2].getIcon();
+ }
+ if (tConnectedSides[4] && !tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 3].getIcon();
+ }
+ if (tConnectedSides[4] && tConnectedSides[5] && !tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 4].getIcon();
+ }
+ if (tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && !tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 5].getIcon();
+ }
+ if (!tConnectedSides[4] && !tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 8].getIcon();
+ }
+ if (tConnectedSides[4] && !tConnectedSides[5] && !tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 9].getIcon();
+ }
+ if (tConnectedSides[4] && tConnectedSides[5] && !tConnectedSides[2] && !tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 10].getIcon();
+ }
+ if (!tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && !tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 11].getIcon();
+ }
+ if (!tConnectedSides[4] && !tConnectedSides[5] && !tConnectedSides[2] && !tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (!tConnectedSides[2] && !tConnectedSides[4]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 1].getIcon();
+ }
+ if (!tConnectedSides[3] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 0].getIcon();
+ }
+ case 2:
+ if (tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 6].getIcon();
+ }
+ if (!tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 2].getIcon();
+ }
+ if (tConnectedSides[2] && !tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 5].getIcon();
+ }
+ if (tConnectedSides[2] && tConnectedSides[0] && !tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 4].getIcon();
+ }
+ if (tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 3].getIcon();
+ }
+ if (!tConnectedSides[2] && !tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 11].getIcon();
+ }
+ if (tConnectedSides[2] && !tConnectedSides[0] && !tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 10].getIcon();
+ }
+ if (tConnectedSides[2] && tConnectedSides[0] && !tConnectedSides[4] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 9].getIcon();
+ }
+ if (!tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 8].getIcon();
+ }
+ if (!tConnectedSides[2] && !tConnectedSides[0] && !tConnectedSides[4] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (!tConnectedSides[2] && !tConnectedSides[4]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 1].getIcon();
+ }
+ if (!tConnectedSides[0] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 0].getIcon();
+ }
+ case 3:
+ if (tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 6].getIcon();
+ }
+ if (!tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 4].getIcon();
+ }
+ if (tConnectedSides[2] && !tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 5].getIcon();
+ }
+ if (tConnectedSides[2] && tConnectedSides[0] && !tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 2].getIcon();
+ }
+ if (tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 3].getIcon();
+ }
+ if (!tConnectedSides[2] && !tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 10].getIcon();
+ }
+ if (tConnectedSides[2] && !tConnectedSides[0] && !tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 11].getIcon();
+ }
+ if (tConnectedSides[2] && tConnectedSides[0] && !tConnectedSides[4] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 8].getIcon();
+ }
+ if (!tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 9].getIcon();
+ }
+ if (!tConnectedSides[2] && !tConnectedSides[0] && !tConnectedSides[4] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (!tConnectedSides[2] && !tConnectedSides[4]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 1].getIcon();
+ }
+ if (!tConnectedSides[0] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 0].getIcon();
+ }
+ case 4:
+ if (tConnectedSides[4]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 6].getIcon();
+ }
+ if (!tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 5].getIcon();
+ }
+ if (tConnectedSides[0] && !tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 4].getIcon();
+ }
+ if (tConnectedSides[0] && tConnectedSides[3] && !tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 3].getIcon();
+ }
+ if (tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 2].getIcon();
+ }
+ if (!tConnectedSides[0] && !tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 10].getIcon();
+ }
+ if (tConnectedSides[0] && !tConnectedSides[3] && !tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 9].getIcon();
+ }
+ if (tConnectedSides[0] && tConnectedSides[3] && !tConnectedSides[1] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 8].getIcon();
+ }
+ if (!tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 11].getIcon();
+ }
+ if (!tConnectedSides[0] && !tConnectedSides[3] && !tConnectedSides[1] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (!tConnectedSides[0] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 0].getIcon();
+ }
+ if (!tConnectedSides[3] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 1].getIcon();
+ }
+ case 5:
+ if (tConnectedSides[2]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 6].getIcon();
+ }
+ if (!tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 5].getIcon();
+ }
+ if (tConnectedSides[0] && !tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 2].getIcon();
+ }
+ if (tConnectedSides[0] && tConnectedSides[3] && !tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 3].getIcon();
+ }
+ if (tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 4].getIcon();
+ }
+ if (!tConnectedSides[0] && !tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 11].getIcon();
+ }
+ if (tConnectedSides[0] && !tConnectedSides[3] && !tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 8].getIcon();
+ }
+ if (tConnectedSides[0] && tConnectedSides[3] && !tConnectedSides[1] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 9].getIcon();
+ }
+ if (!tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 10].getIcon();
+ }
+ if (!tConnectedSides[0] && !tConnectedSides[3] && !tConnectedSides[1] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (!tConnectedSides[0] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 0].getIcon();
+ }
+ if (!tConnectedSides[3] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 1].getIcon();
+ }
+ break;
}
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java
index 84de389827..0ec77d236d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java
@@ -10,433 +10,518 @@ import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
public class TexturesGregtech59 {
-
- private static Textures.BlockIcons.CustomIcon GT8_1_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE1");
- private static Textures.BlockIcons.CustomIcon GT8_1 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST1");
- private static Textures.BlockIcons.CustomIcon GT8_2_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE2");
- private static Textures.BlockIcons.CustomIcon GT8_2 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST2");
- private static Textures.BlockIcons.CustomIcon GT8_3_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE3");
- private static Textures.BlockIcons.CustomIcon GT8_3 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST3");
- private static Textures.BlockIcons.CustomIcon GT8_4_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE4");
- private static Textures.BlockIcons.CustomIcon GT8_4 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST4");
- private static Textures.BlockIcons.CustomIcon GT8_5_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE5");
- private static Textures.BlockIcons.CustomIcon GT8_5 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST5");
- private static Textures.BlockIcons.CustomIcon GT8_6_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE6");
- private static Textures.BlockIcons.CustomIcon GT8_6 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST6");
- private static Textures.BlockIcons.CustomIcon GT8_7_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE7");
- private static Textures.BlockIcons.CustomIcon GT8_7 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST7");
- private static Textures.BlockIcons.CustomIcon GT8_8_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE8");
- private static Textures.BlockIcons.CustomIcon GT8_8 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST8");
- private static Textures.BlockIcons.CustomIcon GT8_9_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE9");
- private static Textures.BlockIcons.CustomIcon GT8_9 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST9");
-
- private static Textures.BlockIcons.CustomIcon frontFace_0 = (GT8_1);
- private static Textures.BlockIcons.CustomIcon frontFaceActive_0 = (GT8_1_Active);
- private static Textures.BlockIcons.CustomIcon frontFace_1 = (GT8_2);
- private static Textures.BlockIcons.CustomIcon frontFaceActive_1 = (GT8_2_Active);
- private static Textures.BlockIcons.CustomIcon frontFace_2 = (GT8_3);
- private static Textures.BlockIcons.CustomIcon frontFaceActive_2 = (GT8_3_Active);
- private static Textures.BlockIcons.CustomIcon frontFace_3 = (GT8_4);
- private static Textures.BlockIcons.CustomIcon frontFaceActive_3 = (GT8_4_Active);
- private static Textures.BlockIcons.CustomIcon frontFace_4 = (GT8_5);
- private static Textures.BlockIcons.CustomIcon frontFaceActive_4 = (GT8_5_Active);
- private static Textures.BlockIcons.CustomIcon frontFace_5 = (GT8_6);
- private static Textures.BlockIcons.CustomIcon frontFaceActive_5 = (GT8_6_Active);
- private static Textures.BlockIcons.CustomIcon frontFace_6 = (GT8_7);
- private static Textures.BlockIcons.CustomIcon frontFaceActive_6 = (GT8_7_Active);
- private static Textures.BlockIcons.CustomIcon frontFace_7 = (GT8_8);
- private static Textures.BlockIcons.CustomIcon frontFaceActive_7 = (GT8_8_Active);
- private static Textures.BlockIcons.CustomIcon frontFace_8 = (GT8_9);
- private static Textures.BlockIcons.CustomIcon frontFaceActive_8 = (GT8_9_Active);
-
- Textures.BlockIcons.CustomIcon[] TURBINE = new Textures.BlockIcons.CustomIcon[]{
- frontFace_0,
- frontFace_1,
- frontFace_2,
- frontFace_3,
- frontFace_4,
- frontFace_5,
- frontFace_6,
- frontFace_7,
- frontFace_8
- };
-
- Textures.BlockIcons.CustomIcon[] TURBINE_ACTIVE = new Textures.BlockIcons.CustomIcon[]{
- frontFaceActive_0,
- frontFaceActive_1,
- frontFaceActive_2,
- frontFaceActive_3,
- frontFaceActive_4,
- frontFaceActive_5,
- frontFaceActive_6,
- frontFaceActive_7,
- frontFaceActive_8
- };
-
-
- public IIcon handleCasingsGT(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, int aSide, GregtechMetaCasingBlocks thisBlock) {
- return handleCasingsGT59(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);
- }
+ private static Textures.BlockIcons.CustomIcon GT8_1_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST_ACTIVE1");
+ private static Textures.BlockIcons.CustomIcon GT8_1 = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST1");
+ private static Textures.BlockIcons.CustomIcon GT8_2_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST_ACTIVE2");
+ private static Textures.BlockIcons.CustomIcon GT8_2 = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST2");
+ private static Textures.BlockIcons.CustomIcon GT8_3_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST_ACTIVE3");
+ private static Textures.BlockIcons.CustomIcon GT8_3 = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST3");
+ private static Textures.BlockIcons.CustomIcon GT8_4_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST_ACTIVE4");
+ private static Textures.BlockIcons.CustomIcon GT8_4 = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST4");
+ private static Textures.BlockIcons.CustomIcon GT8_5_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST_ACTIVE5");
+ private static Textures.BlockIcons.CustomIcon GT8_5 = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST5");
+ private static Textures.BlockIcons.CustomIcon GT8_6_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST_ACTIVE6");
+ private static Textures.BlockIcons.CustomIcon GT8_6 = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST6");
+ private static Textures.BlockIcons.CustomIcon GT8_7_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST_ACTIVE7");
+ private static Textures.BlockIcons.CustomIcon GT8_7 = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST7");
+ private static Textures.BlockIcons.CustomIcon GT8_8_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST_ACTIVE8");
+ private static Textures.BlockIcons.CustomIcon GT8_8 = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST8");
+ private static Textures.BlockIcons.CustomIcon GT8_9_Active = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST_ACTIVE9");
+ private static Textures.BlockIcons.CustomIcon GT8_9 = new Textures.BlockIcons.CustomIcon(
+ "iconsets/LARGETURBINE_ST9");
+
+ private static Textures.BlockIcons.CustomIcon frontFace_0 = TexturesGregtech59.GT8_1;
+ private static Textures.BlockIcons.CustomIcon frontFaceActive_0 = TexturesGregtech59.GT8_1_Active;
+ private static Textures.BlockIcons.CustomIcon frontFace_1 = TexturesGregtech59.GT8_2;
+ private static Textures.BlockIcons.CustomIcon frontFaceActive_1 = TexturesGregtech59.GT8_2_Active;
+ private static Textures.BlockIcons.CustomIcon frontFace_2 = TexturesGregtech59.GT8_3;
+ private static Textures.BlockIcons.CustomIcon frontFaceActive_2 = TexturesGregtech59.GT8_3_Active;
+ private static Textures.BlockIcons.CustomIcon frontFace_3 = TexturesGregtech59.GT8_4;
+ private static Textures.BlockIcons.CustomIcon frontFaceActive_3 = TexturesGregtech59.GT8_4_Active;
+ private static Textures.BlockIcons.CustomIcon frontFace_4 = TexturesGregtech59.GT8_5;
+ private static Textures.BlockIcons.CustomIcon frontFaceActive_4 = TexturesGregtech59.GT8_5_Active;
+ private static Textures.BlockIcons.CustomIcon frontFace_5 = TexturesGregtech59.GT8_6;
+ private static Textures.BlockIcons.CustomIcon frontFaceActive_5 = TexturesGregtech59.GT8_6_Active;
+ private static Textures.BlockIcons.CustomIcon frontFace_6 = TexturesGregtech59.GT8_7;
+ private static Textures.BlockIcons.CustomIcon frontFaceActive_6 = TexturesGregtech59.GT8_7_Active;
+ private static Textures.BlockIcons.CustomIcon frontFace_7 = TexturesGregtech59.GT8_8;
+ private static Textures.BlockIcons.CustomIcon frontFaceActive_7 = TexturesGregtech59.GT8_8_Active;
+ private static Textures.BlockIcons.CustomIcon frontFace_8 = TexturesGregtech59.GT8_9;
+ private static Textures.BlockIcons.CustomIcon frontFaceActive_8 = TexturesGregtech59.GT8_9_Active;
+
+ Textures.BlockIcons.CustomIcon[] TURBINE = new Textures.BlockIcons.CustomIcon[] {
+ TexturesGregtech59.frontFace_0, TexturesGregtech59.frontFace_1, TexturesGregtech59.frontFace_2,
+ TexturesGregtech59.frontFace_3, TexturesGregtech59.frontFace_4, TexturesGregtech59.frontFace_5,
+ TexturesGregtech59.frontFace_6, TexturesGregtech59.frontFace_7, TexturesGregtech59.frontFace_8
+ };
-public IIcon handleCasingsGT59(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, int aSide, GregtechMetaCasingBlocks thisBlock) {
- int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord);
- if (((tMeta != 6) && (tMeta != 8) && (tMeta != 0))) {
- return CasingTextureHandler.getIcon(aSide, tMeta);
+ Textures.BlockIcons.CustomIcon[] TURBINE_ACTIVE = new Textures.BlockIcons.CustomIcon[] {
+ TexturesGregtech59.frontFaceActive_0, TexturesGregtech59.frontFaceActive_1,
+ TexturesGregtech59.frontFaceActive_2, TexturesGregtech59.frontFaceActive_3,
+ TexturesGregtech59.frontFaceActive_4, TexturesGregtech59.frontFaceActive_5,
+ TexturesGregtech59.frontFaceActive_6, TexturesGregtech59.frontFaceActive_7,
+ TexturesGregtech59.frontFaceActive_8
+ };
+
+ public IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
+ final int aSide, final GregtechMetaCasingBlocks thisBlock) {
+ return this.handleCasingsGT59(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);
}
- int tStartIndex = tMeta == 6 ? 1 : 13;
- if (tMeta == 0) {
- if ((aSide == 2) || (aSide == 3)) {
- TileEntity tTileEntity;
- IMetaTileEntity tMetaTileEntity;
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[0].getIcon();
- }
- return TURBINE[0].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[3].getIcon();
+
+ public IIcon handleCasingsGT59(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord,
+ final int aSide, final GregtechMetaCasingBlocks thisBlock) {
+ final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord);
+ if (tMeta != 6 && tMeta != 8 && tMeta != 0) {
+ return CasingTextureHandler.getIcon(aSide, tMeta);
+ }
+ final int tStartIndex = tMeta == 6 ? 1 : 13;
+ if (tMeta == 0) {
+ if (aSide == 2 || aSide == 3) {
+ TileEntity tTileEntity;
+ IMetaTileEntity tMetaTileEntity;
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord - 1, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[0].getIcon();
+ }
+ return this.TURBINE[0].getIcon();
}
- return TURBINE[3].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[6].getIcon();
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[3].getIcon();
+ }
+ return this.TURBINE[3].getIcon();
}
- return TURBINE[6].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[1].getIcon();
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord + 1, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[6].getIcon();
+ }
+ return this.TURBINE[6].getIcon();
}
- return TURBINE[1].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[7].getIcon();
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[1].getIcon();
+ }
+ return this.TURBINE[1].getIcon();
}
- return TURBINE[7].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[8].getIcon();
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[7].getIcon();
+ }
+ return this.TURBINE[7].getIcon();
}
- return TURBINE[8].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[5].getIcon();
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord + 1, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[8].getIcon();
+ }
+ return this.TURBINE[8].getIcon();
}
- return TURBINE[5].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[2].getIcon();
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[5].getIcon();
+ }
+ return this.TURBINE[5].getIcon();
}
- return TURBINE[2].getIcon();
- }
- } else if ((aSide == 4) || (aSide == 5)) {
- TileEntity tTileEntity;
- Object tMetaTileEntity;
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[0].getIcon();
- }
- return TURBINE[0].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[3].getIcon();
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord - 1, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[2].getIcon();
+ }
+ return this.TURBINE[2].getIcon();
}
- return TURBINE[3].getIcon();
}
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[6].getIcon();
+ else if (aSide == 4 || aSide == 5) {
+ TileEntity tTileEntity;
+ Object tMetaTileEntity;
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 4 ? 1 : -1)))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[0].getIcon();
+ }
+ return this.TURBINE[0].getIcon();
}
- return TURBINE[6].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[1].getIcon();
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 4 ? 1 : -1)))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[3].getIcon();
+ }
+ return this.TURBINE[3].getIcon();
}
- return TURBINE[1].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[7].getIcon();
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 4 ? 1 : -1)))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[6].getIcon();
+ }
+ return this.TURBINE[6].getIcon();
}
- return TURBINE[7].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[8].getIcon();
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[1].getIcon();
+ }
+ return this.TURBINE[1].getIcon();
}
- return TURBINE[8].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[5].getIcon();
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[7].getIcon();
+ }
+ return this.TURBINE[7].getIcon();
}
- return TURBINE[5].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[2].getIcon();
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 5 ? 1 : -1)))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[8].getIcon();
+ }
+ return this.TURBINE[8].getIcon();
+ }
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 5 ? 1 : -1)))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[5].getIcon();
+ }
+ return this.TURBINE[5].getIcon();
+ }
+ if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 5 ? 1 : -1)))
+ && tTileEntity instanceof IGregTechTileEntity
+ && ((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide
+ && null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())
+ && tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[2].getIcon();
+ }
+ return this.TURBINE[2].getIcon();
}
- return TURBINE[2].getIcon();
}
+ return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon();
+ }
+ final boolean[] tConnectedSides = {
+ aWorld.getBlock(xCoord, yCoord - 1, zCoord) == thisBlock
+ && aWorld.getBlockMetadata(xCoord, yCoord - 1, zCoord) == tMeta,
+ aWorld.getBlock(xCoord, yCoord + 1, zCoord) == thisBlock
+ && aWorld.getBlockMetadata(xCoord, yCoord + 1, zCoord) == tMeta,
+ aWorld.getBlock(xCoord + 1, yCoord, zCoord) == thisBlock
+ && aWorld.getBlockMetadata(xCoord + 1, yCoord, zCoord) == tMeta,
+ aWorld.getBlock(xCoord, yCoord, zCoord + 1) == thisBlock
+ && aWorld.getBlockMetadata(xCoord, yCoord, zCoord + 1) == tMeta,
+ aWorld.getBlock(xCoord - 1, yCoord, zCoord) == thisBlock
+ && aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta,
+ aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock
+ && aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta
+ };
+ switch (aSide) {
+ case 0:
+ if (tConnectedSides[0]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 6].getIcon();
+ }
+ if (!tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 2].getIcon();
+ }
+ if (tConnectedSides[4] && !tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 3].getIcon();
+ }
+ if (tConnectedSides[4] && tConnectedSides[5] && !tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 4].getIcon();
+ }
+ if (tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && !tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 5].getIcon();
+ }
+ if (!tConnectedSides[4] && !tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 8].getIcon();
+ }
+ if (tConnectedSides[4] && !tConnectedSides[5] && !tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 9].getIcon();
+ }
+ if (tConnectedSides[4] && tConnectedSides[5] && !tConnectedSides[2] && !tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 10].getIcon();
+ }
+ if (!tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && !tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 11].getIcon();
+ }
+ if (!tConnectedSides[4] && !tConnectedSides[5] && !tConnectedSides[2] && !tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (!tConnectedSides[4] && !tConnectedSides[2]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 1].getIcon();
+ }
+ if (!tConnectedSides[5] && !tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 0].getIcon();
+ }
+ case 1:
+ if (tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 6].getIcon();
+ }
+ if (!tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 2].getIcon();
+ }
+ if (tConnectedSides[4] && !tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 3].getIcon();
+ }
+ if (tConnectedSides[4] && tConnectedSides[5] && !tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 4].getIcon();
+ }
+ if (tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && !tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 5].getIcon();
+ }
+ if (!tConnectedSides[4] && !tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 8].getIcon();
+ }
+ if (tConnectedSides[4] && !tConnectedSides[5] && !tConnectedSides[2] && tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 9].getIcon();
+ }
+ if (tConnectedSides[4] && tConnectedSides[5] && !tConnectedSides[2] && !tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 10].getIcon();
+ }
+ if (!tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && !tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 11].getIcon();
+ }
+ if (!tConnectedSides[4] && !tConnectedSides[5] && !tConnectedSides[2] && !tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (!tConnectedSides[2] && !tConnectedSides[4]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 1].getIcon();
+ }
+ if (!tConnectedSides[3] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 0].getIcon();
+ }
+ case 2:
+ if (tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 6].getIcon();
+ }
+ if (!tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 2].getIcon();
+ }
+ if (tConnectedSides[2] && !tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 5].getIcon();
+ }
+ if (tConnectedSides[2] && tConnectedSides[0] && !tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 4].getIcon();
+ }
+ if (tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 3].getIcon();
+ }
+ if (!tConnectedSides[2] && !tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 11].getIcon();
+ }
+ if (tConnectedSides[2] && !tConnectedSides[0] && !tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 10].getIcon();
+ }
+ if (tConnectedSides[2] && tConnectedSides[0] && !tConnectedSides[4] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 9].getIcon();
+ }
+ if (!tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 8].getIcon();
+ }
+ if (!tConnectedSides[2] && !tConnectedSides[0] && !tConnectedSides[4] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (!tConnectedSides[2] && !tConnectedSides[4]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 1].getIcon();
+ }
+ if (!tConnectedSides[0] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 0].getIcon();
+ }
+ case 3:
+ if (tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 6].getIcon();
+ }
+ if (!tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 4].getIcon();
+ }
+ if (tConnectedSides[2] && !tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 5].getIcon();
+ }
+ if (tConnectedSides[2] && tConnectedSides[0] && !tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 2].getIcon();
+ }
+ if (tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 3].getIcon();
+ }
+ if (!tConnectedSides[2] && !tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 10].getIcon();
+ }
+ if (tConnectedSides[2] && !tConnectedSides[0] && !tConnectedSides[4] && tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 11].getIcon();
+ }
+ if (tConnectedSides[2] && tConnectedSides[0] && !tConnectedSides[4] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 8].getIcon();
+ }
+ if (!tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 9].getIcon();
+ }
+ if (!tConnectedSides[2] && !tConnectedSides[0] && !tConnectedSides[4] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (!tConnectedSides[2] && !tConnectedSides[4]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 1].getIcon();
+ }
+ if (!tConnectedSides[0] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 0].getIcon();
+ }
+ case 4:
+ if (tConnectedSides[4]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 6].getIcon();
+ }
+ if (!tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 5].getIcon();
+ }
+ if (tConnectedSides[0] && !tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 4].getIcon();
+ }
+ if (tConnectedSides[0] && tConnectedSides[3] && !tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 3].getIcon();
+ }
+ if (tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 2].getIcon();
+ }
+ if (!tConnectedSides[0] && !tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 10].getIcon();
+ }
+ if (tConnectedSides[0] && !tConnectedSides[3] && !tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 9].getIcon();
+ }
+ if (tConnectedSides[0] && tConnectedSides[3] && !tConnectedSides[1] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 8].getIcon();
+ }
+ if (!tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 11].getIcon();
+ }
+ if (!tConnectedSides[0] && !tConnectedSides[3] && !tConnectedSides[1] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (!tConnectedSides[0] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 0].getIcon();
+ }
+ if (!tConnectedSides[3] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 1].getIcon();
+ }
+ case 5:
+ if (tConnectedSides[2]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 6].getIcon();
+ }
+ if (!tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 5].getIcon();
+ }
+ if (tConnectedSides[0] && !tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 2].getIcon();
+ }
+ if (tConnectedSides[0] && tConnectedSides[3] && !tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 3].getIcon();
+ }
+ if (tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 4].getIcon();
+ }
+ if (!tConnectedSides[0] && !tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 11].getIcon();
+ }
+ if (tConnectedSides[0] && !tConnectedSides[3] && !tConnectedSides[1] && tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 8].getIcon();
+ }
+ if (tConnectedSides[0] && tConnectedSides[3] && !tConnectedSides[1] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 9].getIcon();
+ }
+ if (!tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 10].getIcon();
+ }
+ if (!tConnectedSides[0] && !tConnectedSides[3] && !tConnectedSides[1] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
+ }
+ if (!tConnectedSides[0] && !tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 0].getIcon();
+ }
+ if (!tConnectedSides[3] && !tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 1].getIcon();
+ }
+ break;
}
- return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon();
- }
- boolean[] tConnectedSides = {(aWorld.getBlock(xCoord, yCoord - 1, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord - 1, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord + 1, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord + 1, zCoord) == tMeta), (aWorld.getBlock(xCoord + 1, yCoord, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord + 1, yCoord, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord, zCoord + 1) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord + 1) == tMeta), (aWorld.getBlock(xCoord - 1, yCoord, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta)};
- switch (aSide) {
- case 0:
- if (tConnectedSides[0]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[4]) && (!tConnectedSides[2])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
- }
- if ((!tConnectedSides[5]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- case 1:
- if (tConnectedSides[1]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[4])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
- }
- if ((!tConnectedSides[3]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- case 2:
- if (tConnectedSides[5]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[4])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- case 3:
- if (tConnectedSides[3]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[4])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- case 4:
- if (tConnectedSides[4]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- if ((!tConnectedSides[3]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
- }
- case 5:
- if (tConnectedSides[2]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- if ((!tConnectedSides[3]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
- }
- break;
+ return Textures.BlockIcons.CONNECTED_HULLS[tStartIndex + 7].getIcon();
}
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
-}
-
-
+
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
index 04a7fdceed..017df30a20 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
@@ -13,20 +13,20 @@ public class TexturesGtBlock {
/*
* Handles Custom Textures.
*/
-
+
public static class CustomIcon implements IIconContainer, Runnable {
- protected IIcon mIcon;
- protected String mIconName;
+ protected IIcon mIcon;
+ protected String mIconName;
- public CustomIcon(String aIconName) {
- mIconName = aIconName;
- Utils.LOG_WARNING("Constructing a Custom Texture. " + mIconName);
+ public CustomIcon(final String aIconName) {
+ this.mIconName = aIconName;
+ Utils.LOG_WARNING("Constructing a Custom Texture. " + this.mIconName);
GregTech_API.sGTBlockIconload.add(this);
}
@Override
public IIcon getIcon() {
- return mIcon;
+ return this.mIcon;
}
@Override
@@ -35,131 +35,170 @@ public class TexturesGtBlock {
}
@Override
- public void run() {
- mIcon = GregTech_API.sBlockIcons.registerIcon(CORE.MODID + ":" + mIconName);
- Utils.LOG_WARNING("FIND ME _ Processing texture: "+this.getTextureFile().getResourcePath());
+ public ResourceLocation getTextureFile() {
+ return TextureMap.locationBlocksTexture;
}
@Override
- public ResourceLocation getTextureFile() {
- return TextureMap.locationBlocksTexture;
+ public void run() {
+ this.mIcon = GregTech_API.sBlockIcons.registerIcon(CORE.MODID + ":" + this.mIconName);
+ Utils.LOG_WARNING("FIND ME _ Processing texture: " + this.getTextureFile().getResourcePath());
}
}
-
-
+
/*
- * Add Some Custom Textures below.
- * I am not sure whether or not I need to declare them as such, but better to be safe than sorry.
- * Right?
+ * Add Some Custom Textures below. I am not sure whether or not I need to
+ * declare them as such, but better to be safe than sorry. Right?
*/
+ // Machine Casings
+ // Simple
+ private static final CustomIcon Internal_Casing_Machine_Simple_Top = new CustomIcon(
+ "TileEntities/machine_top");
+ public static final CustomIcon Casing_Machine_Simple_Top = TexturesGtBlock.Internal_Casing_Machine_Simple_Top;
+ private static final CustomIcon Internal_Casing_Machine_Simple_Bottom = new CustomIcon(
+ "TileEntities/machine_bottom");
+ public static final CustomIcon Casing_Machine_Simple_Bottom = TexturesGtBlock.Internal_Casing_Machine_Simple_Bottom;
+ // Advanced and Ultra
+ private static final CustomIcon Internal_Casing_Machine_Advanced = new CustomIcon(
+ "TileEntities/high_adv_machine");
+ public static final CustomIcon Casing_Machine_Advanced = TexturesGtBlock.Internal_Casing_Machine_Advanced;
+ private static final CustomIcon Internal_Casing_Machine_Ultra = new CustomIcon(
+ "TileEntities/adv_machine_lesu");
+ public static final CustomIcon Casing_Machine_Ultra = TexturesGtBlock.Internal_Casing_Machine_Ultra;
+ // Dimensional - Non Overlay
+ private static final CustomIcon Internal_Casing_Machine_Dimensional = new CustomIcon(
+ "TileEntities/adv_machine_dimensional");
+ public static final CustomIcon Casing_Machine_Dimensional = TexturesGtBlock.Internal_Casing_Machine_Dimensional;
+ private static final CustomIcon Internal_Casing_Machine_Dimensional_Adv = new CustomIcon(
+ "TileEntities/high_adv_machine_dimensional");
+ public static final CustomIcon Casing_Machine_Dimensional_Adv = TexturesGtBlock.Internal_Casing_Machine_Dimensional_Adv;
+
+ // Material Casings
+ private static final CustomIcon Internal_Casing_Tantalloy61 = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_TANTALLOY61");
+ public static final CustomIcon Casing_Material_Tantalloy61 = TexturesGtBlock.Internal_Casing_Tantalloy61;
+ private static final CustomIcon Internal_Casing_MaragingSteel = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_MARAGINGSTEEL");
+ public static final CustomIcon Casing_Material_MaragingSteel = TexturesGtBlock.Internal_Casing_MaragingSteel;
+ private static final CustomIcon Internal_Casing_Stellite = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_STELLITE");
+ public static final CustomIcon Casing_Material_Stellite = TexturesGtBlock.Internal_Casing_Stellite;
+ private static final CustomIcon Internal_Casing_Talonite = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_TALONITE");
+ public static final CustomIcon Casing_Material_Talonite = TexturesGtBlock.Internal_Casing_Talonite;
+ private static final CustomIcon Internal_Casing_Tumbaga = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_TUMBAGA");
+ public static final CustomIcon Casing_Material_Tumbaga = TexturesGtBlock.Internal_Casing_Tumbaga;
+ private static final CustomIcon Internal_Casing_Zeron100 = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_ZERON100");
+ public static final CustomIcon Casing_Material_Zeron100 = TexturesGtBlock.Internal_Casing_Zeron100;
+ private static final CustomIcon Internal_Casing_Potin = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_POTIN");
+ public static final CustomIcon Casing_Material_Potin = TexturesGtBlock.Internal_Casing_Potin;
+
+ private static final CustomIcon Internal_Casing_Grisium = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_GRISIUM");
+ public static final CustomIcon Casing_Material_Grisium = TexturesGtBlock.Internal_Casing_Grisium;
+ private static final CustomIcon Internal_Casing_Incoloy020 = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_INCOLOY_020");
+ public static final CustomIcon Casing_Material_Incoloy020 = TexturesGtBlock.Internal_Casing_Incoloy020;
+ private static final CustomIcon Internal_Casing_IncoloyDS = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_INCOLOY_DS");
+ public static final CustomIcon Casing_Material_IncoloyDS = TexturesGtBlock.Internal_Casing_IncoloyDS;
+ private static final CustomIcon Internal_Casing_IncoloyMA956 = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_INCOLOY_MA956");
+ public static final CustomIcon Casing_Material_IncoloyMA956 = TexturesGtBlock.Internal_Casing_IncoloyMA956;
+ private static final CustomIcon Internal_Casing_ZirconiumCarbide = new CustomIcon(
+ "TileEntities/MACHINE_CASING_STABLE_ZIRCONIUM_CARBIDE");
+ public static final CustomIcon Casing_Material_ZirconiumCarbide = TexturesGtBlock.Internal_Casing_ZirconiumCarbide;
+
+ // Material Machine/Firebox Casings
+ private static final CustomIcon Internal_Casing_Staballoy_Firebox = new CustomIcon(
+ "TileEntities/MACHINE_CASING_FIREBOX_STABALLOY");
+ public static final CustomIcon Casing_Staballoy_Firebox = TexturesGtBlock.Internal_Casing_Staballoy_Firebox;
+ // Misc Casings
+ private static final CustomIcon Internal_Casing_Machine_Redstone_Off = new CustomIcon(
+ "TileEntities/cover_redstone_conductor");
+ public static final CustomIcon Casing_Machine_Redstone_Off = TexturesGtBlock.Internal_Casing_Machine_Redstone_Off;
+ private static final CustomIcon Internal_Casing_Machine_Redstone_On = new CustomIcon(
+ "TileEntities/cover_redstone_emitter");
+ public static final CustomIcon Casing_Machine_Redstone_On = TexturesGtBlock.Internal_Casing_Machine_Redstone_On;
- //Machine Casings
- //Simple
- private static final CustomIcon Internal_Casing_Machine_Simple_Top = new CustomIcon("TileEntities/machine_top");
- public static final CustomIcon Casing_Machine_Simple_Top = Internal_Casing_Machine_Simple_Top;
- private static final CustomIcon Internal_Casing_Machine_Simple_Bottom = new CustomIcon("TileEntities/machine_bottom");
- public static final CustomIcon Casing_Machine_Simple_Bottom = Internal_Casing_Machine_Simple_Bottom;
- //Advanced and Ultra
- private static final CustomIcon Internal_Casing_Machine_Advanced = new CustomIcon("TileEntities/high_adv_machine");
- public static final CustomIcon Casing_Machine_Advanced = Internal_Casing_Machine_Advanced;
- private static final CustomIcon Internal_Casing_Machine_Ultra = new CustomIcon("TileEntities/adv_machine_lesu");
- public static final CustomIcon Casing_Machine_Ultra = Internal_Casing_Machine_Ultra;
- //Dimensional - Non Overlay
- private static final CustomIcon Internal_Casing_Machine_Dimensional = new CustomIcon("TileEntities/adv_machine_dimensional");
- public static final CustomIcon Casing_Machine_Dimensional = Internal_Casing_Machine_Dimensional;
- private static final CustomIcon Internal_Casing_Machine_Dimensional_Adv = new CustomIcon("TileEntities/high_adv_machine_dimensional");
- public static final CustomIcon Casing_Machine_Dimensional_Adv = Internal_Casing_Machine_Dimensional_Adv;
-
- //Material Casings
- private static final CustomIcon Internal_Casing_Tantalloy61 = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TANTALLOY61");
- public static final CustomIcon Casing_Material_Tantalloy61 = Internal_Casing_Tantalloy61;
- private static final CustomIcon Internal_Casing_MaragingSteel = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_MARAGINGSTEEL");
- public static final CustomIcon Casing_Material_MaragingSteel = Internal_Casing_MaragingSteel;
- private static final CustomIcon Internal_Casing_Stellite = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_STELLITE");
- public static final CustomIcon Casing_Material_Stellite = Internal_Casing_Stellite;
- private static final CustomIcon Internal_Casing_Talonite = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TALONITE");
- public static final CustomIcon Casing_Material_Talonite = Internal_Casing_Talonite;
- private static final CustomIcon Internal_Casing_Tumbaga = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TUMBAGA");
- public static final CustomIcon Casing_Material_Tumbaga = Internal_Casing_Tumbaga;
- private static final CustomIcon Internal_Casing_Zeron100 = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_ZERON100");
- public static final CustomIcon Casing_Material_Zeron100 = Internal_Casing_Zeron100;
- private static final CustomIcon Internal_Casing_Potin = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_POTIN");
- public static final CustomIcon Casing_Material_Potin = Internal_Casing_Potin;
-
- private static final CustomIcon Internal_Casing_Grisium = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_GRISIUM");
- public static final CustomIcon Casing_Material_Grisium = Internal_Casing_Grisium;
- private static final CustomIcon Internal_Casing_Incoloy020 = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_INCOLOY_020");
- public static final CustomIcon Casing_Material_Incoloy020 = Internal_Casing_Incoloy020;
- private static final CustomIcon Internal_Casing_IncoloyDS = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_INCOLOY_DS");
- public static final CustomIcon Casing_Material_IncoloyDS = Internal_Casing_IncoloyDS;
- private static final CustomIcon Internal_Casing_IncoloyMA956 = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_INCOLOY_MA956");
- public static final CustomIcon Casing_Material_IncoloyMA956 = Internal_Casing_IncoloyMA956;
- private static final CustomIcon Internal_Casing_ZirconiumCarbide = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_ZIRCONIUM_CARBIDE");
- public static final CustomIcon Casing_Material_ZirconiumCarbide = Internal_Casing_ZirconiumCarbide;
-
- //Material Machine/Firebox Casings
- private static final CustomIcon Internal_Casing_Staballoy_Firebox = new CustomIcon("TileEntities/MACHINE_CASING_FIREBOX_STABALLOY");
- public static final CustomIcon Casing_Staballoy_Firebox = Internal_Casing_Staballoy_Firebox;
-
- //Misc Casings
- private static final CustomIcon Internal_Casing_Machine_Redstone_Off = new CustomIcon("TileEntities/cover_redstone_conductor");
- public static final CustomIcon Casing_Machine_Redstone_Off = Internal_Casing_Machine_Redstone_Off;
- private static final CustomIcon Internal_Casing_Machine_Redstone_On = new CustomIcon("TileEntities/cover_redstone_emitter");
- public static final CustomIcon Casing_Machine_Redstone_On = Internal_Casing_Machine_Redstone_On;
-
- //Overlays
- //Fan Textures
- private static final CustomIcon Internal_Overlay_Machine_Vent = new CustomIcon("TileEntities/machine_top_vent_rotating");
- public static final CustomIcon Overlay_Machine_Vent = Internal_Overlay_Machine_Vent;
- private static final CustomIcon Internal_Overlay_Machine_Vent_Fast = new CustomIcon("TileEntities/machine_top_vent_rotating_fast");
- public static final CustomIcon Overlay_Machine_Vent_Fast = Internal_Overlay_Machine_Vent_Fast;
- private static final CustomIcon Internal_Overlay_Machine_Vent_Adv = new CustomIcon("TileEntities/adv_machine_vent_rotating");
- public static final CustomIcon Overlay_Machine_Vent_Adv = Internal_Overlay_Machine_Vent_Adv;
- //Speaker Texture
- private static final CustomIcon Internal_Overlay_Machine_Sound = new CustomIcon("TileEntities/audio_out");
- public static final CustomIcon Overlay_Machine_Sound = Internal_Overlay_Machine_Sound;
- private static final CustomIcon Internal_Overlay_Machine_Sound_Active = new CustomIcon("TileEntities/audio_out_active");
- public static final CustomIcon Overlay_Machine_Sound_Active = Internal_Overlay_Machine_Sound_Active;
- //Diesel Engines
- private static final CustomIcon Internal_Overlay_Machine_Diesel_Vertical = new CustomIcon("TileEntities/machine_top_dieselmotor");
- public static final CustomIcon Overlay_Machine_Diesel_Vertical = Internal_Overlay_Machine_Diesel_Vertical;
- private static final CustomIcon Internal_Overlay_Machine_Diesel_Horizontal = new CustomIcon("TileEntities/machine_top_dieselmotor2");
- public static final CustomIcon Overlay_Machine_Diesel_Horizontal = Internal_Overlay_Machine_Diesel_Horizontal;
- private static final CustomIcon Internal_Overlay_Machine_Diesel_Vertical_Active = new CustomIcon("TileEntities/machine_top_dieselmotor_active");
- public static final CustomIcon Overlay_Machine_Diesel_Vertical_Active = Internal_Overlay_Machine_Diesel_Vertical_Active;
- private static final CustomIcon Internal_Overlay_Machine_Diesel_Horizontal_Active = new CustomIcon("TileEntities/machine_top_dieselmotor2_active");
- public static final CustomIcon Overlay_Machine_Diesel_Horizontal_Active = Internal_Overlay_Machine_Diesel_Horizontal_Active;
- //Computer Screens
- private static final CustomIcon Internal_Casing_Machine_Screen_1 = new CustomIcon("TileEntities/adv_machine_screen_random1");
- public static final CustomIcon Casing_Machine_Screen_1 = Internal_Casing_Machine_Screen_1;
- private static final CustomIcon Internal_Casing_Machine_Screen_2 = new CustomIcon("TileEntities/adv_machine_screen_random2");
- public static final CustomIcon Casing_Machine_Screen_2 = Internal_Casing_Machine_Screen_2;
- private static final CustomIcon Internal_Casing_Machine_Screen_3 = new CustomIcon("TileEntities/adv_machine_screen_random3");
- public static final CustomIcon Casing_Machine_Screen_3 = Internal_Casing_Machine_Screen_3;
- private static final CustomIcon Internal_Casing_Machine_Screen_Frequency = new CustomIcon("TileEntities/adv_machine_screen_frequency");
- public static final CustomIcon Casing_Machine_Screen_Frequency = Internal_Casing_Machine_Screen_Frequency;
- private static final CustomIcon Internal_Overlay_Machine_Screen_Logo = new CustomIcon("TileEntities/adv_machine_screen_logo");
- public static final CustomIcon Overlay_Machine_Screen_Logo = Internal_Overlay_Machine_Screen_Logo;
- //Crafting Overlays
- private static final CustomIcon Internal_Overlay_Crafting_Bronze = new CustomIcon("TileEntities/bronze_top_crafting");
- public static final CustomIcon Overlay_Crafting_Bronze = Internal_Overlay_Crafting_Bronze;
- private static final CustomIcon Internal_Overlay_Crafting_Steel = new CustomIcon("TileEntities/cover_crafting");
- public static final CustomIcon Overlay_Crafting_Steel = Internal_Overlay_Crafting_Steel;
- //Dimensional
- private static final CustomIcon Internal_Overlay_Machine_Dimensional_Blue = new CustomIcon("TileEntities/adv_machine_dimensional_cover_blue");
- public static final CustomIcon Overlay_Machine_Dimensional_Blue = Internal_Overlay_Machine_Dimensional_Blue;
- private static final CustomIcon Internal_Overlay_Machine_Dimensional_Orange = new CustomIcon("TileEntities/adv_machine_dimensional_cover_orange");
- public static final CustomIcon Overlay_Machine_Dimensional_Orange = Internal_Overlay_Machine_Dimensional_Orange;
- //Icons
- private static final CustomIcon Internal_Overlay_MatterFab = new CustomIcon("TileEntities/adv_machine_matterfab");
- public static final CustomIcon Overlay_MatterFab = Internal_Overlay_MatterFab;
- private static final CustomIcon Internal_Overlay_MatterFab_Active = new CustomIcon("TileEntities/adv_machine_matterfab_active");
- public static final CustomIcon Overlay_MatterFab_Active = Internal_Overlay_MatterFab_Active;
- private static final CustomIcon Internal_Overlay_Oil = new CustomIcon("TileEntities/adv_machine_oil");
- public static final CustomIcon Overlay_Oil = Internal_Overlay_Oil;
- private static final CustomIcon Internal_Overlay_UU_Matter = new CustomIcon("TileEntities/adv_machine_uum");
- public static final CustomIcon Overlay_UU_Matter = Internal_Overlay_UU_Matter;
+ // Overlays
+ // Fan Textures
+ private static final CustomIcon Internal_Overlay_Machine_Vent = new CustomIcon(
+ "TileEntities/machine_top_vent_rotating");
+ public static final CustomIcon Overlay_Machine_Vent = TexturesGtBlock.Internal_Overlay_Machine_Vent;
+ private static final CustomIcon Internal_Overlay_Machine_Vent_Fast = new CustomIcon(
+ "TileEntities/machine_top_vent_rotating_fast");
+ public static final CustomIcon Overlay_Machine_Vent_Fast = TexturesGtBlock.Internal_Overlay_Machine_Vent_Fast;
+ private static final CustomIcon Internal_Overlay_Machine_Vent_Adv = new CustomIcon(
+ "TileEntities/adv_machine_vent_rotating");
+ public static final CustomIcon Overlay_Machine_Vent_Adv = TexturesGtBlock.Internal_Overlay_Machine_Vent_Adv;
+ // Speaker Texture
+ private static final CustomIcon Internal_Overlay_Machine_Sound = new CustomIcon(
+ "TileEntities/audio_out");
+ public static final CustomIcon Overlay_Machine_Sound = TexturesGtBlock.Internal_Overlay_Machine_Sound;
+ private static final CustomIcon Internal_Overlay_Machine_Sound_Active = new CustomIcon(
+ "TileEntities/audio_out_active");
+ public static final CustomIcon Overlay_Machine_Sound_Active = TexturesGtBlock.Internal_Overlay_Machine_Sound_Active;
+ // Diesel Engines
+ private static final CustomIcon Internal_Overlay_Machine_Diesel_Vertical = new CustomIcon(
+ "TileEntities/machine_top_dieselmotor");
+ public static final CustomIcon Overlay_Machine_Diesel_Vertical = TexturesGtBlock.Internal_Overlay_Machine_Diesel_Vertical;
+ private static final CustomIcon Internal_Overlay_Machine_Diesel_Horizontal = new CustomIcon(
+ "TileEntities/machine_top_dieselmotor2");
+ public static final CustomIcon Overlay_Machine_Diesel_Horizontal = TexturesGtBlock.Internal_Overlay_Machine_Diesel_Horizontal;
+ private static final CustomIcon Internal_Overlay_Machine_Diesel_Vertical_Active = new CustomIcon(
+ "TileEntities/machine_top_dieselmotor_active");
+ public static final CustomIcon Overlay_Machine_Diesel_Vertical_Active = TexturesGtBlock.Internal_Overlay_Machine_Diesel_Vertical_Active;
+ private static final CustomIcon Internal_Overlay_Machine_Diesel_Horizontal_Active = new CustomIcon(
+ "TileEntities/machine_top_dieselmotor2_active");
+ public static final CustomIcon Overlay_Machine_Diesel_Horizontal_Active = TexturesGtBlock.Internal_Overlay_Machine_Diesel_Horizontal_Active;
+ // Computer Screens
+ private static final CustomIcon Internal_Casing_Machine_Screen_1 = new CustomIcon(
+ "TileEntities/adv_machine_screen_random1");
+ public static final CustomIcon Casing_Machine_Screen_1 = TexturesGtBlock.Internal_Casing_Machine_Screen_1;
+ private static final CustomIcon Internal_Casing_Machine_Screen_2 = new CustomIcon(
+ "TileEntities/adv_machine_screen_random2");
+ public static final CustomIcon Casing_Machine_Screen_2 = TexturesGtBlock.Internal_Casing_Machine_Screen_2;
+ private static final CustomIcon Internal_Casing_Machine_Screen_3 = new CustomIcon(
+ "TileEntities/adv_machine_screen_random3");
+ public static final CustomIcon Casing_Machine_Screen_3 = TexturesGtBlock.Internal_Casing_Machine_Screen_3;
+ private static final CustomIcon Internal_Casing_Machine_Screen_Frequency = new CustomIcon(
+ "TileEntities/adv_machine_screen_frequency");
+ public static final CustomIcon Casing_Machine_Screen_Frequency = TexturesGtBlock.Internal_Casing_Machine_Screen_Frequency;
+ private static final CustomIcon Internal_Overlay_Machine_Screen_Logo = new CustomIcon(
+ "TileEntities/adv_machine_screen_logo");
+ public static final CustomIcon Overlay_Machine_Screen_Logo = TexturesGtBlock.Internal_Overlay_Machine_Screen_Logo;
+ // Crafting Overlays
+ private static final CustomIcon Internal_Overlay_Crafting_Bronze = new CustomIcon(
+ "TileEntities/bronze_top_crafting");
+ public static final CustomIcon Overlay_Crafting_Bronze = TexturesGtBlock.Internal_Overlay_Crafting_Bronze;
+ private static final CustomIcon Internal_Overlay_Crafting_Steel = new CustomIcon(
+ "TileEntities/cover_crafting");
+ public static final CustomIcon Overlay_Crafting_Steel = TexturesGtBlock.Internal_Overlay_Crafting_Steel;
+ // Dimensional
+ private static final CustomIcon Internal_Overlay_Machine_Dimensional_Blue = new CustomIcon(
+ "TileEntities/adv_machine_dimensional_cover_blue");
+ public static final CustomIcon Overlay_Machine_Dimensional_Blue = TexturesGtBlock.Internal_Overlay_Machine_Dimensional_Blue;
+ private static final CustomIcon Internal_Overlay_Machine_Dimensional_Orange = new CustomIcon(
+ "TileEntities/adv_machine_dimensional_cover_orange");
+ public static final CustomIcon Overlay_Machine_Dimensional_Orange = TexturesGtBlock.Internal_Overlay_Machine_Dimensional_Orange;
+ // Icons
+ private static final CustomIcon Internal_Overlay_MatterFab = new CustomIcon(
+ "TileEntities/adv_machine_matterfab");
+ public static final CustomIcon Overlay_MatterFab = TexturesGtBlock.Internal_Overlay_MatterFab;
+ private static final CustomIcon Internal_Overlay_MatterFab_Active = new CustomIcon(
+ "TileEntities/adv_machine_matterfab_active");
+ public static final CustomIcon Overlay_MatterFab_Active = TexturesGtBlock.Internal_Overlay_MatterFab_Active;
+ private static final CustomIcon Internal_Overlay_Oil = new CustomIcon(
+ "TileEntities/adv_machine_oil");
+ public static final CustomIcon Overlay_Oil = TexturesGtBlock.Internal_Overlay_Oil;
+ private static final CustomIcon Internal_Overlay_UU_Matter = new CustomIcon(
+ "TileEntities/adv_machine_uum");
+ public static final CustomIcon Overlay_UU_Matter = TexturesGtBlock.Internal_Overlay_UU_Matter;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java
index 1b3af3a842..c9a0387bdb 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java
@@ -10,50 +10,39 @@ import net.minecraft.util.ResourceLocation;
public final class TexturesGtTools {
- public final static CustomIcon SKOOKUM_CHOOCHER = new CustomIcon("iconsets/SKOOKUMCHOOCHER");
-
-
-
-
-
-
-
-
-
-
-
-
public final static class CustomIcon implements IIconContainer, Runnable {
- protected IIcon mIcon, mOverlay;
- protected final String mIconName;
-
- public CustomIcon(final String aIconName) {
- mIconName = aIconName;
- Utils.LOG_INFO("Constructing a Custom Texture. " + mIconName);
- GregTech_API.sGTItemIconload.add(this);
- }
-
- @Override
- public IIcon getIcon() {
- return mIcon;
- }
-
- @Override
- public IIcon getOverlayIcon() {
- return mOverlay;
- }
-
- @Override
- public void run() {
- mIcon = GregTech_API.sItemIcons.registerIcon(CORE.MODID + ":" + mIconName);
- //Utils.LOG_INFO("Registering a Custom Texture. "+mIcon.g);
- mOverlay = GregTech_API.sItemIcons.registerIcon(CORE.MODID + ":" + mIconName + "_OVERLAY");
- }
-
- @Override
- public ResourceLocation getTextureFile() {
- return TextureMap.locationItemsTexture;
- }
- }
+ protected IIcon mIcon, mOverlay;
+ protected final String mIconName;
+
+ public CustomIcon(final String aIconName) {
+ this.mIconName = aIconName;
+ Utils.LOG_INFO("Constructing a Custom Texture. " + this.mIconName);
+ GregTech_API.sGTItemIconload.add(this);
+ }
+
+ @Override
+ public IIcon getIcon() {
+ return this.mIcon;
+ }
+
+ @Override
+ public IIcon getOverlayIcon() {
+ return this.mOverlay;
+ }
+
+ @Override
+ public ResourceLocation getTextureFile() {
+ return TextureMap.locationItemsTexture;
+ }
+
+ @Override
+ public void run() {
+ this.mIcon = GregTech_API.sItemIcons.registerIcon(CORE.MODID + ":" + this.mIconName);
+ // Utils.LOG_INFO("Registering a Custom Texture. "+mIcon.g);
+ this.mOverlay = GregTech_API.sItemIcons.registerIcon(CORE.MODID + ":" + this.mIconName + "_OVERLAY");
+ }
+ }
+
+ public final static CustomIcon SKOOKUM_CHOOCHER = new CustomIcon("iconsets/SKOOKUMCHOOCHER");
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java
index dc628d116a..1c514acc74 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java
@@ -1,7 +1,5 @@
package gtPlusPlus.xmod.gregtech.common.items;
-import static gtPlusPlus.core.util.Utils.getTcAspectStack;
-
import gregtech.api.GregTech_API;
import gregtech.api.enums.*;
import gregtech.api.interfaces.ITexture;
@@ -18,183 +16,788 @@ import gtPlusPlus.xmod.gregtech.api.items.Gregtech_MetaItem_X32;
import net.minecraft.item.EnumAction;
public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
- public MetaGeneratedGregtechItems INSTANCE;
-
- public MetaGeneratedGregtechItems() {
- super("MU-metaitem.01", new OrePrefixes[]{null});
- INSTANCE = this;
- int tLastID = 0;
-
- if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){
- Utils.LOG_INFO("Gregtech 5.09 not found, using fallback components. (I like how I have to add compat to something I added first and had stolen.)");
- GregtechItemList.Electric_Pump_LuV.set(addItem(tLastID = 0, "Electric Pump (LuV)", "163920 L/sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)}));
- GregtechItemList.Electric_Pump_ZPM.set(addItem(tLastID = 1, "Electric Pump (ZPM)", "655680 L/sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.ITER, 2L), getTcAspectStack(TC_Aspects.AQUA, 2L)}));
- GregtechItemList.Electric_Pump_UV.set(addItem(tLastID = 2, "Electric Pump (UV)", "2622720 L/sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.ITER, 4L), getTcAspectStack(TC_Aspects.AQUA, 4L)}));
- GregtechItemList.Electric_Pump_MAX.set(addItem(tLastID = 3, "Electric Pump (MAX)", "10490880 L/sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.ITER, 8L), getTcAspectStack(TC_Aspects.AQUA, 8L)}));
- GregTech_API.registerCover(GregtechItemList.Electric_Pump_LuV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(8196));
- GregTech_API.registerCover(GregtechItemList.Electric_Pump_ZPM.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[6][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(32768));
- GregTech_API.registerCover(GregtechItemList.Electric_Pump_UV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[7][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(131072));
- GregTech_API.registerCover(GregtechItemList.Electric_Pump_MAX.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(524288));
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Pump_LuV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", Character.valueOf('M'), GregtechItemList.Electric_Motor_LuV, Character.valueOf('O'), OrePrefixes.ring.get(Materials.Rubber), Character.valueOf('X'), OrePrefixes.rotor.get(Materials.Tin), Character.valueOf('S'), OrePrefixes.screw.get(Materials.Tin), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Tin), Character.valueOf('P'), OrePrefixes.pipeMedium.get(Materials.Bronze)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Pump_ZPM.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", Character.valueOf('M'), GregtechItemList.Electric_Motor_ZPM, Character.valueOf('O'), OrePrefixes.ring.get(Materials.Rubber), Character.valueOf('X'), OrePrefixes.rotor.get(Materials.Bronze), Character.valueOf('S'), OrePrefixes.screw.get(Materials.Bronze), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.AnyCopper), Character.valueOf('P'), OrePrefixes.pipeMedium.get(Materials.Steel)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Pump_UV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", Character.valueOf('M'), GregtechItemList.Electric_Motor_UV, Character.valueOf('O'), OrePrefixes.ring.get(Materials.Rubber), Character.valueOf('X'), OrePrefixes.rotor.get(Materials.Steel), Character.valueOf('S'), OrePrefixes.screw.get(Materials.Steel), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Gold), Character.valueOf('P'), OrePrefixes.pipeMedium.get(Materials.StainlessSteel)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Pump_MAX.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", Character.valueOf('M'), GregtechItemList.Electric_Motor_MAX, Character.valueOf('O'), OrePrefixes.ring.get(Materials.Rubber), Character.valueOf('X'), OrePrefixes.rotor.get(Materials.StainlessSteel), Character.valueOf('S'), OrePrefixes.screw.get(Materials.StainlessSteel), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Aluminium), Character.valueOf('P'), OrePrefixes.pipeMedium.get(Materials.Titanium)});
- tLastID = 4;
- GregtechItemList.Electric_Motor_LuV.set(addItem(tLastID = 4, "Electric Motor (LuV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.MOTUS, 1L)}));
- GregtechItemList.Electric_Motor_ZPM.set(addItem(tLastID = 5, "Electric Motor (ZPM)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.MOTUS, 2L)}));
- GregtechItemList.Electric_Motor_UV.set(addItem(tLastID = 6, "Electric Motor (UV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.MOTUS, 4L)}));
- GregtechItemList.Electric_Motor_MAX.set(addItem(tLastID = 7, "Electric Motor (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.MOTUS, 8L)}));
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Motor_LuV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", Character.valueOf('I'), OrePrefixes.stick.get(Materials.IronMagnetic), Character.valueOf('R'), OrePrefixes.stick.get(Materials.AnyIron), Character.valueOf('W'), OrePrefixes.wireGt01.get(Materials.AnyCopper), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Tin)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Motor_ZPM.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", Character.valueOf('I'), OrePrefixes.stick.get(Materials.SteelMagnetic), Character.valueOf('R'), OrePrefixes.stick.get(Materials.Aluminium), Character.valueOf('W'), OrePrefixes.wireGt01.get(Materials.Electrum), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Silver)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Motor_UV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", Character.valueOf('I'), OrePrefixes.stick.get(Materials.SteelMagnetic), Character.valueOf('R'), OrePrefixes.stick.get(Materials.StainlessSteel), Character.valueOf('W'), OrePrefixes.wireGt02.get(Materials.Cupronickel), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Gold)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Motor_MAX.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", Character.valueOf('I'), OrePrefixes.stick.get(Materials.NeodymiumMagnetic), Character.valueOf('R'), OrePrefixes.stick.get(Materials.Titanium), Character.valueOf('W'), OrePrefixes.wireGt02.get(Materials.TungstenSteel), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Nichrome)});
-
- tLastID = 8;
- GregtechItemList.Conveyor_Module_LuV.set(addItem(tLastID = 8, "Conveyor Module (LuV)", "1 Stack every 20 secs (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L)}));
- GregtechItemList.Conveyor_Module_ZPM.set(addItem(tLastID = 9, "Conveyor Module (ZPM)", "1 Stack every 5 secs (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.ITER, 2L)}));
- GregtechItemList.Conveyor_Module_UV.set(addItem(tLastID = 10, "Conveyor Module (UV)", "1 Stack every 1 sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.ITER, 4L)}));
- GregtechItemList.Conveyor_Module_MAX.set(addItem(tLastID = 11, "Conveyor Module (MAX)", "1 Stack every 1/5 sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.ITER, 8L)}));
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Conveyor_Module_LuV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", Character.valueOf('M'), GregtechItemList.Electric_Motor_LuV, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Tin), Character.valueOf('R'), OrePrefixes.plate.get(Materials.Rubber)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Conveyor_Module_ZPM.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", Character.valueOf('M'), GregtechItemList.Electric_Motor_ZPM, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.AnyCopper), Character.valueOf('R'), OrePrefixes.plate.get(Materials.Rubber)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Conveyor_Module_UV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", Character.valueOf('M'), GregtechItemList.Electric_Motor_UV, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Gold), Character.valueOf('R'), OrePrefixes.plate.get(Materials.Rubber)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Conveyor_Module_MAX.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", Character.valueOf('M'), GregtechItemList.Electric_Motor_MAX, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Aluminium), Character.valueOf('R'), OrePrefixes.plate.get(Materials.Rubber)});
- GregTech_API.registerCover(GregtechItemList.Conveyor_Module_LuV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(400));
- GregTech_API.registerCover(GregtechItemList.Conveyor_Module_ZPM.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(100));
- GregTech_API.registerCover(GregtechItemList.Conveyor_Module_UV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[3][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(20));
- GregTech_API.registerCover(GregtechItemList.Conveyor_Module_MAX.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(4));
- tLastID = 12;
- GregtechItemList.Electric_Piston_LuV.set(addItem(tLastID = 12, "Electric Piston (LuV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.MOTUS, 1L)}));
- GregtechItemList.Electric_Piston_ZPM.set(addItem(tLastID = 13, "Electric Piston (ZPM)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.MOTUS, 2L)}));
- GregtechItemList.Electric_Piston_UV.set(addItem(tLastID = 14, "Electric Piston (UV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.MOTUS, 4L)}));
- GregtechItemList.Electric_Piston_MAX.set(addItem(tLastID = 15, "Electric Piston (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 16L), getTcAspectStack(TC_Aspects.MOTUS, 8L)}));
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Piston_LuV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", Character.valueOf('P'), OrePrefixes.plate.get(Materials.Steel), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Steel), Character.valueOf('G'), OrePrefixes.gearGtSmall.get(Materials.Steel), Character.valueOf('M'), GregtechItemList.Electric_Motor_LuV, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Tin)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Piston_ZPM.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", Character.valueOf('P'), OrePrefixes.plate.get(Materials.Aluminium), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Aluminium), Character.valueOf('G'), OrePrefixes.gearGtSmall.get(Materials.Aluminium), Character.valueOf('M'), GregtechItemList.Electric_Motor_ZPM, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.AnyCopper)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Piston_UV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", Character.valueOf('P'), OrePrefixes.plate.get(Materials.StainlessSteel), Character.valueOf('S'), OrePrefixes.stick.get(Materials.StainlessSteel), Character.valueOf('G'), OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), Character.valueOf('M'), GregtechItemList.Electric_Motor_UV, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Gold)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Piston_MAX.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", Character.valueOf('P'), OrePrefixes.plate.get(Materials.Titanium), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Titanium), Character.valueOf('G'), OrePrefixes.gearGtSmall.get(Materials.Titanium), Character.valueOf('M'), GregtechItemList.Electric_Motor_MAX, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Aluminium)});
- tLastID = 16;
- GregtechItemList.Robot_Arm_LuV.set(addItem(tLastID = 16, "Robot Arm (LuV)", "Inserts into specific Slots (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.MOTUS, 1L), Utils.getTcAspectStack("COGNITIO", 1L)}));
- GregtechItemList.Robot_Arm_ZPM.set(addItem(tLastID = 17, "Robot Arm (ZPM)", "Inserts into specific Slots (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.MOTUS, 2L), getTcAspectStack("COGNITIO", 2L)}));
- GregtechItemList.Robot_Arm_UV.set(addItem(tLastID = 18, "Robot Arm (UV)", "Inserts into specific Slots (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.MOTUS, 4L), getTcAspectStack("COGNITIO", 4L)}));
- GregtechItemList.Robot_Arm_MAX.set(addItem(tLastID = 19, "Robot Arm (MAX)", "Inserts into specific Slots (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 16L), getTcAspectStack(TC_Aspects.MOTUS, 8L), getTcAspectStack("COGNITIO", 8L)}));
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Robot_Arm_LuV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", Character.valueOf('S'), OrePrefixes.stick.get(Materials.Steel), Character.valueOf('M'), GregtechItemList.Electric_Motor_LuV, Character.valueOf('P'), GregtechItemList.Electric_Piston_LuV, Character.valueOf('E'), OrePrefixes.circuit.get(Materials.Basic), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Tin)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Robot_Arm_ZPM.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", Character.valueOf('S'), OrePrefixes.stick.get(Materials.Aluminium), Character.valueOf('M'), GregtechItemList.Electric_Motor_ZPM, Character.valueOf('P'), GregtechItemList.Electric_Piston_ZPM, Character.valueOf('E'), OrePrefixes.circuit.get(Materials.Good), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.AnyCopper)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Robot_Arm_UV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", Character.valueOf('S'), OrePrefixes.stick.get(Materials.StainlessSteel), Character.valueOf('M'), GregtechItemList.Electric_Motor_UV, Character.valueOf('P'), GregtechItemList.Electric_Piston_UV, Character.valueOf('E'), OrePrefixes.circuit.get(Materials.Advanced), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Gold)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Robot_Arm_MAX.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", Character.valueOf('S'), OrePrefixes.stick.get(Materials.Titanium), Character.valueOf('M'), GregtechItemList.Electric_Motor_MAX, Character.valueOf('P'), GregtechItemList.Electric_Piston_MAX, Character.valueOf('E'), OrePrefixes.circuit.get(Materials.Elite), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Aluminium)});
- GregTech_API.registerCover(GregtechItemList.Robot_Arm_LuV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(400));
- GregTech_API.registerCover(GregtechItemList.Robot_Arm_ZPM.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(100));
- GregTech_API.registerCover(GregtechItemList.Robot_Arm_UV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[3][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(20));
- GregTech_API.registerCover(GregtechItemList.Robot_Arm_MAX.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(4));
- tLastID = 20;
- GregtechItemList.Field_Generator_LuV.set(addItem(tLastID = 20, "Field Generator (LuV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.TUTAMEN, 1L)}));
- GregtechItemList.Field_Generator_ZPM.set(addItem(tLastID = 21, "Field Generator (ZPM)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.TUTAMEN, 2L)}));
- GregtechItemList.Field_Generator_UV.set(addItem(tLastID = 22, "Field Generator (UV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.TUTAMEN, 4L)}));
- GregtechItemList.Field_Generator_MAX.set(addItem(tLastID = 23, "Field Generator (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 16L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.TUTAMEN, 8L)}));
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Field_Generator_LuV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", Character.valueOf('G'), OrePrefixes.gem.get(Materials.EnderPearl), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Basic), Character.valueOf('W'), OrePrefixes.wireGt01.get(Materials.Osmium)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Field_Generator_ZPM.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", Character.valueOf('G'), OrePrefixes.gem.get(Materials.EnderEye), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Good), Character.valueOf('W'), OrePrefixes.wireGt02.get(Materials.Osmium)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Field_Generator_UV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", Character.valueOf('G'), OrePrefixes.gem.get(Materials.NetherStar), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Advanced), Character.valueOf('W'), OrePrefixes.wireGt04.get(Materials.Osmium)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Field_Generator_MAX.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", Character.valueOf('G'), OrePrefixes.gem.get(Materials.NetherStar), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Elite), Character.valueOf('W'), OrePrefixes.wireGt08.get(Materials.Osmium)});
- tLastID = 24;
- GregtechItemList.Emitter_LuV.set(addItem(tLastID = 24, "Emitter (LuV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.LUX, 1L)}));
- GregtechItemList.Emitter_ZPM.set(addItem(tLastID = 25, "Emitter (ZPM)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.LUX, 2L)}));
- GregtechItemList.Emitter_UV.set(addItem(tLastID = 26, "Emitter (UV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.LUX, 4L)}));
- GregtechItemList.Emitter_MAX.set(addItem(tLastID = 27, "Emitter (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.LUX, 8L)}));
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Emitter_LuV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.Quartzite), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Brass), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Basic), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Tin)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Emitter_ZPM.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.NetherQuartz), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Electrum), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Good), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.AnyCopper)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Emitter_UV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.Emerald), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Chrome), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Advanced), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Gold)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Emitter_MAX.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.EnderPearl), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Platinum), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Elite), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Aluminium)});
- tLastID = 28;
- GregtechItemList.Sensor_LuV.set(addItem(tLastID = 28, "Sensor (LuV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.SENSUS, 1L)}));
- GregtechItemList.Sensor_ZPM.set(addItem(tLastID = 29, "Sensor (ZPM)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.SENSUS, 2L)}));
- GregtechItemList.Sensor_UV.set(addItem(tLastID = 30, "Sensor (UV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.SENSUS, 4L)}));
- GregtechItemList.Sensor_MAX.set(addItem(tLastID = 31, "Sensor (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.SENSUS, 8L)}));
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Sensor_LuV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.Quartzite), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Brass), Character.valueOf('P'), OrePrefixes.plate.get(Materials.Steel), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Basic)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Sensor_ZPM.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.NetherQuartz), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Electrum), Character.valueOf('P'), OrePrefixes.plate.get(Materials.Aluminium), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Good)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Sensor_UV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.Emerald), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Chrome), Character.valueOf('P'), OrePrefixes.plate.get(Materials.StainlessSteel), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Advanced)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Sensor_MAX.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.EnderPearl), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Platinum), Character.valueOf('P'), OrePrefixes.plate.get(Materials.Titanium), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Elite)});
-
- }
-
- else {
- GregtechItemList.Electric_Pump_MAX.set(addItem(tLastID = 3, "Electric Pump (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.ITER, 8L), getTcAspectStack(TC_Aspects.AQUA, 8L)}));
- GregtechItemList.Electric_Motor_MAX.set(addItem(tLastID = 7, "Electric Motor (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.MOTUS, 8L)}));
- GregtechItemList.Conveyor_Module_MAX.set(addItem(tLastID = 11, "Conveyor Module (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.ITER, 8L)}));
- GregtechItemList.Electric_Piston_MAX.set(addItem(tLastID = 15, "Electric Piston (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 16L), getTcAspectStack(TC_Aspects.MOTUS, 8L)}));
- GregtechItemList.Robot_Arm_MAX.set(addItem(tLastID = 19, "Robot Arm (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 16L), getTcAspectStack(TC_Aspects.MOTUS, 8L), getTcAspectStack("COGNITIO", 8L)}));
- GregtechItemList.Field_Generator_MAX.set(addItem(tLastID = 23, "Field Generator (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 16L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.TUTAMEN, 8L)}));
- GregtechItemList.Emitter_MAX.set(addItem(tLastID = 27, "Emitter (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.LUX, 8L)}));
- GregtechItemList.Sensor_MAX.set(addItem(tLastID = 31, "Sensor (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.SENSUS, 8L)}));
-
- }
-
- GregtechItemList.Circuit_IV.set(addItem(tLastID = 704, "Symbiotic Circuit (IV)", "A Symbiotic Data Processor", new Object[]{GregtechOrePrefixes.circuit.get(GT_Materials.Symbiotic)}));
- GregtechItemList.Circuit_LuV.set(addItem(tLastID = 705, "Neutronic Circuit (LuV)", "A Neutron Particle Processor", new Object[]{GregtechOrePrefixes.circuit.get(GT_Materials.Neutronic)}));
- GregtechItemList.Circuit_ZPM.set(addItem(tLastID = 706, "Quantum Circuit (ZPM)", "A Singlularity Processor", new Object[]{GregtechOrePrefixes.circuit.get(GT_Materials.Quantum)}));
- GregtechItemList.Circuit_Board_IV.set(addItem(tLastID = 710, "IV Circuit Board", "An IV Voltage Rated Circuit Board", new Object[0]));
- GregtechItemList.Circuit_Board_LuV.set(addItem(tLastID = 711, "LuV Circuit Board", "An LuV Voltage Rated Circuit Board", new Object[0]));
- GregtechItemList.Circuit_Board_ZPM.set(addItem(tLastID = 712, "ZPM Processor Board", "A ZPM Voltage Rated Processor Board", new Object[0]));
- GregtechItemList.Circuit_Parts_Crystal_Chip_IV.set(addItem(tLastID = 713, "(IV) Energized Crystal Chip", "Needed for Circuits", new Object[0]));
- GregtechItemList.Circuit_Parts_Crystal_Chip_LuV.set(addItem(tLastID = 714, "(LuV) Neutron based Microchip", "Needed for Circuits", new Object[0]));
- GregtechItemList.Circuit_Parts_Crystal_Chip_ZPM.set(addItem(tLastID = 715, "(ZPM) Quantum Chip", "Needed for Circuits", new Object[0]));
- GregtechItemList.Circuit_Parts_IV.set(addItem(tLastID = 716, "(IV) Energized Circuit Parts", "Circuit Parts", new Object[0]));
- GregtechItemList.Circuit_Parts_LuV.set(addItem(tLastID = 717, "(LuV) Neutron-based Circuit Parts", "Circuit Parts", new Object[0]));
- GregtechItemList.Circuit_Parts_ZPM.set(addItem(tLastID = 718, "(ZPM) Quantum Circuit Parts", "Circuit Parts", new Object[0]));
- GregtechItemList.Circuit_Parts_Wiring_IV.set(addItem(tLastID = 719, "Etched IV Voltage Wiring", "Part of Circuit Boards", new Object[0]));
- GregtechItemList.Circuit_Parts_Wiring_LuV.set(addItem(tLastID = 720, "Etched LuV Voltage Wiring", "Part of Circuit Boards", new Object[0]));
- GregtechItemList.Circuit_Parts_Wiring_ZPM.set(addItem(tLastID = 721, "Etched ZPM Voltage Wiring", "Part of Circuit Boards", new Object[0]));
-
-
-
-
- //Extruder Shape
- GregtechItemList.Shape_Extruder_WindmillShaft.set(addItem(tLastID = 40, "Extruder Shape (Shaft)", "Extruder Shape for making Windmill Shafts", new Object[0]));
-
-
- //Batteries
- GregtechItemList.Battery_RE_EV_Sodium.set(addItem(tLastID = 50, "Quad Cell Sodium Battery", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.METALLUM, 2L), getTcAspectStack(TC_Aspects.POTENTIA, 2L)}));
- setElectricStats(32000 + tLastID, 3200000L, GT_Values.V[4], 4L, -3L, true);
-
- GregtechItemList.Battery_RE_EV_Cadmium.set(addItem(tLastID = 52, "Quad Cell Cadmium Battery", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.METALLUM, 1L), getTcAspectStack(TC_Aspects.POTENTIA, 1L)}));
- setElectricStats(32000 + tLastID, 4800000L, GT_Values.V[4], 4L, -3L, true);
-
- GregtechItemList.Battery_RE_EV_Lithium.set(addItem(tLastID = 54, "Quad Cell Lithium Battery", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 3L), getTcAspectStack(TC_Aspects.METALLUM, 3L), getTcAspectStack(TC_Aspects.POTENTIA, 3L)}));
- setElectricStats(32000 + tLastID, 6400000L, GT_Values.V[4], 4L, -3L, true);
-
- /*GregtechItemList.Battery_RE_EV_Sodium.set(addItem(tLastID = 50, "Quad Cell Acid Battery", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.METALLUM, 1L), getTcAspectStack(TC_Aspects.POTENTIA, 1L)}));
- setElectricStats(32000 + tLastID, 5000000L, GT_Values.V[2], 4L, -3L, true);
-
- GregtechItemList.Battery_RE_EV_Sodium.set(addItem(tLastID = 50, "Quad Cell Mercury Battery", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.METALLUM, 1L), getTcAspectStack(TC_Aspects.POTENTIA, 1L)}));
- setElectricStats(32000 + tLastID, 5000000L, GT_Values.V[2], 4L, -3L, true);*/
-
-
- //FOOOOOOOOOOOOOOD
- GregtechItemList.Food_Baked_Raisin_Bread.set(addItem(tLastID = 60, "Raisin Bread", "Extra Raisins, Just for ImQ009", new Object[]{new GT_FoodStat(5, 0.5F, EnumAction.eat, null, false, true, false, new int[0]), getTcAspectStack(TC_Aspects.CORPUS, 1L), getTcAspectStack(TC_Aspects.FAMES, 1L), getTcAspectStack(TC_Aspects.IGNIS, 1L)}));
-
-
-
- GregtechItemList.Fluid_Cell_144L.set(addItem(tLastID = 61, "144L Invar Fluid Cell", "Holds exactly one dust worth of liquid.", new Object[]{new ItemData(Materials.Invar, OrePrefixes.plate.mMaterialAmount * 8L + 4L * OrePrefixes.ring.mMaterialAmount, new MaterialStack[0]), getTcAspectStack(TC_Aspects.VACUOS, 2L), getTcAspectStack(TC_Aspects.AQUA, 1L)}));
- setFluidContainerStats(32000 + tLastID, 144L, 64L);
-
- GregtechItemList.Fluid_Cell_36L.set(addItem(tLastID = 62, "36L Brass Fluid Cell", "Holds exactly one small dust worth of liquid.", new Object[]{new ItemData(Materials.Brass, OrePrefixes.plate.mMaterialAmount * 8L + 4L * OrePrefixes.ring.mMaterialAmount, new MaterialStack[0]), getTcAspectStack(TC_Aspects.VACUOS, 2L), getTcAspectStack(TC_Aspects.AQUA, 1L)}));
- setFluidContainerStats(32000 + tLastID, 36L, 64L);
-
- GregtechItemList.Fluid_Cell_16L.set(addItem(tLastID = 63, "16L Bronze Fluid Cell", "Holds exactly one tiny dust / nugget worth of liquid.", new Object[]{new ItemData(Materials.Bronze, OrePrefixes.plate.mMaterialAmount * 8L + 4L * OrePrefixes.ring.mMaterialAmount, new MaterialStack[0]), getTcAspectStack(TC_Aspects.VACUOS, 2L), getTcAspectStack(TC_Aspects.AQUA, 1L)}));
- setFluidContainerStats(32000 + tLastID, 16L, 64L);
-
- GregtechItemList.Fluid_Cell_1L.set(addItem(tLastID = 64, "1L Wrought Iron Fluid Cell", "Holds exactly one litre worth of liquid.", new Object[]{new ItemData(Materials.WroughtIron, OrePrefixes.plate.mMaterialAmount * 8L + 4L * OrePrefixes.ring.mMaterialAmount, new MaterialStack[0]), getTcAspectStack(TC_Aspects.VACUOS, 2L), getTcAspectStack(TC_Aspects.AQUA, 1L)}));
- setFluidContainerStats(32000 + tLastID, 1L, 64L);
-
- if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.WroughtIron, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.WroughtIron, 2L), GregtechItemList.Fluid_Cell_1L.get(1L, new Object[0]), 50, 32);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Bronze, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Bronze, 2L), GregtechItemList.Fluid_Cell_16L.get(1L, new Object[0]), 50, 32);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Brass, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Brass, 2L), GregtechItemList.Fluid_Cell_36L.get(1L, new Object[0]), 75, 32);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Invar, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Invar, 2L), GregtechItemList.Fluid_Cell_144L.get(1L, new Object[0]), 75, 32);
-
- }
- else {
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 8L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.WroughtIron, 4L), GregtechItemList.Fluid_Cell_1L.get(1L, new Object[0]), 50, 32);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Bronze, 8L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Bronze, 4L), GregtechItemList.Fluid_Cell_16L.get(1L, new Object[0]), 50, 32);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Brass, 8L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Brass, 4L), GregtechItemList.Fluid_Cell_36L.get(1L, new Object[0]), 75, 32);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Invar, 8L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Invar, 4L), GregtechItemList.Fluid_Cell_144L.get(1L, new Object[0]), 75, 32);
- }
- }
+ public MetaGeneratedGregtechItems INSTANCE;
+
+ public MetaGeneratedGregtechItems() {
+ super("MU-metaitem.01", new OrePrefixes[] {
+ null
+ });
+ this.INSTANCE = this;
+ int tLastID = 0;
+
+ if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) {
+ Utils.LOG_INFO(
+ "Gregtech 5.09 not found, using fallback components. (I like how I have to add compat to something I added first and had stolen.)");
+ GregtechItemList.Electric_Pump_LuV
+ .set(this.addItem(tLastID = 0, "Electric Pump (LuV)", "163920 L/sec (as Cover)", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ Utils.getTcAspectStack(TC_Aspects.MACHINA, 1L), Utils.getTcAspectStack(TC_Aspects.ITER, 1L),
+ Utils.getTcAspectStack(TC_Aspects.AQUA, 1L)
+ }));
+ GregtechItemList.Electric_Pump_ZPM
+ .set(this.addItem(tLastID = 1, "Electric Pump (ZPM)", "655680 L/sec (as Cover)", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 2L),
+ Utils.getTcAspectStack(TC_Aspects.MACHINA, 2L), Utils.getTcAspectStack(TC_Aspects.ITER, 2L),
+ Utils.getTcAspectStack(TC_Aspects.AQUA, 2L)
+ }));
+ GregtechItemList.Electric_Pump_UV
+ .set(this.addItem(tLastID = 2, "Electric Pump (UV)", "2622720 L/sec (as Cover)", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 4L),
+ Utils.getTcAspectStack(TC_Aspects.MACHINA, 4L), Utils.getTcAspectStack(TC_Aspects.ITER, 4L),
+ Utils.getTcAspectStack(TC_Aspects.AQUA, 4L)
+ }));
+ GregtechItemList.Electric_Pump_MAX
+ .set(this.addItem(tLastID = 3, "Electric Pump (MAX)", "10490880 L/sec (as Cover)", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
+ Utils.getTcAspectStack(TC_Aspects.MACHINA, 8L), Utils.getTcAspectStack(TC_Aspects.ITER, 8L),
+ Utils.getTcAspectStack(TC_Aspects.AQUA, 8L)
+ }));
+ GregTech_API.registerCover(GregtechItemList.Electric_Pump_LuV.get(1L, new Object[0]),
+ new GT_MultiTexture(new ITexture[] {
+ Textures.BlockIcons.MACHINE_CASINGS[5][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)
+ }), new GT_Cover_Pump(8196));
+ GregTech_API.registerCover(GregtechItemList.Electric_Pump_ZPM.get(1L, new Object[0]),
+ new GT_MultiTexture(new ITexture[] {
+ Textures.BlockIcons.MACHINE_CASINGS[6][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)
+ }), new GT_Cover_Pump(32768));
+ GregTech_API.registerCover(GregtechItemList.Electric_Pump_UV.get(1L, new Object[0]),
+ new GT_MultiTexture(new ITexture[] {
+ Textures.BlockIcons.MACHINE_CASINGS[7][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)
+ }), new GT_Cover_Pump(131072));
+ GregTech_API.registerCover(GregtechItemList.Electric_Pump_MAX.get(1L, new Object[0]),
+ new GT_MultiTexture(new ITexture[] {
+ Textures.BlockIcons.MACHINE_CASINGS[8][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)
+ }), new GT_Cover_Pump(524288));
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Pump_LuV.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw",
+ // "OMW", Character.valueOf('M'),
+ // GregtechItemList.Electric_Motor_LuV, Character.valueOf('O'),
+ // OrePrefixes.ring.get(Materials.Rubber), Character.valueOf('X'),
+ // OrePrefixes.rotor.get(Materials.Tin), Character.valueOf('S'),
+ // OrePrefixes.screw.get(Materials.Tin), Character.valueOf('W'),
+ // OrePrefixes.cableGt01.get(Materials.Tin), Character.valueOf('P'),
+ // OrePrefixes.pipeMedium.get(Materials.Bronze)});
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Pump_ZPM.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw",
+ // "OMW", Character.valueOf('M'),
+ // GregtechItemList.Electric_Motor_ZPM, Character.valueOf('O'),
+ // OrePrefixes.ring.get(Materials.Rubber), Character.valueOf('X'),
+ // OrePrefixes.rotor.get(Materials.Bronze), Character.valueOf('S'),
+ // OrePrefixes.screw.get(Materials.Bronze), Character.valueOf('W'),
+ // OrePrefixes.cableGt01.get(Materials.AnyCopper),
+ // Character.valueOf('P'),
+ // OrePrefixes.pipeMedium.get(Materials.Steel)});
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Pump_UV.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw",
+ // "OMW", Character.valueOf('M'),
+ // GregtechItemList.Electric_Motor_UV, Character.valueOf('O'),
+ // OrePrefixes.ring.get(Materials.Rubber), Character.valueOf('X'),
+ // OrePrefixes.rotor.get(Materials.Steel), Character.valueOf('S'),
+ // OrePrefixes.screw.get(Materials.Steel), Character.valueOf('W'),
+ // OrePrefixes.cableGt01.get(Materials.Gold),
+ // Character.valueOf('P'),
+ // OrePrefixes.pipeMedium.get(Materials.StainlessSteel)});
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Pump_MAX.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw",
+ // "OMW", Character.valueOf('M'),
+ // GregtechItemList.Electric_Motor_MAX, Character.valueOf('O'),
+ // OrePrefixes.ring.get(Materials.Rubber), Character.valueOf('X'),
+ // OrePrefixes.rotor.get(Materials.StainlessSteel),
+ // Character.valueOf('S'),
+ // OrePrefixes.screw.get(Materials.StainlessSteel),
+ // Character.valueOf('W'),
+ // OrePrefixes.cableGt01.get(Materials.Aluminium),
+ // Character.valueOf('P'),
+ // OrePrefixes.pipeMedium.get(Materials.Titanium)});
+ tLastID = 4;
+ GregtechItemList.Electric_Motor_LuV.set(this.addItem(tLastID = 4, "Electric Motor (LuV)", "", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 1L), Utils.getTcAspectStack(TC_Aspects.MACHINA, 1L),
+ Utils.getTcAspectStack(TC_Aspects.MOTUS, 1L)
+ }));
+ GregtechItemList.Electric_Motor_ZPM.set(this.addItem(tLastID = 5, "Electric Motor (ZPM)", "", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 2L), Utils.getTcAspectStack(TC_Aspects.MACHINA, 2L),
+ Utils.getTcAspectStack(TC_Aspects.MOTUS, 2L)
+ }));
+ GregtechItemList.Electric_Motor_UV.set(this.addItem(tLastID = 6, "Electric Motor (UV)", "", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 4L), Utils.getTcAspectStack(TC_Aspects.MACHINA, 4L),
+ Utils.getTcAspectStack(TC_Aspects.MOTUS, 4L)
+ }));
+ GregtechItemList.Electric_Motor_MAX.set(this.addItem(tLastID = 7, "Electric Motor (MAX)", "", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 8L), Utils.getTcAspectStack(TC_Aspects.MACHINA, 8L),
+ Utils.getTcAspectStack(TC_Aspects.MOTUS, 8L)
+ }));
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Motor_LuV.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW",
+ // "RWC", Character.valueOf('I'),
+ // OrePrefixes.stick.get(Materials.IronMagnetic),
+ // Character.valueOf('R'), OrePrefixes.stick.get(Materials.AnyIron),
+ // Character.valueOf('W'),
+ // OrePrefixes.wireGt01.get(Materials.AnyCopper),
+ // Character.valueOf('C'),
+ // OrePrefixes.cableGt01.get(Materials.Tin)});
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Motor_ZPM.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW",
+ // "RWC", Character.valueOf('I'),
+ // OrePrefixes.stick.get(Materials.SteelMagnetic),
+ // Character.valueOf('R'),
+ // OrePrefixes.stick.get(Materials.Aluminium),
+ // Character.valueOf('W'),
+ // OrePrefixes.wireGt01.get(Materials.Electrum),
+ // Character.valueOf('C'),
+ // OrePrefixes.cableGt01.get(Materials.Silver)});
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Motor_UV.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW",
+ // "RWC", Character.valueOf('I'),
+ // OrePrefixes.stick.get(Materials.SteelMagnetic),
+ // Character.valueOf('R'),
+ // OrePrefixes.stick.get(Materials.StainlessSteel),
+ // Character.valueOf('W'),
+ // OrePrefixes.wireGt02.get(Materials.Cupronickel),
+ // Character.valueOf('C'),
+ // OrePrefixes.cableGt01.get(Materials.Gold)});
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Motor_MAX.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW",
+ // "RWC", Character.valueOf('I'),
+ // OrePrefixes.stick.get(Materials.NeodymiumMagnetic),
+ // Character.valueOf('R'),
+ // OrePrefixes.stick.get(Materials.Titanium),
+ // Character.valueOf('W'),
+ // OrePrefixes.wireGt02.get(Materials.TungstenSteel),
+ // Character.valueOf('C'),
+ // OrePrefixes.cableGt01.get(Materials.Nichrome)});
+
+ tLastID = 8;
+ GregtechItemList.Conveyor_Module_LuV.set(this.addItem(tLastID = 8, "Conveyor Module (LuV)",
+ "1 Stack every 20 secs (as Cover)", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ Utils.getTcAspectStack(TC_Aspects.MACHINA, 1L), Utils.getTcAspectStack(TC_Aspects.ITER, 1L)
+ }));
+ GregtechItemList.Conveyor_Module_ZPM.set(
+ this.addItem(tLastID = 9, "Conveyor Module (ZPM)", "1 Stack every 5 secs (as Cover)", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 2L),
+ Utils.getTcAspectStack(TC_Aspects.MACHINA, 2L), Utils.getTcAspectStack(TC_Aspects.ITER, 2L)
+ }));
+ GregtechItemList.Conveyor_Module_UV.set(
+ this.addItem(tLastID = 10, "Conveyor Module (UV)", "1 Stack every 1 sec (as Cover)", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 4L),
+ Utils.getTcAspectStack(TC_Aspects.MACHINA, 4L), Utils.getTcAspectStack(TC_Aspects.ITER, 4L)
+ }));
+ GregtechItemList.Conveyor_Module_MAX.set(this.addItem(tLastID = 11, "Conveyor Module (MAX)",
+ "1 Stack every 1/5 sec (as Cover)", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
+ Utils.getTcAspectStack(TC_Aspects.MACHINA, 8L), Utils.getTcAspectStack(TC_Aspects.ITER, 8L)
+ }));
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Conveyor_Module_LuV.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM",
+ // "RRR", Character.valueOf('M'),
+ // GregtechItemList.Electric_Motor_LuV, Character.valueOf('C'),
+ // OrePrefixes.cableGt01.get(Materials.Tin), Character.valueOf('R'),
+ // OrePrefixes.plate.get(Materials.Rubber)});
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Conveyor_Module_ZPM.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM",
+ // "RRR", Character.valueOf('M'),
+ // GregtechItemList.Electric_Motor_ZPM, Character.valueOf('C'),
+ // OrePrefixes.cableGt01.get(Materials.AnyCopper),
+ // Character.valueOf('R'),
+ // OrePrefixes.plate.get(Materials.Rubber)});
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Conveyor_Module_UV.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM",
+ // "RRR", Character.valueOf('M'),
+ // GregtechItemList.Electric_Motor_UV, Character.valueOf('C'),
+ // OrePrefixes.cableGt01.get(Materials.Gold),
+ // Character.valueOf('R'),
+ // OrePrefixes.plate.get(Materials.Rubber)});
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Conveyor_Module_MAX.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM",
+ // "RRR", Character.valueOf('M'),
+ // GregtechItemList.Electric_Motor_MAX, Character.valueOf('C'),
+ // OrePrefixes.cableGt01.get(Materials.Aluminium),
+ // Character.valueOf('R'),
+ // OrePrefixes.plate.get(Materials.Rubber)});
+ GregTech_API.registerCover(GregtechItemList.Conveyor_Module_LuV.get(1L, new Object[0]),
+ new GT_MultiTexture(new ITexture[] {
+ Textures.BlockIcons.MACHINE_CASINGS[1][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)
+ }), new GT_Cover_Conveyor(400));
+ GregTech_API.registerCover(GregtechItemList.Conveyor_Module_ZPM.get(1L, new Object[0]),
+ new GT_MultiTexture(new ITexture[] {
+ Textures.BlockIcons.MACHINE_CASINGS[2][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)
+ }), new GT_Cover_Conveyor(100));
+ GregTech_API.registerCover(GregtechItemList.Conveyor_Module_UV.get(1L, new Object[0]),
+ new GT_MultiTexture(new ITexture[] {
+ Textures.BlockIcons.MACHINE_CASINGS[3][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)
+ }), new GT_Cover_Conveyor(20));
+ GregTech_API.registerCover(GregtechItemList.Conveyor_Module_MAX.get(1L, new Object[0]),
+ new GT_MultiTexture(new ITexture[] {
+ Textures.BlockIcons.MACHINE_CASINGS[4][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)
+ }), new GT_Cover_Conveyor(4));
+ tLastID = 12;
+ GregtechItemList.Electric_Piston_LuV
+ .set(this.addItem(tLastID = 12, "Electric Piston (LuV)", "", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ Utils.getTcAspectStack(TC_Aspects.MACHINA, 2L), Utils.getTcAspectStack(TC_Aspects.MOTUS, 1L)
+ }));
+ GregtechItemList.Electric_Piston_ZPM
+ .set(this.addItem(tLastID = 13, "Electric Piston (ZPM)", "", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 2L),
+ Utils.getTcAspectStack(TC_Aspects.MACHINA, 4L), Utils.getTcAspectStack(TC_Aspects.MOTUS, 2L)
+ }));
+ GregtechItemList.Electric_Piston_UV
+ .set(this.addItem(tLastID = 14, "Electric Piston (UV)", "", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 4L),
+ Utils.getTcAspectStack(TC_Aspects.MACHINA, 8L), Utils.getTcAspectStack(TC_Aspects.MOTUS, 4L)
+ }));
+ GregtechItemList.Electric_Piston_MAX
+ .set(this.addItem(tLastID = 15, "Electric Piston (MAX)", "", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
+ Utils.getTcAspectStack(TC_Aspects.MACHINA, 16L),
+ Utils.getTcAspectStack(TC_Aspects.MOTUS, 8L)
+ }));
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Piston_LuV.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS",
+ // "CMG", Character.valueOf('P'),
+ // OrePrefixes.plate.get(Materials.Steel), Character.valueOf('S'),
+ // OrePrefixes.stick.get(Materials.Steel), Character.valueOf('G'),
+ // OrePrefixes.gearGtSmall.get(Materials.Steel),
+ // Character.valueOf('M'), GregtechItemList.Electric_Motor_LuV,
+ // Character.valueOf('C'),
+ // OrePrefixes.cableGt01.get(Materials.Tin)});
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Piston_ZPM.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS",
+ // "CMG", Character.valueOf('P'),
+ // OrePrefixes.plate.get(Materials.Aluminium),
+ // Character.valueOf('S'),
+ // OrePrefixes.stick.get(Materials.Aluminium),
+ // Character.valueOf('G'),
+ // OrePrefixes.gearGtSmall.get(Materials.Aluminium),
+ // Character.valueOf('M'), GregtechItemList.Electric_Motor_ZPM,
+ // Character.valueOf('C'),
+ // OrePrefixes.cableGt01.get(Materials.AnyCopper)});
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Piston_UV.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS",
+ // "CMG", Character.valueOf('P'),
+ // OrePrefixes.plate.get(Materials.StainlessSteel),
+ // Character.valueOf('S'),
+ // OrePrefixes.stick.get(Materials.StainlessSteel),
+ // Character.valueOf('G'),
+ // OrePrefixes.gearGtSmall.get(Materials.StainlessSteel),
+ // Character.valueOf('M'), GregtechItemList.Electric_Motor_UV,
+ // Character.valueOf('C'),
+ // OrePrefixes.cableGt01.get(Materials.Gold)});
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Piston_MAX.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS",
+ // "CMG", Character.valueOf('P'),
+ // OrePrefixes.plate.get(Materials.Titanium),
+ // Character.valueOf('S'),
+ // OrePrefixes.stick.get(Materials.Titanium),
+ // Character.valueOf('G'),
+ // OrePrefixes.gearGtSmall.get(Materials.Titanium),
+ // Character.valueOf('M'), GregtechItemList.Electric_Motor_MAX,
+ // Character.valueOf('C'),
+ // OrePrefixes.cableGt01.get(Materials.Aluminium)});
+ tLastID = 16;
+ GregtechItemList.Robot_Arm_LuV.set(this.addItem(tLastID = 16, "Robot Arm (LuV)",
+ "Inserts into specific Slots (as Cover)", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ Utils.getTcAspectStack(TC_Aspects.MACHINA, 2L),
+ Utils.getTcAspectStack(TC_Aspects.MOTUS, 1L), Utils.getTcAspectStack("COGNITIO", 1L)
+ }));
+ GregtechItemList.Robot_Arm_ZPM.set(this.addItem(tLastID = 17, "Robot Arm (ZPM)",
+ "Inserts into specific Slots (as Cover)", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 2L),
+ Utils.getTcAspectStack(TC_Aspects.MACHINA, 4L),
+ Utils.getTcAspectStack(TC_Aspects.MOTUS, 2L), Utils.getTcAspectStack("COGNITIO", 2L)
+ }));
+ GregtechItemList.Robot_Arm_UV.set(this.addItem(tLastID = 18, "Robot Arm (UV)",
+ "Inserts into specific Slots (as Cover)", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 4L),
+ Utils.getTcAspectStack(TC_Aspects.MACHINA, 8L),
+ Utils.getTcAspectStack(TC_Aspects.MOTUS, 4L), Utils.getTcAspectStack("COGNITIO", 4L)
+ }));
+ GregtechItemList.Robot_Arm_MAX.set(this.addItem(tLastID = 19, "Robot Arm (MAX)",
+ "Inserts into specific Slots (as Cover)", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
+ Utils.getTcAspectStack(TC_Aspects.MACHINA, 16L),
+ Utils.getTcAspectStack(TC_Aspects.MOTUS, 8L), Utils.getTcAspectStack("COGNITIO", 8L)
+ }));
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Robot_Arm_LuV.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM",
+ // "PES", Character.valueOf('S'),
+ // OrePrefixes.stick.get(Materials.Steel), Character.valueOf('M'),
+ // GregtechItemList.Electric_Motor_LuV, Character.valueOf('P'),
+ // GregtechItemList.Electric_Piston_LuV, Character.valueOf('E'),
+ // OrePrefixes.circuit.get(Materials.Basic), Character.valueOf('C'),
+ // OrePrefixes.cableGt01.get(Materials.Tin)});
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Robot_Arm_ZPM.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM",
+ // "PES", Character.valueOf('S'),
+ // OrePrefixes.stick.get(Materials.Aluminium),
+ // Character.valueOf('M'), GregtechItemList.Electric_Motor_ZPM,
+ // Character.valueOf('P'), GregtechItemList.Electric_Piston_ZPM,
+ // Character.valueOf('E'), OrePrefixes.circuit.get(Materials.Good),
+ // Character.valueOf('C'),
+ // OrePrefixes.cableGt01.get(Materials.AnyCopper)});
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Robot_Arm_UV.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM",
+ // "PES", Character.valueOf('S'),
+ // OrePrefixes.stick.get(Materials.StainlessSteel),
+ // Character.valueOf('M'), GregtechItemList.Electric_Motor_UV,
+ // Character.valueOf('P'), GregtechItemList.Electric_Piston_UV,
+ // Character.valueOf('E'),
+ // OrePrefixes.circuit.get(Materials.Advanced),
+ // Character.valueOf('C'),
+ // OrePrefixes.cableGt01.get(Materials.Gold)});
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Robot_Arm_MAX.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM",
+ // "PES", Character.valueOf('S'),
+ // OrePrefixes.stick.get(Materials.Titanium),
+ // Character.valueOf('M'), GregtechItemList.Electric_Motor_MAX,
+ // Character.valueOf('P'), GregtechItemList.Electric_Piston_MAX,
+ // Character.valueOf('E'), OrePrefixes.circuit.get(Materials.Elite),
+ // Character.valueOf('C'),
+ // OrePrefixes.cableGt01.get(Materials.Aluminium)});
+ GregTech_API.registerCover(GregtechItemList.Robot_Arm_LuV.get(1L, new Object[0]),
+ new GT_MultiTexture(new ITexture[] {
+ Textures.BlockIcons.MACHINE_CASINGS[1][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)
+ }), new GT_Cover_Arm(400));
+ GregTech_API.registerCover(GregtechItemList.Robot_Arm_ZPM.get(1L, new Object[0]),
+ new GT_MultiTexture(new ITexture[] {
+ Textures.BlockIcons.MACHINE_CASINGS[2][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)
+ }), new GT_Cover_Arm(100));
+ GregTech_API.registerCover(GregtechItemList.Robot_Arm_UV.get(1L, new Object[0]),
+ new GT_MultiTexture(new ITexture[] {
+ Textures.BlockIcons.MACHINE_CASINGS[3][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)
+ }), new GT_Cover_Arm(20));
+ GregTech_API.registerCover(GregtechItemList.Robot_Arm_MAX.get(1L, new Object[0]),
+ new GT_MultiTexture(new ITexture[] {
+ Textures.BlockIcons.MACHINE_CASINGS[4][0],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)
+ }), new GT_Cover_Arm(4));
+ tLastID = 20;
+ GregtechItemList.Field_Generator_LuV
+ .set(this.addItem(tLastID = 20, "Field Generator (LuV)", "", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 2L),
+ Utils.getTcAspectStack(TC_Aspects.MACHINA, 1L),
+ Utils.getTcAspectStack(TC_Aspects.TUTAMEN, 1L)
+ }));
+ GregtechItemList.Field_Generator_ZPM
+ .set(this.addItem(tLastID = 21, "Field Generator (ZPM)", "", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 4L),
+ Utils.getTcAspectStack(TC_Aspects.MACHINA, 2L),
+ Utils.getTcAspectStack(TC_Aspects.TUTAMEN, 2L)
+ }));
+ GregtechItemList.Field_Generator_UV
+ .set(this.addItem(tLastID = 22, "Field Generator (UV)", "", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
+ Utils.getTcAspectStack(TC_Aspects.MACHINA, 4L),
+ Utils.getTcAspectStack(TC_Aspects.TUTAMEN, 4L)
+ }));
+ GregtechItemList.Field_Generator_MAX
+ .set(this.addItem(tLastID = 23, "Field Generator (MAX)", "", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 16L),
+ Utils.getTcAspectStack(TC_Aspects.MACHINA, 8L),
+ Utils.getTcAspectStack(TC_Aspects.TUTAMEN, 8L)
+ }));
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Field_Generator_LuV.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC",
+ // "WCW", Character.valueOf('G'),
+ // OrePrefixes.gem.get(Materials.EnderPearl),
+ // Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Basic),
+ // Character.valueOf('W'),
+ // OrePrefixes.wireGt01.get(Materials.Osmium)});
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Field_Generator_ZPM.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC",
+ // "WCW", Character.valueOf('G'),
+ // OrePrefixes.gem.get(Materials.EnderEye), Character.valueOf('C'),
+ // OrePrefixes.circuit.get(Materials.Good), Character.valueOf('W'),
+ // OrePrefixes.wireGt02.get(Materials.Osmium)});
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Field_Generator_UV.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC",
+ // "WCW", Character.valueOf('G'),
+ // OrePrefixes.gem.get(Materials.NetherStar),
+ // Character.valueOf('C'),
+ // OrePrefixes.circuit.get(Materials.Advanced),
+ // Character.valueOf('W'),
+ // OrePrefixes.wireGt04.get(Materials.Osmium)});
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Field_Generator_MAX.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC",
+ // "WCW", Character.valueOf('G'),
+ // OrePrefixes.gem.get(Materials.NetherStar),
+ // Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Elite),
+ // Character.valueOf('W'),
+ // OrePrefixes.wireGt08.get(Materials.Osmium)});
+ tLastID = 24;
+ GregtechItemList.Emitter_LuV.set(this.addItem(tLastID = 24, "Emitter (LuV)", "", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 1L), Utils.getTcAspectStack(TC_Aspects.MACHINA, 1L),
+ Utils.getTcAspectStack(TC_Aspects.LUX, 1L)
+ }));
+ GregtechItemList.Emitter_ZPM.set(this.addItem(tLastID = 25, "Emitter (ZPM)", "", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 2L), Utils.getTcAspectStack(TC_Aspects.MACHINA, 2L),
+ Utils.getTcAspectStack(TC_Aspects.LUX, 2L)
+ }));
+ GregtechItemList.Emitter_UV.set(this.addItem(tLastID = 26, "Emitter (UV)", "", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 4L), Utils.getTcAspectStack(TC_Aspects.MACHINA, 4L),
+ Utils.getTcAspectStack(TC_Aspects.LUX, 4L)
+ }));
+ GregtechItemList.Emitter_MAX.set(this.addItem(tLastID = 27, "Emitter (MAX)", "", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 8L), Utils.getTcAspectStack(TC_Aspects.MACHINA, 8L),
+ Utils.getTcAspectStack(TC_Aspects.LUX, 8L)
+ }));
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Emitter_LuV.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS",
+ // "CWS", Character.valueOf('Q'),
+ // OrePrefixes.gem.get(Materials.Quartzite), Character.valueOf('S'),
+ // OrePrefixes.stick.get(Materials.Brass), Character.valueOf('C'),
+ // OrePrefixes.circuit.get(Materials.Basic), Character.valueOf('W'),
+ // OrePrefixes.cableGt01.get(Materials.Tin)});
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Emitter_ZPM.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS",
+ // "CWS", Character.valueOf('Q'),
+ // OrePrefixes.gem.get(Materials.NetherQuartz),
+ // Character.valueOf('S'),
+ // OrePrefixes.stick.get(Materials.Electrum),
+ // Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Good),
+ // Character.valueOf('W'),
+ // OrePrefixes.cableGt01.get(Materials.AnyCopper)});
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Emitter_UV.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS",
+ // "CWS", Character.valueOf('Q'),
+ // OrePrefixes.gem.get(Materials.Emerald), Character.valueOf('S'),
+ // OrePrefixes.stick.get(Materials.Chrome), Character.valueOf('C'),
+ // OrePrefixes.circuit.get(Materials.Advanced),
+ // Character.valueOf('W'),
+ // OrePrefixes.cableGt01.get(Materials.Gold)});
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Emitter_MAX.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS",
+ // "CWS", Character.valueOf('Q'),
+ // OrePrefixes.gem.get(Materials.EnderPearl),
+ // Character.valueOf('S'),
+ // OrePrefixes.stick.get(Materials.Platinum),
+ // Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Elite),
+ // Character.valueOf('W'),
+ // OrePrefixes.cableGt01.get(Materials.Aluminium)});
+ tLastID = 28;
+ GregtechItemList.Sensor_LuV.set(this.addItem(tLastID = 28, "Sensor (LuV)", "", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 1L), Utils.getTcAspectStack(TC_Aspects.MACHINA, 1L),
+ Utils.getTcAspectStack(TC_Aspects.SENSUS, 1L)
+ }));
+ GregtechItemList.Sensor_ZPM.set(this.addItem(tLastID = 29, "Sensor (ZPM)", "", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 2L), Utils.getTcAspectStack(TC_Aspects.MACHINA, 2L),
+ Utils.getTcAspectStack(TC_Aspects.SENSUS, 2L)
+ }));
+ GregtechItemList.Sensor_UV.set(this.addItem(tLastID = 30, "Sensor (UV)", "", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 4L), Utils.getTcAspectStack(TC_Aspects.MACHINA, 4L),
+ Utils.getTcAspectStack(TC_Aspects.SENSUS, 4L)
+ }));
+ GregtechItemList.Sensor_MAX.set(this.addItem(tLastID = 31, "Sensor (MAX)", "", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 8L), Utils.getTcAspectStack(TC_Aspects.MACHINA, 8L),
+ Utils.getTcAspectStack(TC_Aspects.SENSUS, 8L)
+ }));
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Sensor_LuV.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ",
+ // "CPP", Character.valueOf('Q'),
+ // OrePrefixes.gem.get(Materials.Quartzite), Character.valueOf('S'),
+ // OrePrefixes.stick.get(Materials.Brass), Character.valueOf('P'),
+ // OrePrefixes.plate.get(Materials.Steel), Character.valueOf('C'),
+ // OrePrefixes.circuit.get(Materials.Basic)});
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Sensor_ZPM.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ",
+ // "CPP", Character.valueOf('Q'),
+ // OrePrefixes.gem.get(Materials.NetherQuartz),
+ // Character.valueOf('S'),
+ // OrePrefixes.stick.get(Materials.Electrum),
+ // Character.valueOf('P'),
+ // OrePrefixes.plate.get(Materials.Aluminium),
+ // Character.valueOf('C'),
+ // OrePrefixes.circuit.get(Materials.Good)});
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Sensor_UV.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ",
+ // "CPP", Character.valueOf('Q'),
+ // OrePrefixes.gem.get(Materials.Emerald), Character.valueOf('S'),
+ // OrePrefixes.stick.get(Materials.Chrome), Character.valueOf('P'),
+ // OrePrefixes.plate.get(Materials.StainlessSteel),
+ // Character.valueOf('C'),
+ // OrePrefixes.circuit.get(Materials.Advanced)});
+ // GT_ModHandler.addCraftingRecipe(GregtechItemList.Sensor_MAX.get(1L,
+ // new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE |
+ // //GT_ModHandler.RecipeBits.NOT_REMOVABLE |
+ // //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ",
+ // "CPP", Character.valueOf('Q'),
+ // OrePrefixes.gem.get(Materials.EnderPearl),
+ // Character.valueOf('S'),
+ // OrePrefixes.stick.get(Materials.Platinum),
+ // Character.valueOf('P'),
+ // OrePrefixes.plate.get(Materials.Titanium),
+ // Character.valueOf('C'),
+ // OrePrefixes.circuit.get(Materials.Elite)});
+
+ }
+
+ else {
+ GregtechItemList.Electric_Pump_MAX.set(this.addItem(tLastID = 3, "Electric Pump (MAX)", "", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 8L), Utils.getTcAspectStack(TC_Aspects.MACHINA, 8L),
+ Utils.getTcAspectStack(TC_Aspects.ITER, 8L), Utils.getTcAspectStack(TC_Aspects.AQUA, 8L)
+ }));
+ GregtechItemList.Electric_Motor_MAX.set(this.addItem(tLastID = 7, "Electric Motor (MAX)", "", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 8L), Utils.getTcAspectStack(TC_Aspects.MACHINA, 8L),
+ Utils.getTcAspectStack(TC_Aspects.MOTUS, 8L)
+ }));
+ GregtechItemList.Conveyor_Module_MAX
+ .set(this.addItem(tLastID = 11, "Conveyor Module (MAX)", "", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
+ Utils.getTcAspectStack(TC_Aspects.MACHINA, 8L), Utils.getTcAspectStack(TC_Aspects.ITER, 8L)
+ }));
+ GregtechItemList.Electric_Piston_MAX
+ .set(this.addItem(tLastID = 15, "Electric Piston (MAX)", "", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
+ Utils.getTcAspectStack(TC_Aspects.MACHINA, 16L),
+ Utils.getTcAspectStack(TC_Aspects.MOTUS, 8L)
+ }));
+ GregtechItemList.Robot_Arm_MAX.set(this.addItem(tLastID = 19, "Robot Arm (MAX)", "", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 8L), Utils.getTcAspectStack(TC_Aspects.MACHINA, 16L),
+ Utils.getTcAspectStack(TC_Aspects.MOTUS, 8L), Utils.getTcAspectStack("COGNITIO", 8L)
+ }));
+ GregtechItemList.Field_Generator_MAX
+ .set(this.addItem(tLastID = 23, "Field Generator (MAX)", "", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 16L),
+ Utils.getTcAspectStack(TC_Aspects.MACHINA, 8L),
+ Utils.getTcAspectStack(TC_Aspects.TUTAMEN, 8L)
+ }));
+ GregtechItemList.Emitter_MAX.set(this.addItem(tLastID = 27, "Emitter (MAX)", "", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 8L), Utils.getTcAspectStack(TC_Aspects.MACHINA, 8L),
+ Utils.getTcAspectStack(TC_Aspects.LUX, 8L)
+ }));
+ GregtechItemList.Sensor_MAX.set(this.addItem(tLastID = 31, "Sensor (MAX)", "", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 8L), Utils.getTcAspectStack(TC_Aspects.MACHINA, 8L),
+ Utils.getTcAspectStack(TC_Aspects.SENSUS, 8L)
+ }));
+
+ }
+
+ GregtechItemList.Circuit_IV
+ .set(this.addItem(tLastID = 704, "Symbiotic Circuit (IV)", "A Symbiotic Data Processor", new Object[] {
+ GregtechOrePrefixes.circuit.get(GT_Materials.Symbiotic)
+ }));
+ GregtechItemList.Circuit_LuV.set(
+ this.addItem(tLastID = 705, "Neutronic Circuit (LuV)", "A Neutron Particle Processor", new Object[] {
+ GregtechOrePrefixes.circuit.get(GT_Materials.Neutronic)
+ }));
+ GregtechItemList.Circuit_ZPM
+ .set(this.addItem(tLastID = 706, "Quantum Circuit (ZPM)", "A Singlularity Processor", new Object[] {
+ GregtechOrePrefixes.circuit.get(GT_Materials.Quantum)
+ }));
+ GregtechItemList.Circuit_Board_IV.set(
+ this.addItem(tLastID = 710, "IV Circuit Board", "An IV Voltage Rated Circuit Board", new Object[0]));
+ GregtechItemList.Circuit_Board_LuV.set(
+ this.addItem(tLastID = 711, "LuV Circuit Board", "An LuV Voltage Rated Circuit Board", new Object[0]));
+ GregtechItemList.Circuit_Board_ZPM.set(this.addItem(tLastID = 712, "ZPM Processor Board",
+ "A ZPM Voltage Rated Processor Board", new Object[0]));
+ GregtechItemList.Circuit_Parts_Crystal_Chip_IV
+ .set(this.addItem(tLastID = 713, "(IV) Energized Crystal Chip", "Needed for Circuits", new Object[0]));
+ GregtechItemList.Circuit_Parts_Crystal_Chip_LuV.set(
+ this.addItem(tLastID = 714, "(LuV) Neutron based Microchip", "Needed for Circuits", new Object[0]));
+ GregtechItemList.Circuit_Parts_Crystal_Chip_ZPM
+ .set(this.addItem(tLastID = 715, "(ZPM) Quantum Chip", "Needed for Circuits", new Object[0]));
+ GregtechItemList.Circuit_Parts_IV
+ .set(this.addItem(tLastID = 716, "(IV) Energized Circuit Parts", "Circuit Parts", new Object[0]));
+ GregtechItemList.Circuit_Parts_LuV
+ .set(this.addItem(tLastID = 717, "(LuV) Neutron-based Circuit Parts", "Circuit Parts", new Object[0]));
+ GregtechItemList.Circuit_Parts_ZPM
+ .set(this.addItem(tLastID = 718, "(ZPM) Quantum Circuit Parts", "Circuit Parts", new Object[0]));
+ GregtechItemList.Circuit_Parts_Wiring_IV
+ .set(this.addItem(tLastID = 719, "Etched IV Voltage Wiring", "Part of Circuit Boards", new Object[0]));
+ GregtechItemList.Circuit_Parts_Wiring_LuV
+ .set(this.addItem(tLastID = 720, "Etched LuV Voltage Wiring", "Part of Circuit Boards", new Object[0]));
+ GregtechItemList.Circuit_Parts_Wiring_ZPM
+ .set(this.addItem(tLastID = 721, "Etched ZPM Voltage Wiring", "Part of Circuit Boards", new Object[0]));
+
+ // Extruder Shape
+ GregtechItemList.Shape_Extruder_WindmillShaft.set(this.addItem(tLastID = 40, "Extruder Shape (Shaft)",
+ "Extruder Shape for making Windmill Shafts", new Object[0]));
+
+ // Batteries
+ GregtechItemList.Battery_RE_EV_Sodium
+ .set(this.addItem(tLastID = 50, "Quad Cell Sodium Battery", "Reusable", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 2L),
+ Utils.getTcAspectStack(TC_Aspects.METALLUM, 2L), Utils.getTcAspectStack(TC_Aspects.POTENTIA, 2L)
+ }));
+ this.setElectricStats(32000 + tLastID, 3200000L, GT_Values.V[4], 4L, -3L, true);
+
+ GregtechItemList.Battery_RE_EV_Cadmium
+ .set(this.addItem(tLastID = 52, "Quad Cell Cadmium Battery", "Reusable", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ Utils.getTcAspectStack(TC_Aspects.METALLUM, 1L), Utils.getTcAspectStack(TC_Aspects.POTENTIA, 1L)
+ }));
+ this.setElectricStats(32000 + tLastID, 4800000L, GT_Values.V[4], 4L, -3L, true);
+
+ GregtechItemList.Battery_RE_EV_Lithium
+ .set(this.addItem(tLastID = 54, "Quad Cell Lithium Battery", "Reusable", new Object[] {
+ Utils.getTcAspectStack(TC_Aspects.ELECTRUM, 3L),
+ Utils.getTcAspectStack(TC_Aspects.METALLUM, 3L), Utils.getTcAspectStack(TC_Aspects.POTENTIA, 3L)
+ }));
+ this.setElectricStats(32000 + tLastID, 6400000L, GT_Values.V[4], 4L, -3L, true);
+
+ /*
+ * GregtechItemList.Battery_RE_EV_Sodium.set(addItem(tLastID = 50,
+ * "Quad Cell Acid Battery", "Reusable", new
+ * Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ * getTcAspectStack(TC_Aspects.METALLUM, 1L),
+ * getTcAspectStack(TC_Aspects.POTENTIA, 1L)})); setElectricStats(32000
+ * + tLastID, 5000000L, GT_Values.V[2], 4L, -3L, true);
+ *
+ * GregtechItemList.Battery_RE_EV_Sodium.set(addItem(tLastID = 50,
+ * "Quad Cell Mercury Battery", "Reusable", new
+ * Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
+ * getTcAspectStack(TC_Aspects.METALLUM, 1L),
+ * getTcAspectStack(TC_Aspects.POTENTIA, 1L)})); setElectricStats(32000
+ * + tLastID, 5000000L, GT_Values.V[2], 4L, -3L, true);
+ */
+
+ // FOOOOOOOOOOOOOOD
+ GregtechItemList.Food_Baked_Raisin_Bread
+ .set(this.addItem(tLastID = 60, "Raisin Bread", "Extra Raisins, Just for ImQ009", new Object[] {
+ new GT_FoodStat(5, 0.5F, EnumAction.eat, null, false, true, false, new int[0]),
+ Utils.getTcAspectStack(TC_Aspects.CORPUS, 1L), Utils.getTcAspectStack(TC_Aspects.FAMES, 1L),
+ Utils.getTcAspectStack(TC_Aspects.IGNIS, 1L)
+ }));
+
+ GregtechItemList.Fluid_Cell_144L.set(this.addItem(tLastID = 61, "144L Invar Fluid Cell",
+ "Holds exactly one dust worth of liquid.", new Object[] {
+ new ItemData(Materials.Invar,
+ OrePrefixes.plate.mMaterialAmount * 8L + 4L * OrePrefixes.ring.mMaterialAmount,
+ new MaterialStack[0]),
+ Utils.getTcAspectStack(TC_Aspects.VACUOS, 2L), Utils.getTcAspectStack(TC_Aspects.AQUA, 1L)
+ }));
+ this.setFluidContainerStats(32000 + tLastID, 144L, 64L);
+
+ GregtechItemList.Fluid_Cell_36L.set(this.addItem(tLastID = 62, "36L Brass Fluid Cell",
+ "Holds exactly one small dust worth of liquid.", new Object[] {
+ new ItemData(Materials.Brass,
+ OrePrefixes.plate.mMaterialAmount * 8L + 4L * OrePrefixes.ring.mMaterialAmount,
+ new MaterialStack[0]),
+ Utils.getTcAspectStack(TC_Aspects.VACUOS, 2L), Utils.getTcAspectStack(TC_Aspects.AQUA, 1L)
+ }));
+ this.setFluidContainerStats(32000 + tLastID, 36L, 64L);
+
+ GregtechItemList.Fluid_Cell_16L.set(this.addItem(tLastID = 63, "16L Bronze Fluid Cell",
+ "Holds exactly one tiny dust / nugget worth of liquid.", new Object[] {
+ new ItemData(Materials.Bronze,
+ OrePrefixes.plate.mMaterialAmount * 8L + 4L * OrePrefixes.ring.mMaterialAmount,
+ new MaterialStack[0]),
+ Utils.getTcAspectStack(TC_Aspects.VACUOS, 2L), Utils.getTcAspectStack(TC_Aspects.AQUA, 1L)
+ }));
+ this.setFluidContainerStats(32000 + tLastID, 16L, 64L);
+
+ GregtechItemList.Fluid_Cell_1L.set(this.addItem(tLastID = 64, "1L Wrought Iron Fluid Cell",
+ "Holds exactly one litre worth of liquid.", new Object[] {
+ new ItemData(Materials.WroughtIron,
+ OrePrefixes.plate.mMaterialAmount * 8L + 4L * OrePrefixes.ring.mMaterialAmount,
+ new MaterialStack[0]),
+ Utils.getTcAspectStack(TC_Aspects.VACUOS, 2L), Utils.getTcAspectStack(TC_Aspects.AQUA, 1L)
+ }));
+ this.setFluidContainerStats(32000 + tLastID, 1L, 64L);
+
+ if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) {
+ GT_Values.RA.addAssemblerRecipe(
+ GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.WroughtIron, 1L),
+ GT_OreDictUnificator.get(OrePrefixes.ring, Materials.WroughtIron, 2L),
+ GregtechItemList.Fluid_Cell_1L.get(1L, new Object[0]), 50, 32);
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Bronze, 1L),
+ GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Bronze, 2L),
+ GregtechItemList.Fluid_Cell_16L.get(1L, new Object[0]), 50, 32);
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Brass, 1L),
+ GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Brass, 2L),
+ GregtechItemList.Fluid_Cell_36L.get(1L, new Object[0]), 75, 32);
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Invar, 1L),
+ GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Invar, 2L),
+ GregtechItemList.Fluid_Cell_144L.get(1L, new Object[0]), 75, 32);
+
+ }
+ else {
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 8L),
+ GT_OreDictUnificator.get(OrePrefixes.ring, Materials.WroughtIron, 4L),
+ GregtechItemList.Fluid_Cell_1L.get(1L, new Object[0]), 50, 32);
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Bronze, 8L),
+ GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Bronze, 4L),
+ GregtechItemList.Fluid_Cell_16L.get(1L, new Object[0]), 50, 32);
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Brass, 8L),
+ GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Brass, 4L),
+ GregtechItemList.Fluid_Cell_36L.get(1L, new Object[0]), 75, 32);
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Invar, 8L),
+ GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Invar, 4L),
+ GregtechItemList.Fluid_Cell_144L.get(1L, new Object[0]), 75, 32);
+ }
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java
index d5bd4c134c..bea883120d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java
@@ -9,23 +9,19 @@ import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_Choocher;
public class MetaGeneratedGregtechTools extends GT_MetaGenerated_Tool {
- public static final short SKOOKUM_CHOOCHER = 7734;
- public static MetaGeneratedGregtechTools INSTANCE;
+ public static final short SKOOKUM_CHOOCHER = 7734;
+ public static MetaGeneratedGregtechTools INSTANCE;
public MetaGeneratedGregtechTools() {
super("plusplus.metatool.01");
- INSTANCE = this;
- GregTech_API.registerTool(
- addTool(
- SKOOKUM_CHOOCHER, "Skookum Choocher",
- "Can Really Chooch. Does a Skookum job at Hammering and Wrenching stuff.",
- new TOOL_Gregtech_Choocher(),
- new Object[]{GregtechToolDictNames.craftingToolSkookumChoocher,
- ToolDictNames.craftingToolHardHammer,
- ToolDictNames.craftingToolWrench,
- new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)}),
- GregTech_API.sWrenchList);
+ MetaGeneratedGregtechTools.INSTANCE = this;
+ GregTech_API.registerTool(this.addTool(MetaGeneratedGregtechTools.SKOOKUM_CHOOCHER, "Skookum Choocher",
+ "Can Really Chooch. Does a Skookum job at Hammering and Wrenching stuff.", new TOOL_Gregtech_Choocher(),
+ new Object[] {
+ GregtechToolDictNames.craftingToolSkookumChoocher, ToolDictNames.craftingToolHardHammer,
+ ToolDictNames.craftingToolWrench, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)
+ }), GregTech_API.sWrenchList);
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java
index b247a6a157..14828fd3a3 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java
@@ -10,58 +10,64 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
-public class Behaviour_Choocher
-extends Behaviour_None {
- private boolean isWrench = true;
- private final Behaviour_Wrench wrench = new Behaviour_Wrench(150);
- private final Behaviour_Prospecting_Ex prospecting = new Behaviour_Prospecting_Ex(10, 1250);
- private String mTooltip1 = GT_LanguageManager.addStringLocalization("gt.behaviour.choochering1", "Current tool mode: ");
- private String mTooltip2 = GT_LanguageManager.addStringLocalization("gt.behaviour.choochering2", "Change tool mode using Shift+Rightclick.");
- private final String mTooltipH = GT_LanguageManager.addStringLocalization("gt.behaviour.prospectingEx", "Usable for Prospecting large areas.");
- private final String mTooltipW = GT_LanguageManager.addStringLocalization("gt.behaviour.wrench", "Rotates Blocks on Rightclick.");
+public class Behaviour_Choocher extends Behaviour_None {
+ private boolean isWrench = true;
+ private final Behaviour_Wrench wrench = new Behaviour_Wrench(150);
+ private final Behaviour_Prospecting_Ex prospecting = new Behaviour_Prospecting_Ex(10, 1250);
+ private final String mTooltip1 = GT_LanguageManager
+ .addStringLocalization("gt.behaviour.choochering1", "Current tool mode: ");
+ private final String mTooltip2 = GT_LanguageManager
+ .addStringLocalization("gt.behaviour.choochering2", "Change tool mode using Shift+Rightclick.");
+ private final String mTooltipH = GT_LanguageManager
+ .addStringLocalization("gt.behaviour.prospectingEx", "Usable for Prospecting large areas.");
+ private final String mTooltipW = GT_LanguageManager
+ .addStringLocalization("gt.behaviour.wrench", "Rotates Blocks on Rightclick.");
public Behaviour_Choocher() {
}
@Override
- public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
+ public List<String> getAdditionalToolTips(final GT_MetaBase_Item aItem, final List<String> aList,
+ final ItemStack aStack) {
+
+ if (this.isWrench) {
+ aList.add(this.mTooltip1 + "Wrench");
+ aList.add(this.mTooltipW);
+ }
+ else {
+ aList.add(this.mTooltip1 + "Prospecting");
+ aList.add(this.mTooltipH);
+ }
+ aList.add(this.mTooltip2);
+
+ return aList;
+ }
+
+ @Override
+ public boolean onItemUseFirst(final GT_MetaBase_Item aItem, final ItemStack aStack, final EntityPlayer aPlayer,
+ final World aWorld, final int aX, final int aY, final int aZ, final int aSide, final float hitX,
+ final float hitY, final float hitZ) {
if (aWorld.isRemote) {
return false;
}
- if (aPlayer.isSneaking()){
- if (isWrench){
- isWrench = false;
+ if (aPlayer.isSneaking()) {
+ if (this.isWrench) {
+ this.isWrench = false;
return false;
}
- isWrench = true;
+ this.isWrench = true;
return false;
}
- else if (!aPlayer.isSneaking()){
- if (isWrench){
- wrench.onItemUseFirst(aItem, aStack, aPlayer, aWorld, aSide, aSide, aSide, aSide, hitZ, hitZ, hitZ);
+ else if (!aPlayer.isSneaking()) {
+ if (this.isWrench) {
+ this.wrench.onItemUseFirst(aItem, aStack, aPlayer, aWorld, aSide, aSide, aSide, aSide, hitZ, hitZ,
+ hitZ);
return false;
}
- prospecting.onItemUseFirst(aItem, aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ);
+ this.prospecting.onItemUseFirst(aItem, aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ);
return false;
}
return false;
}
-
- @Override
- public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) {
-
-
- if (isWrench){
- aList.add(this.mTooltip1+"Wrench");
- aList.add(this.mTooltipW);
- }
- else {
- aList.add(this.mTooltip1+"Prospecting");
- aList.add(this.mTooltipH);
- }
- aList.add(this.mTooltip2);
-
- return aList;
- }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Prospecting_Ex.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Prospecting_Ex.java
index 70eaec83d8..b996618ed2 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Prospecting_Ex.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Prospecting_Ex.java
@@ -20,99 +20,113 @@ import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.IFluidBlock;
-public class Behaviour_Prospecting_Ex
- extends Behaviour_Prospecting {
- private final int mVanillaCosts;
- private final int mEUCosts;
+public class Behaviour_Prospecting_Ex extends Behaviour_Prospecting {
+ private final int mVanillaCosts;
+ private final int mEUCosts;
- public Behaviour_Prospecting_Ex(int aVanillaCosts, int aEUCosts) {
- super(aVanillaCosts, aEUCosts);
- this.mVanillaCosts = aVanillaCosts;
- this.mEUCosts = aEUCosts;
- }
+ public Behaviour_Prospecting_Ex(final int aVanillaCosts, final int aEUCosts) {
+ super(aVanillaCosts, aEUCosts);
+ this.mVanillaCosts = aVanillaCosts;
+ this.mEUCosts = aEUCosts;
+ }
- public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- if (aWorld.isRemote) {
- return false;
- }
- Block aBlock = aWorld.getBlock(aX, aY, aZ);
- if (aBlock == null) {
- return false;
- }
- byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ);
+ @Override
+ public boolean onItemUseFirst(final GT_MetaBase_Item aItem, final ItemStack aStack, final EntityPlayer aPlayer,
+ final World aWorld, final int aX, final int aY, final int aZ, final int aSide, final float hitX,
+ final float hitY, final float hitZ) {
+ if (aWorld.isRemote) {
+ return false;
+ }
+ final Block aBlock = aWorld.getBlock(aX, aY, aZ);
+ if (aBlock == null) {
+ return false;
+ }
+ final byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ);
+ ItemData tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(aBlock, 1, aMeta));
+ if (tAssotiation != null && tAssotiation.mPrefix.toString().startsWith("ore")) {
+ GT_Utility.sendChatToPlayer(aPlayer,
+ "This is " + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + " Ore.");
+ GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(1)), 1.0F, -1.0F, aX, aY,
+ aZ);
+ return true;
+ }
+ if (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone)
+ || aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockGranites)
+ || aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.netherrack)
+ || aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.end_stone)
+ || aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.dirt)
+ || aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.grass)) {
+ if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) {
+ GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(1)), 1.0F, -1.0F, aX,
+ aY, aZ);
+ int tX = aX;
+ int tY = aY;
+ int tZ = aZ;
+ int tMetaID = 0;
+ final int tQuality = (aItem instanceof GT_MetaGenerated_Tool
+ ? ((GT_MetaGenerated_Tool) aItem).getHarvestLevel(aStack, "") : 0) * 3;
- ItemData tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(aBlock, 1, aMeta));
- if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore"))) {
- GT_Utility.sendChatToPlayer(aPlayer, "This is " + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + " Ore.");
- GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(1)), 1.0F, -1.0F, aX, aY, aZ);
- return true;
- }
- if ((aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockGranites)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.netherrack)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.end_stone)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.dirt)) ||(aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.grass)) ) {
- if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) {
- GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(1)), 1.0F, -1.0F, aX, aY, aZ);
- int tX = aX;
- int tY = aY;
- int tZ = aZ;
- int tMetaID = 0;
- int tQuality = ((aItem instanceof GT_MetaGenerated_Tool) ? ((GT_MetaGenerated_Tool) aItem).getHarvestLevel(aStack, "") : 0)*3;
+ int i = 0;
+ for (final int j = 6 + tQuality; i < j; i++) {
+ tX -= ForgeDirection.getOrientation(aSide).offsetX;
+ tY -= ForgeDirection.getOrientation(aSide).offsetY;
+ tZ -= ForgeDirection.getOrientation(aSide).offsetZ;
- int i = 0;
- for (int j = 6 + tQuality; i < j; i++) {
- tX -= ForgeDirection.getOrientation(aSide).offsetX;
- tY -= ForgeDirection.getOrientation(aSide).offsetY;
- tZ -= ForgeDirection.getOrientation(aSide).offsetZ;
-
- Block tBlock = aWorld.getBlock(tX, tY, tZ);
- if ((tBlock == Blocks.lava) || (tBlock == Blocks.flowing_lava)) {
- GT_Utility.sendChatToPlayer(aPlayer, "There is Lava behind this Block.");
- break;
- }
- if ((tBlock == Blocks.water) || (tBlock == Blocks.flowing_water) || ((tBlock instanceof IFluidBlock))) {
- GT_Utility.sendChatToPlayer(aPlayer, "There is a Liquid behind this Block.");
- break;
- }
- if ((tBlock == Blocks.monster_egg) || (!GT_Utility.hasBlockHitBox(aWorld, tX, tY, tZ))) {
- GT_Utility.sendChatToPlayer(aPlayer, "There is an Air Pocket behind this Block.");
- break;
- }
- if (tBlock != aBlock) {
- if (i >= 4) {
- break;
- }
- GT_Utility.sendChatToPlayer(aPlayer, "Material is changing behind this Block.");
- break;
- }
- }
- Random tRandom = new Random(aX ^ aY ^ aZ ^ aSide);
- i = 0;
- for (int j = 9 + 2 * tQuality; i < j; i++) {
- tX = aX - 4 - tQuality + tRandom.nextInt(j);
- tY = aY - 4 - tQuality + tRandom.nextInt(j);
- tZ = aZ - 4 - tQuality + tRandom.nextInt(j);
- Block tBlock = aWorld.getBlock(tX, tY, tZ);
- if ((tBlock instanceof GT_Block_Ores)) {
- TileEntity tTileEntity = aWorld.getTileEntity(tX, tY, tZ);
- if ((tTileEntity instanceof GT_TileEntity_Ores)) {
- Materials tMaterial = GregTech_API.sGeneratedMaterials[(((GT_TileEntity_Ores) tTileEntity).mMetaData % 1000)];
- if ((tMaterial != null) && (tMaterial != Materials._NULL)) {
- GT_Utility.sendChatToPlayer(aPlayer, "Found traces of " + tMaterial.mDefaultLocalName + " Ore.");
- return true;
- }
- }
- } else {
- tMetaID = aWorld.getBlockMetadata(tX, tY, tZ);
- tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(tBlock, 1, tMetaID));
- if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore"))) {
- GT_Utility.sendChatToPlayer(aPlayer, "Found traces of " + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + " Ore.");
- return true;
- }
- }
- }
- GT_Utility.sendChatToPlayer(aPlayer, "No Ores found.");
- }
- return true;
- }
- return false;
- }
+ final Block tBlock = aWorld.getBlock(tX, tY, tZ);
+ if (tBlock == Blocks.lava || tBlock == Blocks.flowing_lava) {
+ GT_Utility.sendChatToPlayer(aPlayer, "There is Lava behind this Block.");
+ break;
+ }
+ if (tBlock == Blocks.water || tBlock == Blocks.flowing_water || tBlock instanceof IFluidBlock) {
+ GT_Utility.sendChatToPlayer(aPlayer, "There is a Liquid behind this Block.");
+ break;
+ }
+ if (tBlock == Blocks.monster_egg || !GT_Utility.hasBlockHitBox(aWorld, tX, tY, tZ)) {
+ GT_Utility.sendChatToPlayer(aPlayer, "There is an Air Pocket behind this Block.");
+ break;
+ }
+ if (tBlock != aBlock) {
+ if (i >= 4) {
+ break;
+ }
+ GT_Utility.sendChatToPlayer(aPlayer, "Material is changing behind this Block.");
+ break;
+ }
+ }
+ final Random tRandom = new Random(aX ^ aY ^ aZ ^ aSide);
+ i = 0;
+ for (final int j = 9 + 2 * tQuality; i < j; i++) {
+ tX = aX - 4 - tQuality + tRandom.nextInt(j);
+ tY = aY - 4 - tQuality + tRandom.nextInt(j);
+ tZ = aZ - 4 - tQuality + tRandom.nextInt(j);
+ final Block tBlock = aWorld.getBlock(tX, tY, tZ);
+ if (tBlock instanceof GT_Block_Ores) {
+ final TileEntity tTileEntity = aWorld.getTileEntity(tX, tY, tZ);
+ if (tTileEntity instanceof GT_TileEntity_Ores) {
+ final Materials tMaterial = GregTech_API.sGeneratedMaterials[((GT_TileEntity_Ores) tTileEntity).mMetaData
+ % 1000];
+ if (tMaterial != null && tMaterial != Materials._NULL) {
+ GT_Utility.sendChatToPlayer(aPlayer,
+ "Found traces of " + tMaterial.mDefaultLocalName + " Ore.");
+ return true;
+ }
+ }
+ }
+ else {
+ tMetaID = aWorld.getBlockMetadata(tX, tY, tZ);
+ tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(tBlock, 1, tMetaID));
+ if (tAssotiation != null && tAssotiation.mPrefix.toString().startsWith("ore")) {
+ GT_Utility.sendChatToPlayer(aPlayer,
+ "Found traces of " + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + " Ore.");
+ return true;
+ }
+ }
+ }
+ GT_Utility.sendChatToPlayer(aPlayer, "No Ores found.");
+ }
+ return true;
+ }
+ return false;
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java
index 56f6a8d4f9..a1093d67d3 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java
@@ -1,7 +1,5 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.automation;
-import static gtPlusPlus.core.lib.CORE.sTesseractGenerators;
-
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.*;
@@ -10,6 +8,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Config;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.player.PlayerUtils;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
@@ -23,516 +22,484 @@ import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.*;
-public class GT_MetaTileEntity_TesseractGenerator
-extends GT_MetaTileEntity_BasicTank
-{
- public static int TESSERACT_ENERGY_COST_DIMENSIONAL = 2048;
- public static int TESSERACT_ENERGY_COST = 1024;
- public byte isWorking = 0;
- public int oFrequency = 0;
- public int mNeededEnergy = 0;
- public int mFrequency = 0;
-
- public GT_MetaTileEntity_TesseractGenerator(int aID, String aName, String aNameRegional, int aTier) {
+public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_BasicTank {
+ public static int TESSERACT_ENERGY_COST_DIMENSIONAL = 2048;
+ public static int TESSERACT_ENERGY_COST = 1024;
+ public byte isWorking = 0;
+ public int oFrequency = 0;
+ public int mNeededEnergy = 0;
+ public int mFrequency = 0;
+
+ public GT_MetaTileEntity_TesseractGenerator(final int aID, final String aName, final String aNameRegional,
+ final int aTier) {
super(aID, aName, aNameRegional, aTier, 3, "");
}
- public GT_MetaTileEntity_TesseractGenerator(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_TesseractGenerator(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures) {
super(aName, aTier, 3, aDescription, aTextures);
- }
-
- @Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_TesseractGenerator(mName, mTier, mDescription, mTextures);
}
- @Override
- public boolean isTransformerUpgradable()
- {
+ public boolean addEnergyConsumption(final GT_MetaTileEntity_TesseractTerminal aTerminal) {
+ if (!this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return false;
+ }
+ this.mNeededEnergy += aTerminal.getBaseMetaTileEntity().getWorld() == this.getBaseMetaTileEntity().getWorld()
+ ? GT_MetaTileEntity_TesseractGenerator.TESSERACT_ENERGY_COST
+ : GT_MetaTileEntity_TesseractGenerator.TESSERACT_ENERGY_COST_DIMENSIONAL;
return true;
}
+ public boolean allowCoverOnSide(final byte aSide, final int aCoverID) {
+ return aSide != this.getBaseMetaTileEntity().getFrontFacing();
+ }
+
@Override
- public boolean isOverclockerUpgradable()
- {
+ public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
return false;
}
@Override
- public boolean isSimpleMachine()
- {
+ public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
return false;
}
@Override
- public boolean isFacingValid(byte aFacing)
- {
- return true;
+ public boolean canDrain(final ForgeDirection aSide, final Fluid aFluid) {
+ final IFluidHandler tTileEntity = this.getBaseMetaTileEntity()
+ .getITankContainerAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return false;
+ }
+ return tTileEntity.canDrain(aSide, aFluid);
}
@Override
- public boolean isEnetInput()
- {
+ public boolean canExtractItem(final int aIndex, final ItemStack aStack, final int aSide) {
+ final IInventory tTileEntity = this.getBaseMetaTileEntity()
+ .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return false;
+ }
+ if (tTileEntity instanceof ISidedInventory) {
+ return ((ISidedInventory) tTileEntity).canExtractItem(aIndex, aStack, aSide);
+ }
return true;
}
@Override
- public boolean isEnetOutput()
- {
- return false;
+ public boolean canFill(final ForgeDirection aSide, final Fluid aFluid) {
+ final IFluidHandler tTileEntity = this.getBaseMetaTileEntity()
+ .getITankContainerAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return false;
+ }
+ return tTileEntity.canFill(aSide, aFluid);
}
@Override
- public boolean isInputFacing(byte aSide)
- {
+ public boolean canInsertItem(final int aIndex, final ItemStack aStack, final int aSide) {
+ final IInventory tTileEntity = this.getBaseMetaTileEntity()
+ .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return false;
+ }
+ if (tTileEntity instanceof ISidedInventory) {
+ return ((ISidedInventory) tTileEntity).canInsertItem(aIndex, aStack, aSide);
+ }
return true;
}
@Override
- public boolean isOutputFacing(byte aSide) {
- return aSide == getBaseMetaTileEntity().getBackFacing();
+ public boolean canTankBeEmptied() {
+ return false;
}
@Override
- public boolean isValidSlot(int aIndex)
- {
+ public boolean canTankBeFilled() {
return false;
}
@Override
- public long getMinimumStoredEU()
- {
- return getBaseMetaTileEntity().getEUCapacity() / 2;
+ public ItemStack decrStackSize(final int aIndex, final int aAmount) {
+ final IInventory tTileEntity = this.getBaseMetaTileEntity()
+ .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return null;
+ }
+ return tTileEntity.decrStackSize(aIndex, aAmount);
}
@Override
- public long maxEUInput()
- {
- return 2048;
+ public boolean displaysItemStack() {
+ return false;
}
@Override
- public long maxEUOutput()
- {
- return 0;
+ public boolean displaysStackSize() {
+ return false;
}
@Override
- public long maxEUStore()
- {
- return 100000;
+ public boolean doesEmptyContainers() {
+ return false;
}
+ // To-Do?
@Override
- public long maxSteamStore()
- {
- return maxEUStore();
+ public boolean doesFillContainers() {
+ return false;
}
@Override
- public boolean isAccessAllowed(EntityPlayer aPlayer)
- {
- return true;
+ public FluidStack drain(final ForgeDirection aSide, final FluidStack aFluid, final boolean doDrain) {
+ final IFluidHandler tTileEntity = this.getBaseMetaTileEntity()
+ .getITankContainerAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return null;
+ }
+ return tTileEntity.drain(aSide, aFluid, doDrain);
}
@Override
- public boolean ownerControl()
- {
- return true;
+ public FluidStack drain(final ForgeDirection aDirection, final int maxDrain, final boolean doDrain) {
+ final IFluidHandler tTileEntity = this.getBaseMetaTileEntity()
+ .getITankContainerAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return null;
+ }
+ return tTileEntity.drain(aDirection, maxDrain, doDrain);
}
@Override
- public int getProgresstime()
- {
- return (sTesseractGenerators.get(Integer.valueOf(this.mFrequency)) == this) && (this.isWorking >= 20) ? 999 : 0;
+ public int fill_default(final ForgeDirection aDirection, final FluidStack aFluid, final boolean doFill) {
+ final IFluidHandler tTileEntity = this.getBaseMetaTileEntity()
+ .getITankContainerAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return 0;
+ }
+ return tTileEntity.fill(aDirection, aFluid, doFill);
}
@Override
- public int maxProgresstime()
- {
- return 1000;
+ public int[] getAccessibleSlotsFromSide(final int aSide) {
+ final IInventory tTileEntity = this.getBaseMetaTileEntity()
+ .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return new int[0];
+ }
+ if (tTileEntity instanceof ISidedInventory) {
+ return ((ISidedInventory) tTileEntity).getAccessibleSlotsFromSide(aSide);
+ }
+ final int[] rArray = new int[this.getSizeInventory()];
+ for (int i = 0; i < this.getSizeInventory(); i++) {
+ rArray[i] = i;
+ }
+ return rArray;
}
@Override
- public void saveNBTData(NBTTagCompound aNBT)
- {
- aNBT.setInteger("mFrequency", this.mFrequency);
+ public String[] getDescription() {
+ return new String[] {
+ "Generates a Tesseract for the attached Inventory"
+ };
}
@Override
- public void loadNBTData(NBTTagCompound aNBT)
- {
- this.mFrequency = aNBT.getInteger("mFrequency");
+ public String[] getInfoData() {
+ final TileEntity tTileEntity = this.getBaseMetaTileEntity()
+ .getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if (tTileEntity != null && this.getBaseMetaTileEntity().isAllowedToWork()
+ && tTileEntity instanceof IGregTechDeviceInformation
+ && ((IGregTechDeviceInformation) tTileEntity).isGivingInformation()) {
+ return ((IGregTechDeviceInformation) tTileEntity).getInfoData();
+ }
+ return new String[] {
+ "Tesseract Generator", "Freqency:", "" + this.mFrequency,
+ CORE.sTesseractGenerators.get(Integer.valueOf(this.mFrequency)) == this && this.isWorking >= 20
+ ? "Active" : "Inactive"
+ };
}
@Override
- public void onConfigLoad(GT_Config aConfig)
- {
- TESSERACT_ENERGY_COST = 1024;
- TESSERACT_ENERGY_COST_DIMENSIONAL = 2048;
+ public String getInventoryName() {
+ final IInventory tTileEntity = this.getBaseMetaTileEntity()
+ .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return "";
+ }
+ return tTileEntity.getInventoryName();
}
@Override
- public void onServerStart()
- {
- sTesseractGenerators.clear();
+ public int getInventoryStackLimit() {
+ final IInventory tTileEntity = this.getBaseMetaTileEntity()
+ .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return 0;
+ }
+ return tTileEntity.getInventoryStackLimit();
}
- public void onServerStop()
- {
- sTesseractGenerators.clear();
- }
-
@Override
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ){
- if (aSide == getBaseMetaTileEntity().getFrontFacing()){
- float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ);
- switch ((byte)((byte)(int)(tCoords[0] * 2.0F) + 2 * (byte)(int)(tCoords[1] * 2.0F))){
- case 0:
- Utils.LOG_INFO("Freq. -1 | " + this.mFrequency);
- this.mFrequency -= 1;
- break;
- case 1:
- Utils.LOG_INFO("Freq. +1 | " + this.mFrequency);
- this.mFrequency += 1;
- default:
- //Utils.LOG_INFO("Did not click the correct place.");
- break;
- }
- PlayerUtils.messagePlayer(aPlayer, "Frequency: " + this.mFrequency);
- PlayerUtils.messagePlayer(aPlayer, ((sTesseractGenerators.get(Integer.valueOf(this.mFrequency)) != null) && (sTesseractGenerators.get(Integer.valueOf(this.mFrequency)) != this) ? EnumChatFormatting.RED + " (Occupied)" : ""));
- }
- return true;
+ public int getMaxItemCount() {
+ final TileEntity tTileEntity = this.getBaseMetaTileEntity()
+ .getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if (tTileEntity != null && this.getBaseMetaTileEntity().isAllowedToWork()
+ && tTileEntity instanceof IDigitalChest) {
+ return ((IDigitalChest) tTileEntity).getMaxItemCount();
+ }
+ return 0;
}
@Override
- public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ)
- {
- if (aSide == getBaseMetaTileEntity().getFrontFacing())
- {
- float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ);
- switch ((byte)((byte)(int)(tCoords[0] * 2.0F) + 2 * (byte)(int)(tCoords[1] * 2.0F)))
- {
- case 0:
- this.mFrequency -= 64;
- break;
- case 1:
- this.mFrequency += 64;
- break;
- case 2:
- this.mFrequency -= 512;
- break;
- case 3:
- this.mFrequency += 512;
- }
- GT_Utility.sendChatToPlayer(aPlayer, "Frequency: " + this.mFrequency + ((sTesseractGenerators.get(Integer.valueOf(this.mFrequency)) != null) && (sTesseractGenerators.get(Integer.valueOf(this.mFrequency)) != this) ? EnumChatFormatting.RED + " (Occupied)" : ""));
- }
+ public long getMinimumStoredEU() {
+ return this.getBaseMetaTileEntity().getEUCapacity() / 2;
}
- public boolean allowCoverOnSide(byte aSide, int aCoverID)
- {
- return aSide != getBaseMetaTileEntity().getFrontFacing();
+ @Override
+ public int getProgresstime() {
+ return CORE.sTesseractGenerators.get(Integer.valueOf(this.mFrequency)) == this && this.isWorking >= 20 ? 999
+ : 0;
}
@Override
- public String[] getInfoData()
- {
- TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity != null) && (getBaseMetaTileEntity().isAllowedToWork()) && ((tTileEntity instanceof IGregTechDeviceInformation)) && (((IGregTechDeviceInformation)tTileEntity).isGivingInformation())) {
- return ((IGregTechDeviceInformation)tTileEntity).getInfoData();
+ public int getSizeInventory() {
+ final IInventory tTileEntity = this.getBaseMetaTileEntity()
+ .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return 0;
}
- return new String[] { "Tesseract Generator", "Freqency:", "" + this.mFrequency, (sTesseractGenerators.get(Integer.valueOf(this.mFrequency)) == this) && (this.isWorking >= 20) ? "Active" : "Inactive" };
+ return tTileEntity.getSizeInventory();
}
@Override
- public boolean isGivingInformation()
- {
- return true;
+ public ItemStack getStackInSlot(final int aIndex) {
+ final IInventory tTileEntity = this.getBaseMetaTileEntity()
+ .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return null;
+ }
+ return tTileEntity.getStackInSlot(aIndex);
}
- public boolean isSendingInformation()
- {
- TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity != null) && (getBaseMetaTileEntity().isAllowedToWork()) && ((tTileEntity instanceof IGregTechDeviceInformation))) {
- return ((IGregTechDeviceInformation)tTileEntity).isGivingInformation();
+ @Override
+ public ItemStack[] getStoredItemData() {
+ final TileEntity tTileEntity = this.getBaseMetaTileEntity()
+ .getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if (tTileEntity != null && this.getBaseMetaTileEntity().isAllowedToWork()
+ && tTileEntity instanceof IDigitalChest) {
+ return ((IDigitalChest) tTileEntity).getStoredItemData();
}
- return false;
+ return null;
}
@Override
- public boolean isDigitalChest()
- {
- TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity != null) && (getBaseMetaTileEntity().isAllowedToWork()) && ((tTileEntity instanceof IDigitalChest))) {
- return ((IDigitalChest)tTileEntity).isDigitalChest();
+ public FluidTankInfo[] getTankInfo(final ForgeDirection aSide) {
+ final IFluidHandler tTileEntity = this.getBaseMetaTileEntity()
+ .getITankContainerAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return new FluidTankInfo[0];
}
- return false;
+ return tTileEntity.getTankInfo(aSide);
}
@Override
- public ItemStack[] getStoredItemData()
- {
- TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity != null) && (getBaseMetaTileEntity().isAllowedToWork()) && ((tTileEntity instanceof IDigitalChest))) {
- return ((IDigitalChest)tTileEntity).getStoredItemData();
- }
- return null;
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ return aSide == aFacing ? new ITexture[] {
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional),
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_Frequency)
+ } : new ITexture[] {
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional),
+ new GT_RenderedTexture(Textures.BlockIcons.VOID)
+ };
}
@Override
- public void setItemCount(int aCount)
- {
- TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity != null) && (getBaseMetaTileEntity().isAllowedToWork()) && ((tTileEntity instanceof IDigitalChest))) {
- ((IDigitalChest)tTileEntity).setItemCount(aCount);
- }
+ public ITexture[][][] getTextureSet(final ITexture[] aTextures) {
+ return new ITexture[0][0][0];
}
@Override
- public int getMaxItemCount()
- {
- TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity != null) && (getBaseMetaTileEntity().isAllowedToWork()) && ((tTileEntity instanceof IDigitalChest))) {
- return ((IDigitalChest)tTileEntity).getMaxItemCount();
- }
- return 0;
+ public boolean isAccessAllowed(final EntityPlayer aPlayer) {
+ return true;
}
@Override
- public boolean isItemValidForSlot(int aIndex, ItemStack aStack)
- {
- IInventory tTileEntity = getBaseMetaTileEntity().getIInventoryAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return false;
+ public boolean isDigitalChest() {
+ final TileEntity tTileEntity = this.getBaseMetaTileEntity()
+ .getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if (tTileEntity != null && this.getBaseMetaTileEntity().isAllowedToWork()
+ && tTileEntity instanceof IDigitalChest) {
+ return ((IDigitalChest) tTileEntity).isDigitalChest();
}
- return tTileEntity.isItemValidForSlot(aIndex, aStack);
+ return false;
}
@Override
- public int[] getAccessibleSlotsFromSide(int aSide)
- {
- IInventory tTileEntity = getBaseMetaTileEntity().getIInventoryAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return new int[0];
- }
- if ((tTileEntity instanceof ISidedInventory)) {
- return ((ISidedInventory)tTileEntity).getAccessibleSlotsFromSide(aSide);
- }
- int[] rArray = new int[getSizeInventory()];
- for (int i = 0; i < getSizeInventory(); i++) {
- rArray[i] = i;
- }
- return rArray;
+ public boolean isEnetInput() {
+ return true;
}
@Override
- public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide)
- {
- IInventory tTileEntity = getBaseMetaTileEntity().getIInventoryAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return false;
- }
- if ((tTileEntity instanceof ISidedInventory)) {
- return ((ISidedInventory)tTileEntity).canInsertItem(aIndex, aStack, aSide);
- }
+ public boolean isEnetOutput() {
+ return false;
+ }
+
+ @Override
+ public boolean isFacingValid(final byte aFacing) {
return true;
}
@Override
- public boolean canExtractItem(int aIndex, ItemStack aStack, int aSide)
- {
- IInventory tTileEntity = getBaseMetaTileEntity().getIInventoryAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return false;
- }
- if ((tTileEntity instanceof ISidedInventory)) {
- return ((ISidedInventory)tTileEntity).canExtractItem(aIndex, aStack, aSide);
- }
+ public boolean isGivingInformation() {
return true;
}
@Override
- public int getSizeInventory()
- {
- IInventory tTileEntity = getBaseMetaTileEntity().getIInventoryAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return 0;
- }
- return tTileEntity.getSizeInventory();
+ public boolean isInputFacing(final byte aSide) {
+ return true;
}
@Override
- public ItemStack getStackInSlot(int aIndex)
- {
- IInventory tTileEntity = getBaseMetaTileEntity().getIInventoryAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return null;
+ public boolean isItemValidForSlot(final int aIndex, final ItemStack aStack) {
+ final IInventory tTileEntity = this.getBaseMetaTileEntity()
+ .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return false;
}
- return tTileEntity.getStackInSlot(aIndex);
+ return tTileEntity.isItemValidForSlot(aIndex, aStack);
}
@Override
- public void setInventorySlotContents(int aIndex, ItemStack aStack)
- {
- IInventory tTileEntity = getBaseMetaTileEntity().getIInventoryAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return;
- }
- tTileEntity.setInventorySlotContents(aIndex, aStack);
+ public boolean isOutputFacing(final byte aSide) {
+ return aSide == this.getBaseMetaTileEntity().getBackFacing();
}
@Override
- public ItemStack decrStackSize(int aIndex, int aAmount)
- {
- IInventory tTileEntity = getBaseMetaTileEntity().getIInventoryAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return null;
+ public boolean isOverclockerUpgradable() {
+ return false;
+ }
+
+ public boolean isSendingInformation() {
+ final TileEntity tTileEntity = this.getBaseMetaTileEntity()
+ .getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if (tTileEntity != null && this.getBaseMetaTileEntity().isAllowedToWork()
+ && tTileEntity instanceof IGregTechDeviceInformation) {
+ return ((IGregTechDeviceInformation) tTileEntity).isGivingInformation();
}
- return tTileEntity.decrStackSize(aIndex, aAmount);
+ return false;
}
@Override
- public String getInventoryName()
- {
- IInventory tTileEntity = getBaseMetaTileEntity().getIInventoryAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return "";
- }
- return tTileEntity.getInventoryName();
+ public boolean isSimpleMachine() {
+ return false;
}
@Override
- public int getInventoryStackLimit()
- {
- IInventory tTileEntity = getBaseMetaTileEntity().getIInventoryAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return 0;
- }
- return tTileEntity.getInventoryStackLimit();
+ public boolean isTransformerUpgradable() {
+ return true;
}
@Override
- public boolean canFill(ForgeDirection aSide, Fluid aFluid)
- {
- IFluidHandler tTileEntity = getBaseMetaTileEntity().getITankContainerAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return false;
- }
- return tTileEntity.canFill(aSide, aFluid);
+ public boolean isValidSlot(final int aIndex) {
+ return false;
+ }
+
+ public boolean isValidTesseractGenerator(final String aOwnerName, final boolean aWorkIrrelevant) {
+ return this.getBaseMetaTileEntity() != null && !this.getBaseMetaTileEntity().isInvalidTileEntity()
+ && this.getBaseMetaTileEntity().isAllowedToWork()
+ && (aOwnerName == null || this.getBaseMetaTileEntity().getOwnerName().equals(aOwnerName))
+ && (aWorkIrrelevant || this.isWorking >= 20);
}
@Override
- public boolean canDrain(ForgeDirection aSide, Fluid aFluid)
- {
- IFluidHandler tTileEntity = getBaseMetaTileEntity().getITankContainerAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return false;
- }
- return tTileEntity.canDrain(aSide, aFluid);
+ public void loadNBTData(final NBTTagCompound aNBT) {
+ this.mFrequency = aNBT.getInteger("mFrequency");
}
@Override
- public FluidTankInfo[] getTankInfo(ForgeDirection aSide)
- {
- IFluidHandler tTileEntity = getBaseMetaTileEntity().getITankContainerAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return new FluidTankInfo[0];
- }
- return tTileEntity.getTankInfo(aSide);
+ public long maxEUInput() {
+ return 2048;
}
@Override
- public int fill_default(ForgeDirection aDirection, FluidStack aFluid, boolean doFill)
- {
- IFluidHandler tTileEntity = getBaseMetaTileEntity().getITankContainerAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return 0;
- }
- return tTileEntity.fill(aDirection, aFluid, doFill);
+ public long maxEUOutput() {
+ return 0;
}
@Override
- public FluidStack drain(ForgeDirection aDirection, int maxDrain, boolean doDrain)
- {
- IFluidHandler tTileEntity = getBaseMetaTileEntity().getITankContainerAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return null;
- }
- return tTileEntity.drain(aDirection, maxDrain, doDrain);
+ public long maxEUStore() {
+ return 100000;
}
@Override
- public FluidStack drain(ForgeDirection aSide, FluidStack aFluid, boolean doDrain)
- {
- IFluidHandler tTileEntity = getBaseMetaTileEntity().getITankContainerAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return null;
- }
- return tTileEntity.drain(aSide, aFluid, doDrain);
+ public int maxProgresstime() {
+ return 1000;
}
- public boolean addEnergyConsumption(GT_MetaTileEntity_TesseractTerminal aTerminal)
- {
- if (!getBaseMetaTileEntity().isAllowedToWork()) {
- return false;
- }
- this.mNeededEnergy += (aTerminal.getBaseMetaTileEntity().getWorld() == getBaseMetaTileEntity().getWorld() ? TESSERACT_ENERGY_COST : TESSERACT_ENERGY_COST_DIMENSIONAL);
- return true;
+ @Override
+ public long maxSteamStore() {
+ return this.maxEUStore();
}
- public boolean isValidTesseractGenerator(String aOwnerName, boolean aWorkIrrelevant)
- {
- return (getBaseMetaTileEntity() != null) && (!getBaseMetaTileEntity().isInvalidTileEntity()) && (getBaseMetaTileEntity().isAllowedToWork()) && ((aOwnerName == null) || (getBaseMetaTileEntity().getOwnerName().equals(aOwnerName))) && ((aWorkIrrelevant) || (this.isWorking >= 20));
+ @Override
+ public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_TesseractGenerator(this.mName, this.mTier, this.mDescription, this.mTextures);
+ }
+
+ @Override
+ public void onConfigLoad(final GT_Config aConfig) {
+ GT_MetaTileEntity_TesseractGenerator.TESSERACT_ENERGY_COST = 1024;
+ GT_MetaTileEntity_TesseractGenerator.TESSERACT_ENERGY_COST_DIMENSIONAL = 2048;
}
- public void onPostTick()
- {
- if (getBaseMetaTileEntity().isServerSide()){
- if (this.mFrequency != this.oFrequency){
-
+ public void onPostTick() {
+ if (this.getBaseMetaTileEntity().isServerSide()) {
+ if (this.mFrequency != this.oFrequency) {
+
Utils.LOG_INFO("mFreq != oFreq");
-
- if (sTesseractGenerators.get(Integer.valueOf(this.oFrequency)) == this)
- {
- sTesseractGenerators.remove(Integer.valueOf(this.oFrequency));
- getBaseMetaTileEntity().issueBlockUpdate();
+
+ if (CORE.sTesseractGenerators.get(Integer.valueOf(this.oFrequency)) == this) {
+ CORE.sTesseractGenerators.remove(Integer.valueOf(this.oFrequency));
+ this.getBaseMetaTileEntity().issueBlockUpdate();
Utils.LOG_INFO("this Gen == oFreq on map - do block update");
}
Utils.LOG_INFO("mFreq will be set to oFreq");
this.oFrequency = this.mFrequency;
}
- if ((getBaseMetaTileEntity().isAllowedToWork()) && (getBaseMetaTileEntity().decreaseStoredEnergyUnits(this.mNeededEnergy, false)))
- {
+ if (this.getBaseMetaTileEntity().isAllowedToWork()
+ && this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(this.mNeededEnergy, false)) {
Utils.LOG_INFO("Can Work & Has Energy");
- if ((sTesseractGenerators.get(Integer.valueOf(this.mFrequency)) == null) || (!((GT_MetaTileEntity_TesseractGenerator)sTesseractGenerators.get(Integer.valueOf(this.mFrequency))).isValidTesseractGenerator(null, true))) {
+ if (CORE.sTesseractGenerators.get(Integer.valueOf(this.mFrequency)) == null
+ || !CORE.sTesseractGenerators.get(Integer.valueOf(this.mFrequency))
+ .isValidTesseractGenerator(null, true)) {
Utils.LOG_INFO("storing TE I think to mFreq map?");
- sTesseractGenerators.put(Integer.valueOf(this.mFrequency), this);
+ CORE.sTesseractGenerators.put(Integer.valueOf(this.mFrequency), this);
}
}
- else
- {
- if (sTesseractGenerators.get(Integer.valueOf(this.mFrequency)) == this)
- {
+ else {
+ if (CORE.sTesseractGenerators.get(Integer.valueOf(this.mFrequency)) == this) {
Utils.LOG_INFO("this gen == mFreq on map - do block update");
- sTesseractGenerators.remove(Integer.valueOf(this.mFrequency));
- getBaseMetaTileEntity().issueBlockUpdate();
+ CORE.sTesseractGenerators.remove(Integer.valueOf(this.mFrequency));
+ this.getBaseMetaTileEntity().issueBlockUpdate();
}
this.isWorking = 0;
}
- if (sTesseractGenerators.get(Integer.valueOf(this.mFrequency)) == this)
- {
+ if (CORE.sTesseractGenerators.get(Integer.valueOf(this.mFrequency)) == this) {
Utils.LOG_INFO("mFreq == this - do work related things");
if (this.isWorking < 20) {
- this.isWorking = ((byte)(this.isWorking + 1));
+ this.isWorking = (byte) (this.isWorking + 1);
}
- if (this.isWorking == 20)
- {
- getBaseMetaTileEntity().issueBlockUpdate();
- this.isWorking = ((byte)(this.isWorking + 1));
+ if (this.isWorking == 20) {
+ this.getBaseMetaTileEntity().issueBlockUpdate();
+ this.isWorking = (byte) (this.isWorking + 1);
}
}
- else
- {
+ else {
this.isWorking = 0;
}
this.mNeededEnergy = 0;
@@ -540,60 +507,93 @@ extends GT_MetaTileEntity_BasicTank
}
@Override
- public String[] getDescription()
- {
- return new String[] {"Generates a Tesseract for the attached Inventory"};
- }
-
- @Override
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-
- @Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-
- @Override
- public ITexture[][][] getTextureSet(ITexture[] aTextures) {
- return new ITexture[0][0][0];
+ public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer,
+ final byte aSide, final float aX, final float aY, final float aZ) {
+ if (aSide == this.getBaseMetaTileEntity().getFrontFacing()) {
+ final float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ);
+ switch ((byte) ((byte) (int) (tCoords[0] * 2.0F) + 2 * (byte) (int) (tCoords[1] * 2.0F))) {
+ case 0:
+ Utils.LOG_INFO("Freq. -1 | " + this.mFrequency);
+ this.mFrequency -= 1;
+ break;
+ case 1:
+ Utils.LOG_INFO("Freq. +1 | " + this.mFrequency);
+ this.mFrequency += 1;
+ default:
+ // Utils.LOG_INFO("Did not click the correct place.");
+ break;
+ }
+ PlayerUtils.messagePlayer(aPlayer, "Frequency: " + this.mFrequency);
+ PlayerUtils.messagePlayer(aPlayer,
+ CORE.sTesseractGenerators.get(Integer.valueOf(this.mFrequency)) != null
+ && CORE.sTesseractGenerators.get(Integer.valueOf(this.mFrequency)) != this
+ ? EnumChatFormatting.RED + " (Occupied)" : "");
+ }
+ return true;
}
@Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- return aSide == aFacing ? new ITexture[]{ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional), new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_Frequency)} : new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional), new GT_RenderedTexture(Textures.BlockIcons.VOID)};
+ public void onScrewdriverRightClick(final byte aSide, final EntityPlayer aPlayer, final float aX, final float aY,
+ final float aZ) {
+ if (aSide == this.getBaseMetaTileEntity().getFrontFacing()) {
+ final float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ);
+ switch ((byte) ((byte) (int) (tCoords[0] * 2.0F) + 2 * (byte) (int) (tCoords[1] * 2.0F))) {
+ case 0:
+ this.mFrequency -= 64;
+ break;
+ case 1:
+ this.mFrequency += 64;
+ break;
+ case 2:
+ this.mFrequency -= 512;
+ break;
+ case 3:
+ this.mFrequency += 512;
+ }
+ GT_Utility.sendChatToPlayer(aPlayer,
+ "Frequency: " + this.mFrequency
+ + (CORE.sTesseractGenerators.get(Integer.valueOf(this.mFrequency)) != null
+ && CORE.sTesseractGenerators.get(Integer.valueOf(this.mFrequency)) != this
+ ? EnumChatFormatting.RED + " (Occupied)" : ""));
+ }
}
-
- //To-Do?
@Override
- public boolean doesFillContainers() {
- return false;
+ public void onServerStart() {
+ CORE.sTesseractGenerators.clear();
}
- @Override
- public boolean doesEmptyContainers() {
- return false;
+ public void onServerStop() {
+ CORE.sTesseractGenerators.clear();
}
@Override
- public boolean canTankBeFilled() {
- return false;
+ public boolean ownerControl() {
+ return true;
}
@Override
- public boolean canTankBeEmptied() {
- return false;
+ public void saveNBTData(final NBTTagCompound aNBT) {
+ aNBT.setInteger("mFrequency", this.mFrequency);
}
@Override
- public boolean displaysItemStack() {
- return false;
+ public void setInventorySlotContents(final int aIndex, final ItemStack aStack) {
+ final IInventory tTileEntity = this.getBaseMetaTileEntity()
+ .getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return;
+ }
+ tTileEntity.setInventorySlotContents(aIndex, aStack);
}
@Override
- public boolean displaysStackSize() {
- return false;
+ public void setItemCount(final int aCount) {
+ final TileEntity tTileEntity = this.getBaseMetaTileEntity()
+ .getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if (tTileEntity != null && this.getBaseMetaTileEntity().isAllowedToWork()
+ && tTileEntity instanceof IDigitalChest) {
+ ((IDigitalChest) tTileEntity).setItemCount(aCount);
+ }
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractTerminal.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractTerminal.java
index 3544d2a124..9a1a89cf47 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractTerminal.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractTerminal.java
@@ -19,508 +19,476 @@ import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.*;
-public class GT_MetaTileEntity_TesseractTerminal
-extends GT_MetaTileEntity_BasicTank
-{
- public int mFrequency = 0;
- public boolean mDidWork = false;
- public static boolean sInterDimensionalTesseractAllowed = true;
-
- public GT_MetaTileEntity_TesseractTerminal(int aID, String aName, String aNameRegional, int aTier) {
+public class GT_MetaTileEntity_TesseractTerminal extends GT_MetaTileEntity_BasicTank {
+ public static boolean sInterDimensionalTesseractAllowed = true;
+ public int mFrequency = 0;
+ public boolean mDidWork = false;
+
+ public GT_MetaTileEntity_TesseractTerminal(final int aID, final String aName, final String aNameRegional,
+ final int aTier) {
super(aID, aName, aNameRegional, aTier, 3, "");
}
- public GT_MetaTileEntity_TesseractTerminal(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_TesseractTerminal(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures) {
super(aName, aTier, 3, aDescription, aTextures);
- }
-
- @Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_TesseractTerminal(mName, mTier, mDescription, mTextures);
}
- @Override
- public boolean isTransformerUpgradable()
- {
- return false;
+ public boolean allowCoverOnSide(final byte aSide, final int aCoverID) {
+ return aSide != this.getBaseMetaTileEntity().getFrontFacing();
}
@Override
- public boolean isOverclockerUpgradable()
- {
+ public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
return false;
}
@Override
- public boolean isSimpleMachine()
- {
+ public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
return false;
}
@Override
- public boolean isFacingValid(byte aFacing)
- {
- return true;
- }
-
- @Override
- public boolean isOutputFacing(byte aSide) {
- return aSide == getBaseMetaTileEntity().getBackFacing();
+ public boolean canDrain(final ForgeDirection aSide, final Fluid aFluid) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return false;
+ }
+ return tTileEntity.canDrain(aSide, aFluid);
}
@Override
- public boolean isValidSlot(int aIndex)
- {
- return false;
- }
-
- @Override
- public long getMinimumStoredEU()
- {
- return getBaseMetaTileEntity().getEUCapacity() / 2;
+ public boolean canExtractItem(final int aIndex, final ItemStack aStack, final int aSide) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return false;
+ }
+ return tTileEntity.canExtractItem(aIndex, aStack, aSide);
}
@Override
- public long maxEUInput()
- {
- return 2048;
+ public boolean canFill(final ForgeDirection aSide, final Fluid aFluid) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return false;
+ }
+ return tTileEntity.canFill(aSide, aFluid);
}
@Override
- public boolean isAccessAllowed(EntityPlayer aPlayer)
- {
- return true;
- }
-
- @Override
- public long maxEUStore()
- {
- return 100000;
+ public boolean canInsertItem(final int aIndex, final ItemStack aStack, final int aSide) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return false;
+ }
+ return tTileEntity.canInsertItem(aIndex, aStack, aSide);
}
@Override
- public long maxSteamStore()
- {
- return maxEUStore();
+ public boolean canTankBeEmptied() {
+ return false;
}
@Override
- public boolean ownerControl()
- {
- return true;
+ public boolean canTankBeFilled() {
+ return false;
}
@Override
- public int getProgresstime()
- {
- return getTesseract(this.mFrequency, false) != null ? 999 : 0;
+ public ItemStack decrStackSize(final int aIndex, final int aAmount) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return null;
+ }
+ return tTileEntity.decrStackSize(aIndex, aAmount);
}
@Override
- public int maxProgresstime()
- {
- return 1000;
+ public boolean displaysItemStack() {
+ return false;
}
@Override
- public void saveNBTData(NBTTagCompound aNBT)
- {
- aNBT.setInteger("mFrequency", this.mFrequency);
+ public boolean displaysStackSize() {
+ return false;
}
@Override
- public void loadNBTData(NBTTagCompound aNBT)
- {
- this.mFrequency = aNBT.getInteger("mFrequency");
+ public boolean doesEmptyContainers() {
+ return false;
}
+ // To-Do?
@Override
- public void onConfigLoad(GT_Config aConfig)
- {
- sInterDimensionalTesseractAllowed = true;
- }
-
- /*public boolean onRightclick(EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ)
- {
- if (aSide == getBaseMetaTileEntity().getFrontFacing())
- {
- float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ);
- switch ((byte)((byte)(int)(tCoords[0] * 2.0F) + 2 * (byte)(int)(tCoords[1] * 2.0F)))
- {
- case 0:
- this.mFrequency -= 1;
- break;
- case 1:
- this.mFrequency += 1;
- }
- GT_Utility.sendChatToPlayer(aPlayer, "Frequency: " + this.mFrequency + (getTesseract(this.mFrequency, false) == null ? "" : new StringBuilder().append(EnumChatFormatting.GREEN).append(" (Connected)").toString()));
- }
- return true;
- }*/
-
- @Override
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ){
- if (aSide == getBaseMetaTileEntity().getFrontFacing()){
- float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ);
- switch ((byte)((byte)(int)(tCoords[0] * 2.0F) + 2 * (byte)(int)(tCoords[1] * 2.0F))){
- case 0:
- Utils.LOG_INFO("Freq. -1 | " + this.mFrequency);
- this.mFrequency -= 1;
- break;
- case 1:
- Utils.LOG_INFO("Freq. +1 | " + this.mFrequency);
- this.mFrequency += 1;
- default:
- //Utils.LOG_INFO("Did not click the correct place.");
- break;
- }
- PlayerUtils.messagePlayer(aPlayer, "Frequency: " + this.mFrequency);
- PlayerUtils.messagePlayer(aPlayer, (getTesseract(this.mFrequency, false) == null ? "" : new StringBuilder().append(EnumChatFormatting.GREEN).append(" (Connected)").toString()));
- }
- return true;
- }
-
- @Override
- public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ)
- {
- if (aSide == getBaseMetaTileEntity().getFrontFacing())
- {
- float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ);
- switch ((byte)((byte)(int)(tCoords[0] * 2.0F) + 2 * (byte)(int)(tCoords[1] * 2.0F)))
- {
- case 0:
- this.mFrequency -= 64;
- break;
- case 1:
- this.mFrequency += 64;
- break;
- case 2:
- this.mFrequency -= 512;
- break;
- case 3:
- this.mFrequency += 512;
- }
- GT_Utility.sendChatToPlayer(aPlayer, "Frequency: " + this.mFrequency + (getTesseract(this.mFrequency, false) == null ? "" : new StringBuilder().append(EnumChatFormatting.GREEN).append(" (Connected)").toString()));
- }
- }
-
- public boolean allowCoverOnSide(byte aSide, int aCoverID)
- {
- return aSide != getBaseMetaTileEntity().getFrontFacing();
+ public boolean doesFillContainers() {
+ return false;
}
- public GT_MetaTileEntity_TesseractGenerator getTesseract(int aFrequency, boolean aWorkIrrelevant)
- {
- GT_MetaTileEntity_TesseractGenerator rTesseract = (GT_MetaTileEntity_TesseractGenerator)CORE.sTesseractGenerators.get(Integer.valueOf(aFrequency));
- if (rTesseract == null) {
- return null;
- }
- if (rTesseract.mFrequency != aFrequency)
- {
- CORE.sTesseractGenerators.put(Integer.valueOf(aFrequency), null);return null;
- }
- if (!rTesseract.isValidTesseractGenerator(getBaseMetaTileEntity().getOwnerName(), aWorkIrrelevant)) {
- return null;
- }
- if ((!sInterDimensionalTesseractAllowed) && (rTesseract.getBaseMetaTileEntity().getWorld() != getBaseMetaTileEntity().getWorld())) {
+ @Override
+ public FluidStack drain(final ForgeDirection aSide, final FluidStack aFluid, final boolean doDrain) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
return null;
}
- return rTesseract;
+ return tTileEntity.drain(aSide, aFluid, doDrain);
}
@Override
- public String[] getInfoData()
- {
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity != null) && (getBaseMetaTileEntity().isAllowedToWork()) && (tTileEntity.isSendingInformation())) {
- return tTileEntity.getInfoData();
+ public FluidStack drain(final ForgeDirection aDirection, final int maxDrain, final boolean doDrain) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return null;
}
- return new String[] { "Tesseract Generator", "Freqency:", "" + this.mFrequency, getTesseract(this.mFrequency, false) != null ? "Active" : "Inactive" };
+ return tTileEntity.drain(aDirection, maxDrain, doDrain);
}
@Override
- public boolean isGivingInformation()
- {
- return true;
+ public int fill_default(final ForgeDirection aDirection, final FluidStack aFluid, final boolean doFill) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return 0;
+ }
+ return tTileEntity.fill(aDirection, aFluid, doFill);
}
@Override
- public boolean isDigitalChest()
- {
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return false;
+ public int[] getAccessibleSlotsFromSide(final int aSide) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return new int[0];
}
- return tTileEntity.isDigitalChest();
+ return tTileEntity.getAccessibleSlotsFromSide(aSide);
}
+ /*
+ * public boolean onRightclick(EntityPlayer aPlayer, byte aSide, float aX,
+ * float aY, float aZ) { if (aSide ==
+ * getBaseMetaTileEntity().getFrontFacing()) { float[] tCoords =
+ * GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ); switch
+ * ((byte)((byte)(int)(tCoords[0] * 2.0F) + 2 * (byte)(int)(tCoords[1] *
+ * 2.0F))) { case 0: this.mFrequency -= 1; break; case 1: this.mFrequency +=
+ * 1; } GT_Utility.sendChatToPlayer(aPlayer, "Frequency: " + this.mFrequency
+ * + (getTesseract(this.mFrequency, false) == null ? "" : new
+ * StringBuilder().append(EnumChatFormatting.GREEN).append(" (Connected)"
+ * ).toString())); } return true; }
+ */
+
@Override
- public ItemStack[] getStoredItemData()
- {
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return null;
- }
- return tTileEntity.getStoredItemData();
+ public String[] getDescription() {
+ return new String[] {
+ "Accesses Tesseracts remotely"
+ };
}
@Override
- public void setItemCount(int aCount)
- {
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return;
+ public String[] getInfoData() {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if (tTileEntity != null && this.getBaseMetaTileEntity().isAllowedToWork()
+ && tTileEntity.isSendingInformation()) {
+ return tTileEntity.getInfoData();
}
- tTileEntity.setItemCount(aCount);
+ return new String[] {
+ "Tesseract Generator", "Freqency:", "" + this.mFrequency,
+ this.getTesseract(this.mFrequency, false) != null ? "Active" : "Inactive"
+ };
}
@Override
- public int getMaxItemCount()
- {
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return 0;
+ public String getInventoryName() {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return "";
}
- return tTileEntity.getMaxItemCount();
+ return tTileEntity.getInventoryName();
}
@Override
- public boolean isItemValidForSlot(int aIndex, ItemStack aStack)
- {
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return false;
+ public int getInventoryStackLimit() {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return 0;
}
- return tTileEntity.isItemValidForSlot(aIndex, aStack);
+ return tTileEntity.getInventoryStackLimit();
}
@Override
- public int[] getAccessibleSlotsFromSide(int aSide)
- {
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return new int[0];
+ public int getMaxItemCount() {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return 0;
}
- return tTileEntity.getAccessibleSlotsFromSide(aSide);
+ return tTileEntity.getMaxItemCount();
}
@Override
- public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide)
- {
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return false;
- }
- return tTileEntity.canInsertItem(aIndex, aStack, aSide);
+ public long getMinimumStoredEU() {
+ return this.getBaseMetaTileEntity().getEUCapacity() / 2;
}
@Override
- public boolean canExtractItem(int aIndex, ItemStack aStack, int aSide)
- {
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return false;
- }
- return tTileEntity.canExtractItem(aIndex, aStack, aSide);
+ public int getProgresstime() {
+ return this.getTesseract(this.mFrequency, false) != null ? 999 : 0;
}
@Override
- public int getSizeInventory()
- {
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ public int getSizeInventory() {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
return 0;
}
return tTileEntity.getSizeInventory();
}
@Override
- public ItemStack getStackInSlot(int aIndex)
- {
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ public ItemStack getStackInSlot(final int aIndex) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
return null;
}
return tTileEntity.getStackInSlot(aIndex);
}
@Override
- public void setInventorySlotContents(int aIndex, ItemStack aStack)
- {
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return;
+ public ItemStack[] getStoredItemData() {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return null;
}
- tTileEntity.setInventorySlotContents(aIndex, aStack);
+ return tTileEntity.getStoredItemData();
}
@Override
- public ItemStack decrStackSize(int aIndex, int aAmount)
- {
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ public FluidTankInfo[] getTankInfo(final ForgeDirection aSide) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return new FluidTankInfo[0];
+ }
+ return tTileEntity.getTankInfo(aSide);
+ }
+
+ public GT_MetaTileEntity_TesseractGenerator getTesseract(final int aFrequency, final boolean aWorkIrrelevant) {
+ final GT_MetaTileEntity_TesseractGenerator rTesseract = CORE.sTesseractGenerators
+ .get(Integer.valueOf(aFrequency));
+ if (rTesseract == null) {
return null;
}
- return tTileEntity.decrStackSize(aIndex, aAmount);
+ if (rTesseract.mFrequency != aFrequency) {
+ CORE.sTesseractGenerators.put(Integer.valueOf(aFrequency), null);
+ return null;
+ }
+ if (!rTesseract.isValidTesseractGenerator(this.getBaseMetaTileEntity().getOwnerName(), aWorkIrrelevant)) {
+ return null;
+ }
+ if (!GT_MetaTileEntity_TesseractTerminal.sInterDimensionalTesseractAllowed
+ && rTesseract.getBaseMetaTileEntity().getWorld() != this.getBaseMetaTileEntity().getWorld()) {
+ return null;
+ }
+ return rTesseract;
}
@Override
- public String getInventoryName()
- {
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return "";
- }
- return tTileEntity.getInventoryName();
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ return aSide == aFacing ? new ITexture[] {
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional),
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_Frequency)
+ } : new ITexture[] {
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional),
+ new GT_RenderedTexture(Textures.BlockIcons.VOID)
+ };
}
@Override
- public int getInventoryStackLimit()
- {
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return 0;
- }
- return tTileEntity.getInventoryStackLimit();
+ public ITexture[][][] getTextureSet(final ITexture[] aTextures) {
+ return new ITexture[0][0][0];
}
@Override
- public boolean canFill(ForgeDirection aSide, Fluid aFluid)
- {
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return false;
- }
- return tTileEntity.canFill(aSide, aFluid);
+ public boolean isAccessAllowed(final EntityPlayer aPlayer) {
+ return true;
}
@Override
- public boolean canDrain(ForgeDirection aSide, Fluid aFluid)
- {
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ public boolean isDigitalChest() {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
return false;
}
- return tTileEntity.canDrain(aSide, aFluid);
+ return tTileEntity.isDigitalChest();
}
@Override
- public FluidTankInfo[] getTankInfo(ForgeDirection aSide)
- {
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return new FluidTankInfo[0];
- }
- return tTileEntity.getTankInfo(aSide);
+ public boolean isFacingValid(final byte aFacing) {
+ return true;
}
@Override
- public int fill_default(ForgeDirection aDirection, FluidStack aFluid, boolean doFill)
- {
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return 0;
- }
- return tTileEntity.fill(aDirection, aFluid, doFill);
+ public boolean isGivingInformation() {
+ return true;
}
@Override
- public FluidStack drain(ForgeDirection aDirection, int maxDrain, boolean doDrain)
- {
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return null;
+ public boolean isItemValidForSlot(final int aIndex, final ItemStack aStack) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return false;
}
- return tTileEntity.drain(aDirection, maxDrain, doDrain);
+ return tTileEntity.isItemValidForSlot(aIndex, aStack);
}
@Override
- public FluidStack drain(ForgeDirection aSide, FluidStack aFluid, boolean doDrain)
- {
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
- return null;
- }
- return tTileEntity.drain(aSide, aFluid, doDrain);
+ public boolean isOutputFacing(final byte aSide) {
+ return aSide == this.getBaseMetaTileEntity().getBackFacing();
}
- public void onPostTick()
- {
- if ((getBaseMetaTileEntity().isServerSide()) && (getBaseMetaTileEntity().isAllowedToWork()))
- {
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, true);
- if (tTileEntity != null)
- {
- tTileEntity.addEnergyConsumption(this);
- if ((!this.mDidWork) && (getTesseract(this.mFrequency, false) != null))
- {
- this.mDidWork = true;
- getBaseMetaTileEntity().issueBlockUpdate();
- }
- }
- else if (this.mDidWork == true)
- {
- this.mDidWork = false;
- getBaseMetaTileEntity().issueBlockUpdate();
- }
- }
+ @Override
+ public boolean isOverclockerUpgradable() {
+ return false;
}
@Override
- public String[] getDescription()
- {
- return new String[] {"Accesses Tesseracts remotely"};
+ public boolean isSimpleMachine() {
+ return false;
}
@Override
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
+ public boolean isTransformerUpgradable() {
return false;
}
@Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
+ public boolean isValidSlot(final int aIndex) {
return false;
}
@Override
- public ITexture[][][] getTextureSet(ITexture[] aTextures) {
- return new ITexture[0][0][0];
+ public void loadNBTData(final NBTTagCompound aNBT) {
+ this.mFrequency = aNBT.getInteger("mFrequency");
}
@Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- return aSide == aFacing ? new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional), new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_Frequency)} : new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional), new GT_RenderedTexture(Textures.BlockIcons.VOID)};
+ public long maxEUInput() {
+ return 2048;
}
- //To-Do?
@Override
- public boolean doesFillContainers() {
- return false;
+ public long maxEUStore() {
+ return 100000;
}
@Override
- public boolean doesEmptyContainers() {
- return false;
+ public int maxProgresstime() {
+ return 1000;
}
@Override
- public boolean canTankBeFilled() {
- return false;
+ public long maxSteamStore() {
+ return this.maxEUStore();
}
@Override
- public boolean canTankBeEmptied() {
- return false;
+ public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_TesseractTerminal(this.mName, this.mTier, this.mDescription, this.mTextures);
}
@Override
- public boolean displaysItemStack() {
- return false;
+ public void onConfigLoad(final GT_Config aConfig) {
+ GT_MetaTileEntity_TesseractTerminal.sInterDimensionalTesseractAllowed = true;
+ }
+
+ public void onPostTick() {
+ if (this.getBaseMetaTileEntity().isServerSide() && this.getBaseMetaTileEntity().isAllowedToWork()) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, true);
+ if (tTileEntity != null) {
+ tTileEntity.addEnergyConsumption(this);
+ if (!this.mDidWork && this.getTesseract(this.mFrequency, false) != null) {
+ this.mDidWork = true;
+ this.getBaseMetaTileEntity().issueBlockUpdate();
+ }
+ }
+ else if (this.mDidWork == true) {
+ this.mDidWork = false;
+ this.getBaseMetaTileEntity().issueBlockUpdate();
+ }
+ }
}
@Override
- public boolean displaysStackSize() {
- return false;
+ public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer,
+ final byte aSide, final float aX, final float aY, final float aZ) {
+ if (aSide == this.getBaseMetaTileEntity().getFrontFacing()) {
+ final float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ);
+ switch ((byte) ((byte) (int) (tCoords[0] * 2.0F) + 2 * (byte) (int) (tCoords[1] * 2.0F))) {
+ case 0:
+ Utils.LOG_INFO("Freq. -1 | " + this.mFrequency);
+ this.mFrequency -= 1;
+ break;
+ case 1:
+ Utils.LOG_INFO("Freq. +1 | " + this.mFrequency);
+ this.mFrequency += 1;
+ default:
+ // Utils.LOG_INFO("Did not click the correct place.");
+ break;
+ }
+ PlayerUtils.messagePlayer(aPlayer, "Frequency: " + this.mFrequency);
+ PlayerUtils.messagePlayer(aPlayer, this.getTesseract(this.mFrequency, false) == null ? ""
+ : new StringBuilder().append(EnumChatFormatting.GREEN).append(" (Connected)").toString());
+ }
+ return true;
+ }
+
+ @Override
+ public void onScrewdriverRightClick(final byte aSide, final EntityPlayer aPlayer, final float aX, final float aY,
+ final float aZ) {
+ if (aSide == this.getBaseMetaTileEntity().getFrontFacing()) {
+ final float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ);
+ switch ((byte) ((byte) (int) (tCoords[0] * 2.0F) + 2 * (byte) (int) (tCoords[1] * 2.0F))) {
+ case 0:
+ this.mFrequency -= 64;
+ break;
+ case 1:
+ this.mFrequency += 64;
+ break;
+ case 2:
+ this.mFrequency -= 512;
+ break;
+ case 3:
+ this.mFrequency += 512;
+ }
+ GT_Utility.sendChatToPlayer(aPlayer,
+ "Frequency: " + this.mFrequency + (this.getTesseract(this.mFrequency, false) == null ? ""
+ : new StringBuilder().append(EnumChatFormatting.GREEN).append(" (Connected)").toString()));
+ }
+ }
+
+ @Override
+ public boolean ownerControl() {
+ return true;
+ }
+
+ @Override
+ public void saveNBTData(final NBTTagCompound aNBT) {
+ aNBT.setInteger("mFrequency", this.mFrequency);
+ }
+
+ @Override
+ public void setInventorySlotContents(final int aIndex, final ItemStack aStack) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return;
+ }
+ tTileEntity.setInventorySlotContents(aIndex, aStack);
+ }
+
+ @Override
+ public void setItemCount(final int aCount) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if (tTileEntity == null || !this.getBaseMetaTileEntity().isAllowedToWork()) {
+ return;
+ }
+ tTileEntity.setItemCount(aCount);
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Solar.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Solar.java
index c2cadab478..fee44a962e 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Solar.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Solar.java
@@ -16,129 +16,164 @@ import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidHandler;
-public class GT_MetaTileEntity_Boiler_Solar
- extends GT_MetaTileEntity_Boiler {
- public GT_MetaTileEntity_Boiler_Solar(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional, "Steam Power by the Sun", new ITexture[0]);
- }
+public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler {
+ private int mRunTime = 0;
- public GT_MetaTileEntity_Boiler_Solar(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, aDescription, aTextures);
- }
+ public GT_MetaTileEntity_Boiler_Solar(final int aID, final String aName, final String aNameRegional) {
+ super(aID, aName, aNameRegional, "Steam Power by the Sun", new ITexture[0]);
+ }
- public ITexture[][][] getTextureSet(ITexture[] aTextures) {
- ITexture[][][] rTextures = new ITexture[4][17][];
- for (byte i = -1; i < 16; i = (byte) (i + 1)) {
- ITexture[] tmp0 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
- rTextures[0][(i + 1)] = tmp0;
- ITexture[] tmp1 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.BOILER_SOLAR)};
- rTextures[1][(i + 1)] = tmp1;
- ITexture[] tmp2 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
- rTextures[2][(i + 1)] = tmp2;
- ITexture[] tmp3 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE)};
- rTextures[3][(i + 1)] = tmp3;
- }
- return rTextures;
- }
+ public GT_MetaTileEntity_Boiler_Solar(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures) {
+ super(aName, aTier, aDescription, aTextures);
+ }
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- return mTextures[aSide >= 2 ? ((byte) (aSide != aFacing ? 2 : 3)) : aSide][aColorIndex + 1];
- }
+ @Override
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory,
+ final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GT_GUIContainer_Boiler(aPlayerInventory, aBaseMetaTileEntity, "SolarBoiler.png", 16000);
+ }
- public int maxProgresstime() {
- return 500;
- }
+ @Override
+ public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory,
+ final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GT_Container_Boiler(aPlayerInventory, aBaseMetaTileEntity, 16000);
+ }
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_Container_Boiler(aPlayerInventory, aBaseMetaTileEntity, 16000);
- }
+ @Override
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ return this.mTextures[aSide >= 2 ? (byte) (aSide != aFacing ? 2 : 3) : aSide][aColorIndex + 1];
+ }
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_Boiler(aPlayerInventory, aBaseMetaTileEntity, "SolarBoiler.png", 16000);
- }
+ @Override
+ public ITexture[][][] getTextureSet(final ITexture[] aTextures) {
+ final ITexture[][][] rTextures = new ITexture[4][17][];
+ for (byte i = -1; i < 16; i = (byte) (i + 1)) {
+ final ITexture[] tmp0 = {
+ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa))
+ };
+ rTextures[0][i + 1] = tmp0;
+ final ITexture[] tmp1 = {
+ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa)),
+ new GT_RenderedTexture(Textures.BlockIcons.BOILER_SOLAR)
+ };
+ rTextures[1][i + 1] = tmp1;
+ final ITexture[] tmp2 = {
+ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa))
+ };
+ rTextures[2][i + 1] = tmp2;
+ final ITexture[] tmp3 = {
+ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE,
+ Dyes.getModulation(i, Dyes._NULL.mRGBa)),
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE)
+ };
+ rTextures[3][i + 1] = tmp3;
+ }
+ return rTextures;
+ }
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_Boiler_Solar(this.mName, this.mTier, this.mDescription, this.mTextures);
- }
-
- private int mRunTime = 0;
-
- @Override
- public void saveNBTData(NBTTagCompound aNBT) {
- super.saveNBTData(aNBT);
- aNBT.setInteger("mRunTime", this.mRunTime);
- }
+ @Override
+ public void loadNBTData(final NBTTagCompound aNBT) {
+ super.loadNBTData(aNBT);
+ this.mRunTime = aNBT.getInteger("mRunTime");
+ }
- @Override
- public void loadNBTData(NBTTagCompound aNBT) {
- super.loadNBTData(aNBT);
- this.mRunTime = aNBT.getInteger("mRunTime");
- }
+ @Override
+ public int maxProgresstime() {
+ return 500;
+ }
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- if ((aBaseMetaTileEntity.isServerSide()) && (aTick > 20L)) {
- if (this.mTemperature <= 20) {
- this.mTemperature = 20;
- this.mLossTimer = 0;
- }
- if (++this.mLossTimer > 45) {
- this.mTemperature -= 1;
- this.mLossTimer = 0;
- }
- if (this.mSteam != null) {
- byte i = aBaseMetaTileEntity.getFrontFacing();
- IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(i);
- if (tTileEntity != null) {
- FluidStack tDrained = aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), Math.max(1, this.mSteam.amount / 2), false);
- if (tDrained != null) {
- int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), tDrained, false);
- if (tFilledAmount > 0) {
- tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), tFilledAmount, true), true);
- }
- }
- }
- }
- if (aTick % 25L == 0L) {
- if (this.mTemperature > 100) {
- if ((this.mFluid == null) || (!GT_ModHandler.isWater(this.mFluid)) || (this.mFluid.amount <= 0)) {
- this.mHadNoWater = true;
- } else {
- if (this.mHadNoWater) {
- aBaseMetaTileEntity.doExplosion(2048L);
- return;
- }
- this.mFluid.amount -= 1;
- mRunTime += 1;
- int tOutput = 150;
- if(mRunTime > 10000){
- tOutput = Math.max(50, 150 - ((mRunTime-10000)/100));
- }
- if (this.mSteam == null) {
- this.mSteam = GT_ModHandler.getSteam(tOutput);
- } else if (GT_ModHandler.isSteam(this.mSteam)) {
- this.mSteam.amount += tOutput;
- } else {
- this.mSteam = GT_ModHandler.getSteam(tOutput);
- }
- }
- } else {
- this.mHadNoWater = false;
- }
- }
- if ((this.mSteam != null) &&
- (this.mSteam.amount > 16000)) {
- sendSound((byte) 1);
- this.mSteam.amount = 12000;
- }
- if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) && (aTick % 256L == 0L) && (!aBaseMetaTileEntity.getWorld().isThundering())) {
- boolean bRain = aBaseMetaTileEntity.getWorld().isRaining() && aBaseMetaTileEntity.getBiome().rainfall > 0.0F;
- mProcessingEnergy += bRain && aBaseMetaTileEntity.getWorld().skylightSubtracted >= 4 || !aBaseMetaTileEntity.getSkyAtSide((byte) 1) ? 0 : !bRain && aBaseMetaTileEntity.getWorld().isDaytime() ? 8 : 1;
- }
- if ((this.mTemperature < 500) && (this.mProcessingEnergy > 0) && (aTick % 12L == 0L)) {
- this.mProcessingEnergy -= 1;
- this.mTemperature += 1;
- }
- aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0);
- }
- }
+ @Override
+ public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_Boiler_Solar(this.mName, this.mTier, this.mDescription, this.mTextures);
+ }
+
+ @Override
+ public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) {
+ if (aBaseMetaTileEntity.isServerSide() && aTick > 20L) {
+ if (this.mTemperature <= 20) {
+ this.mTemperature = 20;
+ this.mLossTimer = 0;
+ }
+ if (++this.mLossTimer > 45) {
+ this.mTemperature -= 1;
+ this.mLossTimer = 0;
+ }
+ if (this.mSteam != null) {
+ final byte i = aBaseMetaTileEntity.getFrontFacing();
+ final IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(i);
+ if (tTileEntity != null) {
+ final FluidStack tDrained = aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i),
+ Math.max(1, this.mSteam.amount / 2), false);
+ if (tDrained != null) {
+ final int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(),
+ tDrained, false);
+ if (tFilledAmount > 0) {
+ tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(),
+ aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), tFilledAmount, true),
+ true);
+ }
+ }
+ }
+ }
+ if (aTick % 25L == 0L) {
+ if (this.mTemperature > 100) {
+ if (this.mFluid == null || !GT_ModHandler.isWater(this.mFluid) || this.mFluid.amount <= 0) {
+ this.mHadNoWater = true;
+ }
+ else {
+ if (this.mHadNoWater) {
+ aBaseMetaTileEntity.doExplosion(2048L);
+ return;
+ }
+ this.mFluid.amount -= 1;
+ this.mRunTime += 1;
+ int tOutput = 150;
+ if (this.mRunTime > 10000) {
+ tOutput = Math.max(50, 150 - (this.mRunTime - 10000) / 100);
+ }
+ if (this.mSteam == null) {
+ this.mSteam = GT_ModHandler.getSteam(tOutput);
+ }
+ else if (GT_ModHandler.isSteam(this.mSteam)) {
+ this.mSteam.amount += tOutput;
+ }
+ else {
+ this.mSteam = GT_ModHandler.getSteam(tOutput);
+ }
+ }
+ }
+ else {
+ this.mHadNoWater = false;
+ }
+ }
+ if (this.mSteam != null && this.mSteam.amount > 16000) {
+ this.sendSound((byte) 1);
+ this.mSteam.amount = 12000;
+ }
+ if (this.mProcessingEnergy <= 0 && aBaseMetaTileEntity.isAllowedToWork() && aTick % 256L == 0L
+ && !aBaseMetaTileEntity.getWorld().isThundering()) {
+ final boolean bRain = aBaseMetaTileEntity.getWorld().isRaining()
+ && aBaseMetaTileEntity.getBiome().rainfall > 0.0F;
+ this.mProcessingEnergy += bRain && aBaseMetaTileEntity.getWorld().skylightSubtracted >= 4
+ || !aBaseMetaTileEntity.getSkyAtSide((byte) 1) ? 0
+ : !bRain && aBaseMetaTileEntity.getWorld().isDaytime() ? 8 : 1;
+ }
+ if (this.mTemperature < 500 && this.mProcessingEnergy > 0 && aTick % 12L == 0L) {
+ this.mProcessingEnergy -= 1;
+ this.mTemperature += 1;
+ }
+ aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0);
+ }
+ }
+
+ @Override
+ public void saveNBTData(final NBTTagCompound aNBT) {
+ super.saveNBTData(aNBT);
+ aNBT.setInteger("mRunTime", this.mRunTime);
+ }
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java
index 668c8e4018..b05e1cb2a0 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java
@@ -13,122 +13,151 @@ import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generato
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import net.minecraft.item.ItemStack;
-public class GregtechMetaTileEntityDoubleFuelGeneratorBase
- extends GregtechRocketFuelGeneratorBase {
-
- public int mEfficiency;
-
- public GregtechMetaTileEntityDoubleFuelGeneratorBase(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, "Requires two liquid Fuels. Fuel A is Fastburn, Fuel B is slowburn.", new ITexture[0]);
- onConfigLoad();
- }
-
- public GregtechMetaTileEntityDoubleFuelGeneratorBase(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, aDescription, aTextures);
- onConfigLoad();
- }
-
- @Override
- public boolean isOutputFacing(byte aSide) {
- return aSide == getBaseMetaTileEntity().getFrontFacing();
- }
-
- @Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GregtechMetaTileEntityDoubleFuelGeneratorBase(this.mName, this.mTier, this.mDescription, this.mTextures);
- }
+public class GregtechMetaTileEntityDoubleFuelGeneratorBase extends GregtechRocketFuelGeneratorBase {
+
+ public int mEfficiency;
+
+ public GregtechMetaTileEntityDoubleFuelGeneratorBase(final int aID, final String aName, final String aNameRegional,
+ final int aTier) {
+ super(aID, aName, aNameRegional, aTier, "Requires two liquid Fuels. Fuel A is Fastburn, Fuel B is slowburn.",
+ new ITexture[0]);
+ this.onConfigLoad();
+ }
+
+ public GregtechMetaTileEntityDoubleFuelGeneratorBase(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures) {
+ super(aName, aTier, aDescription, aTextures);
+ this.onConfigLoad();
+ }
+
+ @Override
+ public ITexture[] getBack(final byte aColor) {
+ return new ITexture[] {
+ super.getBack(aColor)[0], this.getCasingTexture(),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent)
+ };
+ }
+
+ @Override
+ public ITexture[] getBackActive(final byte aColor) {
+ return new ITexture[] {
+ super.getBackActive(aColor)[0], this.getCasingTexture(),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent_Fast)
+ };
+ }
+
+ @Override
+ public ITexture[] getBottom(final byte aColor) {
+ return new ITexture[] {
+ super.getBottom(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
+ };
+ }
+
+ @Override
+ public ITexture[] getBottomActive(final byte aColor) {
+ return new ITexture[] {
+ super.getBottomActive(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
+ };
+ }
+
+ @Override
+ public int getCapacity() {
+ return 32000;
+ }
- @Override
- public GT_Recipe.GT_Recipe_Map getRecipes() {
- return GT_Recipe.GT_Recipe_Map.sDieselFuels;
- }
+ private GT_RenderedTexture getCasingTexture() {
+ if (this.mTier <= 4) {
+ return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top);
+ }
+ else if (this.mTier == 5) {
- @Override
- public int getCapacity() {
- return 32000;
- }
+ return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Advanced);
+ }
+ else if (this.mTier >= 6) {
- public void onConfigLoad() {
- this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "RocketEngine.efficiency.tier." + this.mTier, (100 - this.mTier * 8));
- }
+ return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Ultra);
+ }
+ return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top);
+ }
- @Override
+ @Override
public int getEfficiency() {
- return this.mEfficiency;
- }
-
- @Override
- public int getFuelValue(ItemStack aStack) {
- int rValue = Math.max(GT_ModHandler.getFuelCanValue(aStack) * 6 / 5, super.getFuelValue(aStack));
- if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) {
- rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3);
- }
- return rValue;
- }
-
- private GT_RenderedTexture getCasingTexture(){
- if (this.mTier <= 4){
- return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top);
- }
- else if (this.mTier == 5){
-
- return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Advanced);
- }
- else if (this.mTier >= 6){
-
- return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Ultra);
- }
- return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top);
- }
-
-
- @Override
- public ITexture[] getFront(byte aColor) {
- return new ITexture[]{super.getFront(aColor)[0], getCasingTexture(), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]};
- }
-
- @Override
- public ITexture[] getBack(byte aColor) {
- return new ITexture[]{super.getBack(aColor)[0], getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent)};
- }
-
- @Override
- public ITexture[] getBottom(byte aColor) {
- return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)};
- }
-
- @Override
- public ITexture[] getTop(byte aColor) {
- return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_Off)};
- }
-
- @Override
- public ITexture[] getSides(byte aColor) {
- return new ITexture[]{super.getSides(aColor)[0], getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal)};
- }
-
- @Override
- public ITexture[] getFrontActive(byte aColor) {
- return new ITexture[]{super.getFrontActive(aColor)[0], getCasingTexture(), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]};
- }
-
- @Override
- public ITexture[] getBackActive(byte aColor) {
- return new ITexture[]{super.getBackActive(aColor)[0], getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent_Fast)};
- }
-
- @Override
- public ITexture[] getBottomActive(byte aColor) {
- return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)};
- }
-
- @Override
- public ITexture[] getTopActive(byte aColor) {
- return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_On)};
- }
-
- @Override
- public ITexture[] getSidesActive(byte aColor) {
- return new ITexture[]{super.getSidesActive(aColor)[0], getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal_Active)};
- }
+ return this.mEfficiency;
+ }
+
+ @Override
+ public ITexture[] getFront(final byte aColor) {
+ return new ITexture[] {
+ super.getFront(aColor)[0], this.getCasingTexture(),
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]
+ };
+ }
+
+ @Override
+ public ITexture[] getFrontActive(final byte aColor) {
+ return new ITexture[] {
+ super.getFrontActive(aColor)[0], this.getCasingTexture(),
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]
+ };
+ }
+
+ @Override
+ public int getFuelValue(final ItemStack aStack) {
+ int rValue = Math.max(GT_ModHandler.getFuelCanValue(aStack) * 6 / 5, super.getFuelValue(aStack));
+ if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) {
+ rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3);
+ }
+ return rValue;
+ }
+
+ @Override
+ public GT_Recipe.GT_Recipe_Map getRecipes() {
+ return GT_Recipe.GT_Recipe_Map.sDieselFuels;
+ }
+
+ @Override
+ public ITexture[] getSides(final byte aColor) {
+ return new ITexture[] {
+ super.getSides(aColor)[0], this.getCasingTexture(),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal)
+ };
+ }
+
+ @Override
+ public ITexture[] getSidesActive(final byte aColor) {
+ return new ITexture[] {
+ super.getSidesActive(aColor)[0], this.getCasingTexture(),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal_Active)
+ };
+ }
+
+ @Override
+ public ITexture[] getTop(final byte aColor) {
+ return new ITexture[] {
+ super.getTop(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_Off)
+ };
+ }
+
+ @Override
+ public ITexture[] getTopActive(final byte aColor) {
+ return new ITexture[] {
+ super.getTopActive(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_On)
+ };
+ }
+
+ @Override
+ public boolean isOutputFacing(final byte aSide) {
+ return aSide == this.getBaseMetaTileEntity().getFrontFacing();
+ }
+
+ @Override
+ public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntityDoubleFuelGeneratorBase(this.mName, this.mTier, this.mDescription,
+ this.mTextures);
+ }
+
+ public void onConfigLoad() {
+ this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig,
+ "RocketEngine.efficiency.tier." + this.mTier, 100 - this.mTier * 8);
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java
index 83ce6576c9..6c0df9ea99 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java
@@ -14,130 +14,158 @@ import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
-public class GregtechMetaTileEntityGeothermalGenerator
-extends GT_MetaTileEntity_BasicGenerator
-{
+public class GregtechMetaTileEntityGeothermalGenerator extends GT_MetaTileEntity_BasicGenerator {
public int mEfficiency;
- public GregtechMetaTileEntityGeothermalGenerator(int aID, String aName, String aNameRegional, int aTier) {
+ public GregtechMetaTileEntityGeothermalGenerator(final int aID, final String aName, final String aNameRegional,
+ final int aTier) {
super(aID, aName, aNameRegional, aTier, "Requires Pahoehoe Lava or Normal Lava as Fuel", new ITexture[0]);
- onConfigLoad();
+ this.onConfigLoad();
}
- public GregtechMetaTileEntityGeothermalGenerator(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
+ public GregtechMetaTileEntityGeothermalGenerator(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
- onConfigLoad();
- }
+ this.onConfigLoad();
+ }
@Override
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
- if (aBaseMetaTileEntity.isClientSide()){
- return true;
- }
- aBaseMetaTileEntity.openGUI(aPlayer);
- return true;
- }
+ public ITexture[] getBack(final byte aColor) {
+ return new ITexture[] {
+ super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BACK),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Vertical)
+ };
+ }
@Override
- public int getCapacity() {
- //return MathUtils.roundToClosestMultiple(32000*(this.mTier/2), 25000);
- return 5000*this.mTier;
+ public ITexture[] getBackActive(final byte aColor) {
+ return new ITexture[] {
+ super.getBackActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BACK_ACTIVE),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Vertical_Active)
+ };
}
- public void onConfigLoad() {
- this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "ThermalGenerator.efficiency.tier." + this.mTier, (100 - this.mTier * 7));
+ @Override
+ public ITexture[] getBottom(final byte aColor) {
+ return new ITexture[] {
+ super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM)
+ };
}
@Override
- public int getEfficiency() {
- return this.mEfficiency;
+ public ITexture[] getBottomActive(final byte aColor) {
+ return new ITexture[] {
+ super.getBottomActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM_ACTIVE)
+ };
}
@Override
- public int getFuelValue(ItemStack aStack) {
- int rValue = Math.max(GT_ModHandler.getFuelCanValue(aStack) * 6 / 5, super.getFuelValue(aStack));
- if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) {
- rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3);
- }
- return rValue;
+ public int getCapacity() {
+ // return MathUtils.roundToClosestMultiple(32000*(this.mTier/2), 25000);
+ return 5000 * this.mTier;
}
@Override
- public boolean isOutputFacing(byte aSide) {
- return aSide == getBaseMetaTileEntity().getFrontFacing();
+ public String[] getDescription() {
+ return new String[] {
+ "Generates power from Lava/Pahoehoe at " + this.getEfficiency() + "% Efficiency per tick"
+ };
}
@Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GregtechMetaTileEntityGeothermalGenerator(this.mName, this.mTier, this.mDescription, this.mTextures);
+ public int getEfficiency() {
+ return this.mEfficiency;
}
@Override
- public ITexture[] getFront(byte aColor) {
- return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]};
+ public ITexture[] getFront(final byte aColor) {
+ return new ITexture[] {
+ super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE),
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]
+ };
}
@Override
- public ITexture[] getBack(byte aColor) {
- return new ITexture[]{super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BACK), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Vertical)};
+ public ITexture[] getFrontActive(final byte aColor) {
+ return new ITexture[] {
+ super.getFrontActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE_ACTIVE),
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]
+ };
}
@Override
- public ITexture[] getBottom(byte aColor) {
- return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM)};
+ public int getFuelValue(final ItemStack aStack) {
+ int rValue = Math.max(GT_ModHandler.getFuelCanValue(aStack) * 6 / 5, super.getFuelValue(aStack));
+ if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) {
+ rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3);
+ }
+ return rValue;
}
- @Override
- public ITexture[] getTop(byte aColor) {
- return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER)};
+ public int getPollution() {
+ return 100;
}
@Override
- public ITexture[] getSides(byte aColor) {
- return new ITexture[]{super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.BOILER_LAVA_FRONT)};
+ public GT_Recipe_Map getRecipes() {
+ return GT_Recipe_Map.sHotFuels;
}
@Override
- public ITexture[] getFrontActive(byte aColor) {
- return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE_ACTIVE), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]};
+ public ITexture[] getSides(final byte aColor) {
+ return new ITexture[] {
+ super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.BOILER_LAVA_FRONT)
+ };
}
@Override
- public ITexture[] getBackActive(byte aColor) {
- return new ITexture[]{super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BACK_ACTIVE), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Vertical_Active)};
+ public ITexture[] getSidesActive(final byte aColor) {
+ return new ITexture[] {
+ super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.BOILER_LAVA_FRONT_ACTIVE)
+ };
}
@Override
- public ITexture[] getBottomActive(byte aColor) {
- return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM_ACTIVE)};
+ public ITexture[] getTop(final byte aColor) {
+ return new ITexture[] {
+ super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE),
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER)
+ };
}
@Override
- public ITexture[] getTopActive(byte aColor) {
- return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE)};
+ public ITexture[] getTopActive(final byte aColor) {
+ return new ITexture[] {
+ super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE),
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE)
+ };
}
@Override
- public ITexture[] getSidesActive(byte aColor) {
- return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.BOILER_LAVA_FRONT_ACTIVE)};
+ public boolean isOutputFacing(final byte aSide) {
+ return aSide == this.getBaseMetaTileEntity().getFrontFacing();
}
-
@Override
- public String[] getDescription()
- {
- return new String[] {"Generates power from Lava/Pahoehoe at " + getEfficiency() + "% Efficiency per tick"};
+ public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntityGeothermalGenerator(this.mName, this.mTier, this.mDescription, this.mTextures);
}
- @Override
- public GT_Recipe_Map getRecipes()
- {
- return GT_Recipe_Map.sHotFuels;
+ public void onConfigLoad() {
+ this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig,
+ "ThermalGenerator.efficiency.tier." + this.mTier, 100 - this.mTier * 7);
}
-
- public int getPollution() {
- return 100;
+ @Override
+ public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) {
+ if (aBaseMetaTileEntity.isClientSide()) {
+ return true;
+ }
+ aBaseMetaTileEntity.openGUI(aPlayer);
+ return true;
}
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java
index 74bc6ef5e1..95194a5ecb 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java
@@ -13,122 +13,149 @@ import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generato
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import net.minecraft.item.ItemStack;
-public class GregtechMetaTileEntityRocketFuelGenerator
- extends GregtechRocketFuelGeneratorBase {
-
- public int mEfficiency;
-
- public GregtechMetaTileEntityRocketFuelGenerator(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, "Requires liquid Fuels.", new ITexture[0]);
- onConfigLoad();
- }
-
- public GregtechMetaTileEntityRocketFuelGenerator(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, aDescription, aTextures);
- onConfigLoad();
- }
-
- @Override
- public boolean isOutputFacing(byte aSide) {
- return aSide == getBaseMetaTileEntity().getFrontFacing();
- }
-
- @Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GregtechMetaTileEntityRocketFuelGenerator(this.mName, this.mTier, this.mDescription, this.mTextures);
- }
+public class GregtechMetaTileEntityRocketFuelGenerator extends GregtechRocketFuelGeneratorBase {
+
+ public int mEfficiency;
+
+ public GregtechMetaTileEntityRocketFuelGenerator(final int aID, final String aName, final String aNameRegional,
+ final int aTier) {
+ super(aID, aName, aNameRegional, aTier, "Requires liquid Fuels.", new ITexture[0]);
+ this.onConfigLoad();
+ }
+
+ public GregtechMetaTileEntityRocketFuelGenerator(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures) {
+ super(aName, aTier, aDescription, aTextures);
+ this.onConfigLoad();
+ }
+
+ @Override
+ public ITexture[] getBack(final byte aColor) {
+ return new ITexture[] {
+ super.getBack(aColor)[0], this.getCasingTexture(),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent)
+ };
+ }
+
+ @Override
+ public ITexture[] getBackActive(final byte aColor) {
+ return new ITexture[] {
+ super.getBackActive(aColor)[0], this.getCasingTexture(),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent_Fast)
+ };
+ }
+
+ @Override
+ public ITexture[] getBottom(final byte aColor) {
+ return new ITexture[] {
+ super.getBottom(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
+ };
+ }
+
+ @Override
+ public ITexture[] getBottomActive(final byte aColor) {
+ return new ITexture[] {
+ super.getBottomActive(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)
+ };
+ }
+
+ @Override
+ public int getCapacity() {
+ return 32000;
+ }
- @Override
- public GT_Recipe.GT_Recipe_Map getRecipes() {
- return GT_Recipe.GT_Recipe_Map.sDieselFuels;
- }
+ private GT_RenderedTexture getCasingTexture() {
+ if (this.mTier <= 4) {
+ return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top);
+ }
+ else if (this.mTier == 5) {
- @Override
- public int getCapacity() {
- return 32000;
- }
+ return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Advanced);
+ }
+ else if (this.mTier >= 6) {
- public void onConfigLoad() {
- this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "RocketEngine.efficiency.tier." + this.mTier, (100 - this.mTier * 8));
- }
+ return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Ultra);
+ }
+ return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top);
+ }
- @Override
+ @Override
public int getEfficiency() {
- return this.mEfficiency;
- }
-
- @Override
- public int getFuelValue(ItemStack aStack) {
- int rValue = Math.max(GT_ModHandler.getFuelCanValue(aStack) * 6 / 5, super.getFuelValue(aStack));
- if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) {
- rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3);
- }
- return rValue;
- }
-
- private GT_RenderedTexture getCasingTexture(){
- if (this.mTier <= 4){
- return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top);
- }
- else if (this.mTier == 5){
-
- return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Advanced);
- }
- else if (this.mTier >= 6){
-
- return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Ultra);
- }
- return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top);
- }
-
-
- @Override
- public ITexture[] getFront(byte aColor) {
- return new ITexture[]{super.getFront(aColor)[0], getCasingTexture(), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]};
- }
-
- @Override
- public ITexture[] getBack(byte aColor) {
- return new ITexture[]{super.getBack(aColor)[0], getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent)};
- }
-
- @Override
- public ITexture[] getBottom(byte aColor) {
- return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)};
- }
-
- @Override
- public ITexture[] getTop(byte aColor) {
- return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_Off)};
- }
-
- @Override
- public ITexture[] getSides(byte aColor) {
- return new ITexture[]{super.getSides(aColor)[0], getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal)};
- }
-
- @Override
- public ITexture[] getFrontActive(byte aColor) {
- return new ITexture[]{super.getFrontActive(aColor)[0], getCasingTexture(), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]};
- }
-
- @Override
- public ITexture[] getBackActive(byte aColor) {
- return new ITexture[]{super.getBackActive(aColor)[0], getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent_Fast)};
- }
-
- @Override
- public ITexture[] getBottomActive(byte aColor) {
- return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)};
- }
-
- @Override
- public ITexture[] getTopActive(byte aColor) {
- return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_On)};
- }
-
- @Override
- public ITexture[] getSidesActive(byte aColor) {
- return new ITexture[]{super.getSidesActive(aColor)[0], getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal_Active)};
- }
+ return this.mEfficiency;
+ }
+
+ @Override
+ public ITexture[] getFront(final byte aColor) {
+ return new ITexture[] {
+ super.getFront(aColor)[0], this.getCasingTexture(),
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]
+ };
+ }
+
+ @Override
+ public ITexture[] getFrontActive(final byte aColor) {
+ return new ITexture[] {
+ super.getFrontActive(aColor)[0], this.getCasingTexture(),
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]
+ };
+ }
+
+ @Override
+ public int getFuelValue(final ItemStack aStack) {
+ int rValue = Math.max(GT_ModHandler.getFuelCanValue(aStack) * 6 / 5, super.getFuelValue(aStack));
+ if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) {
+ rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3);
+ }
+ return rValue;
+ }
+
+ @Override
+ public GT_Recipe.GT_Recipe_Map getRecipes() {
+ return GT_Recipe.GT_Recipe_Map.sDieselFuels;
+ }
+
+ @Override
+ public ITexture[] getSides(final byte aColor) {
+ return new ITexture[] {
+ super.getSides(aColor)[0], this.getCasingTexture(),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal)
+ };
+ }
+
+ @Override
+ public ITexture[] getSidesActive(final byte aColor) {
+ return new ITexture[] {
+ super.getSidesActive(aColor)[0], this.getCasingTexture(),
+ new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal_Active)
+ };
+ }
+
+ @Override
+ public ITexture[] getTop(final byte aColor) {
+ return new ITexture[] {
+ super.getTop(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_Off)
+ };
+ }
+
+ @Override
+ public ITexture[] getTopActive(final byte aColor) {
+ return new ITexture[] {
+ super.getTopActive(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_On)
+ };
+ }
+
+ @Override
+ public boolean isOutputFacing(final byte aSide) {
+ return aSide == this.getBaseMetaTileEntity().getFrontFacing();
+ }
+
+ @Override
+ public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntityRocketFuelGenerator(this.mName, this.mTier, this.mDescription, this.mTextures);
+ }
+
+ public void onConfigLoad() {
+ this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig,
+ "RocketEngine.efficiency.tier." + this.mTier, 100 - this.mTier * 8);
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java
index 0bab0ab9d0..50303dbfcd 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java
@@ -1,10 +1,7 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.generators;
-import static gregtech.api.enums.GT_Values.V;
-
import gregtech.api.GregTech_API;
-import gregtech.api.enums.ConfigCategories;
-import gregtech.api.enums.Textures;
+import gregtech.api.enums.*;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
@@ -17,159 +14,200 @@ import net.minecraft.entity.player.InventoryPlayer;
public class GregtechMetaTileEntitySolarGenerator extends GregtechMetaSolarGenerator {
- public GregtechMetaTileEntitySolarGenerator(int aID, String aName, String aNameRegional, int aTier) {
+ ITexture SolarArray[] = {
+ new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_8V),
+ new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LV),
+ new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_MV),
+ new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_HV),
+ new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_EV),
+ new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_IV),
+ new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LuV),
+ new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_ZPM),
+ new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_UV),
+ new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL)
+ };
+
+ public GregtechMetaTileEntitySolarGenerator(final int aID, final String aName, final String aNameRegional,
+ final int aTier) {
super(aID, aName, aNameRegional, aTier, "Feasts on the power of the Sun!", new ITexture[0]);
- onConfigLoad();
+ this.onConfigLoad();
}
- public GregtechMetaTileEntitySolarGenerator(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
+ public GregtechMetaTileEntitySolarGenerator(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
- onConfigLoad();
+ this.onConfigLoad();
}
@Override
- public boolean isOutputFacing(byte aSide) {
- return aSide == getBaseMetaTileEntity().getFrontFacing();
+ public ITexture[] getBack(final byte aColor) {
+ return new ITexture[] {
+ super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC)
+ };
}
@Override
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new CONTAINER_SolarGenerator(aPlayerInventory, aBaseMetaTileEntity, 16000);
+ public ITexture[] getBackActive(final byte aColor) {
+ return new ITexture[] {
+ super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE)
+ };
}
@Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GUI_SolarGenerator(aPlayerInventory, aBaseMetaTileEntity, "SolarBoiler.png", 16000);
+ public ITexture[] getBottom(final byte aColor) {
+ return new ITexture[] {
+ super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC)
+ };
}
@Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GregtechMetaTileEntitySolarGenerator(this.mName, this.mTier, this.mDescription, this.mTextures);
+ public ITexture[] getBottomActive(final byte aColor) {
+ return new ITexture[] {
+ super.getBottomActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE)
+ };
}
- public void onConfigLoad() {
- this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "SunAbsorber.efficiency.tier." + this.mTier, 100 - this.mTier * 10);
-
+ @Override
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory,
+ final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GUI_SolarGenerator(aPlayerInventory, aBaseMetaTileEntity, "SolarBoiler.png", 16000);
}
@Override
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork()
- && aBaseMetaTileEntity.getUniversalEnergyStored() < maxEUOutput() + aBaseMetaTileEntity.getEUCapacity()) {
-
- if (this.mSolarCharge <= 20) {
- //Utils.LOG_WARNING("1.");
- this.mSolarCharge = 20;
- this.mLossTimer = 0;
- }
- if (++this.mLossTimer > 45) {
- //Utils.LOG_WARNING("2.");
- this.mSolarCharge -= 1;
- this.mLossTimer = 0;
- }
-
- if (aTick % 10L == 0L) {
-
- Utils.LOG_WARNING("getUniversalEnergyStored: "+aBaseMetaTileEntity.getUniversalEnergyStored() + " maxEUOutput * 20 + getMinimumStoredEU: " + (maxEUOutput() * 20 + getMinimumStoredEU()));
-
- if ((this.mSolarCharge > 100) && (aBaseMetaTileEntity.isAllowedToWork()) &&
- (!aBaseMetaTileEntity.getWorld().isThundering()) &&
- aBaseMetaTileEntity.getUniversalEnergyStored() < (maxEUStore() - getMinimumStoredEU())) {
- getBaseMetaTileEntity().increaseStoredEnergyUnits(sEnergyPerTick * getEfficiency(), true);
- }
- }
-
- if ((this.mSolarCharge < 500) && (this.mProcessingEnergy != 0) && (aTick % 32L == 0L)) {
- Utils.LOG_WARNING("Adding Solar Charge. Currently "+mSolarCharge);
- this.mProcessingEnergy -= 1;
- this.mSolarCharge += 1;
- }
-
- if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) && (aTick % 64L == 0L) && (!aBaseMetaTileEntity.getWorld().isThundering())) {
- Utils.LOG_WARNING("Adding Processing Energy. Currently "+mProcessingEnergy);
- boolean bRain = aBaseMetaTileEntity.getWorld().isRaining() && aBaseMetaTileEntity.getBiome().rainfall > 0.0F;
- mProcessingEnergy += bRain && aBaseMetaTileEntity.getWorld().skylightSubtracted >= 4 || !aBaseMetaTileEntity.getSkyAtSide((byte) 1) ? 0 : !bRain && aBaseMetaTileEntity.getWorld().isDaytime() ? 8 : 1;
- }
-
- if (aBaseMetaTileEntity.isServerSide()){
- //Utils.LOG_WARNING("6.");
- aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity.getUniversalEnergyStored() >= maxEUOutput() + getMinimumStoredEU());
- }
- }
+ public int getEfficiency() {
+ return this.mEfficiency;
}
@Override
- public void inValidate() {
-
+ public ITexture[] getFront(final byte aColor) {
+ return new ITexture[] {
+ super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT),
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]
+ };
}
@Override
- public int getEfficiency() {
- return this.mEfficiency;
+ public ITexture[] getFrontActive(final byte aColor) {
+ return new ITexture[] {
+ super.getFrontActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT_ACTIVE),
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]
+ };
}
@Override
- public long maxEUStore() {
- return Math.max(getEUVar(), V[mTier] * 16000 + getMinimumStoredEU());
+ public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory,
+ final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new CONTAINER_SolarGenerator(aPlayerInventory, aBaseMetaTileEntity, 16000);
}
-
- ITexture SolarArray[] = {new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_8V),
- new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LV), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_MV), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_HV),
- new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_EV), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_IV), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LuV),
- new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_ZPM), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_UV), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL)};
-
-
@Override
- public ITexture[] getFront(byte aColor) {
- return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT),
- Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]};
+ public ITexture[] getSides(final byte aColor) {
+ return new ITexture[] {
+ super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC)
+ };
}
@Override
- public ITexture[] getBack(byte aColor) {
- return new ITexture[]{super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC)};
+ public ITexture[] getSidesActive(final byte aColor) {
+ return new ITexture[] {
+ super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE)
+ };
}
@Override
- public ITexture[] getBottom(byte aColor) {
- return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC)};
+ public ITexture[] getTop(final byte aColor) {
+ return new ITexture[] {
+ super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL)
+ };
}
@Override
- public ITexture[] getTop(byte aColor) {
- return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL)};
+ public ITexture[] getTopActive(final byte aColor) {
+ return new ITexture[] {
+ super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL)
+ };
}
@Override
- public ITexture[] getSides(byte aColor) {
- return new ITexture[]{super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC)};
+ public void inValidate() {
+
}
@Override
- public ITexture[] getFrontActive(byte aColor) {
- return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT_ACTIVE),
- Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]};
+ public boolean isOutputFacing(final byte aSide) {
+ return aSide == this.getBaseMetaTileEntity().getFrontFacing();
}
@Override
- public ITexture[] getBackActive(byte aColor) {
- return new ITexture[]{super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE)};
+ public long maxEUStore() {
+ return Math.max(this.getEUVar(), GT_Values.V[this.mTier] * 16000 + this.getMinimumStoredEU());
}
@Override
- public ITexture[] getBottomActive(byte aColor) {
- return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE)};
+ public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntitySolarGenerator(this.mName, this.mTier, this.mDescription, this.mTextures);
}
- @Override
- public ITexture[] getTopActive(byte aColor) {
- return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL)};
+ public void onConfigLoad() {
+ this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig,
+ "SunAbsorber.efficiency.tier." + this.mTier, 100 - this.mTier * 10);
+
}
@Override
- public ITexture[] getSidesActive(byte aColor) {
- return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE)};
+ public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) {
+ if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity
+ .getUniversalEnergyStored() < this.maxEUOutput() + aBaseMetaTileEntity.getEUCapacity()) {
+
+ if (this.mSolarCharge <= 20) {
+ // Utils.LOG_WARNING("1.");
+ this.mSolarCharge = 20;
+ this.mLossTimer = 0;
+ }
+ if (++this.mLossTimer > 45) {
+ // Utils.LOG_WARNING("2.");
+ this.mSolarCharge -= 1;
+ this.mLossTimer = 0;
+ }
+
+ if (aTick % 10L == 0L) {
+
+ Utils.LOG_WARNING("getUniversalEnergyStored: " + aBaseMetaTileEntity.getUniversalEnergyStored()
+ + " maxEUOutput * 20 + getMinimumStoredEU: "
+ + (this.maxEUOutput() * 20 + this.getMinimumStoredEU()));
+
+ if (this.mSolarCharge > 100 && aBaseMetaTileEntity.isAllowedToWork()
+ && !aBaseMetaTileEntity.getWorld().isThundering() && aBaseMetaTileEntity
+ .getUniversalEnergyStored() < this.maxEUStore() - this.getMinimumStoredEU()) {
+ this.getBaseMetaTileEntity().increaseStoredEnergyUnits(
+ GregtechMetaSolarGenerator.sEnergyPerTick * this.getEfficiency(), true);
+ }
+ }
+
+ if (this.mSolarCharge < 500 && this.mProcessingEnergy != 0 && aTick % 32L == 0L) {
+ Utils.LOG_WARNING("Adding Solar Charge. Currently " + this.mSolarCharge);
+ this.mProcessingEnergy -= 1;
+ this.mSolarCharge += 1;
+ }
+
+ if (this.mProcessingEnergy <= 0 && aBaseMetaTileEntity.isAllowedToWork() && aTick % 64L == 0L
+ && !aBaseMetaTileEntity.getWorld().isThundering()) {
+ Utils.LOG_WARNING("Adding Processing Energy. Currently " + this.mProcessingEnergy);
+ final boolean bRain = aBaseMetaTileEntity.getWorld().isRaining()
+ && aBaseMetaTileEntity.getBiome().rainfall > 0.0F;
+ this.mProcessingEnergy += bRain && aBaseMetaTileEntity.getWorld().skylightSubtracted >= 4
+ || !aBaseMetaTileEntity.getSkyAtSide((byte) 1) ? 0
+ : !bRain && aBaseMetaTileEntity.getWorld().isDaytime() ? 8 : 1;
+ }
+
+ if (aBaseMetaTileEntity.isServerSide()) {
+ // Utils.LOG_WARNING("6.");
+ aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity
+ .getUniversalEnergyStored() >= this.maxEUOutput() + this.getMinimumStoredEU());
+ }
+ }
}
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySuperCondensor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySuperCondensor.java
index 5d1befbbad..be4a51a02f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySuperCondensor.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySuperCondensor.java
@@ -8,97 +8,129 @@ import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Recipe;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GregtechMetaSuperConductorNodeBase;
-public class GregtechMetaTileEntitySuperCondensor
- extends GregtechMetaSuperConductorNodeBase {
-
- public int mEfficiency;
-
- public GregtechMetaTileEntitySuperCondensor(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, "Requires liquid Nitrogen/Helium", new ITexture[0]);
- onConfigLoad();
- }
-
- public GregtechMetaTileEntitySuperCondensor(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, aDescription, aTextures);
- onConfigLoad();
- }
-
- @Override
- public boolean isOutputFacing(byte aSide) {
- return aSide == getBaseMetaTileEntity().getFrontFacing();
- }
-
- @Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GregtechMetaTileEntitySuperCondensor(this.mName, this.mTier, this.mDescription, this.mTextures);
- }
-
- @Override
- public GT_Recipe.GT_Recipe_Map getRecipes() {
- return GT_Recipe.GT_Recipe_Map.sDieselFuels;
- }
-
- @Override
+public class GregtechMetaTileEntitySuperCondensor extends GregtechMetaSuperConductorNodeBase {
+
+ public int mEfficiency;
+
+ public GregtechMetaTileEntitySuperCondensor(final int aID, final String aName, final String aNameRegional,
+ final int aTier) {
+ super(aID, aName, aNameRegional, aTier, "Requires liquid Nitrogen/Helium", new ITexture[0]);
+ this.onConfigLoad();
+ }
+
+ public GregtechMetaTileEntitySuperCondensor(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures) {
+ super(aName, aTier, aDescription, aTextures);
+ this.onConfigLoad();
+ }
+
+ @Override
+ public ITexture[] getBack(final byte aColor) {
+ return new ITexture[] {
+ super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR),
+ Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]
+ };
+ }
+
+ @Override
+ public ITexture[] getBackActive(final byte aColor) {
+ return new ITexture[] {
+ super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR),
+ Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]
+ };
+ }
+
+ @Override
+ public ITexture[] getBottom(final byte aColor) {
+ return new ITexture[] {
+ super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR),
+ Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]
+ };
+ }
+
+ @Override
+ public ITexture[] getBottomActive(final byte aColor) {
+ return new ITexture[] {
+ super.getBottomActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR),
+ Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]
+ };
+ }
+
+ @Override
public int getCapacity() {
- return 64000;
- }
+ return 64000;
+ }
- public void onConfigLoad() {
- this.mEfficiency = 100;
- }
-
- @Override
+ @Override
public int getEfficiency() {
- return this.mEfficiency;
- }
-
- @Override
- public ITexture[] getFront(byte aColor) {
- return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]};
- }
-
- @Override
- public ITexture[] getBack(byte aColor) {
- return new ITexture[]{super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR), Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]};
- }
-
- @Override
- public ITexture[] getBottom(byte aColor) {
- return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR), Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]};
- }
-
- @Override
- public ITexture[] getTop(byte aColor) {
- return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP)};
- }
-
- @Override
- public ITexture[] getSides(byte aColor) {
- return new ITexture[]{super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR), Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]};
- }
-
- @Override
- public ITexture[] getFrontActive(byte aColor) {
- return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]};
- }
-
- @Override
- public ITexture[] getBackActive(byte aColor) {
- return new ITexture[]{super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR), Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]};
- }
-
- @Override
- public ITexture[] getBottomActive(byte aColor) {
- return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR), Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]};
- }
-
- @Override
- public ITexture[] getTopActive(byte aColor) {
- return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP_ACTIVE)};
- }
-
- @Override
- public ITexture[] getSidesActive(byte aColor) {
- return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR), Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]};
- }
+ return this.mEfficiency;
+ }
+
+ @Override
+ public ITexture[] getFront(final byte aColor) {
+ return new ITexture[] {
+ super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR),
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]
+ };
+ }
+
+ @Override
+ public ITexture[] getFrontActive(final byte aColor) {
+ return new ITexture[] {
+ super.getFrontActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR),
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]
+ };
+ }
+
+ @Override
+ public GT_Recipe.GT_Recipe_Map getRecipes() {
+ return GT_Recipe.GT_Recipe_Map.sDieselFuels;
+ }
+
+ @Override
+ public ITexture[] getSides(final byte aColor) {
+ return new ITexture[] {
+ super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR),
+ Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]
+ };
+ }
+
+ @Override
+ public ITexture[] getSidesActive(final byte aColor) {
+ return new ITexture[] {
+ super.getSidesActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR),
+ Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]
+ };
+ }
+
+ @Override
+ public ITexture[] getTop(final byte aColor) {
+ return new ITexture[] {
+ super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP)
+ };
+ }
+
+ @Override
+ public ITexture[] getTopActive(final byte aColor) {
+ return new ITexture[] {
+ super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP_ACTIVE)
+ };
+ }
+
+ @Override
+ public boolean isOutputFacing(final byte aSide) {
+ return aSide == this.getBaseMetaTileEntity().getFrontFacing();
+ }
+
+ @Override
+ public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntitySuperCondensor(this.mName, this.mTier, this.mDescription, this.mTextures);
+ }
+
+ public void onConfigLoad() {
+ this.mEfficiency = 100;
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityChunkLoader.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityChunkLoader.java
index 8dbdfce45b..9df0d03a1b 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityChunkLoader.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityChunkLoader.java
@@ -1,7 +1,6 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic;
-import static gregtech.api.enums.GT_Values.V;
-
+import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -14,117 +13,141 @@ import net.minecraft.nbt.NBTTagCompound;
public class GregtechMetaTileEntityChunkLoader extends GT_MetaTileEntity_TieredMachineBlock {
- public int mRange = 16;
-
- public GregtechMetaTileEntityChunkLoader(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, 0, "Reprells nasty Creatures. Range: " + (4 + (12 * aTier)) + " unpowered / " + (16 + (48 * aTier)) + " powered");
- }
-
- public GregtechMetaTileEntityChunkLoader(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, aInvSlotCount, aDescription, aTextures);
- }
-
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GregtechMetaTileEntityChunkLoader(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures);
- }
-
- @Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], (aSide != 1) ? null : aActive ? new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE) : new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER)};
- }
-
- @Override
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) {
- if (aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity.isServerSide()) {
- int[] tCoords = new int[]{aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord(), aBaseMetaTileEntity.getWorld().provider.dimensionId};
- if ((aTimer % 600 == 0) && !GT_SpawnEventHandler.mobReps.contains(tCoords)) {
- GT_SpawnEventHandler.mobReps.add(tCoords);
- }
- if (aBaseMetaTileEntity.isUniversalEnergyStored(getMinimumStoredEU()) && aBaseMetaTileEntity.decreaseStoredEnergyUnits(1 << (this.mTier * 2), false)) {
- mRange = 16 + (48 * mTier);
- } else {
- mRange = 4 + (12 * mTier);
- }
- }
- }
-
- @Override
- public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) {
- int[] tCoords = new int[]{aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord(), aBaseMetaTileEntity.getWorld().provider.dimensionId};
- GT_SpawnEventHandler.mobReps.add(tCoords);
- }
-
- @Override
- public void onRemoval() {
- int[] tCoords = new int[]{this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord(), this.getBaseMetaTileEntity().getWorld().provider.dimensionId};
- GT_SpawnEventHandler.mobReps.remove(tCoords);
- }
-
- @Override
- public boolean isSimpleMachine() {
- return false;
- }
-
- @Override
- public boolean isFacingValid(byte aFacing) {
- return true;
- }
-
- @Override
- public boolean isEnetInput() {
- return true;
- }
-
- @Override
- public boolean isInputFacing(byte aSide) {
- return true;
- }
-
- @Override
- public boolean isTeleporterCompatible() {
- return false;
- }
-
- @Override
- public long getMinimumStoredEU() {
- return 512;
- }
-
- @Override
- public long maxEUStore() {
- return 512 + V[mTier] * 50;
- }
-
- @Override
- public long maxEUInput() {
- return V[mTier];
- }
-
- @Override
- public long maxAmperesIn() {
- return 2;
- }
-
- @Override
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-
- @Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-
- @Override
- public ITexture[][][] getTextureSet(ITexture[] aTextures) {
- return null;
- }
-
- @Override
- public void saveNBTData(NBTTagCompound aNBT) {
- }
-
- @Override
- public void loadNBTData(NBTTagCompound aNBT) {
- }
+ public int mRange = 16;
+
+ public GregtechMetaTileEntityChunkLoader(final int aID, final String aName, final String aNameRegional,
+ final int aTier) {
+ super(aID, aName, aNameRegional, aTier, 0, "Reprells nasty Creatures. Range: " + (4 + 12 * aTier)
+ + " unpowered / " + (16 + 48 * aTier) + " powered");
+ }
+
+ public GregtechMetaTileEntityChunkLoader(final String aName, final int aTier, final int aInvSlotCount,
+ final String aDescription, final ITexture[][][] aTextures) {
+ super(aName, aTier, aInvSlotCount, aDescription, aTextures);
+ }
+
+ @Override
+ public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
+ return false;
+ }
+
+ @Override
+ public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
+ return false;
+ }
+
+ @Override
+ public long getMinimumStoredEU() {
+ return 512;
+ }
+
+ @Override
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ return new ITexture[] {
+ Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1],
+ aSide != 1 ? null
+ : aActive ? new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE)
+ : new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER)
+ };
+ }
+
+ @Override
+ public ITexture[][][] getTextureSet(final ITexture[] aTextures) {
+ return null;
+ }
+
+ @Override
+ public boolean isEnetInput() {
+ return true;
+ }
+
+ @Override
+ public boolean isFacingValid(final byte aFacing) {
+ return true;
+ }
+
+ @Override
+ public boolean isInputFacing(final byte aSide) {
+ return true;
+ }
+
+ @Override
+ public boolean isSimpleMachine() {
+ return false;
+ }
+
+ @Override
+ public boolean isTeleporterCompatible() {
+ return false;
+ }
+
+ @Override
+ public void loadNBTData(final NBTTagCompound aNBT) {
+ }
+
+ @Override
+ public long maxAmperesIn() {
+ return 2;
+ }
+
+ @Override
+ public long maxEUInput() {
+ return GT_Values.V[this.mTier];
+ }
+
+ @Override
+ public long maxEUStore() {
+ return 512 + GT_Values.V[this.mTier] * 50;
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntityChunkLoader(this.mName, this.mTier, this.mInventory.length, this.mDescription,
+ this.mTextures);
+ }
+
+ @Override
+ public void onFirstTick(final IGregTechTileEntity aBaseMetaTileEntity) {
+ final int[] tCoords = new int[] {
+ aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord(),
+ aBaseMetaTileEntity.getWorld().provider.dimensionId
+ };
+ GT_SpawnEventHandler.mobReps.add(tCoords);
+ }
+
+ @Override
+ public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTimer) {
+ if (aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity.isServerSide()) {
+ final int[] tCoords = new int[] {
+ aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord(),
+ aBaseMetaTileEntity.getWorld().provider.dimensionId
+ };
+ if (aTimer % 600 == 0 && !GT_SpawnEventHandler.mobReps.contains(tCoords)) {
+ GT_SpawnEventHandler.mobReps.add(tCoords);
+ }
+ if (aBaseMetaTileEntity.isUniversalEnergyStored(this.getMinimumStoredEU())
+ && aBaseMetaTileEntity.decreaseStoredEnergyUnits(1 << this.mTier * 2, false)) {
+ this.mRange = 16 + 48 * this.mTier;
+ }
+ else {
+ this.mRange = 4 + 12 * this.mTier;
+ }
+ }
+ }
+
+ @Override
+ public void onRemoval() {
+ final int[] tCoords = new int[] {
+ this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(),
+ this.getBaseMetaTileEntity().getZCoord(), this.getBaseMetaTileEntity().getWorld().provider.dimensionId
+ };
+ GT_SpawnEventHandler.mobReps.remove(tCoords);
+ }
+
+ @Override
+ public void saveNBTData(final NBTTagCompound aNBT) {
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java
index 898fab830f..f478be73d6 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java
@@ -25,172 +25,97 @@ import net.minecraftforge.fluids.FluidStack;
public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase {
- public static int sUUAperUUM = 1;
- public static int sUUASpeedBonus = 4;
- public static int sDurationMultiplier = 3215;
- public static boolean sRequiresUUA = false;
- private int recipeCounter = 0;
- private static Block IC2Glass = Block.getBlockFromItem(ItemUtils.getItem("IC2:blockAlloyGlass"));
- //public FluidStack mFluidOut = Materials.UUMatter.getFluid(1L);
+ public static int sUUAperUUM = 1;
+ public static int sUUASpeedBonus = 4;
+ public static int sDurationMultiplier = 3215;
+ public static boolean sRequiresUUA = false;
+ private static Block IC2Glass = Block.getBlockFromItem(ItemUtils.getItem("IC2:blockAlloyGlass"));
+ // public FluidStack mFluidOut = Materials.UUMatter.getFluid(1L);
+ private int recipeCounter = 0;
- public GregtechMTE_NuclearReactor(int aID, String aName, String aNameRegional) {
+ public GregtechMTE_NuclearReactor(final int aID, final String aName, final String aNameRegional) {
super(aID, aName, aNameRegional);
}
- public GregtechMTE_NuclearReactor(String aName) {
+ public GregtechMTE_NuclearReactor(final String aName) {
super(aName);
}
@Override
- public String[] getDescription() {
- return new String[]{
- "Controller Block for the Nuclear Reactor",
- "Produces heat from Radioactive beta decay.",
- "Size(WxHxD): 5x4x5, Controller (Bottom center)",
- "3x1x3 Matter Generation Coils (Inside bottom 5x1x5 layer)",
- "9x Matter Generation Coils (Centered 3x1x3 area in Bottom layer)",
- "1x Input Hatch (Any bottom layer casing)",
- "1x Output Hatch (Any bottom layer casing)",
- "1x Maintenance Hatch (Any bottom layer casing)",
- "1x Muffler Hatch (Centered 3x1x3 area in Top layer)",
- "1x Energy Hatch (Any bottom layer casing)",
- "24x IC2 Reinforced Glass for the walls",
- "Matter Fabricator Casings for the edges & top (40 at least!)",
- CORE.GT_Tooltip};
- }
-
- @Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- if (aSide == aFacing) {
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[66],
- new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER)};
- }
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[66]};
- }
-
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MatterFabricator.png");
- }
-
- @Override
- public void onConfigLoad(GT_Config aConfig) {
- }
-
- @Override
- public boolean checkRecipe(ItemStack aStack) {
- ArrayList<FluidStack> tFluidList = getStoredFluids();
- for (int i = 0; i < tFluidList.size() - 1; i++) {
- for (int j = i + 1; j < tFluidList.size(); j++) {
- if (GT_Utility.areFluidsEqual((FluidStack) tFluidList.get(i), (FluidStack) tFluidList.get(j))) {
- if (((FluidStack) tFluidList.get(i)).amount >= ((FluidStack) tFluidList.get(j)).amount) {
- tFluidList.remove(j--);
- } else {
- tFluidList.remove(i--);
- break;
- }
- }
- }
- }
-
- long tVoltage = getMaxInputVoltage();
- byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
- FluidStack[] tFluids = (FluidStack[]) Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tFluidList.size()]), 0, tFluidList.size());
- if (tFluids.length > 0) {
- for(int i = 0;i<tFluids.length;i++){
- GT_Recipe tRecipe = Recipe_GT.Gregtech_Recipe_Map.sMatterFab2Recipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], new FluidStack[]{tFluids[i]}, new ItemStack[]{});
- if (tRecipe != null) {
- if (tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[]{})) {
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
- this.mEfficiencyIncrease = 10000;
- if (tRecipe.mEUt <= 16) {
- this.mEUt = (tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1));
- this.mMaxProgresstime = ((tRecipe.mDuration/**sDurationMultiplier*/) / (1 << tTier - 1));
- } else {
- this.mEUt = tRecipe.mEUt;
- this.mMaxProgresstime = (tRecipe.mDuration/**sDurationMultiplier*/);
- while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
- this.mEUt *= 4;
- this.mMaxProgresstime /= 2;
- }
- }
- if (this.mEUt > 0) {
- this.mEUt = (-this.mEUt);
- }
- this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
- this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0)};
- this.mOutputFluids = tRecipe.mFluidOutputs.clone();
- ArrayUtils.reverse(mOutputFluids);
- recipeCounter++;
- updateSlots();
- //Utils.LOG_INFO("Recipes Finished: "+recipeCounter);
- return true;
- }
- }
- else {
- Utils.LOG_INFO("Invalid Recipe");
- }
- }
- }
- return false;
- }
-
- @Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 2;
- int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 2;
+ public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
+ final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 2;
+ final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 2;
for (int i = -3; i < 4; i++) {
for (int j = -3; j < 4; j++) {
for (int h = 0; h < 4; h++) {
- IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i,
+ h, zDir + j);
- if ((i != -3 && i != 3) && (j != -3 && j != 3)) {// Reactor Floor/Roof inner 7x7
- if (h == 0 || h == 4) {// Reactor Floor & Roof (Inner 7x7) + muffler x4
- if ((!addMufflerToMachineList(tTileEntity, 66))) {
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the top layers inner 3x3.");
+ if (i != -3 && i != 3 && j != -3 && j != 3) {// Reactor
+ // Floor/Roof
+ // inner 7x7
+ if (h == 0 || h == 4) {// Reactor Floor & Roof (Inner
+ // 7x7) + muffler x4
+ if (!this.addMufflerToMachineList(tTileEntity, 66)) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h,
+ zDir + j) != ModBlocks.blockCasingsMisc) {
+ Utils.LOG_INFO(
+ "Matter Fabricator Casings Missing from one of the top layers inner 3x3.");
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 12) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the top layers inner 3x3.");
+ Utils.LOG_INFO(
+ "Matter Fabricator Casings Missing from one of the top layers inner 3x3.");
return false;
}
}
- } else {// Inside 6 layers, mostly air
- if ((i != -1 && i != 1) && (j != -1 && j != 1)) {// Reactor Floor/Roof inner 5x5
+ }
+ else {// Inside 6 layers, mostly air
+ if (i != -1 && i != 1 && j != -1 && j != 1) {// Reactor
+ // Floor/Roof
+ // inner
+ // 5x5
if (!aBaseMetaTileEntity.getAirOffset(xDir + i, h, zDir + j)) {
Utils.LOG_INFO("Make sure the inner 3x3 of the Multiblock is Air.");
return false;
}
}
- else { //carbon moderation rods are at 1,1 & -1,-1 & 1,-1 & -1,1
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the top layers inner 3x3.");
+ else { // carbon moderation rods are at 1,1 & -1,-1
+ // & 1,-1 & -1,1
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h,
+ zDir + j) != ModBlocks.blockCasingsMisc) {
+ Utils.LOG_INFO(
+ "Matter Fabricator Casings Missing from one of the top layers inner 3x3.");
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 12) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the top layers inner 3x3.");
+ Utils.LOG_INFO(
+ "Matter Fabricator Casings Missing from one of the top layers inner 3x3.");
return false;
}
- }
+ }
}
} // End Inner Workings
else {// Reactor Exterior
if (h == 1) {
- if ((i == -3 || i == 3) && (j == -3 || j == 3)){
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the corners in the second layer.");
+ if ((i == -3 || i == 3) && (j == -3 || j == 3)) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h,
+ zDir + j) != ModBlocks.blockCasingsMisc) {
+ Utils.LOG_INFO(
+ "Matter Fabricator Casings Missing from one of the corners in the second layer.");
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 12) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the corners in the second layer.");
+ Utils.LOG_INFO(
+ "Matter Fabricator Casings Missing from one of the corners in the second layer.");
return false;
}
}
- else if ((i != -3 || i != 3) && (j != -3 || j != 3)){
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
+ else if ((i != -3 || i != 3) && (j != -3 || j != 3)) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h,
+ zDir + j) != ModBlocks.blockCasingsMisc) {
Utils.LOG_INFO("Glass Casings Missing from somewhere in the second layer.");
return false;
}
@@ -201,19 +126,23 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
}
}
if (h == 2) {
- if ((i == -3 || i == 3) && (j == -3 || j == 3)){
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the corners in the third layer.");
+ if ((i == -3 || i == 3) && (j == -3 || j == 3)) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h,
+ zDir + j) != ModBlocks.blockCasingsMisc) {
+ Utils.LOG_INFO(
+ "Matter Fabricator Casings Missing from one of the corners in the third layer.");
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 12) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the corners in the third layer.");
+ Utils.LOG_INFO(
+ "Matter Fabricator Casings Missing from one of the corners in the third layer.");
return false;
}
}
- else if ((i != -3 || i != 3) && (j != -3 || j != 3)){
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
+ else if ((i != -3 || i != 3) && (j != -3 || j != 3)) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h,
+ zDir + j) != ModBlocks.blockCasingsMisc) {
Utils.LOG_INFO("Glass Casings Missing from somewhere in the second layer.");
return false;
}
@@ -224,12 +153,15 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
}
}
if (h == 3) {
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the edges on the top layer.");
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h,
+ zDir + j) != ModBlocks.blockCasingsMisc) {
+ Utils.LOG_INFO(
+ "Matter Fabricator Casings Missing from one of the edges on the top layer.");
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 12) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the edges on the top layer.");
+ Utils.LOG_INFO(
+ "Matter Fabricator Casings Missing from one of the edges on the top layer.");
return false;
}
}
@@ -244,38 +176,143 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
}
@Override
- public boolean isCorrectMachinePart(ItemStack aStack) {
- return true;
+ public boolean checkRecipe(final ItemStack aStack) {
+ final ArrayList<FluidStack> tFluidList = this.getStoredFluids();
+ for (int i = 0; i < tFluidList.size() - 1; i++) {
+ for (int j = i + 1; j < tFluidList.size(); j++) {
+ if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) {
+ if (tFluidList.get(i).amount >= tFluidList.get(j).amount) {
+ tFluidList.remove(j--);
+ }
+ else {
+ tFluidList.remove(i--);
+ break;
+ }
+ }
+ }
+ }
+
+ final long tVoltage = this.getMaxInputVoltage();
+ final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
+ final FluidStack[] tFluids = Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tFluidList.size()]), 0,
+ tFluidList.size());
+ if (tFluids.length > 0) {
+ for (int i = 0; i < tFluids.length; i++) {
+ final GT_Recipe tRecipe = Recipe_GT.Gregtech_Recipe_Map.sMatterFab2Recipes.findRecipe(
+ this.getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], new FluidStack[] {
+ tFluids[i]
+ }, new ItemStack[] {});
+ if (tRecipe != null) {
+ if (tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[] {})) {
+ this.mEfficiency = 10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000;
+ this.mEfficiencyIncrease = 10000;
+ if (tRecipe.mEUt <= 16) {
+ this.mEUt = tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1);
+ this.mMaxProgresstime = tRecipe.mDuration / (1 << tTier - 1);
+ }
+ else {
+ this.mEUt = tRecipe.mEUt;
+ this.mMaxProgresstime = tRecipe.mDuration;
+ while (this.mEUt <= gregtech.api.enums.GT_Values.V[tTier - 1]) {
+ this.mEUt *= 4;
+ this.mMaxProgresstime /= 2;
+ }
+ }
+ if (this.mEUt > 0) {
+ this.mEUt = -this.mEUt;
+ }
+ this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
+ this.mOutputItems = new ItemStack[] {
+ tRecipe.getOutput(0)
+ };
+ this.mOutputFluids = tRecipe.mFluidOutputs.clone();
+ ArrayUtils.reverse(this.mOutputFluids);
+ this.recipeCounter++;
+ this.updateSlots();
+ // Utils.LOG_INFO("Recipes Finished: "+recipeCounter);
+ return true;
+ }
+ }
+ else {
+ Utils.LOG_INFO("Invalid Recipe");
+ }
+ }
+ }
+ return false;
}
@Override
- public int getMaxEfficiency(ItemStack aStack) {
- return 10000;
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
+ return false;
+ }
+
+ @Override
+ public int getAmountOfOutputs() {
+ return 1;
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory,
+ final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "MatterFabricator.png");
+ }
+
+ @Override
+ public int getDamageToComponent(final ItemStack aStack) {
return 0;
}
@Override
- public int getDamageToComponent(ItemStack aStack) {
+ public String[] getDescription() {
+ return new String[] {
+ "Controller Block for the Nuclear Reactor", "Produces heat from Radioactive beta decay.",
+ "Size(WxHxD): 5x4x5, Controller (Bottom center)",
+ "3x1x3 Matter Generation Coils (Inside bottom 5x1x5 layer)",
+ "9x Matter Generation Coils (Centered 3x1x3 area in Bottom layer)",
+ "1x Input Hatch (Any bottom layer casing)", "1x Output Hatch (Any bottom layer casing)",
+ "1x Maintenance Hatch (Any bottom layer casing)", "1x Muffler Hatch (Centered 3x1x3 area in Top layer)",
+ "1x Energy Hatch (Any bottom layer casing)", "24x IC2 Reinforced Glass for the walls",
+ "Matter Fabricator Casings for the edges & top (40 at least!)", CORE.GT_Tooltip
+ };
+ }
+
+ @Override
+ public int getMaxEfficiency(final ItemStack aStack) {
+ return 10000;
+ }
+
+ @Override
+ public int getPollutionPerTick(final ItemStack aStack) {
return 0;
}
@Override
- public int getAmountOfOutputs() {
- return 1;
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ if (aSide == aFacing) {
+ return new ITexture[] {
+ Textures.BlockIcons.CASING_BLOCKS[66],
+ new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER_ACTIVE
+ : Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER)
+ };
+ }
+ return new ITexture[] {
+ Textures.BlockIcons.CASING_BLOCKS[66]
+ };
}
@Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
- return false;
+ public boolean isCorrectMachinePart(final ItemStack aStack) {
+ return true;
}
@Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
return new GregtechMTE_NuclearReactor(this.mName);
}
+ @Override
+ public void onConfigLoad(final GT_Config aConfig) {
+ }
+
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_AlloyBlastSmelter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_AlloyBlastSmelter.java
index 811e049a8b..2d9512ce2f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_AlloyBlastSmelter.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_AlloyBlastSmelter.java
@@ -18,212 +18,234 @@ import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
-public class GregtechMetaTileEntity_AlloyBlastSmelter
- extends GT_MetaTileEntity_MultiBlockBase {
- private int mHeatingCapacity = 0;
-
- public GregtechMetaTileEntity_AlloyBlastSmelter(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional);
- }
-
- public GregtechMetaTileEntity_AlloyBlastSmelter(String aName) {
- super(aName);
- }
-
- @Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GregtechMetaTileEntity_AlloyBlastSmelter(this.mName);
- }
-
- @Override
+public class GregtechMetaTileEntity_AlloyBlastSmelter extends GT_MetaTileEntity_MultiBlockBase {
+ private int mHeatingCapacity = 0;
+
+ public GregtechMetaTileEntity_AlloyBlastSmelter(final int aID, final String aName, final String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GregtechMetaTileEntity_AlloyBlastSmelter(final String aName) {
+ super(aName);
+ }
+
+ @Override
+ public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
+ final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
+ final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
+
+ // this.mHeatingCapacity = 0;
+ if (!aBaseMetaTileEntity.getAirOffset(xDir, 1, zDir)) {
+ return false;
+ }
+ if (!aBaseMetaTileEntity.getAirOffset(xDir, 2, zDir)) {
+ return false;
+ }
+ this.addMufflerToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, 3, zDir), 72);
+
+ final byte tUsedMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + 1, 2, zDir);
+
+ this.mHeatingCapacity = 20000;
+
+ for (int i = -1; i < 2; i++) {
+ for (int j = -1; j < 2; j++) {
+ if (i != 0 || j != 0) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 2, zDir + j) != ModBlocks.blockCasingsMisc) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 2, zDir + j) != 14) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 1, zDir + j) != ModBlocks.blockCasingsMisc) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 1, zDir + j) != 14) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 3, zDir + j) != ModBlocks.blockCasingsMisc) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 3, zDir + j) != 15) {
+ return false;
+ }
+ }
+ }
+ }
+ for (int i = -1; i < 2; i++) {
+ for (int j = -1; j < 2; j++) {
+ if (xDir + i != 0 || zDir + j != 0) {
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i,
+ 0, zDir + j);
+ if (!this.addMaintenanceToMachineList(tTileEntity, 72)
+ && !this.addInputToMachineList(tTileEntity, 72)
+ && !this.addOutputToMachineList(tTileEntity, 72)
+ && !this.addEnergyInputToMachineList(tTileEntity, 72)) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 0, zDir + j) != ModBlocks.blockCasingsMisc) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 0, zDir + j) != 15) {
+ return false;
+ }
+ }
+ }
+ }
+ }
+ this.mHeatingCapacity += 100 * (GT_Utility.getTier(this.getMaxInputVoltage()) - 2);
+ return true;
+ }
+
+ @Override
+ public boolean checkRecipe(final ItemStack aStack) {
+ final ArrayList<ItemStack> tInputList = this.getStoredInputs();
+ for (int i = 0; i < tInputList.size() - 1; i++) {
+ for (int j = i + 1; j < tInputList.size(); j++) {
+ if (GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) {
+ if (tInputList.get(i).stackSize >= tInputList.get(j).stackSize) {
+ tInputList.remove(j--);
+ }
+ else {
+ tInputList.remove(i--);
+ break;
+ }
+ }
+ }
+ }
+ final ItemStack[] tInputs = Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
+
+ final ArrayList<FluidStack> tFluidList = this.getStoredFluids();
+ for (int i = 0; i < tFluidList.size() - 1; i++) {
+ for (int j = i + 1; j < tFluidList.size(); j++) {
+ if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) {
+ if (tFluidList.get(i).amount >= tFluidList.get(j).amount) {
+ tFluidList.remove(j--);
+ }
+ else {
+ tFluidList.remove(i--);
+ break;
+ }
+ }
+ }
+ }
+ final FluidStack[] tFluids = Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tInputList.size()]), 0, 1);
+ if (tInputList.size() > 1) {
+ final long tVoltage = this.getMaxInputVoltage();
+ final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
+ final GT_Recipe tRecipe = Recipe_GT.Gregtech_Recipe_Map.sAlloyBlastSmelterRecipes.findRecipe(
+ this.getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs);
+ if (tRecipe != null && this.mHeatingCapacity >= tRecipe.mSpecialValue
+ && tRecipe.isRecipeInputEqual(true, tFluids, tInputs)) {
+ Utils.LOG_WARNING("Found some Valid Inputs.");
+ this.mEfficiency = 10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000;
+ this.mEfficiencyIncrease = 10000;
+ if (tRecipe.mEUt <= 16) {
+ this.mEUt = tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1);
+ this.mMaxProgresstime = tRecipe.mDuration / (1 << tTier - 1);
+ }
+ else {
+ this.mEUt = tRecipe.mEUt;
+ this.mMaxProgresstime = tRecipe.mDuration;
+ while (this.mEUt <= gregtech.api.enums.GT_Values.V[tTier - 1]) {
+ this.mEUt *= 4;
+ this.mMaxProgresstime /= 2;
+ }
+ }
+ if (this.mEUt > 0) {
+ this.mEUt = -this.mEUt;
+ }
+ this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
+ this.mOutputFluids = new FluidStack[] {
+ tRecipe.getFluidOutput(0)
+ };
+ this.updateSlots();
+ return true;
+ }
+ }
+ Utils.LOG_WARNING("Failed to find some Valid Inputs.");
+ return false;
+ }
+
+ @Override
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
+ return false;
+ }
+
+ @Override
+ public int getAmountOfOutputs() {
+ return 2;
+ }
+
+ @Override
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory,
+ final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(),
+ "ElectricBlastFurnace.png");
+ }
+
+ @Override
+ public int getDamageToComponent(final ItemStack aStack) {
+ return 0;
+ }
+
+ @Override
public String[] getDescription() {
- return new String[]{
- "Controller Block for the Alloy Blast Smelter", //Outputs 144mb fluid for every inputStack.stackSize; Time to use those hot metals.
- "Size: 3x3x4 (Hollow)",
- "Controller (front middle at bottom)",
- "16x Blast Smelter Heat Containment Coils (two middle Layers, hollow)",
- "1x Input bus (one of bottom)",
- "1x Output Hatch (one of bottom)",
- "1x Energy Hatch (one of bottom)",
- "1x Maintenance Hatch (one of bottom)",
- "1x Muffler Hatch (top middle)",
- "Blast Smelter Casings for the rest"};
- }
-
- @Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- if (aSide == aFacing) {
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[72], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE)};
- }
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[72]};
- }
-
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "ElectricBlastFurnace.png");
- }
-
- @Override
+ return new String[] {
+ "Controller Block for the Alloy Blast Smelter", // Outputs 144mb
+ // fluid for
+ // every
+ // inputStack.stackSize;
+ // Time to use
+ // those hot
+ // metals.
+ "Size: 3x3x4 (Hollow)", "Controller (front middle at bottom)",
+ "16x Blast Smelter Heat Containment Coils (two middle Layers, hollow)", "1x Input bus (one of bottom)",
+ "1x Output Hatch (one of bottom)", "1x Energy Hatch (one of bottom)",
+ "1x Maintenance Hatch (one of bottom)", "1x Muffler Hatch (top middle)",
+ "Blast Smelter Casings for the rest"
+ };
+ }
+
+ @Override
+ public int getMaxEfficiency(final ItemStack aStack) {
+ return 10000;
+ }
+
+ @Override
+ public int getPollutionPerTick(final ItemStack aStack) {
+ return 10;
+ }
+
+ @Override
public GT_Recipe.GT_Recipe_Map getRecipeMap() {
- return Recipe_GT.Gregtech_Recipe_Map.sAlloyBlastSmelterRecipes;
- }
-
- @Override
- public boolean isCorrectMachinePart(ItemStack aStack) {
- return true;
- }
-
- @Override
- public boolean isFacingValid(byte aFacing) {
- return aFacing > 1;
- }
-
- @Override
- public boolean checkRecipe(ItemStack aStack) {
- ArrayList<ItemStack> tInputList = getStoredInputs();
- for (int i = 0; i < tInputList.size() - 1; i++) {
- for (int j = i + 1; j < tInputList.size(); j++) {
- if (GT_Utility.areStacksEqual((ItemStack) tInputList.get(i), (ItemStack) tInputList.get(j))) {
- if (((ItemStack) tInputList.get(i)).stackSize >= ((ItemStack) tInputList.get(j)).stackSize) {
- tInputList.remove(j--);
- } else {
- tInputList.remove(i--);
- break;
- }
- }
- }
- }
- ItemStack[] tInputs = (ItemStack[]) Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
-
- ArrayList<FluidStack> tFluidList = getStoredFluids();
- for (int i = 0; i < tFluidList.size() - 1; i++) {
- for (int j = i + 1; j < tFluidList.size(); j++) {
- if (GT_Utility.areFluidsEqual((FluidStack) tFluidList.get(i), (FluidStack) tFluidList.get(j))) {
- if (((FluidStack) tFluidList.get(i)).amount >= ((FluidStack) tFluidList.get(j)).amount) {
- tFluidList.remove(j--);
- } else {
- tFluidList.remove(i--);
- break;
- }
- }
- }
- }
- FluidStack[] tFluids = (FluidStack[]) Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tInputList.size()]), 0, 1);
- if (tInputList.size() > 1) {
- long tVoltage = getMaxInputVoltage();
- byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
- GT_Recipe tRecipe = Recipe_GT.Gregtech_Recipe_Map.sAlloyBlastSmelterRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs);
- if ((tRecipe != null) && (this.mHeatingCapacity >= tRecipe.mSpecialValue) && (tRecipe.isRecipeInputEqual(true, tFluids, tInputs))) {
- Utils.LOG_WARNING("Found some Valid Inputs.");
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
- this.mEfficiencyIncrease = 10000;
- if (tRecipe.mEUt <= 16) {
- this.mEUt = (tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1));
- this.mMaxProgresstime = (tRecipe.mDuration / (1 << tTier - 1));
- } else {
- this.mEUt = tRecipe.mEUt;
- this.mMaxProgresstime = tRecipe.mDuration;
- while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
- this.mEUt *= 4;
- this.mMaxProgresstime /= 2;
- }
- }
- if (this.mEUt > 0) {
- this.mEUt = (-this.mEUt);
- }
- this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
- this.mOutputFluids = new FluidStack[]{tRecipe.getFluidOutput(0)};
- updateSlots();
- return true;
- }
- }
- Utils.LOG_WARNING("Failed to find some Valid Inputs.");
- return false;
- }
-
- @Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
- int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
-
- //this.mHeatingCapacity = 0;
- if (!aBaseMetaTileEntity.getAirOffset(xDir, 1, zDir)) {
- return false;
- }
- if (!aBaseMetaTileEntity.getAirOffset(xDir, 2, zDir)) {
- return false;
- }
- addMufflerToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, 3, zDir), 72);
-
- byte tUsedMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + 1, 2, zDir);
-
- this.mHeatingCapacity = 20000;
-
- for (int i = -1; i < 2; i++) {
- for (int j = -1; j < 2; j++) {
- if ((i != 0) || (j != 0)) {
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 2, zDir + j) != ModBlocks.blockCasingsMisc) {
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 2, zDir + j) != 14) {
- return false;
- }
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 1, zDir + j) != ModBlocks.blockCasingsMisc) {
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 1, zDir + j) != 14) {
- return false;
- }
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 3, zDir + j) != ModBlocks.blockCasingsMisc) {
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 3, zDir + j) != 15) {
- return false;
- }
- }
- }
- }
- for (int i = -1; i < 2; i++) {
- for (int j = -1; j < 2; j++) {
- if ((xDir + i != 0) || (zDir + j != 0)) {
- IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 0, zDir + j);
- if ((!addMaintenanceToMachineList(tTileEntity, 72)) && (!addInputToMachineList(tTileEntity, 72)) && (!addOutputToMachineList(tTileEntity, 72)) && (!addEnergyInputToMachineList(tTileEntity, 72))) {
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 0, zDir + j) != ModBlocks.blockCasingsMisc) {
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 0, zDir + j) != 15) {
- return false;
- }
- }
- }
- }
- }
- this.mHeatingCapacity += 100 * (GT_Utility.getTier(getMaxInputVoltage()) - 2);
- return true;
- }
-
- @Override
- public int getMaxEfficiency(ItemStack aStack) {
- return 10000;
- }
-
- @Override
- public int getPollutionPerTick(ItemStack aStack) {
- return 10;
- }
-
- @Override
- public int getDamageToComponent(ItemStack aStack) {
- return 0;
- }
-
- @Override
- public int getAmountOfOutputs() {
- return 2;
- }
-
- @Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
- return false;
- }
+ return Recipe_GT.Gregtech_Recipe_Map.sAlloyBlastSmelterRecipes;
+ }
+
+ @Override
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ if (aSide == aFacing) {
+ return new ITexture[] {
+ Textures.BlockIcons.CASING_BLOCKS[72],
+ new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE
+ : Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE)
+ };
+ }
+ return new ITexture[] {
+ Textures.BlockIcons.CASING_BLOCKS[72]
+ };
+ }
+
+ @Override
+ public boolean isCorrectMachinePart(final ItemStack aStack) {
+ return true;
+ }
+
+ @Override
+ public boolean isFacingValid(final byte aFacing) {
+ return aFacing > 1;
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntity_AlloyBlastSmelter(this.mName);
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCentrifuge.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCentrifuge.java
index db9eb17093..db857a782d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCentrifuge.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCentrifuge.java
@@ -27,99 +27,131 @@ import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
-public class GregtechMetaTileEntity_IndustrialCentrifuge
-extends GregtechMeta_MultiBlockBase {
- private static boolean controller;
- private static boolean isDisabled = false;
- private static ITexture frontFace;
- private static ITexture frontFaceActive;
- private static CustomIcon GT9_5_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE5");
- private static CustomIcon GT9_5 = new CustomIcon("iconsets/LARGECENTRIFUGE5");
- //public static double recipesComplete = 0;
+public class GregtechMetaTileEntity_IndustrialCentrifuge extends GregtechMeta_MultiBlockBase {
+ private static boolean controller;
+ private static boolean isDisabled = false;
+ private static ITexture frontFace;
+ private static ITexture frontFaceActive;
+ private static CustomIcon GT9_5_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE5");
+ private static CustomIcon GT9_5 = new CustomIcon("iconsets/LARGECENTRIFUGE5");
+ // public static double recipesComplete = 0;
- public GregtechMetaTileEntity_IndustrialCentrifuge(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional);
- frontFaceActive = new GT_RenderedTexture(GT9_5_Active);
- frontFace = new GT_RenderedTexture(GT9_5);
- }
+ ArrayList<ItemStack> tInputList = this.getStoredInputs();
- public GregtechMetaTileEntity_IndustrialCentrifuge(String aName) {
- super(aName);
- }
+ GT_Recipe mLastRecipe;
- @Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GregtechMetaTileEntity_IndustrialCentrifuge(this.mName);
+ public GregtechMetaTileEntity_IndustrialCentrifuge(final int aID, final String aName, final String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ GregtechMetaTileEntity_IndustrialCentrifuge.frontFaceActive = new GT_RenderedTexture(
+ GregtechMetaTileEntity_IndustrialCentrifuge.GT9_5_Active);
+ GregtechMetaTileEntity_IndustrialCentrifuge.frontFace = new GT_RenderedTexture(
+ GregtechMetaTileEntity_IndustrialCentrifuge.GT9_5);
}
- @Override
- public String[] getDescription() {
- return new String[]{
- "Controller Block for the Industrial Centrifuge",
- "Size: 3x3x3 (Hollow)",
- "Controller (Front Center) [Orange]",
- "1x Maintenance Hatch (Rear Center) [Green]",
- "The rest can be placed anywhere except the Front [Red]",
- "1x Input Hatch",
- "1x Output Hatch",
- "1x Input Bus",
- "1x Output Bus",
- "1x [EV] Energy Hatch (Can be higher Tier) [Blue]",
- "Centrifuge Casings for the rest (16 at least)",
- CORE.GT_Tooltip};
+ public GregtechMetaTileEntity_IndustrialCentrifuge(final String aName) {
+ super(aName);
}
-
-
@Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? frontFaceActive : frontFace : Textures.BlockIcons.CASING_BLOCKS[57]};
- }
-
-
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "IndustrialCentrifuge.png");
- }
+ public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
+ /*
+ * if (configSwitches.disableCentrifugeFormation){ EntityPlayerMP player
+ * =
+ * MinecraftServer.getServer().getConfigurationManager().func_152612_a(
+ * this.getBaseMetaTileEntity().getOwnerName()); if
+ * (!player.getEntityWorld().isRemote && isDisabled == false)
+ * PlayerUtils.messagePlayer(player,
+ * "This Multiblock is disabled via the config. [Only re-enable if you're bugtesting.]"
+ * ); isDisabled = true; return false; }
+ */
+ final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
+ final int yDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetY;
+ final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
+ // Utils.LOG_WARNING("X:"+xDir+" Y:"+yDir+" Z:"+zDir);
+ if (!aBaseMetaTileEntity.getAirOffset(xDir, 0, zDir)) {
+ return false;
+ }
+ int tAmount = 0;
+ for (int i = -1; i < 2; i++) { // X-Dir
+ for (int j = -1; j < 2; j++) { // Z-Dir
+ for (int h = -1; h < 2; h++) { // Y-Dir
+ if (h != 0 || (xDir + i != 0 || zDir + j != 0) && (i != 0 || j != 0)) {
+
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity
+ .getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
+ // Utils.LOG_WARNING("X:"+tTileEntity.getXCoord()+"
+ // Y:"+tTileEntity.getYCoord()+"
+ // Z:"+tTileEntity.getZCoord());
+ if (!this.addMaintenanceToMachineList(tTileEntity, 57)
+ && !this.addInputToMachineList(tTileEntity, 57)
+ && !this.addOutputToMachineList(tTileEntity, 57)
+ && !this.addEnergyInputToMachineList(tTileEntity, 57)) {
+
+ // Maintenance Hatch
+ if (tTileEntity != null && tTileEntity.getMetaTileEntity() != null) {
+ if (tTileEntity.getXCoord() == aBaseMetaTileEntity.getXCoord()
+ && tTileEntity.getYCoord() == aBaseMetaTileEntity.getYCoord()
+ && tTileEntity.getZCoord() == aBaseMetaTileEntity.getZCoord() + 2) {
+ if (tTileEntity
+ .getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Maintenance) {
+ Utils.LOG_WARNING("MAINT HATCH IN CORRECT PLACE");
+ this.mMaintenanceHatches.add(
+ (GT_MetaTileEntity_Hatch_Maintenance) tTileEntity.getMetaTileEntity());
+ ((GT_MetaTileEntity_Hatch) tTileEntity.getMetaTileEntity()).mMachineBlock = this
+ .getCasingTextureIndex();
+ }
+ else {
+ return false;
+ }
+ }
+ else {
+ Utils.LOG_WARNING("MAINT HATCH IN WRONG PLACE");
+ }
+ }
- @Override
- public GT_Recipe.GT_Recipe_Map getRecipeMap() {
- return GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes;
- }
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h,
+ zDir + j) != ModBlocks.blockCasingsMisc) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 0) {
+ return false;
+ }
+ tAmount++;
- @Override
- public boolean isFacingValid(byte aFacing) {
- return aFacing > 1;
+ }
+ }
+ }
+ }
+ }
+ return tAmount >= 16;
}
- ArrayList<ItemStack> tInputList = getStoredInputs();
- GT_Recipe mLastRecipe;
-
@Override
- public boolean checkRecipe(ItemStack aStack) {
- /*if (!isCorrectMachinePart(mInventory[1])) {
- return false;
- }*/
+ public boolean checkRecipe(final ItemStack aStack) {
+ /*
+ * if (!isCorrectMachinePart(mInventory[1])) { return false; }
+ */
Utils.LOG_WARNING("Centrifuge Debug - 1");
- GT_Recipe.GT_Recipe_Map map = getRecipeMap();
+ final GT_Recipe.GT_Recipe_Map map = this.getRecipeMap();
if (map == null) {
Utils.LOG_WARNING("Centrifuge Debug - False - No recipe map");
return false;
}
Utils.LOG_WARNING("Centrifuge Debug - 2");
- ArrayList<ItemStack> tInputList = getStoredInputs();
- long tVoltage = getMaxInputVoltage();
- byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
- Utils.LOG_WARNING("Centrifuge Debug - Tier variable: "+tTier);
- ItemStack[] tInputs = (ItemStack[]) tInputList.toArray(new ItemStack[tInputList.size()]);
- ArrayList<FluidStack> tFluidList = getStoredFluids();
- FluidStack[] tFluids = (FluidStack[]) tFluidList.toArray(new FluidStack[tFluidList.size()]);
+ final ArrayList<ItemStack> tInputList = this.getStoredInputs();
+ final long tVoltage = this.getMaxInputVoltage();
+ final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
+ Utils.LOG_WARNING("Centrifuge Debug - Tier variable: " + tTier);
+ final ItemStack[] tInputs = tInputList.toArray(new ItemStack[tInputList.size()]);
+ final ArrayList<FluidStack> tFluidList = this.getStoredFluids();
+ final FluidStack[] tFluids = tFluidList.toArray(new FluidStack[tFluidList.size()]);
if (tInputList.size() > 0 || tFluids.length > 0) {
- GT_Recipe tRecipe = map.findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs);
+ final GT_Recipe tRecipe = map.findRecipe(this.getBaseMetaTileEntity(), this.mLastRecipe, false,
+ gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs);
if (tRecipe != null) {
Utils.LOG_WARNING("Recipe was not invalid");
- mLastRecipe = tRecipe;
+ this.mLastRecipe = tRecipe;
this.mEUt = 0;
this.mOutputItems = null;
this.mOutputFluids = null;
@@ -130,29 +162,34 @@ extends GregtechMeta_MultiBlockBase {
}
this.mMaxProgresstime = tRecipe.mDuration;
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
+ this.mEfficiency = 10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000;
this.mEfficiencyIncrease = 10000;
- Utils.LOG_WARNING("Centrifuge Debug - 2 - Max Progress Time: "+this.mMaxProgresstime);
+ Utils.LOG_WARNING("Centrifuge Debug - 2 - Max Progress Time: " + this.mMaxProgresstime);
if (tRecipe.mEUt <= 16) {
Utils.LOG_WARNING("Centrifuge Debug - Using < 16eu/t");
- this.mEUt = (tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1));
- this.mMaxProgresstime = (tRecipe.mDuration / (1 << tTier - 1));
- Utils.LOG_WARNING("Centrifuge Debug - 3.1 - Max Progress Time: "+this.mMaxProgresstime+" EU/t"+this.mEUt + " Obscure GT Value "+gregtech.api.enums.GT_Values.V[(tTier - 1)]);
- } else {
+ this.mEUt = tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1);
+ this.mMaxProgresstime = tRecipe.mDuration / (1 << tTier - 1);
+ Utils.LOG_WARNING("Centrifuge Debug - 3.1 - Max Progress Time: " + this.mMaxProgresstime + " EU/t"
+ + this.mEUt + " Obscure GT Value " + gregtech.api.enums.GT_Values.V[tTier - 1]);
+ }
+ else {
Utils.LOG_WARNING("Centrifuge Debug - using > 16eu/t");
this.mEUt = tRecipe.mEUt;
this.mMaxProgresstime = tRecipe.mDuration;
- Utils.LOG_WARNING("Centrifuge Debug - 3.2 - Max Progress Time: "+this.mMaxProgresstime+" EU/t"+this.mEUt + " Obscure GT Value "+gregtech.api.enums.GT_Values.V[(tTier - 1)]);
- while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
+ Utils.LOG_WARNING("Centrifuge Debug - 3.2 - Max Progress Time: " + this.mMaxProgresstime + " EU/t"
+ + this.mEUt + " Obscure GT Value " + gregtech.api.enums.GT_Values.V[tTier - 1]);
+ while (this.mEUt <= gregtech.api.enums.GT_Values.V[tTier - 1]) {
this.mEUt *= 4;
this.mMaxProgresstime /= 2;
- Utils.LOG_WARNING("Centrifuge Debug - 4 - Max Progress Time: "+this.mMaxProgresstime+" EU/t"+this.mEUt);
+ Utils.LOG_WARNING("Centrifuge Debug - 4 - Max Progress Time: " + this.mMaxProgresstime + " EU/t"
+ + this.mEUt);
}
}
this.mEUt *= 1;
if (this.mEUt > 0) {
- this.mEUt = (-this.mEUt);
- Utils.LOG_WARNING("Centrifuge Debug - 5 - Max Progress Time: "+this.mMaxProgresstime+" EU/t"+this.mEUt);
+ this.mEUt = -this.mEUt;
+ Utils.LOG_WARNING(
+ "Centrifuge Debug - 5 - Max Progress Time: " + this.mMaxProgresstime + " EU/t" + this.mEUt);
}
ItemStack[] tOut = new ItemStack[tRecipe.mOutputs.length];
for (int h = 0; h < tRecipe.mOutputs.length; h++) {
@@ -160,30 +197,34 @@ extends GregtechMeta_MultiBlockBase {
tOut[h].stackSize = 0;
}
FluidStack tFOut = null;
- if (tRecipe.getFluidOutput(0) != null) tFOut = tRecipe.getFluidOutput(0).copy();
+ if (tRecipe.getFluidOutput(0) != null) {
+ tFOut = tRecipe.getFluidOutput(0).copy();
+ }
for (int f = 0; f < tOut.length; f++) {
if (tRecipe.mOutputs[f] != null && tOut[f] != null) {
for (int g = 0; g < 1; g++) {
- if (getBaseMetaTileEntity().getRandomNumber(10000) < tRecipe.getOutputChance(f))
+ if (this.getBaseMetaTileEntity().getRandomNumber(10000) < tRecipe.getOutputChance(f)) {
tOut[f].stackSize += tRecipe.mOutputs[f].stackSize;
+ }
}
}
}
if (tFOut != null) {
- int tSize = tFOut.amount;
+ final int tSize = tFOut.amount;
tFOut.amount = tSize * 6;
}
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
this.mMaxProgresstime /= 4;
- if (this.mMaxProgresstime <= 0){
+ if (this.mMaxProgresstime <= 0) {
this.mMaxProgresstime++;
}
- Utils.LOG_WARNING("Centrifuge Debug - 6 - Max Progress Time: "+this.mMaxProgresstime+" EU/t"+this.mEUt);
- List<ItemStack> overStacks = new ArrayList<ItemStack>();
+ Utils.LOG_WARNING(
+ "Centrifuge Debug - 6 - Max Progress Time: " + this.mMaxProgresstime + " EU/t" + this.mEUt);
+ final List<ItemStack> overStacks = new ArrayList<ItemStack>();
for (int f = 0; f < tOut.length; f++) {
if (tOut[f].getMaxStackSize() < tOut[f].stackSize) {
while (tOut[f].getMaxStackSize() < tOut[f].stackSize) {
- ItemStack tmp = tOut[f].copy();
+ final ItemStack tmp = tOut[f].copy();
tmp.stackSize = tmp.getMaxStackSize();
tOut[f].stackSize = tOut[f].stackSize - tOut[f].getMaxStackSize();
overStacks.add(tmp);
@@ -195,14 +236,18 @@ extends GregtechMeta_MultiBlockBase {
tmp = overStacks.toArray(tmp);
tOut = ArrayUtils.addAll(tOut, tmp);
}
- List<ItemStack> tSList = new ArrayList<ItemStack>();
- for (ItemStack tS : tOut) {
- if (tS.stackSize > 0) tSList.add(tS);
+ final List<ItemStack> tSList = new ArrayList<ItemStack>();
+ for (final ItemStack tS : tOut) {
+ if (tS.stackSize > 0) {
+ tSList.add(tS);
+ }
}
tOut = tSList.toArray(new ItemStack[tSList.size()]);
this.mOutputItems = tOut;
- this.mOutputFluids = new FluidStack[]{tFOut};
- updateSlots();
+ this.mOutputFluids = new FluidStack[] {
+ tFOut
+ };
+ this.updateSlots();
Utils.LOG_WARNING("Centrifuge: True");
return true;
}
@@ -211,11 +256,20 @@ extends GregtechMeta_MultiBlockBase {
return false;
}
+ @Override
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
+ return false;
+ }
+
+ @Override
+ public int getAmountOfOutputs() {
+ return 1;
+ }
+
@SuppressWarnings("static-method")
public Block getCasingBlock() {
return ModBlocks.blockCasingsMisc;
}
-
@SuppressWarnings("static-method")
public byte getCasingMeta() {
return 0;
@@ -227,89 +281,66 @@ extends GregtechMeta_MultiBlockBase {
}
@Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- /*if (configSwitches.disableCentrifugeFormation){
- EntityPlayerMP player = MinecraftServer.getServer().getConfigurationManager().func_152612_a(this.getBaseMetaTileEntity().getOwnerName());
- if (!player.getEntityWorld().isRemote && isDisabled == false)
- PlayerUtils.messagePlayer(player, "This Multiblock is disabled via the config. [Only re-enable if you're bugtesting.]");
- isDisabled = true;
- return false;
- }*/
- int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
- int yDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetY;
- int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
- //Utils.LOG_WARNING("X:"+xDir+" Y:"+yDir+" Z:"+zDir);
- if (!aBaseMetaTileEntity.getAirOffset(xDir, 0, zDir)) {
- return false;
- }
- int tAmount = 0;
- for (int i = -1; i < 2; i++) { //X-Dir
- for (int j = -1; j < 2; j++) { //Z-Dir
- for (int h = -1; h < 2; h++) { //Y-Dir
- if ((h != 0) || (((xDir + i != 0) || (zDir + j != 0)) && ((i != 0) || (j != 0)))) {
-
- IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
- //Utils.LOG_WARNING("X:"+tTileEntity.getXCoord()+" Y:"+tTileEntity.getYCoord()+" Z:"+tTileEntity.getZCoord());
- if ((!addMaintenanceToMachineList(tTileEntity, 57)) && (!addInputToMachineList(tTileEntity, 57)) && (!addOutputToMachineList(tTileEntity, 57)) && (!addEnergyInputToMachineList(tTileEntity, 57))) {
-
- //Maintenance Hatch
- if ((tTileEntity != null) && (tTileEntity.getMetaTileEntity() != null)) {
- if (tTileEntity.getXCoord() == aBaseMetaTileEntity.getXCoord() && tTileEntity.getYCoord() == aBaseMetaTileEntity.getYCoord() && tTileEntity.getZCoord() == (aBaseMetaTileEntity.getZCoord()+2)) {
- if ((tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Maintenance)) {
- Utils.LOG_WARNING("MAINT HATCH IN CORRECT PLACE");
- this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) tTileEntity.getMetaTileEntity());
- ((GT_MetaTileEntity_Hatch) tTileEntity.getMetaTileEntity()).mMachineBlock = getCasingTextureIndex();
- } else {
- return false;
- }
- }
- else {
- Utils.LOG_WARNING("MAINT HATCH IN WRONG PLACE");
- }
- }
-
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 0) {
- return false;
- }
- tAmount++;
-
- }
- }
- }
- }
- }
- return tAmount >= 16;
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory,
+ final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(),
+ "IndustrialCentrifuge.png");
}
- @SuppressWarnings("static-method")
- public boolean ignoreController(Block tTileEntity) {
- if (!controller && tTileEntity == GregTech_API.sBlockMachines) {
- return true;
- }
- return false;
+ @Override
+ public String[] getDescription() {
+ return new String[] {
+ "Controller Block for the Industrial Centrifuge", "Size: 3x3x3 (Hollow)",
+ "Controller (Front Center) [Orange]", "1x Maintenance Hatch (Rear Center) [Green]",
+ "The rest can be placed anywhere except the Front [Red]", "1x Input Hatch", "1x Output Hatch",
+ "1x Input Bus", "1x Output Bus", "1x [EV] Energy Hatch (Can be higher Tier) [Blue]",
+ "Centrifuge Casings for the rest (16 at least)", CORE.GT_Tooltip
+ };
}
@Override
- public int getMaxEfficiency(ItemStack aStack) {
+ public int getMaxEfficiency(final ItemStack aStack) {
return 10000;
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
+ public int getPollutionPerTick(final ItemStack aStack) {
return 0;
}
@Override
- public int getAmountOfOutputs() {
- return 1;
+ public GT_Recipe.GT_Recipe_Map getRecipeMap() {
+ return GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes;
}
@Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ return new ITexture[] {
+ Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1],
+ aFacing == aSide
+ ? aActive ? GregtechMetaTileEntity_IndustrialCentrifuge.frontFaceActive
+ : GregtechMetaTileEntity_IndustrialCentrifuge.frontFace
+ : Textures.BlockIcons.CASING_BLOCKS[57]
+ };
+ }
+
+ @SuppressWarnings("static-method")
+ public boolean ignoreController(final Block tTileEntity) {
+ if (!GregtechMetaTileEntity_IndustrialCentrifuge.controller && tTileEntity == GregTech_API.sBlockMachines) {
+ return true;
+ }
return false;
}
+ @Override
+ public boolean isFacingValid(final byte aFacing) {
+ return aFacing > 1;
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntity_IndustrialCentrifuge(this.mName);
+ }
+
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCokeOven.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCokeOven.java
index 0c579c6bf0..5d0ceb53e8 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCokeOven.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCokeOven.java
@@ -1,7 +1,5 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi;
-import static gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks.GTID;
-
import java.util.ArrayList;
import java.util.Arrays;
@@ -16,261 +14,271 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
+import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
-public class GregtechMetaTileEntity_IndustrialCokeOven
- extends GregtechMeta_MultiBlockBase {
- private int mLevel = 0;
+public class GregtechMetaTileEntity_IndustrialCokeOven extends GregtechMeta_MultiBlockBase {
+ private int mLevel = 0;
- public GregtechMetaTileEntity_IndustrialCokeOven(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional);
- }
+ public GregtechMetaTileEntity_IndustrialCokeOven(final int aID, final String aName, final String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
- public GregtechMetaTileEntity_IndustrialCokeOven(String aName) {
- super(aName);
- }
+ public GregtechMetaTileEntity_IndustrialCokeOven(final String aName) {
+ super(aName);
+ }
- @Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GregtechMetaTileEntity_IndustrialCokeOven(this.mName);
- }
+ @Override
+ public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
+ final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
+ final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
+ int xr = aBaseMetaTileEntity.getXCoord();
+ int yr = aBaseMetaTileEntity.getYCoord();
+ int zr = aBaseMetaTileEntity.getZCoord();
+ this.mLevel = 0;
+ if (!aBaseMetaTileEntity.getAirOffset(xDir, 1, zDir)) {
+ return false;
+ }
+ this.addMufflerToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, 2, zDir),
+ GregtechMetaCasingBlocks.GTID + 1);
- @Override
- public String[] getDescription() {
- return new String[]{"Processes Logs and Coal into Charcoal and Coal Coke.",
- "Controller Block for the Industrial Coke Oven",
- "Size: 3x3x3 (Hollow)",
- "Controller (front middle at bottom)",
- "8x Heat Resistant/Proof Coils (middle Layer, hollow)",
- "1x Input (one of bottom)",
- "1x Output (one of bottom)",
- "1x Energy Hatch (one of bottom)",
- "1x Maintenance Hatch (one of bottom)",
- "1x Muffler Hatch (top middle)",
- "Structural Coke Oven Casings for the rest",
- CORE.GT_Tooltip};
- }
+ final byte tUsedMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + 1, 1, zDir);
+ switch (tUsedMeta) {
+ case 2:
+ this.mLevel = 1;
+ break;
+ case 3:
+ this.mLevel = 2;
+ break;
+ default:
+ return false;
+ }
+ this.mOutputItems = new ItemStack[12 * this.mLevel];
+ for (int i = -1; i < 2; i++) {
+ for (int j = -1; j < 2; j++) {
+ if (i != 0 || j != 0) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 1, zDir + j) != ModBlocks.blockCasingsMisc) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 1, zDir + j) != tUsedMeta) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 2, zDir + j) != ModBlocks.blockCasingsMisc) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 2, zDir + j) != 1) {
+ return false;
+ }
+ }
+ }
+ }
+ for (int i = -1; i < 2; i++) {
+ xr = aBaseMetaTileEntity.getXCoord();
+ yr = aBaseMetaTileEntity.getYCoord();
+ zr = aBaseMetaTileEntity.getZCoord();
+ // Utils.LOG_WARNING("STEP 1 - x ["+xr+"] y ["+yr+"] z ["+zr+"]");
+ for (int j = -1; j < 2; j++) {
+ xr = aBaseMetaTileEntity.getXCoord();
+ yr = aBaseMetaTileEntity.getYCoord();
+ zr = aBaseMetaTileEntity.getZCoord();
+ // Utils.LOG_WARNING("STEP 2 - x ["+xr+"] y ["+yr+"] z
+ // ["+zr+"]");
+ if (xDir + i != 0 || zDir + j != 0) {
+ xr = aBaseMetaTileEntity.getXCoord();
+ yr = aBaseMetaTileEntity.getYCoord();
+ zr = aBaseMetaTileEntity.getZCoord();
+ // Utils.LOG_WARNING("STEP 3 - x ["+xr+"] y ["+yr+"] z
+ // ["+zr+"]");
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i,
+ 0, zDir + j);
+ if (!this.addMaintenanceToMachineList(tTileEntity, GregtechMetaCasingBlocks.GTID + 1)
+ && !this.addInputToMachineList(tTileEntity, GregtechMetaCasingBlocks.GTID + 1)
+ && !this.addOutputToMachineList(tTileEntity, GregtechMetaCasingBlocks.GTID + 1)
+ && !this.addEnergyInputToMachineList(tTileEntity, GregtechMetaCasingBlocks.GTID + 1)) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 0, zDir + j) != ModBlocks.blockCasingsMisc) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 0, zDir + j) != 1) {
+ return false;
+ }
+ }
+ }
+ }
+ }
+ return true;
+ }
- @Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- if (aSide == aFacing) {
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[GTID+1], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER)};
- }
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[GTID+1]};
- }
+ @Override
+ public boolean checkRecipe(final ItemStack aStack) {
+ final ArrayList<ItemStack> tInputList = this.getStoredInputs();
+ for (int i = 0; i < tInputList.size() - 1; i++) {
+ for (int j = i + 1; j < tInputList.size(); j++) {
+ if (GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) {
+ if (tInputList.get(i).stackSize >= tInputList.get(j).stackSize) {
+ tInputList.remove(j--);
+ }
+ else {
+ tInputList.remove(i--);
+ break;
+ }
+ }
+ }
+ }
+ final ItemStack[] tInputs = Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "CokeOven.png");
- }
+ final ArrayList<FluidStack> tFluidList = this.getStoredFluids();
+ for (int i = 0; i < tFluidList.size() - 1; i++) {
+ for (int j = i + 1; j < tFluidList.size(); j++) {
+ if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) {
+ if (tFluidList.get(i).amount >= tFluidList.get(j).amount) {
+ tFluidList.remove(j--);
+ }
+ else {
+ tFluidList.remove(i--);
+ break;
+ }
+ }
+ }
+ }
+ final FluidStack[] tFluids = Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tInputList.size()]), 0, 1);
- @Override
- public GT_Recipe.GT_Recipe_Map getRecipeMap() {
- return Recipe_GT.Gregtech_Recipe_Map.sCokeOvenRecipes;
-
- }
+ final int tValidOutputSlots = this.getValidOutputSlots(this.getRecipeMap(), tInputs);
+ Utils.LOG_WARNING("Valid Output Slots: " + tValidOutputSlots);
+
+ // More than or one input
+ if (tInputList.size() > 0 && tValidOutputSlots >= 1) {
+ final long tVoltage = this.getMaxInputVoltage();
+ final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
+ final GT_Recipe tRecipe = Recipe_GT.Gregtech_Recipe_Map.sCokeOvenRecipes.findRecipe(
+ this.getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs);
+ if (tRecipe != null && this.mLevel >= tRecipe.mSpecialValue
+ && tRecipe.isRecipeInputEqual(true, tFluids, tInputs)) {
+ this.mEfficiency = 10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000;
+ this.mEfficiencyIncrease = 10000;
+ if (tRecipe.mEUt <= 16) {
+ this.mEUt = tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1);
+ this.mMaxProgresstime = tRecipe.mDuration / (1 << tTier - 1);
+ }
+ else {
+ this.mEUt = tRecipe.mEUt;
+ this.mMaxProgresstime = tRecipe.mDuration;
+ while (this.mEUt <= gregtech.api.enums.GT_Values.V[tTier - 1]) {
+ this.mEUt *= 4;
+ this.mMaxProgresstime /= 2;
+ }
+ }
+ if (this.mEUt > 0) {
+ this.mEUt = -this.mEUt;
+ }
+ this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
+ this.mOutputItems = new ItemStack[] {
+ tRecipe.getOutput(0)
+ };
+ this.mOutputFluids = new FluidStack[] {
+ tRecipe.getFluidOutput(0)
+ };
+ this.updateSlots();
+ // Utils.LOG_INFO("Coke oven: True");
+ return true;
+ }
+ }
+ // Utils.LOG_INFO("Coke oven: False");
+ return false;
+ }
+ /*
+ * public boolean checkRecipe(ItemStack aStack) { ArrayList<ItemStack>
+ * tInputList = getStoredInputs(); if (!tInputList.isEmpty()) { byte tTier =
+ * (byte) Math.max(1, GT_Utility.getTier(getMaxInputVoltage()));
+ *
+ * int j = 0; this.mOutputItems = new ItemStack[12 * this.mLevel]; for (int
+ * i = 0; (i < 100) && (j < this.mOutputItems.length); i++) { if (null !=
+ * (this.mOutputItems[j] = GT_ModHandler.getSmeltingOutput((ItemStack)
+ * tInputList.get(i % tInputList.size()), true, null))) { j++; } } if (j >
+ * 0) { this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) *
+ * 1000); this.mEfficiencyIncrease = 10000;
+ *
+ * this.mEUt = (-4 * (1 << tTier - 1) * (1 << tTier - 1) * this.mLevel);
+ * this.mMaxProgresstime = Math.max(1, 512 / (1 << tTier - 1)); }
+ * updateSlots(); return true; } return false; }
+ */
- /* @Override
- public boolean isCorrectMachinePart(ItemStack aStack) {
- return true;
- }*/
+ @Override
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
+ return false;
+ }
- @Override
- public boolean isFacingValid(byte aFacing) {
- return aFacing > 1;
- }
+ @Override
+ public int getAmountOfOutputs() {
+ return 24;
+ }
- @Override
- public boolean checkRecipe(ItemStack aStack) {
- ArrayList<ItemStack> tInputList = getStoredInputs();
- for (int i = 0; i < tInputList.size() - 1; i++) {
- for (int j = i + 1; j < tInputList.size(); j++) {
- if (GT_Utility.areStacksEqual((ItemStack) tInputList.get(i), (ItemStack) tInputList.get(j))) {
- if (((ItemStack) tInputList.get(i)).stackSize >= ((ItemStack) tInputList.get(j)).stackSize) {
- tInputList.remove(j--);
- } else {
- tInputList.remove(i--);
- break;
- }
- }
- }
- }
- ItemStack[] tInputs = (ItemStack[]) Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
+ @Override
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory,
+ final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "CokeOven.png");
+ }
- ArrayList<FluidStack> tFluidList = getStoredFluids();
- for (int i = 0; i < tFluidList.size() - 1; i++) {
- for (int j = i + 1; j < tFluidList.size(); j++) {
- if (GT_Utility.areFluidsEqual((FluidStack) tFluidList.get(i), (FluidStack) tFluidList.get(j))) {
- if (((FluidStack) tFluidList.get(i)).amount >= ((FluidStack) tFluidList.get(j)).amount) {
- tFluidList.remove(j--);
- } else {
- tFluidList.remove(i--);
- break;
- }
- }
- }
- }
- FluidStack[] tFluids = (FluidStack[]) Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tInputList.size()]), 0, 1);
-
- int tValidOutputSlots = this.getValidOutputSlots(getRecipeMap(), tInputs);
- Utils.LOG_WARNING("Valid Output Slots: "+tValidOutputSlots);
-
- //More than or one input
- if (tInputList.size() > 0 && tValidOutputSlots >= 1) {
- long tVoltage = getMaxInputVoltage();
- byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
- GT_Recipe tRecipe = Recipe_GT.Gregtech_Recipe_Map.sCokeOvenRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs);
- if ((tRecipe != null) && (this.mLevel >= tRecipe.mSpecialValue) && (tRecipe.isRecipeInputEqual(true, tFluids, tInputs))) {
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
- this.mEfficiencyIncrease = 10000;
- if (tRecipe.mEUt <= 16) {
- this.mEUt = (tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1));
- this.mMaxProgresstime = (tRecipe.mDuration / (1 << tTier - 1));
- } else {
- this.mEUt = tRecipe.mEUt;
- this.mMaxProgresstime = tRecipe.mDuration;
- while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
- this.mEUt *= 4;
- this.mMaxProgresstime /= 2;
- }
- }
- if (this.mEUt > 0) {
- this.mEUt = (-this.mEUt);
- }
- this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
- this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0)};
- this.mOutputFluids = new FluidStack[]{tRecipe.getFluidOutput(0)};
- updateSlots();
- //Utils.LOG_INFO("Coke oven: True");
- return true;
- }
- }
- //Utils.LOG_INFO("Coke oven: False");
- return false;
- }
- /*public boolean checkRecipe(ItemStack aStack) {
- ArrayList<ItemStack> tInputList = getStoredInputs();
- if (!tInputList.isEmpty()) {
- byte tTier = (byte) Math.max(1, GT_Utility.getTier(getMaxInputVoltage()));
+ /*
+ * @Override public boolean isCorrectMachinePart(ItemStack aStack) { return
+ * true; }
+ */
- int j = 0;
- this.mOutputItems = new ItemStack[12 * this.mLevel];
- for (int i = 0; (i < 100) && (j < this.mOutputItems.length); i++) {
- if (null != (this.mOutputItems[j] = GT_ModHandler.getSmeltingOutput((ItemStack) tInputList.get(i % tInputList.size()), true, null))) {
- j++;
- }
- }
- if (j > 0) {
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
- this.mEfficiencyIncrease = 10000;
+ @Override
+ public String[] getDescription() {
+ return new String[] {
+ "Processes Logs and Coal into Charcoal and Coal Coke.", "Controller Block for the Industrial Coke Oven",
+ "Size: 3x3x3 (Hollow)", "Controller (front middle at bottom)",
+ "8x Heat Resistant/Proof Coils (middle Layer, hollow)", "1x Input (one of bottom)",
+ "1x Output (one of bottom)", "1x Energy Hatch (one of bottom)", "1x Maintenance Hatch (one of bottom)",
+ "1x Muffler Hatch (top middle)", "Structural Coke Oven Casings for the rest", CORE.GT_Tooltip
+ };
+ }
- this.mEUt = (-4 * (1 << tTier - 1) * (1 << tTier - 1) * this.mLevel);
- this.mMaxProgresstime = Math.max(1, 512 / (1 << tTier - 1));
- }
- updateSlots();
- return true;
- }
- return false;
- }*/
+ @Override
+ public int getMaxEfficiency(final ItemStack aStack) {
+ return 10000;
+ }
- @Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
- int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
- int xr = aBaseMetaTileEntity.getXCoord();
- int yr = aBaseMetaTileEntity.getYCoord();
- int zr = aBaseMetaTileEntity.getZCoord();
- this.mLevel = 0;
- if (!aBaseMetaTileEntity.getAirOffset(xDir, 1, zDir)) {
- return false;
- }
- addMufflerToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, 2, zDir), GTID+1);
+ @Override
+ public int getPollutionPerTick(final ItemStack aStack) {
+ return 0;
+ }
- byte tUsedMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + 1, 1, zDir);
- switch (tUsedMeta) {
- case 2:
- this.mLevel = 1;
- break;
- case 3:
- this.mLevel = 2;
- break;
- default:
- return false;
- }
- this.mOutputItems = new ItemStack[12 * this.mLevel];
- for (int i = -1; i < 2; i++) {
- for (int j = -1; j < 2; j++) {
- if ((i != 0) || (j != 0)) {
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 1, zDir + j) != ModBlocks.blockCasingsMisc) {
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 1, zDir + j) != tUsedMeta) {
- return false;
- }
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 2, zDir + j) != ModBlocks.blockCasingsMisc) {
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 2, zDir + j) != 1) {
- return false;
- }
- }
- }
- }
- for (int i = -1; i < 2; i++) {
- xr = aBaseMetaTileEntity.getXCoord();
- yr = aBaseMetaTileEntity.getYCoord();
- zr = aBaseMetaTileEntity.getZCoord();
- //Utils.LOG_WARNING("STEP 1 - x ["+xr+"] y ["+yr+"] z ["+zr+"]");
- for (int j = -1; j < 2; j++) {
- xr = aBaseMetaTileEntity.getXCoord();
- yr = aBaseMetaTileEntity.getYCoord();
- zr = aBaseMetaTileEntity.getZCoord();
- //Utils.LOG_WARNING("STEP 2 - x ["+xr+"] y ["+yr+"] z ["+zr+"]");
- if ((xDir + i != 0) || (zDir + j != 0)) {
- xr = aBaseMetaTileEntity.getXCoord();
- yr = aBaseMetaTileEntity.getYCoord();
- zr = aBaseMetaTileEntity.getZCoord();
- //Utils.LOG_WARNING("STEP 3 - x ["+xr+"] y ["+yr+"] z ["+zr+"]");
- IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 0, zDir + j);
- if ((!addMaintenanceToMachineList(tTileEntity, GTID+1)) && (!addInputToMachineList(tTileEntity, GTID+1)) && (!addOutputToMachineList(tTileEntity, GTID+1)) && (!addEnergyInputToMachineList(tTileEntity, GTID+1))) {
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 0, zDir + j) != ModBlocks.blockCasingsMisc) {
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 0, zDir + j) != 1) {
- return false;
- }
- }
- }
- }
- }
- return true;
- }
+ @Override
+ public GT_Recipe.GT_Recipe_Map getRecipeMap() {
+ return Recipe_GT.Gregtech_Recipe_Map.sCokeOvenRecipes;
- @Override
- public int getMaxEfficiency(ItemStack aStack) {
- return 10000;
- }
+ }
- @Override
- public int getPollutionPerTick(ItemStack aStack) {
- return 0;
- }
+ @Override
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ if (aSide == aFacing) {
+ return new ITexture[] {
+ Textures.BlockIcons.CASING_BLOCKS[GregtechMetaCasingBlocks.GTID + 1],
+ new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_ACTIVE
+ : Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER)
+ };
+ }
+ return new ITexture[] {
+ Textures.BlockIcons.CASING_BLOCKS[GregtechMetaCasingBlocks.GTID + 1]
+ };
+ }
- /* @Override
- public int getDamageToComponent(ItemStack aStack) {
- return 0;
- }*/
+ /*
+ * @Override public int getDamageToComponent(ItemStack aStack) { return 0; }
+ */
- @Override
- public int getAmountOfOutputs() {
- return 24;
- }
+ @Override
+ public boolean isFacingValid(final byte aFacing) {
+ return aFacing > 1;
+ }
- @Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
- return false;
- }
+ @Override
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntity_IndustrialCokeOven(this.mName);
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialElectrolyzer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialElectrolyzer.java
index 07087123cf..16920395f7 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialElectrolyzer.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialElectrolyzer.java
@@ -1,7 +1,5 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi;
-import static gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks.GTID;
-
import java.util.*;
import org.apache.commons.lang3.ArrayUtils;
@@ -19,153 +17,154 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
+import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks;
import net.minecraft.block.Block;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
-public class GregtechMetaTileEntity_IndustrialElectrolyzer
-extends GregtechMeta_MultiBlockBase {
- public GregtechMetaTileEntity_IndustrialElectrolyzer(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional);
- }
+public class GregtechMetaTileEntity_IndustrialElectrolyzer extends GregtechMeta_MultiBlockBase {
+ ArrayList<ItemStack> tInputList = this.getStoredInputs();
- public GregtechMetaTileEntity_IndustrialElectrolyzer(String aName) {
- super(aName);
- }
+ GT_Recipe mLastRecipe;
- @Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GregtechMetaTileEntity_IndustrialElectrolyzer(this.mName);
+ public GregtechMetaTileEntity_IndustrialElectrolyzer(final int aID, final String aName,
+ final String aNameRegional) {
+ super(aID, aName, aNameRegional);
}
- @Override
- public String[] getDescription() {
- return new String[]{"Controller Block for the Industrial Electrolyzer",
- "Size: 3x3x3 (Hollow)",
- "Controller (front centered)",
- "1x Input Bus (anywhere)",
- "1x Output Bus (anywhere)",
- "1x Input Hatch (anywhere)",
- "1x Output Hatch (anywhere)",
- "1x Energy Hatch (anywhere)",
- "1x Maintenance Hatch (anywhere)",
- "1x Muffler (anywhere)",
- "Electrolyzer Casings for the rest (16 at least!)",
- CORE.GT_Tooltip};
+ public GregtechMetaTileEntity_IndustrialElectrolyzer(final String aName) {
+ super(aName);
}
@Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- if (aSide == aFacing) {
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[GTID+5], new GT_RenderedTexture(aActive ? Textures.BlockIcons.STEAM_TURBINE_SIDE_ACTIVE : Textures.BlockIcons.STEAM_TURBINE_SIDE)};
+ public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
+ final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
+ final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
+ if (!aBaseMetaTileEntity.getAirOffset(xDir, 0, zDir)) {
+ return false;
}
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[GTID+5]};
+ int tAmount = 0;
+ for (int i = -1; i < 2; i++) {
+ for (int j = -1; j < 2; j++) {
+ for (int h = -1; h < 2; h++) {
+ if (h != 0 || (xDir + i != 0 || zDir + j != 0) && (i != 0 || j != 0)) {
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity
+ .getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
+ if (!this.addMaintenanceToMachineList(tTileEntity, 62)
+ && !this.addMufflerToMachineList(tTileEntity, 62)
+ && !this.addInputToMachineList(tTileEntity, 62)
+ && !this.addOutputToMachineList(tTileEntity, 62)
+ && !this.addEnergyInputToMachineList(tTileEntity, 62)) {
+ final Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j);
+ final byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j);
+ if (tBlock != ModBlocks.blockCasingsMisc || tMeta != 5) {
+ return false;
+ }
+ tAmount++;
+ }
+ }
+ }
+ }
+ }
+ return tAmount >= 16;
}
@Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "IndustrialElectrolyzer.png");
- }
+ public boolean checkRecipe(final ItemStack aStack) { // TODO - Add Check to
+ // make sure Fluid
+ // output isn't full
+ final ArrayList<ItemStack> tInputList = this.getStoredInputs();
+ for (int i = 0; i < tInputList.size() - 1; i++) {
+ for (int j = i + 1; j < tInputList.size(); j++) {
+ if (GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) {
+ if (tInputList.get(i).stackSize >= tInputList.get(j).stackSize) {
+ tInputList.remove(j--);
+ }
+ else {
+ tInputList.remove(i--);
+ break;
+ }
+ }
+ }
+ }
+ final ItemStack[] tInputs = Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
- @Override
- public GT_Recipe.GT_Recipe_Map getRecipeMap() {
- return GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes;
- }
+ final ArrayList<FluidStack> tFluidList = this.getStoredFluids();
+ for (int i = 0; i < tFluidList.size() - 1; i++) {
+ for (int j = i + 1; j < tFluidList.size(); j++) {
+ if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) {
+ if (tFluidList.get(i).amount >= tFluidList.get(j).amount) {
+ tFluidList.remove(j--);
+ }
+ else {
+ tFluidList.remove(i--);
+ break;
+ }
+ }
+ }
+ }
+ final FluidStack[] tFluids = Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tInputList.size()]), 0, 1);
- @Override
- public boolean isFacingValid(byte aFacing) {
- return aFacing > 1;
- }
-
- ArrayList<ItemStack> tInputList = getStoredInputs();
- GT_Recipe mLastRecipe;
+ final int tValidOutputSlots = this.getValidOutputSlots(this.getRecipeMap(), tInputs);
+ Utils.LOG_WARNING("Valid Output Slots: " + tValidOutputSlots);
- @Override
- public boolean checkRecipe(ItemStack aStack) { //TODO - Add Check to make sure Fluid output isn't full
- ArrayList<ItemStack> tInputList = getStoredInputs();
- for (int i = 0; i < tInputList.size() - 1; i++) {
- for (int j = i + 1; j < tInputList.size(); j++) {
- if (GT_Utility.areStacksEqual((ItemStack) tInputList.get(i), (ItemStack) tInputList.get(j))) {
- if (((ItemStack) tInputList.get(i)).stackSize >= ((ItemStack) tInputList.get(j)).stackSize) {
- tInputList.remove(j--);
- } else {
- tInputList.remove(i--);
- break;
- }
- }
- }
- }
- ItemStack[] tInputs = (ItemStack[]) Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
-
- ArrayList<FluidStack> tFluidList = getStoredFluids();
- for (int i = 0; i < tFluidList.size() - 1; i++) {
- for (int j = i + 1; j < tFluidList.size(); j++) {
- if (GT_Utility.areFluidsEqual((FluidStack) tFluidList.get(i), (FluidStack) tFluidList.get(j))) {
- if (((FluidStack) tFluidList.get(i)).amount >= ((FluidStack) tFluidList.get(j)).amount) {
- tFluidList.remove(j--);
- } else {
- tFluidList.remove(i--);
- break;
- }
- }
- }
- }
- FluidStack[] tFluids = (FluidStack[]) Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tInputList.size()]), 0, 1);
-
- int tValidOutputSlots = this.getValidOutputSlots(getRecipeMap(), tInputs);
- Utils.LOG_WARNING("Valid Output Slots: "+tValidOutputSlots);
-
- //More than or one input
+ // More than or one input
if (tInputList.size() > 0 && tValidOutputSlots >= 1) {
- long tVoltage = getMaxInputVoltage();
- byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs);
- if ((tRecipe != null) && (7500 >= tRecipe.mSpecialValue) && (tRecipe.isRecipeInputEqual(true, tFluids, tInputs))) {
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
- this.mEfficiencyIncrease = 10000;
- if (tRecipe.mEUt <= 16) {
- this.mEUt = (tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1));
- this.mMaxProgresstime = (tRecipe.mDuration / (1 << tTier - 1));
- } else {
- this.mEUt = tRecipe.mEUt;
- this.mMaxProgresstime = tRecipe.mDuration;
- while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
- this.mEUt *= 4;
- this.mMaxProgresstime /= 2;
- }
- }
- if (this.mEUt > 0) {
- this.mEUt = (-this.mEUt);
- }
- this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
-
- ItemStack[] tOut = new ItemStack[tRecipe.mOutputs.length];
+ final long tVoltage = this.getMaxInputVoltage();
+ final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
+ final GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes.findRecipe(
+ this.getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs);
+ if (tRecipe != null && 7500 >= tRecipe.mSpecialValue
+ && tRecipe.isRecipeInputEqual(true, tFluids, tInputs)) {
+ this.mEfficiency = 10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000;
+ this.mEfficiencyIncrease = 10000;
+ if (tRecipe.mEUt <= 16) {
+ this.mEUt = tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1);
+ this.mMaxProgresstime = tRecipe.mDuration / (1 << tTier - 1);
+ }
+ else {
+ this.mEUt = tRecipe.mEUt;
+ this.mMaxProgresstime = tRecipe.mDuration;
+ while (this.mEUt <= gregtech.api.enums.GT_Values.V[tTier - 1]) {
+ this.mEUt *= 4;
+ this.mMaxProgresstime /= 2;
+ }
+ }
+ if (this.mEUt > 0) {
+ this.mEUt = -this.mEUt;
+ }
+ this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
+
+ ItemStack[] tOut = new ItemStack[tRecipe.mOutputs.length];
for (int h = 0; h < tRecipe.mOutputs.length; h++) {
tOut[h] = tRecipe.getOutput(h).copy();
tOut[h].stackSize = 0;
}
- FluidStack tFOut = null;
- if (tRecipe.getFluidOutput(0) != null) tFOut = tRecipe.getFluidOutput(0).copy();
+ FluidStack tFOut = null;
+ if (tRecipe.getFluidOutput(0) != null) {
+ tFOut = tRecipe.getFluidOutput(0).copy();
+ }
for (int f = 0; f < tOut.length; f++) {
if (tRecipe.mOutputs[f] != null && tOut[f] != null) {
for (int g = 0; g < 1; g++) {
- if (getBaseMetaTileEntity().getRandomNumber(10000) < tRecipe.getOutputChance(f))
+ if (this.getBaseMetaTileEntity().getRandomNumber(10000) < tRecipe.getOutputChance(f)) {
tOut[f].stackSize += tRecipe.mOutputs[f].stackSize;
+ }
}
}
}
if (tFOut != null) {
- int tSize = tFOut.amount;
+ final int tSize = tFOut.amount;
tFOut.amount = tSize * 1;
}
-
- List<ItemStack> overStacks = new ArrayList<ItemStack>();
+
+ final List<ItemStack> overStacks = new ArrayList<ItemStack>();
for (int f = 0; f < tOut.length; f++) {
if (tOut[f].getMaxStackSize() < tOut[f].stackSize) {
while (tOut[f].getMaxStackSize() < tOut[f].stackSize) {
- ItemStack tmp = tOut[f].copy();
+ final ItemStack tmp = tOut[f].copy();
tmp.stackSize = tmp.getMaxStackSize();
tOut[f].stackSize = tOut[f].stackSize - tOut[f].getMaxStackSize();
overStacks.add(tmp);
@@ -177,76 +176,100 @@ extends GregtechMeta_MultiBlockBase {
tmp = overStacks.toArray(tmp);
tOut = ArrayUtils.addAll(tOut, tmp);
}
- List<ItemStack> tSList = new ArrayList<ItemStack>();
- for (ItemStack tS : tOut) {
- if (tS.stackSize > 0) tSList.add(tS);
+ final List<ItemStack> tSList = new ArrayList<ItemStack>();
+ for (final ItemStack tS : tOut) {
+ if (tS.stackSize > 0) {
+ tSList.add(tS);
+ }
}
tOut = tSList.toArray(new ItemStack[tSList.size()]);
this.mOutputItems = tOut;
- this.mOutputFluids = new FluidStack[]{tFOut};
- updateSlots();
-
- /* this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0), tRecipe.getOutput(1)};
- updateSlots();*/
- return true;
- }
- }
- return false;
- }
+ this.mOutputFluids = new FluidStack[] {
+ tFOut
+ };
+ this.updateSlots();
+
+ /*
+ * this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0),
+ * tRecipe.getOutput(1)}; updateSlots();
+ */
+ return true;
+ }
+ }
+ return false;
+ }
@Override
- public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
- super.startSoundLoop(aIndex, aX, aY, aZ);
- if (aIndex == 20) {
- GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(5)), 10, 1.0F, aX, aY, aZ);
- }
- }
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
+ return false;
+ }
@Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
- int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
- if (!aBaseMetaTileEntity.getAirOffset(xDir, 0, zDir)) {
- return false;
- }
- int tAmount = 0;
- for (int i = -1; i < 2; i++) {
- for (int j = -1; j < 2; j++) {
- for (int h = -1; h < 2; h++) {
- if ((h != 0) || (((xDir + i != 0) || (zDir + j != 0)) && ((i != 0) || (j != 0)))) {
- IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
- if ((!addMaintenanceToMachineList(tTileEntity, 62)) && (!addMufflerToMachineList(tTileEntity, 62)) && (!addInputToMachineList(tTileEntity, 62)) && (!addOutputToMachineList(tTileEntity, 62)) && (!addEnergyInputToMachineList(tTileEntity, 62))) {
- Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j);
- byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j);
- if (((tBlock != ModBlocks.blockCasingsMisc) || (tMeta != 5))) {
- return false;
- }
- tAmount++;
- }
- }
- }
- }
- }
- return tAmount >= 16;
- }
+ public int getAmountOfOutputs() {
+ return 1;
+ }
@Override
- public int getMaxEfficiency(ItemStack aStack) {
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory,
+ final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(),
+ "IndustrialElectrolyzer.png");
+ }
+ @Override
+ public String[] getDescription() {
+ return new String[] {
+ "Controller Block for the Industrial Electrolyzer", "Size: 3x3x3 (Hollow)",
+ "Controller (front centered)", "1x Input Bus (anywhere)", "1x Output Bus (anywhere)",
+ "1x Input Hatch (anywhere)", "1x Output Hatch (anywhere)", "1x Energy Hatch (anywhere)",
+ "1x Maintenance Hatch (anywhere)", "1x Muffler (anywhere)",
+ "Electrolyzer Casings for the rest (16 at least!)", CORE.GT_Tooltip
+ };
+ }
+
+ @Override
+ public int getMaxEfficiency(final ItemStack aStack) {
return 10000;
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
+ public int getPollutionPerTick(final ItemStack aStack) {
return 0;
}
@Override
- public int getAmountOfOutputs() {
- return 1;
+ public GT_Recipe.GT_Recipe_Map getRecipeMap() {
+ return GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes;
}
@Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
- return false;
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ if (aSide == aFacing) {
+ return new ITexture[] {
+ Textures.BlockIcons.CASING_BLOCKS[GregtechMetaCasingBlocks.GTID + 5], new GT_RenderedTexture(aActive
+ ? Textures.BlockIcons.STEAM_TURBINE_SIDE_ACTIVE : Textures.BlockIcons.STEAM_TURBINE_SIDE)
+ };
+ }
+ return new ITexture[] {
+ Textures.BlockIcons.CASING_BLOCKS[GregtechMetaCasingBlocks.GTID + 5]
+ };
+ }
+
+ @Override
+ public boolean isFacingValid(final byte aFacing) {
+ return aFacing > 1;
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntity_IndustrialElectrolyzer(this.mName);
+ }
+
+ @Override
+ public void startSoundLoop(final byte aIndex, final double aX, final double aY, final double aZ) {
+ super.startSoundLoop(aIndex, aX, aY, aZ);
+ if (aIndex == 20) {
+ GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(Integer.valueOf(5)), 10, 1.0F, aX, aY, aZ);
+ }
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialMacerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialMacerator.java
index 0a50b94976..787aa61856 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialMacerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialMacerator.java
@@ -22,172 +22,47 @@ import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
-public class GregtechMetaTileEntity_IndustrialMacerator
-extends GregtechMeta_MultiBlockBase {
+public class GregtechMetaTileEntity_IndustrialMacerator extends GregtechMeta_MultiBlockBase {
private static boolean controller;
- public GregtechMetaTileEntity_IndustrialMacerator(int aID, String aName, String aNameRegional) {
+ public GregtechMetaTileEntity_IndustrialMacerator(final int aID, final String aName, final String aNameRegional) {
super(aID, aName, aNameRegional);
}
- public GregtechMetaTileEntity_IndustrialMacerator(String aName) {
+ public GregtechMetaTileEntity_IndustrialMacerator(final String aName) {
super(aName);
}
@Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GregtechMetaTileEntity_IndustrialMacerator(this.mName);
- }
-
- @Override
- public String[] getDescription() {
- return new String[]{
- "Controller Block for the Industrial Maceration Stack",
- "Size[WxHxL]: 3x6x3 (Hollow)",
- "Controller (Center Bottom)",
- "1x Input Bus (Any bottom layer casing)",
- "5x Output Bus (Any casing besides bottom layer)",
- "1x Maintenance Hatch (Any casing)",
- "1x Energy Hatch (Any casing)",
- "Maceration Stack Casings for the rest (26 at least!)",
- CORE.GT_Tooltip};
- }
-
- @Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- if (aSide == aFacing) {
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[64], new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_MatterFab_Active : TexturesGtBlock.Overlay_MatterFab)};
- }
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[64]};
- }
-
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MacerationStack.png");
- }
-
- @Override
- public GT_Recipe.GT_Recipe_Map getRecipeMap() {
- return GT_Recipe.GT_Recipe_Map.sMaceratorRecipes;
- }
-
- /*@Override
- public boolean isCorrectMachinePart(ItemStack aStack) {
- return true;
- }*/
-
- @Override
- public boolean isFacingValid(byte aFacing) {
- return aFacing > 1;
- }
-
- @Override
- public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- super.onPreTick(aBaseMetaTileEntity, aTick);
- if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive()) && (aBaseMetaTileEntity.getFrontFacing() != 1) && (aBaseMetaTileEntity.getCoverIDAtSide((byte) 1) == 0) && (!aBaseMetaTileEntity.getOpacityAtSide((byte) 1))) {
- Random tRandom = aBaseMetaTileEntity.getWorld().rand;
- aBaseMetaTileEntity.getWorld().spawnParticle("smoke", aBaseMetaTileEntity.getXCoord() + 0.8F - tRandom.nextFloat() * 0.6F, aBaseMetaTileEntity.getYCoord() + 0.3f + tRandom.nextFloat() * 0.2F, aBaseMetaTileEntity.getZCoord() + 1.2F - tRandom.nextFloat() * 1.6F, 0.0D, 0.0D, 0.0D);
- }
- }
-
- @Override
- public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
- super.startSoundLoop(aIndex, aX, aY, aZ);
- if (aIndex == 1) {
- GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(201)), 10, 1.0F, aX, aY, aZ);
- }
- }
-
- @Override
- public void startProcess() {
- sendLoopStart((byte) 1);
- }
-
- @Override
- public boolean checkRecipe(ItemStack aStack) {
-
- //Get inputs.
- ArrayList<ItemStack> tInputList = getStoredInputs();
- for (int i = 0; i < tInputList.size() - 1; i++) {
- for (int j = i + 1; j < tInputList.size(); j++) {
- if (GT_Utility.areStacksEqual((ItemStack) tInputList.get(i), (ItemStack) tInputList.get(j))) {
- if (((ItemStack) tInputList.get(i)).stackSize >= ((ItemStack) tInputList.get(j)).stackSize) {
- tInputList.remove(j--);
- } else {
- tInputList.remove(i--);
- break;
- }
- }
- }
- }
-
- //Temp var
- ItemStack[] tInputs = (ItemStack[]) Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
-
- //Don't check the recipe if someone got around the output bus size check.
- if (this.mOutputBusses.size() != 5){
- return false;
- }
-
- //Make a recipe instance for the rest of the method.
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes.findRecipe(getBaseMetaTileEntity(), false, 9223372036854775807L, null, tInputs);
-
-
- int tValidOutputSlots = this.getValidOutputSlots(getRecipeMap(), tInputs);
- Utils.LOG_WARNING("Valid Output Slots: "+tValidOutputSlots);
-
- //More than or one input
- if (tInputList.size() > 0 && tValidOutputSlots >= 1) {
- if ((tRecipe != null) && (tRecipe.isRecipeInputEqual(true, null, tInputs))) {
- Utils.LOG_WARNING("Valid Recipe found - size "+tRecipe.mOutputs.length);
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
- this.mEfficiencyIncrease = 10000;
-
-
- this.mEUt = (-tRecipe.mEUt);
- this.mMaxProgresstime = Math.max(1, (tRecipe.mDuration/5));
- ItemStack[] outputs = new ItemStack[tRecipe.mOutputs.length];
- for (int i = 0; i < tRecipe.mOutputs.length; i++){
- if (i==0) {
- Utils.LOG_WARNING("Adding the default output");
- outputs[0] = tRecipe.getOutput(i);
- }
- else if (getBaseMetaTileEntity().getRandomNumber(7500) < tRecipe.getOutputChance(i)){
- Utils.LOG_WARNING("Adding a bonus output");
- outputs[i] = tRecipe.getOutput(i);
- }
- else {
- Utils.LOG_WARNING("Adding null output");
- outputs[i] = null;
- }
- }
-
- this.mOutputItems = outputs;
- sendLoopStart((byte) 20);
- updateSlots();
- return true;
- }
- }
- return false;
- }
-
- @Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
- int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
+ public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
+ final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
+ final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
if (!aBaseMetaTileEntity.getAirOffset(xDir, 1, zDir)) {
return false;
}
int tAmount = 0;
- controller = false;
+ GregtechMetaTileEntity_IndustrialMacerator.controller = false;
for (int i = -1; i < 2; i++) {
for (int j = -1; j < 2; j++) {
for (int h = 0; h < 6; h++) {
- if (!(i == 0 && j == 0 && (h > 0 && h < 5)))//((h > 0)&&(h<5)) || (((xDir + i != 0) || (zDir + j != 0)) && ((i != 0) || (j != 0)))
+ if (!(i == 0 && j == 0 && h > 0 && h < 5))// ((h >
+ // 0)&&(h<5)) ||
+ // (((xDir + i
+ // != 0) ||
+ // (zDir + j !=
+ // 0)) && ((i !=
+ // 0) || (j !=
+ // 0)))
{
- IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
- if ((!addMaintenanceToMachineList(tTileEntity, 64)) && (!addInputToMachineList(tTileEntity, 64)) && (!addOutputToMachineList(tTileEntity, 64)) && (!addEnergyInputToMachineList(tTileEntity, 64)) && (!ignoreController(aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j)))) {
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity
+ .getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
+ if (!this.addMaintenanceToMachineList(tTileEntity, 64)
+ && !this.addInputToMachineList(tTileEntity, 64)
+ && !this.addOutputToMachineList(tTileEntity, 64)
+ && !this.addEnergyInputToMachineList(tTileEntity, 64)
+ && !this.ignoreController(aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j))) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h,
+ zDir + j) != ModBlocks.blockCasingsMisc) {
Utils.LOG_INFO("Returned False 1");
return false;
}
@@ -205,17 +80,18 @@ extends GregtechMeta_MultiBlockBase {
Utils.LOG_INFO("Returned False 3");
return false;
}
- int height = this.getBaseMetaTileEntity().getYCoord();
+ final int height = this.getBaseMetaTileEntity().getYCoord();
if (this.mInputBusses.get(0).getBaseMetaTileEntity().getYCoord() != height) {
- Utils.LOG_INFO("height: "+height+" | Returned False 4");
+ Utils.LOG_INFO("height: " + height + " | Returned False 4");
return false;
}
- GT_MetaTileEntity_Hatch_OutputBus[] tmpHatches = new GT_MetaTileEntity_Hatch_OutputBus[5];
+ final GT_MetaTileEntity_Hatch_OutputBus[] tmpHatches = new GT_MetaTileEntity_Hatch_OutputBus[5];
for (int i = 0; i < this.mOutputBusses.size(); i++) {
- int hatchNumber = this.mOutputBusses.get(i).getBaseMetaTileEntity().getYCoord() - 1 - height;
+ final int hatchNumber = this.mOutputBusses.get(i).getBaseMetaTileEntity().getYCoord() - 1 - height;
if (tmpHatches[hatchNumber] == null) {
tmpHatches[hatchNumber] = this.mOutputBusses.get(i);
- } else {
+ }
+ else {
Utils.LOG_INFO("Returned False 5");
return false;
}
@@ -227,35 +103,181 @@ extends GregtechMeta_MultiBlockBase {
return tAmount >= 26;
}
- public boolean ignoreController(Block tTileEntity) {
- if (!controller && tTileEntity == GregTech_API.sBlockMachines) {
- return true;
+ @Override
+ public boolean checkRecipe(final ItemStack aStack) {
+
+ // Get inputs.
+ final ArrayList<ItemStack> tInputList = this.getStoredInputs();
+ for (int i = 0; i < tInputList.size() - 1; i++) {
+ for (int j = i + 1; j < tInputList.size(); j++) {
+ if (GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) {
+ if (tInputList.get(i).stackSize >= tInputList.get(j).stackSize) {
+ tInputList.remove(j--);
+ }
+ else {
+ tInputList.remove(i--);
+ break;
+ }
+ }
+ }
}
+
+ // Temp var
+ final ItemStack[] tInputs = Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
+
+ // Don't check the recipe if someone got around the output bus size
+ // check.
+ if (this.mOutputBusses.size() != 5) {
+ return false;
+ }
+
+ // Make a recipe instance for the rest of the method.
+ final GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes.findRecipe(this.getBaseMetaTileEntity(),
+ false, 9223372036854775807L, null, tInputs);
+
+ final int tValidOutputSlots = this.getValidOutputSlots(this.getRecipeMap(), tInputs);
+ Utils.LOG_WARNING("Valid Output Slots: " + tValidOutputSlots);
+
+ // More than or one input
+ if (tInputList.size() > 0 && tValidOutputSlots >= 1) {
+ if (tRecipe != null && tRecipe.isRecipeInputEqual(true, null, tInputs)) {
+ Utils.LOG_WARNING("Valid Recipe found - size " + tRecipe.mOutputs.length);
+ this.mEfficiency = 10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000;
+ this.mEfficiencyIncrease = 10000;
+
+ this.mEUt = -tRecipe.mEUt;
+ this.mMaxProgresstime = Math.max(1, tRecipe.mDuration / 5);
+ final ItemStack[] outputs = new ItemStack[tRecipe.mOutputs.length];
+ for (int i = 0; i < tRecipe.mOutputs.length; i++) {
+ if (i == 0) {
+ Utils.LOG_WARNING("Adding the default output");
+ outputs[0] = tRecipe.getOutput(i);
+ }
+ else if (this.getBaseMetaTileEntity().getRandomNumber(7500) < tRecipe.getOutputChance(i)) {
+ Utils.LOG_WARNING("Adding a bonus output");
+ outputs[i] = tRecipe.getOutput(i);
+ }
+ else {
+ Utils.LOG_WARNING("Adding null output");
+ outputs[i] = null;
+ }
+ }
+
+ this.mOutputItems = outputs;
+ this.sendLoopStart((byte) 20);
+ this.updateSlots();
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
return false;
}
@Override
- public int getMaxEfficiency(ItemStack aStack) {
+ public int getAmountOfOutputs() {
+ return 16;
+ }
+
+ @Override
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory,
+ final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "MacerationStack.png");
+ }
+
+ /*
+ * @Override public boolean isCorrectMachinePart(ItemStack aStack) { return
+ * true; }
+ */
+
+ @Override
+ public String[] getDescription() {
+ return new String[] {
+ "Controller Block for the Industrial Maceration Stack", "Size[WxHxL]: 3x6x3 (Hollow)",
+ "Controller (Center Bottom)", "1x Input Bus (Any bottom layer casing)",
+ "5x Output Bus (Any casing besides bottom layer)", "1x Maintenance Hatch (Any casing)",
+ "1x Energy Hatch (Any casing)", "Maceration Stack Casings for the rest (26 at least!)", CORE.GT_Tooltip
+ };
+ }
+
+ @Override
+ public int getMaxEfficiency(final ItemStack aStack) {
return 10000;
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
+ public int getPollutionPerTick(final ItemStack aStack) {
return 0;
}
@Override
- public int getAmountOfOutputs() {
- return 16;
+ public GT_Recipe.GT_Recipe_Map getRecipeMap() {
+ return GT_Recipe.GT_Recipe_Map.sMaceratorRecipes;
}
@Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ if (aSide == aFacing) {
+ return new ITexture[] {
+ Textures.BlockIcons.CASING_BLOCKS[64], new GT_RenderedTexture(
+ aActive ? TexturesGtBlock.Overlay_MatterFab_Active : TexturesGtBlock.Overlay_MatterFab)
+ };
+ }
+ return new ITexture[] {
+ Textures.BlockIcons.CASING_BLOCKS[64]
+ };
+ }
+
+ public boolean ignoreController(final Block tTileEntity) {
+ if (!GregtechMetaTileEntity_IndustrialMacerator.controller && tTileEntity == GregTech_API.sBlockMachines) {
+ return true;
+ }
return false;
}
@Override
+ public boolean isFacingValid(final byte aFacing) {
+ return aFacing > 1;
+ }
+
+ @Override
public boolean isOverclockerUpgradable() {
return true;
}
+
+ @Override
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntity_IndustrialMacerator(this.mName);
+ }
+
+ @Override
+ public void onPreTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) {
+ super.onPreTick(aBaseMetaTileEntity, aTick);
+ if (aBaseMetaTileEntity.isClientSide() && aBaseMetaTileEntity.isActive()
+ && aBaseMetaTileEntity.getFrontFacing() != 1 && aBaseMetaTileEntity.getCoverIDAtSide((byte) 1) == 0
+ && !aBaseMetaTileEntity.getOpacityAtSide((byte) 1)) {
+ final Random tRandom = aBaseMetaTileEntity.getWorld().rand;
+ aBaseMetaTileEntity.getWorld().spawnParticle("smoke",
+ aBaseMetaTileEntity.getXCoord() + 0.8F - tRandom.nextFloat() * 0.6F,
+ aBaseMetaTileEntity.getYCoord() + 0.3f + tRandom.nextFloat() * 0.2F,
+ aBaseMetaTileEntity.getZCoord() + 1.2F - tRandom.nextFloat() * 1.6F, 0.0D, 0.0D, 0.0D);
+ }
+ }
+
+ @Override
+ public void startProcess() {
+ this.sendLoopStart((byte) 1);
+ }
+
+ @Override
+ public void startSoundLoop(final byte aIndex, final double aX, final double aY, final double aZ) {
+ super.startSoundLoop(aIndex, aX, aY, aZ);
+ if (aIndex == 1) {
+ GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(Integer.valueOf(201)), 10, 1.0F, aX, aY, aZ);
+ }
+ }
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialPlatePress.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialPlatePress.java
index 68254a880f..ee15dcd83c 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialPlatePress.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialPlatePress.java
@@ -1,7 +1,5 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi;
-import static gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks.GTID;
-
import java.util.ArrayList;
import java.util.Arrays;
@@ -18,182 +16,200 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
+import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks;
import net.minecraft.block.Block;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
-public class GregtechMetaTileEntity_IndustrialPlatePress
-extends GregtechMeta_MultiBlockBase {
- public GregtechMetaTileEntity_IndustrialPlatePress(int aID, String aName, String aNameRegional) {
+public class GregtechMetaTileEntity_IndustrialPlatePress extends GregtechMeta_MultiBlockBase {
+ public GregtechMetaTileEntity_IndustrialPlatePress(final int aID, final String aName, final String aNameRegional) {
super(aID, aName, aNameRegional);
}
- public GregtechMetaTileEntity_IndustrialPlatePress(String aName) {
+ public GregtechMetaTileEntity_IndustrialPlatePress(final String aName) {
super(aName);
}
@Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GregtechMetaTileEntity_IndustrialPlatePress(this.mName);
+ public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
+ final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
+ final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
+ if (!aBaseMetaTileEntity.getAirOffset(xDir, 0, zDir)) {
+ return false;
+ }
+ int tAmount = 0;
+ for (int i = -1; i < 2; i++) {
+ for (int j = -1; j < 2; j++) {
+ for (int h = -1; h < 2; h++) {
+ if (h != 0 || (xDir + i != 0 || zDir + j != 0) && (i != 0 || j != 0)) {
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity
+ .getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
+ if (!this.addMaintenanceToMachineList(tTileEntity, 61)
+ && !this.addMufflerToMachineList(tTileEntity, 61)
+ && !this.addInputToMachineList(tTileEntity, 61)
+ && !this.addOutputToMachineList(tTileEntity, 61)
+ && !this.addEnergyInputToMachineList(tTileEntity, 61)) {
+ final Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j);
+ final byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j);
+ if (tBlock != ModBlocks.blockCasingsMisc || tMeta != 4) {
+ return false;
+ }
+ tAmount++;
+ }
+ }
+ }
+ }
+ }
+ return tAmount >= 16;
}
@Override
- public String[] getDescription() {
- return new String[]{"Controller Block for the Material Press",
- "Size: 3x3x3 (Hollow)",
- "Controller (front centered)",
- "1x Input Bus (anywhere)",
- "1x Output Bus (anywhere)",
- "1x Energy Hatch (anywhere)",
- "1x Maintenance Hatch (anywhere)",
- "1x Muffler (anywhere)",
- "Material Press Machine Casings for the rest (16 at least!)",
- CORE.GT_Tooltip};
+ public boolean checkRecipe(final ItemStack aStack) { // TODO - Add Check to
+ // make sure Fluid
+ // output isn't full
+ final ArrayList<ItemStack> tInputList = this.getStoredInputs();
+ for (int i = 0; i < tInputList.size() - 1; i++) {
+ for (int j = i + 1; j < tInputList.size(); j++) {
+ if (GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) {
+ if (tInputList.get(i).stackSize >= tInputList.get(j).stackSize) {
+ tInputList.remove(j--);
+ }
+ else {
+ tInputList.remove(i--);
+ break;
+ }
+ }
+ }
+ }
+ final ItemStack[] tInputs = Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
+
+ final ArrayList<FluidStack> tFluidList = this.getStoredFluids();
+ for (int i = 0; i < tFluidList.size() - 1; i++) {
+ for (int j = i + 1; j < tFluidList.size(); j++) {
+ if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) {
+ if (tFluidList.get(i).amount >= tFluidList.get(j).amount) {
+ tFluidList.remove(j--);
+ }
+ else {
+ tFluidList.remove(i--);
+ break;
+ }
+ }
+ }
+ }
+ final FluidStack[] tFluids = Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tInputList.size()]), 0, 1);
+
+ final int tValidOutputSlots = this.getValidOutputSlots(this.getRecipeMap(), tInputs);
+ Utils.LOG_WARNING("Valid Output Slots: " + tValidOutputSlots);
+ // More than or one input
+ if (tInputList.size() > 0 && tValidOutputSlots >= 1) {
+ final long tVoltage = this.getMaxInputVoltage();
+ final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
+ final GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBenderRecipes.findRecipe(this.getBaseMetaTileEntity(),
+ false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs);
+ if (tRecipe != null && 2500 >= tRecipe.mSpecialValue
+ && tRecipe.isRecipeInputEqual(true, tFluids, tInputs)) {
+ this.mEfficiency = 10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000;
+ this.mEfficiencyIncrease = 10000;
+ if (tRecipe.mEUt <= 16) {
+ this.mEUt = tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1);
+ this.mMaxProgresstime = tRecipe.mDuration / (1 << tTier - 1);
+ }
+ else {
+ this.mEUt = tRecipe.mEUt;
+ this.mMaxProgresstime = tRecipe.mDuration;
+ while (this.mEUt <= gregtech.api.enums.GT_Values.V[tTier - 1]) {
+ this.mEUt *= 4;
+ this.mMaxProgresstime /= 2;
+ }
+ }
+ if (this.mEUt > 0) {
+ this.mEUt = -this.mEUt;
+ }
+ this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
+ this.mOutputItems = new ItemStack[] {
+ tRecipe.getOutput(0), tRecipe.getOutput(1)
+ };
+ this.updateSlots();
+ return true;
+ }
+ }
+ return false;
}
@Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- if (aSide == aFacing) {
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[GTID+4], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER)};
- }
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[GTID+4]};
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
+ return false;
}
@Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MaterialPress.png");
+ public int getAmountOfOutputs() {
+ return 1;
}
@Override
- public GT_Recipe.GT_Recipe_Map getRecipeMap() {
- return GT_Recipe.GT_Recipe_Map.sBenderRecipes;
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory,
+ final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "MaterialPress.png");
}
@Override
- public boolean isFacingValid(byte aFacing) {
- return aFacing > 1;
+ public String[] getDescription() {
+ return new String[] {
+ "Controller Block for the Material Press", "Size: 3x3x3 (Hollow)", "Controller (front centered)",
+ "1x Input Bus (anywhere)", "1x Output Bus (anywhere)", "1x Energy Hatch (anywhere)",
+ "1x Maintenance Hatch (anywhere)", "1x Muffler (anywhere)",
+ "Material Press Machine Casings for the rest (16 at least!)", CORE.GT_Tooltip
+ };
}
- @Override
- public boolean checkRecipe(ItemStack aStack) { //TODO - Add Check to make sure Fluid output isn't full
- ArrayList<ItemStack> tInputList = getStoredInputs();
- for (int i = 0; i < tInputList.size() - 1; i++) {
- for (int j = i + 1; j < tInputList.size(); j++) {
- if (GT_Utility.areStacksEqual((ItemStack) tInputList.get(i), (ItemStack) tInputList.get(j))) {
- if (((ItemStack) tInputList.get(i)).stackSize >= ((ItemStack) tInputList.get(j)).stackSize) {
- tInputList.remove(j--);
- } else {
- tInputList.remove(i--);
- break;
- }
- }
- }
- }
- ItemStack[] tInputs = (ItemStack[]) Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
-
- ArrayList<FluidStack> tFluidList = getStoredFluids();
- for (int i = 0; i < tFluidList.size() - 1; i++) {
- for (int j = i + 1; j < tFluidList.size(); j++) {
- if (GT_Utility.areFluidsEqual((FluidStack) tFluidList.get(i), (FluidStack) tFluidList.get(j))) {
- if (((FluidStack) tFluidList.get(i)).amount >= ((FluidStack) tFluidList.get(j)).amount) {
- tFluidList.remove(j--);
- } else {
- tFluidList.remove(i--);
- break;
- }
- }
- }
- }
- FluidStack[] tFluids = (FluidStack[]) Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tInputList.size()]), 0, 1);
-
- int tValidOutputSlots = this.getValidOutputSlots(getRecipeMap(), tInputs);
- Utils.LOG_WARNING("Valid Output Slots: "+tValidOutputSlots);
- //More than or one input
- if (tInputList.size() > 0 && tValidOutputSlots >= 1) {
- long tVoltage = getMaxInputVoltage();
- byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBenderRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs);
- if ((tRecipe != null) && (2500 >= tRecipe.mSpecialValue) && (tRecipe.isRecipeInputEqual(true, tFluids, tInputs))) {
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
- this.mEfficiencyIncrease = 10000;
- if (tRecipe.mEUt <= 16) {
- this.mEUt = (tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1));
- this.mMaxProgresstime = (tRecipe.mDuration / (1 << tTier - 1));
- } else {
- this.mEUt = tRecipe.mEUt;
- this.mMaxProgresstime = tRecipe.mDuration;
- while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
- this.mEUt *= 4;
- this.mMaxProgresstime /= 2;
- }
- }
- if (this.mEUt > 0) {
- this.mEUt = (-this.mEUt);
- }
- this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
- this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0), tRecipe.getOutput(1)};
- updateSlots();
- return true;
- }
- }
- return false;
- }
+ @Override
+ public int getMaxEfficiency(final ItemStack aStack) {
+ return 10000;
+ }
@Override
- public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
- super.startSoundLoop(aIndex, aX, aY, aZ);
- if (aIndex == 20) {
- GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(5)), 10, 1.0F, aX, aY, aZ);
- }
- }
+ public int getPollutionPerTick(final ItemStack aStack) {
+ return 0;
+ }
@Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
- int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
- if (!aBaseMetaTileEntity.getAirOffset(xDir, 0, zDir)) {
- return false;
- }
- int tAmount = 0;
- for (int i = -1; i < 2; i++) {
- for (int j = -1; j < 2; j++) {
- for (int h = -1; h < 2; h++) {
- if ((h != 0) || (((xDir + i != 0) || (zDir + j != 0)) && ((i != 0) || (j != 0)))) {
- IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
- if ((!addMaintenanceToMachineList(tTileEntity, 61)) && (!addMufflerToMachineList(tTileEntity, 61)) && (!addInputToMachineList(tTileEntity, 61)) && (!addOutputToMachineList(tTileEntity, 61)) && (!addEnergyInputToMachineList(tTileEntity, 61))) {
- Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j);
- byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j);
- if (((tBlock != ModBlocks.blockCasingsMisc) || (tMeta != 4))) {
- return false;
- }
- tAmount++;
- }
- }
- }
- }
- }
- return tAmount >= 16;
- }
+ public GT_Recipe.GT_Recipe_Map getRecipeMap() {
+ return GT_Recipe.GT_Recipe_Map.sBenderRecipes;
+ }
@Override
- public int getMaxEfficiency(ItemStack aStack) {
- return 10000;
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ if (aSide == aFacing) {
+ return new ITexture[] {
+ Textures.BlockIcons.CASING_BLOCKS[GregtechMetaCasingBlocks.GTID + 4],
+ new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE
+ : Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER)
+ };
+ }
+ return new ITexture[] {
+ Textures.BlockIcons.CASING_BLOCKS[GregtechMetaCasingBlocks.GTID + 4]
+ };
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
- return 0;
+ public boolean isFacingValid(final byte aFacing) {
+ return aFacing > 1;
}
@Override
- public int getAmountOfOutputs() {
- return 1;
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntity_IndustrialPlatePress(this.mName);
}
@Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
- return false;
+ public void startSoundLoop(final byte aIndex, final double aX, final double aY, final double aZ) {
+ super.startSoundLoop(aIndex, aX, aY, aZ);
+ if (aIndex == 20) {
+ GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(Integer.valueOf(5)), 10, 1.0F, aX, aY, aZ);
+ }
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialSinter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialSinter.java
index 3e964bdb28..dadb82388d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialSinter.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialSinter.java
@@ -19,159 +19,111 @@ import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
-public class GregtechMetaTileEntity_IndustrialSinter
-extends GT_MetaTileEntity_MultiBlockBase {
-
+public class GregtechMetaTileEntity_IndustrialSinter extends GT_MetaTileEntity_MultiBlockBase {
RenderBlocks asdasd = RenderBlocks.getInstance();
-
- public GregtechMetaTileEntity_IndustrialSinter(int aID, String aName, String aNameRegional) {
+
+ public GregtechMetaTileEntity_IndustrialSinter(final int aID, final String aName, final String aNameRegional) {
super(aID, aName, aNameRegional);
}
- public GregtechMetaTileEntity_IndustrialSinter(String aName) {
+ public GregtechMetaTileEntity_IndustrialSinter(final String aName) {
super(aName);
}
- @Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GregtechMetaTileEntity_IndustrialSinter(this.mName);
- }
-
- @Override
- public String[] getDescription() {
- return new String[]{
- "Controller Block for the Industrial Sinter Furnace",
- "Size: 3x5x3 [WxLxH] (Hollow)", "Controller (front centered)",
- "2x Input Bus (side centered)",
- "2x Output Bus (side centered)",
- "1x Energy Hatch (top or bottom centered)",
- "1x Maintenance Hatch (back centered)",
- "Sinter Furnace Casings for the rest (32 at least!)",
- CORE.GT_Tooltip
- };
- }
-
- @Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- if (aSide == aFacing) {
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[63], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER)};
- }
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[63]};
- }
-
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "WireFactory.png");
+ private boolean addEnergyInputToMachineList(final IGregTechTileEntity tTileEntity) {
+ return this.addEnergyInputToMachineList(tTileEntity, this.getCasingTextureIndex());
}
- @Override
- public GT_Recipe.GT_Recipe_Map getRecipeMap() {
- return GT_Recipe.GT_Recipe_Map.sWiremillRecipes;
- }
-
- @Override
- public boolean isCorrectMachinePart(ItemStack aStack) {
- return true;
- }
-
- @Override
- public boolean isFacingValid(byte aFacing) {
- return aFacing > 1;
- }
-
- @Override
- public boolean checkRecipe(ItemStack aStack) {
- ArrayList<ItemStack> tInputList = getStoredInputs();
- for (ItemStack tInput : tInputList) {
- long tVoltage = getMaxInputVoltage();
- byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
-
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sWiremillRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], null, new ItemStack[]{tInput});
- if (tRecipe != null) {
- if (tRecipe.isRecipeInputEqual(true, null, new ItemStack[]{tInput})) {
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
- this.mEfficiencyIncrease = 10000;
- if (tRecipe.mEUt <= 16) {
- this.mEUt = (tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1));
- this.mMaxProgresstime = (tRecipe.mDuration / (1 << tTier - 1));
- } else {
- this.mEUt = tRecipe.mEUt;
- this.mMaxProgresstime = tRecipe.mDuration;
- while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
- this.mEUt *= 4;
- this.mMaxProgresstime /= 2;
- }
- }
- if (this.mEUt > 0) {
- this.mEUt = (-this.mEUt);
- }
- this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
- this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0)};
- updateSlots();
- return true;
- }
- }
- }
- return false;
+ private boolean addToMachineList(final IGregTechTileEntity tTileEntity) {
+ return this.addMaintenanceToMachineList(tTileEntity, this.getCasingTextureIndex())
+ || this.addInputToMachineList(tTileEntity, this.getCasingTextureIndex())
+ || this.addOutputToMachineList(tTileEntity, this.getCasingTextureIndex())
+ || this.addMufflerToMachineList(tTileEntity, this.getCasingTextureIndex());
}
@Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- int controllerX = aBaseMetaTileEntity.getXCoord();
- int controllerY = aBaseMetaTileEntity.getYCoord();
- int controllerZ = aBaseMetaTileEntity.getZCoord();
+ public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
+ final int controllerX = aBaseMetaTileEntity.getXCoord();
+ final int controllerY = aBaseMetaTileEntity.getYCoord();
+ final int controllerZ = aBaseMetaTileEntity.getZCoord();
- byte tSide = getBaseMetaTileEntity().getBackFacing();
- if ((getBaseMetaTileEntity().getAirAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 1)) && (getBaseMetaTileEntity().getAirAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 2) && (getBaseMetaTileEntity().getAirAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 3)))) {
+ final byte tSide = this.getBaseMetaTileEntity().getBackFacing();
+ if (this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 1)
+ && this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 2)
+ && this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(),
+ 3)) {
int tAirCount = 0;
for (byte i = -1; i < 2; i = (byte) (i + 1)) {
for (byte j = -1; j < 2; j = (byte) (j + 1)) {
for (byte k = -1; k < 2; k = (byte) (k + 1)) {
- if (getBaseMetaTileEntity().getAirOffset(i, j, k)) {
- Utils.LOG_INFO("Found Air at: "+(controllerX+i)+" "+(controllerY+k)+" "+(controllerZ+k));
- //if (aBaseMetaTileEntity.getWorld().isRemote){
- //asdasd.renderStandardBlock(ModBlocks.MatterFabricatorEffectBlock, (controllerX+i), (controllerY+k), (controllerZ+k));
- //UtilsRendering.drawBlockInWorld((controllerX+i), (controllerY+k), (controllerZ+k), Color.YELLOW_GREEN);
- //}
+ if (this.getBaseMetaTileEntity().getAirOffset(i, j, k)) {
+ Utils.LOG_INFO("Found Air at: " + (controllerX + i) + " " + (controllerY + k) + " "
+ + (controllerZ + k));
+ // if (aBaseMetaTileEntity.getWorld().isRemote){
+ // asdasd.renderStandardBlock(ModBlocks.MatterFabricatorEffectBlock,
+ // (controllerX+i), (controllerY+k),
+ // (controllerZ+k));
+ // UtilsRendering.drawBlockInWorld((controllerX+i),
+ // (controllerY+k), (controllerZ+k),
+ // Color.YELLOW_GREEN);
+ // }
tAirCount++;
}
}
}
}
if (tAirCount != 10) {
- Utils.LOG_INFO("False. Air != 10. Air == "+tAirCount);
- //return false;
+ Utils.LOG_INFO("False. Air != 10. Air == " + tAirCount);
+ // return false;
}
for (byte i = 2; i < 6; i = (byte) (i + 1)) {
- //UtilsRendering.drawBlockInWorld((controllerX+i), (controllerY), (controllerZ), Color.LIME_GREEN);
+ // UtilsRendering.drawBlockInWorld((controllerX+i),
+ // (controllerY), (controllerZ), Color.LIME_GREEN);
IGregTechTileEntity tTileEntity;
- if ((null != (tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(i, 2))) &&
- (tTileEntity.getFrontFacing() == getBaseMetaTileEntity().getFrontFacing()) && (tTileEntity.getMetaTileEntity() != null) &&
- ((tTileEntity.getMetaTileEntity() instanceof GregtechMetaTileEntity_IndustrialSinter))) {
- //Utils.LOG_INFO("False 1");
+ if (null != (tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(i, 2))
+ && tTileEntity.getFrontFacing() == this.getBaseMetaTileEntity().getFrontFacing()
+ && tTileEntity.getMetaTileEntity() != null
+ && tTileEntity.getMetaTileEntity() instanceof GregtechMetaTileEntity_IndustrialSinter) {
+ // Utils.LOG_INFO("False 1");
return false;
}
}
- int tX = getBaseMetaTileEntity().getXCoord();
- int tY = getBaseMetaTileEntity().getYCoord();
- int tZ = getBaseMetaTileEntity().getZCoord();
+ final int tX = this.getBaseMetaTileEntity().getXCoord();
+ final int tY = this.getBaseMetaTileEntity().getYCoord();
+ final int tZ = this.getBaseMetaTileEntity().getZCoord();
for (byte i = -1; i < 2; i = (byte) (i + 1)) {
for (byte j = -1; j < 2; j = (byte) (j + 1)) {
- if ((i != 0) || (j != 0)) {
+ if (i != 0 || j != 0) {
for (byte k = 0; k < 5; k = (byte) (k + 1)) {
- //UtilsRendering.drawBlockInWorld((controllerX+i), (controllerY+k), (controllerZ+k), Color.ORANGE);
- if (((i == 0) || (j == 0)) && ((k == 1) || (k == 2) || (k == 3))) {
- //UtilsRendering.drawBlockInWorld((controllerX+i), (controllerY+k), (controllerZ+k), Color.TOMATO);
- if (getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == getCasingBlock() && getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == getCasingMeta()) {
- }
- else if (!addToMachineList(getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i))) && (!addEnergyInputToMachineList(getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i))))) {
+ // UtilsRendering.drawBlockInWorld((controllerX+i),
+ // (controllerY+k), (controllerZ+k), Color.ORANGE);
+ if ((i == 0 || j == 0) && (k == 1 || k == 2 || k == 3)) {
+ // UtilsRendering.drawBlockInWorld((controllerX+i),
+ // (controllerY+k), (controllerZ+k),
+ // Color.TOMATO);
+ if (this.getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i),
+ tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingBlock()
+ && this.getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k
+ : tSide == 4 ? -k : i), tY + j,
+ tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingMeta()) {
+ }
+ else if (!this.addToMachineList(this.getBaseMetaTileEntity().getIGregTechTileEntity(
+ tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j,
+ tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)))
+ && !this.addEnergyInputToMachineList(this.getBaseMetaTileEntity()
+ .getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i),
+ tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)))) {
Utils.LOG_INFO("False 2");
return false;
}
- }
- else if (getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == getCasingBlock() && getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == getCasingMeta()) {
- }
+ }
+ else if (this.getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i),
+ tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingBlock()
+ && this.getBaseMetaTileEntity().getMetaID(
+ tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j,
+ tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingMeta()) {
+ }
else {
Utils.LOG_INFO("False 3");
return false;
@@ -187,14 +139,17 @@ extends GT_MetaTileEntity_MultiBlockBase {
if (this.mInputBusses.size() != 2 || this.mOutputBusses.size() != 2) {
Utils.LOG_INFO("Incorrect amount of Input & Output busses.");
return false;
- }
+ }
this.mMaintenanceHatches.clear();
- IGregTechTileEntity tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 4);
- if ((tTileEntity != null) && (tTileEntity.getMetaTileEntity() != null)) {
- if ((tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Maintenance)) {
+ final IGregTechTileEntity tTileEntity = this.getBaseMetaTileEntity()
+ .getIGregTechTileEntityAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 4);
+ if (tTileEntity != null && tTileEntity.getMetaTileEntity() != null) {
+ if (tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Maintenance) {
this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) tTileEntity.getMetaTileEntity());
- ((GT_MetaTileEntity_Hatch) tTileEntity.getMetaTileEntity()).mMachineBlock = getCasingTextureIndex();
- } else {
+ ((GT_MetaTileEntity_Hatch) tTileEntity.getMetaTileEntity()).mMachineBlock = this
+ .getCasingTextureIndex();
+ }
+ else {
Utils.LOG_INFO("Maintenance hatch must be in the middle block on the back.");
return false;
}
@@ -203,7 +158,8 @@ extends GT_MetaTileEntity_MultiBlockBase {
Utils.LOG_INFO("Incorrect amount of Maintenance or Energy hatches.");
return false;
}
- } else {
+ }
+ else {
Utils.LOG_INFO("False 5");
return false;
}
@@ -212,18 +168,52 @@ extends GT_MetaTileEntity_MultiBlockBase {
}
@Override
- public int getMaxEfficiency(ItemStack aStack) {
- return 10000;
- }
+ public boolean checkRecipe(final ItemStack aStack) {
+ final ArrayList<ItemStack> tInputList = this.getStoredInputs();
+ for (final ItemStack tInput : tInputList) {
+ final long tVoltage = this.getMaxInputVoltage();
+ final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
- @Override
- public int getPollutionPerTick(ItemStack aStack) {
- return 0;
+ final GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sWiremillRecipes.findRecipe(this.getBaseMetaTileEntity(),
+ false, gregtech.api.enums.GT_Values.V[tTier], null, new ItemStack[] {
+ tInput
+ });
+ if (tRecipe != null) {
+ if (tRecipe.isRecipeInputEqual(true, null, new ItemStack[] {
+ tInput
+ })) {
+ this.mEfficiency = 10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000;
+ this.mEfficiencyIncrease = 10000;
+ if (tRecipe.mEUt <= 16) {
+ this.mEUt = tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1);
+ this.mMaxProgresstime = tRecipe.mDuration / (1 << tTier - 1);
+ }
+ else {
+ this.mEUt = tRecipe.mEUt;
+ this.mMaxProgresstime = tRecipe.mDuration;
+ while (this.mEUt <= gregtech.api.enums.GT_Values.V[tTier - 1]) {
+ this.mEUt *= 4;
+ this.mMaxProgresstime /= 2;
+ }
+ }
+ if (this.mEUt > 0) {
+ this.mEUt = -this.mEUt;
+ }
+ this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
+ this.mOutputItems = new ItemStack[] {
+ tRecipe.getOutput(0)
+ };
+ this.updateSlots();
+ return true;
+ }
+ }
+ }
+ return false;
}
@Override
- public int getDamageToComponent(ItemStack aStack) {
- return 0;
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
+ return false;
}
@Override
@@ -231,30 +221,81 @@ extends GT_MetaTileEntity_MultiBlockBase {
return 1;
}
- @Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
- return false;
- }
-
public Block getCasingBlock() {
return ModBlocks.blockCasingsMisc;
}
-
public byte getCasingMeta() {
return 6;
}
-
public byte getCasingTextureIndex() {
return 63;
}
- private boolean addToMachineList(IGregTechTileEntity tTileEntity) {
- return ((addMaintenanceToMachineList(tTileEntity, getCasingTextureIndex())) || (addInputToMachineList(tTileEntity, getCasingTextureIndex())) || (addOutputToMachineList(tTileEntity, getCasingTextureIndex())) || (addMufflerToMachineList(tTileEntity, getCasingTextureIndex())));
+ @Override
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory,
+ final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "WireFactory.png");
}
- private boolean addEnergyInputToMachineList(IGregTechTileEntity tTileEntity) {
- return ((addEnergyInputToMachineList(tTileEntity, getCasingTextureIndex())));
+ @Override
+ public int getDamageToComponent(final ItemStack aStack) {
+ return 0;
+ }
+
+ @Override
+ public String[] getDescription() {
+ return new String[] {
+ "Controller Block for the Industrial Sinter Furnace", "Size: 3x5x3 [WxLxH] (Hollow)",
+ "Controller (front centered)", "2x Input Bus (side centered)", "2x Output Bus (side centered)",
+ "1x Energy Hatch (top or bottom centered)", "1x Maintenance Hatch (back centered)",
+ "Sinter Furnace Casings for the rest (32 at least!)", CORE.GT_Tooltip
+ };
+ }
+
+ @Override
+ public int getMaxEfficiency(final ItemStack aStack) {
+ return 10000;
+ }
+
+ @Override
+ public int getPollutionPerTick(final ItemStack aStack) {
+ return 0;
+ }
+
+ @Override
+ public GT_Recipe.GT_Recipe_Map getRecipeMap() {
+ return GT_Recipe.GT_Recipe_Map.sWiremillRecipes;
+ }
+
+ @Override
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ if (aSide == aFacing) {
+ return new ITexture[] {
+ Textures.BlockIcons.CASING_BLOCKS[63],
+ new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE
+ : Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER)
+ };
+ }
+ return new ITexture[] {
+ Textures.BlockIcons.CASING_BLOCKS[63]
+ };
+ }
+
+ @Override
+ public boolean isCorrectMachinePart(final ItemStack aStack) {
+ return true;
+ }
+
+ @Override
+ public boolean isFacingValid(final byte aFacing) {
+ return aFacing > 1;
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntity_IndustrialSinter(this.mName);
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWireMill.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWireMill.java
index 5ee5c0d787..f9a633bff5 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWireMill.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWireMill.java
@@ -20,110 +20,38 @@ import net.minecraft.block.Block;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
-public class GregtechMetaTileEntity_IndustrialWireMill
-extends GregtechMeta_MultiBlockBase {
- public GregtechMetaTileEntity_IndustrialWireMill(int aID, String aName, String aNameRegional) {
+public class GregtechMetaTileEntity_IndustrialWireMill extends GregtechMeta_MultiBlockBase {
+ public GregtechMetaTileEntity_IndustrialWireMill(final int aID, final String aName, final String aNameRegional) {
super(aID, aName, aNameRegional);
}
- public GregtechMetaTileEntity_IndustrialWireMill(String aName) {
+ public GregtechMetaTileEntity_IndustrialWireMill(final String aName) {
super(aName);
}
- @Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GregtechMetaTileEntity_IndustrialWireMill(this.mName);
- }
-
- @Override
- public String[] getDescription() {
- return new String[]{
- "Controller Block for the Industrial Wire Factory",
- "Size: 3x5x3 [WxLxH] (Hollow)", "Controller (front centered)",
- "2x Input Bus (side centered)",
- "2x Output Bus (side centered)",
- "1x Energy Hatch (top or bottom centered)",
- "1x Maintenance Hatch (back centered)",
- "Wire Factory Casings for the rest (32 at least!)",
- CORE.GT_Tooltip
- };
+ private boolean addEnergyInputToMachineList(final IGregTechTileEntity tTileEntity) {
+ return this.addEnergyInputToMachineList(tTileEntity, this.getCasingTextureIndex());
}
- @Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- if (aSide == aFacing) {
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[63], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER)};
- }
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[63]};
- }
-
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "WireFactory.png");
+ private boolean addToMachineList(final IGregTechTileEntity tTileEntity) {
+ return this.addMaintenanceToMachineList(tTileEntity, this.getCasingTextureIndex())
+ || this.addInputToMachineList(tTileEntity, this.getCasingTextureIndex())
+ || this.addOutputToMachineList(tTileEntity, this.getCasingTextureIndex())
+ || this.addMufflerToMachineList(tTileEntity, this.getCasingTextureIndex());
}
@Override
- public GT_Recipe.GT_Recipe_Map getRecipeMap() {
- return GT_Recipe.GT_Recipe_Map.sWiremillRecipes;
- }
-
- @Override
- public boolean isFacingValid(byte aFacing) {
- return aFacing > 1;
- }
-
- @Override
- public boolean checkRecipe(ItemStack aStack) {
- ArrayList<ItemStack> tInputList = getStoredInputs();
- for (ItemStack tInput : tInputList) {
- long tVoltage = getMaxInputVoltage();
- byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
-
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sWiremillRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], null, new ItemStack[]{tInput});
- if (tRecipe != null) {
-
- int tValidOutputSlots = this.getValidOutputSlots(getRecipeMap(), new ItemStack[]{tInput});
- Utils.LOG_WARNING("Valid Output Slots: "+tValidOutputSlots);
- //More than or one input
- if (tInputList.size() > 0 && tValidOutputSlots >= 1) {
-
- if (tRecipe.isRecipeInputEqual(true, null, new ItemStack[]{tInput})) {
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
- this.mEfficiencyIncrease = 10000;
- if (tRecipe.mEUt <= 16) {
- this.mEUt = (tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1));
- this.mMaxProgresstime = (tRecipe.mDuration / (1 << tTier - 1));
- } else {
- this.mEUt = tRecipe.mEUt;
- this.mMaxProgresstime = tRecipe.mDuration;
- while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
- this.mEUt *= 4;
- this.mMaxProgresstime /= 2;
- }
- }
- if (this.mEUt > 0) {
- this.mEUt = (-this.mEUt);
- }
- this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
- this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0)};
- updateSlots();
- return true;
- }
- }
- }
- }
- return false;
- }
-
- @Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- byte tSide = getBaseMetaTileEntity().getBackFacing();
- if ((getBaseMetaTileEntity().getAirAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 1)) && (getBaseMetaTileEntity().getAirAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 2) && (getBaseMetaTileEntity().getAirAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 3)))) {
+ public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
+ final byte tSide = this.getBaseMetaTileEntity().getBackFacing();
+ if (this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 1)
+ && this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 2)
+ && this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(),
+ 3)) {
int tAirCount = 0;
for (byte i = -1; i < 2; i = (byte) (i + 1)) {
for (byte j = -1; j < 2; j = (byte) (j + 1)) {
for (byte k = -1; k < 2; k = (byte) (k + 1)) {
- if (getBaseMetaTileEntity().getAirOffset(i, j, k)) {
+ if (this.getBaseMetaTileEntity().getAirOffset(i, j, k)) {
tAirCount++;
}
}
@@ -135,30 +63,44 @@ extends GregtechMeta_MultiBlockBase {
}
for (byte i = 2; i < 6; i = (byte) (i + 1)) {
IGregTechTileEntity tTileEntity;
- if ((null != (tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(i, 2))) &&
- (tTileEntity.getFrontFacing() == getBaseMetaTileEntity().getFrontFacing()) && (tTileEntity.getMetaTileEntity() != null) &&
- ((tTileEntity.getMetaTileEntity() instanceof GregtechMetaTileEntity_IndustrialWireMill))) {
- //Utils.LOG_INFO("False 1");
+ if (null != (tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(i, 2))
+ && tTileEntity.getFrontFacing() == this.getBaseMetaTileEntity().getFrontFacing()
+ && tTileEntity.getMetaTileEntity() != null
+ && tTileEntity.getMetaTileEntity() instanceof GregtechMetaTileEntity_IndustrialWireMill) {
+ // Utils.LOG_INFO("False 1");
return false;
}
}
- int tX = getBaseMetaTileEntity().getXCoord();
- int tY = getBaseMetaTileEntity().getYCoord();
- int tZ = getBaseMetaTileEntity().getZCoord();
+ final int tX = this.getBaseMetaTileEntity().getXCoord();
+ final int tY = this.getBaseMetaTileEntity().getYCoord();
+ final int tZ = this.getBaseMetaTileEntity().getZCoord();
for (byte i = -1; i < 2; i = (byte) (i + 1)) {
for (byte j = -1; j < 2; j = (byte) (j + 1)) {
- if ((i != 0) || (j != 0)) {
+ if (i != 0 || j != 0) {
for (byte k = 0; k < 5; k = (byte) (k + 1)) {
- if (((i == 0) || (j == 0)) && ((k == 1) || (k == 2) || (k == 3))) {
- if (getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == getCasingBlock() && getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == getCasingMeta()) {
- }
- else if (!addToMachineList(getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i))) && (!addEnergyInputToMachineList(getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i))))) {
+ if ((i == 0 || j == 0) && (k == 1 || k == 2 || k == 3)) {
+ if (this.getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i),
+ tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingBlock()
+ && this.getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k
+ : tSide == 4 ? -k : i), tY + j,
+ tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingMeta()) {
+ }
+ else if (!this.addToMachineList(this.getBaseMetaTileEntity().getIGregTechTileEntity(
+ tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j,
+ tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)))
+ && !this.addEnergyInputToMachineList(this.getBaseMetaTileEntity()
+ .getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i),
+ tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)))) {
Utils.LOG_INFO("False 2");
return false;
}
- }
- else if (getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == getCasingBlock() && getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == getCasingMeta()) {
- }
+ }
+ else if (this.getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i),
+ tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingBlock()
+ && this.getBaseMetaTileEntity().getMetaID(
+ tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j,
+ tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingMeta()) {
+ }
else {
Utils.LOG_INFO("False 3");
return false;
@@ -174,14 +116,17 @@ extends GregtechMeta_MultiBlockBase {
if (this.mInputBusses.size() != 2 || this.mOutputBusses.size() != 2) {
Utils.LOG_INFO("Incorrect amount of Input & Output busses.");
return false;
- }
+ }
this.mMaintenanceHatches.clear();
- IGregTechTileEntity tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 4);
- if ((tTileEntity != null) && (tTileEntity.getMetaTileEntity() != null)) {
- if ((tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Maintenance)) {
+ final IGregTechTileEntity tTileEntity = this.getBaseMetaTileEntity()
+ .getIGregTechTileEntityAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 4);
+ if (tTileEntity != null && tTileEntity.getMetaTileEntity() != null) {
+ if (tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Maintenance) {
this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) tTileEntity.getMetaTileEntity());
- ((GT_MetaTileEntity_Hatch) tTileEntity.getMetaTileEntity()).mMachineBlock = getCasingTextureIndex();
- } else {
+ ((GT_MetaTileEntity_Hatch) tTileEntity.getMetaTileEntity()).mMachineBlock = this
+ .getCasingTextureIndex();
+ }
+ else {
Utils.LOG_INFO("Maintenance hatch must be in the middle block on the back.");
return false;
}
@@ -190,7 +135,8 @@ extends GregtechMeta_MultiBlockBase {
Utils.LOG_INFO("Incorrect amount of Maintenance or Energy hatches.");
return false;
}
- } else {
+ }
+ else {
Utils.LOG_INFO("False 5");
return false;
}
@@ -199,13 +145,61 @@ extends GregtechMeta_MultiBlockBase {
}
@Override
- public int getMaxEfficiency(ItemStack aStack) {
- return 10000;
+ public boolean checkRecipe(final ItemStack aStack) {
+ final ArrayList<ItemStack> tInputList = this.getStoredInputs();
+ for (final ItemStack tInput : tInputList) {
+ final long tVoltage = this.getMaxInputVoltage();
+ final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
+
+ final GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sWiremillRecipes.findRecipe(this.getBaseMetaTileEntity(),
+ false, gregtech.api.enums.GT_Values.V[tTier], null, new ItemStack[] {
+ tInput
+ });
+ if (tRecipe != null) {
+
+ final int tValidOutputSlots = this.getValidOutputSlots(this.getRecipeMap(), new ItemStack[] {
+ tInput
+ });
+ Utils.LOG_WARNING("Valid Output Slots: " + tValidOutputSlots);
+ // More than or one input
+ if (tInputList.size() > 0 && tValidOutputSlots >= 1) {
+
+ if (tRecipe.isRecipeInputEqual(true, null, new ItemStack[] {
+ tInput
+ })) {
+ this.mEfficiency = 10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000;
+ this.mEfficiencyIncrease = 10000;
+ if (tRecipe.mEUt <= 16) {
+ this.mEUt = tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1);
+ this.mMaxProgresstime = tRecipe.mDuration / (1 << tTier - 1);
+ }
+ else {
+ this.mEUt = tRecipe.mEUt;
+ this.mMaxProgresstime = tRecipe.mDuration;
+ while (this.mEUt <= gregtech.api.enums.GT_Values.V[tTier - 1]) {
+ this.mEUt *= 4;
+ this.mMaxProgresstime /= 2;
+ }
+ }
+ if (this.mEUt > 0) {
+ this.mEUt = -this.mEUt;
+ }
+ this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
+ this.mOutputItems = new ItemStack[] {
+ tRecipe.getOutput(0)
+ };
+ this.updateSlots();
+ return true;
+ }
+ }
+ }
+ }
+ return false;
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
- return 0;
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
+ return false;
}
@Override
@@ -213,30 +207,71 @@ extends GregtechMeta_MultiBlockBase {
return 1;
}
- @Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
- return false;
- }
-
public Block getCasingBlock() {
return ModBlocks.blockCasingsMisc;
}
-
public byte getCasingMeta() {
return 6;
}
-
public byte getCasingTextureIndex() {
return 63;
}
- private boolean addToMachineList(IGregTechTileEntity tTileEntity) {
- return ((addMaintenanceToMachineList(tTileEntity, getCasingTextureIndex())) || (addInputToMachineList(tTileEntity, getCasingTextureIndex())) || (addOutputToMachineList(tTileEntity, getCasingTextureIndex())) || (addMufflerToMachineList(tTileEntity, getCasingTextureIndex())));
+ @Override
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory,
+ final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "WireFactory.png");
+ }
+
+ @Override
+ public String[] getDescription() {
+ return new String[] {
+ "Controller Block for the Industrial Wire Factory", "Size: 3x5x3 [WxLxH] (Hollow)",
+ "Controller (front centered)", "2x Input Bus (side centered)", "2x Output Bus (side centered)",
+ "1x Energy Hatch (top or bottom centered)", "1x Maintenance Hatch (back centered)",
+ "Wire Factory Casings for the rest (32 at least!)", CORE.GT_Tooltip
+ };
+ }
+
+ @Override
+ public int getMaxEfficiency(final ItemStack aStack) {
+ return 10000;
+ }
+
+ @Override
+ public int getPollutionPerTick(final ItemStack aStack) {
+ return 0;
+ }
+
+ @Override
+ public GT_Recipe.GT_Recipe_Map getRecipeMap() {
+ return GT_Recipe.GT_Recipe_Map.sWiremillRecipes;
+ }
+
+ @Override
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ if (aSide == aFacing) {
+ return new ITexture[] {
+ Textures.BlockIcons.CASING_BLOCKS[63],
+ new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE
+ : Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER)
+ };
+ }
+ return new ITexture[] {
+ Textures.BlockIcons.CASING_BLOCKS[63]
+ };
+ }
+
+ @Override
+ public boolean isFacingValid(final byte aFacing) {
+ return aFacing > 1;
}
-
- private boolean addEnergyInputToMachineList(IGregTechTileEntity tTileEntity) {
- return ((addEnergyInputToMachineList(tTileEntity, getCasingTextureIndex())));
+
+ @Override
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntity_IndustrialWireMill(this.mName);
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IronBlastFurnace.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IronBlastFurnace.java
index aa7aecc8c5..1ae8e60885 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IronBlastFurnace.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IronBlastFurnace.java
@@ -23,358 +23,460 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.common.util.ForgeDirection;
-public class GregtechMetaTileEntity_IronBlastFurnace
- extends MetaTileEntity {
- private static final ITexture[] FACING_SIDE = {new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top)};
- private static final ITexture[] FACING_FRONT = {new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_Off)};
- private static final ITexture[] FACING_ACTIVE = {new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_On)};
- public int mMaxProgresstime = 0;
- public int mUpdate = 30;
- public int mProgresstime = 0;
- public boolean mMachine = false;
- public ItemStack mOutputItem1;
- public ItemStack mOutputItem2;
-
- public GregtechMetaTileEntity_IronBlastFurnace(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional, 4);
- }
-
- public GregtechMetaTileEntity_IronBlastFurnace(String aName) {
- super(aName, 4);
- }
-
- @Override
+public class GregtechMetaTileEntity_IronBlastFurnace extends MetaTileEntity {
+ private static final ITexture[] FACING_SIDE = {
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top)
+ };
+ private static final ITexture[] FACING_FRONT = {
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_Off)
+ };
+ private static final ITexture[] FACING_ACTIVE = {
+ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_On)
+ };
+ public int mMaxProgresstime = 0;
+ public int mUpdate = 30;
+ public int mProgresstime = 0;
+ public boolean mMachine = false;
+ public ItemStack mOutputItem1;
+ public ItemStack mOutputItem2;
+
+ public GregtechMetaTileEntity_IronBlastFurnace(final int aID, final String aName, final String aNameRegional) {
+ super(aID, aName, aNameRegional, 4);
+ }
+
+ public GregtechMetaTileEntity_IronBlastFurnace(final String aName) {
+ super(aName, 4);
+ }
+
+ private void addOutputProducts() {
+ if (this.mOutputItem1 != null) {
+ if (this.mInventory[2] == null) {
+ this.mInventory[2] = GT_Utility.copy(new Object[] {
+ this.mOutputItem1
+ });
+ }
+ else if (GT_Utility.areStacksEqual(this.mInventory[2], this.mOutputItem1)) {
+ this.mInventory[2].stackSize = Math.min(this.mOutputItem1.getMaxStackSize(),
+ this.mOutputItem1.stackSize + this.mInventory[2].stackSize);
+ }
+ }
+ if (this.mOutputItem2 != null) {
+ if (this.mInventory[3] == null) {
+ this.mInventory[3] = GT_Utility.copy(new Object[] {
+ this.mOutputItem2
+ });
+ }
+ else if (GT_Utility.areStacksEqual(this.mInventory[3], this.mOutputItem2)) {
+ this.mInventory[3].stackSize = Math.min(this.mOutputItem2.getMaxStackSize(),
+ this.mOutputItem2.stackSize + this.mInventory[3].stackSize);
+ }
+ }
+ }
+
+ @Override
+ public boolean allowCoverOnSide(final byte aSide, final GT_ItemStack aCoverID) {
+ return GregTech_API.getCoverBehavior(aCoverID.toStack()).isSimpleCover()
+ && super.allowCoverOnSide(aSide, aCoverID);
+ }
+
+ @Override
+ public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
+ return aIndex > 1;
+ }
+
+ @Override
+ public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
+ if (aIndex < 2) {
+ }
+ return !GT_Utility.areStacksEqual(aStack, this.mInventory[0]);
+ }
+
+ private boolean checkMachine() {
+ final int xDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetX;
+ final int zDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetZ;
+ for (int i = -1; i < 2; i++) {
+ for (int j = -1; j < 4; j++) { // This is height
+ for (int k = -1; k < 2; k++) {
+ if (xDir + i != 0 || j != 0 || zDir + k != 0) {
+ if (i != 0 || j == -1 || k != 0) {
+ if (this.getBaseMetaTileEntity().getBlockOffset(xDir + i, j,
+ zDir + k) != ModBlocks.blockCasingsMisc
+ || this.getBaseMetaTileEntity().getMetaIDOffset(xDir + i, j, zDir + k) != 10) {
+ return false;
+ }
+ }
+ else if (!GT_Utility.arrayContains(
+ this.getBaseMetaTileEntity().getBlockOffset(xDir + i, j, zDir + k), new Object[] {
+ Blocks.lava, Blocks.flowing_lava, null
+ }) && !this.getBaseMetaTileEntity().getAirOffset(xDir + i, j, zDir + k)) {
+ return false;
+ }
+ }
+ }
+ }
+ }
+ return true;
+ }
+
+ private boolean checkRecipe() {
+ if (!this.mMachine) {
+ return false;
+ }
+ if (this.mInventory[0] != null && this.mInventory[1] != null && this.mInventory[0].stackSize >= 1) {
+ if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "dustIron")
+ || GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "ingotIron")) {
+ if (this.mInventory[1].getItem() == Items.coal && this.mInventory[1].stackSize >= 4
+ && this.spaceForOutput(
+ this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L),
+ this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh,
+ 4L))) {
+ this.getBaseMetaTileEntity().decrStackSize(0, 1);
+ this.getBaseMetaTileEntity().decrStackSize(1, 4 * 3);
+ this.mMaxProgresstime = 36000;
+ return true;
+ }
+ if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "fuelCoke")
+ && this.mInventory[1].stackSize >= 2
+ && this.spaceForOutput(
+ this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L),
+ this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash,
+ 4L))) {
+ this.getBaseMetaTileEntity().decrStackSize(0, 1);
+ this.getBaseMetaTileEntity().decrStackSize(1, 2 * 3);
+ this.mMaxProgresstime = 4800 * 5;
+ return true;
+ }
+ if (this.mInventory[0].stackSize >= 9
+ && (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCoal")
+ || GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCharcoal"))
+ && this.mInventory[1].stackSize >= 4
+ && this.spaceForOutput(
+ this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L),
+ this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh,
+ 4L))) {
+ this.getBaseMetaTileEntity().decrStackSize(0, 9);
+ this.getBaseMetaTileEntity().decrStackSize(1, 4 * 3);
+ this.mMaxProgresstime = 64800 * 5;
+ return true;
+ }
+ }
+ else if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "dustSteel")) {
+ if (this.mInventory[1].getItem() == Items.coal && this.mInventory[1].stackSize >= 2
+ && this.spaceForOutput(
+ this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L),
+ this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh,
+ 2L))) {
+ this.getBaseMetaTileEntity().decrStackSize(0, 1);
+ this.getBaseMetaTileEntity().decrStackSize(1, 2 * 3);
+ this.mMaxProgresstime = 3600 * 5;
+ return true;
+ }
+ if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "fuelCoke")
+ && this.mInventory[1].stackSize >= 1
+ && this.spaceForOutput(
+ this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L),
+ this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash,
+ 2L))) {
+ this.getBaseMetaTileEntity().decrStackSize(0, 1);
+ this.getBaseMetaTileEntity().decrStackSize(1, 1 * 3);
+ this.mMaxProgresstime = 2400 * 5;
+ return true;
+ }
+ if (this.mInventory[0].stackSize >= 9
+ && (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCoal")
+ || GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCharcoal"))
+ && this.mInventory[1].stackSize >= 2
+ && this.spaceForOutput(
+ this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L),
+ this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh,
+ 2L))) {
+ this.getBaseMetaTileEntity().decrStackSize(0, 9);
+ this.getBaseMetaTileEntity().decrStackSize(1, 2 * 3);
+ this.mMaxProgresstime = 32400 * 5;
+ return true;
+ }
+ }
+ else if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "blockIron")) {
+ if (this.mInventory[1].getItem() == Items.coal && this.mInventory[1].stackSize >= 36
+ && this.spaceForOutput(
+ this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L),
+ this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh,
+ 4L))) {
+ this.getBaseMetaTileEntity().decrStackSize(0, 1);
+ this.getBaseMetaTileEntity().decrStackSize(1, 64);
+ this.mMaxProgresstime = 64800 * 9;
+ return true;
+ }
+ if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "fuelCoke")
+ && this.mInventory[1].stackSize >= 18
+ && this.spaceForOutput(
+ this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L),
+ this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 4L))) {
+ this.getBaseMetaTileEntity().decrStackSize(0, 1);
+ this.getBaseMetaTileEntity().decrStackSize(1, 18 * 3);
+ this.mMaxProgresstime = 43200 * 5;
+ return true;
+ }
+ if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCoal")
+ || GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCharcoal"))
+ && this.mInventory[1].stackSize >= 4
+ && this.spaceForOutput(
+ this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L),
+ this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh,
+ 4L))) {
+ this.getBaseMetaTileEntity().decrStackSize(0, 1);
+ this.getBaseMetaTileEntity().decrStackSize(1, 4 * 3);
+ this.mMaxProgresstime = 64800 * 5;
+ return true;
+ }
+ }
+ }
+ this.mOutputItem1 = null;
+ this.mOutputItem2 = null;
+ return false;
+ }
+
+ @Override
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory,
+ final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GUI_IronBlastFurnace(aPlayerInventory, aBaseMetaTileEntity);
+ }
+
+ @Override
public String[] getDescription() {
- return new String[]{"Sloooowly, Skip the Bronze age, Get some Steel!",
- "Multiblock: 3x3x5 hollow with opening on top",
- "40 Iron Plated Bricks required",
- "----",
- "Even though Iron melts hotter than bronze,",
- "this machine is to help players skip looking",
- "for tin and copper, which are not as common",
- "as Iron is. This machine takes 5x longer than the bronze",
- "blast furnace as a result.",
- "----",
- CORE.GT_Tooltip};
- }
-
- @Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- if (aSide == aFacing) {
- return aActive ? FACING_ACTIVE : FACING_FRONT;
- }
- return FACING_SIDE;
- }
-
- @Override
- public boolean isSteampowered() {
- return false;
- }
+ return new String[] {
+ "Sloooowly, Skip the Bronze age, Get some Steel!", "Multiblock: 3x3x5 hollow with opening on top",
+ "40 Iron Plated Bricks required", "----", "Even though Iron melts hotter than bronze,",
+ "this machine is to help players skip looking", "for tin and copper, which are not as common",
+ "as Iron is. This machine takes 5x longer than the bronze", "blast furnace as a result.", "----",
+ CORE.GT_Tooltip
+ };
+ }
+
+ @Override
+ public int getProgresstime() {
+ return this.mProgresstime;
+ }
+
+ @Override
+ public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory,
+ final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new CONTAINER_IronBlastFurnace(aPlayerInventory, aBaseMetaTileEntity);
+ }
+
+ @Override
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ if (aSide == aFacing) {
+ return aActive ? GregtechMetaTileEntity_IronBlastFurnace.FACING_ACTIVE
+ : GregtechMetaTileEntity_IronBlastFurnace.FACING_FRONT;
+ }
+ return GregtechMetaTileEntity_IronBlastFurnace.FACING_SIDE;
+ }
+
+ @Override
+ public byte getTileEntityBaseType() {
+ return 0;
+ }
- @Override
- public boolean isElectric() {
- return false;
- }
+ @Override
+ public int increaseProgress(final int aProgress) {
+ this.mProgresstime += aProgress;
+ return this.mMaxProgresstime - this.mProgresstime;
+ }
- @Override
- public boolean isPneumatic() {
- return false;
- }
+ @Override
+ public boolean isAccessAllowed(final EntityPlayer aPlayer) {
+ return true;
+ }
- @Override
+ @Override
+ public boolean isElectric() {
+ return false;
+ }
+
+ @Override
public boolean isEnetInput() {
- return false;
- }
+ return false;
+ }
- @Override
+ @Override
public boolean isEnetOutput() {
- return false;
- }
+ return false;
+ }
- @Override
- public boolean isInputFacing(byte aSide) {
- return false;
- }
+ @Override
+ public boolean isFacingValid(final byte aFacing) {
+ return aFacing > 1;
+ }
- @Override
- public boolean isOutputFacing(byte aSide) {
- return false;
- }
+ @Override
+ public boolean isGivingInformation() {
+ return false;
+ }
- @Override
- public boolean isTeleporterCompatible() {
- return false;
- }
+ @Override
+ public boolean isInputFacing(final byte aSide) {
+ return false;
+ }
- @Override
- public boolean isFacingValid(byte aFacing) {
- return aFacing > 1;
- }
+ @Override
+ public boolean isOutputFacing(final byte aSide) {
+ return false;
+ }
- @Override
- public boolean isAccessAllowed(EntityPlayer aPlayer) {
- return true;
- }
+ @Override
+ public boolean isPneumatic() {
+ return false;
+ }
- @Override
- public int getProgresstime() {
- return this.mProgresstime;
- }
+ @Override
+ public boolean isSteampowered() {
+ return false;
+ }
- @Override
+ @Override
+ public boolean isTeleporterCompatible() {
+ return false;
+ }
+
+ @Override
+ public void loadNBTData(final NBTTagCompound aNBT) {
+ this.mUpdate = 30;
+ this.mProgresstime = aNBT.getInteger("mProgresstime");
+ this.mMaxProgresstime = aNBT.getInteger("mMaxProgresstime");
+ this.mOutputItem1 = GT_Utility.loadItem(aNBT, "mOutputItem1");
+ this.mOutputItem2 = GT_Utility.loadItem(aNBT, "mOutputItem2");
+ }
+
+ @Override
public int maxProgresstime() {
- return this.mMaxProgresstime;
- }
-
- @Override
- public int increaseProgress(int aProgress) {
- this.mProgresstime += aProgress;
- return this.mMaxProgresstime - this.mProgresstime;
- }
-
- @Override
- public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCoverID) {
- return (GregTech_API.getCoverBehavior(aCoverID.toStack()).isSimpleCover()) && (super.allowCoverOnSide(aSide, aCoverID));
- }
-
- @Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GregtechMetaTileEntity_IronBlastFurnace(this.mName);
- }
-
- @Override
- public void saveNBTData(NBTTagCompound aNBT) {
- aNBT.setInteger("mProgresstime", this.mProgresstime);
- aNBT.setInteger("mMaxProgresstime", this.mMaxProgresstime);
- if (this.mOutputItem1 != null) {
- NBTTagCompound tNBT = new NBTTagCompound();
- this.mOutputItem1.writeToNBT(tNBT);
- aNBT.setTag("mOutputItem1", tNBT);
- }
- if (this.mOutputItem2 != null) {
- NBTTagCompound tNBT = new NBTTagCompound();
- this.mOutputItem2.writeToNBT(tNBT);
- aNBT.setTag("mOutputItem2", tNBT);
- }
- }
-
- @Override
- public void loadNBTData(NBTTagCompound aNBT) {
- this.mUpdate = 30;
- this.mProgresstime = aNBT.getInteger("mProgresstime");
- this.mMaxProgresstime = aNBT.getInteger("mMaxProgresstime");
- this.mOutputItem1 = GT_Utility.loadItem(aNBT, "mOutputItem1");
- this.mOutputItem2 = GT_Utility.loadItem(aNBT, "mOutputItem2");
- }
-
- @Override
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
- if (aBaseMetaTileEntity.isClientSide()) {
- return true;
- }
- aBaseMetaTileEntity.openGUI(aPlayer);
- return true;
- }
-
- @Override
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new CONTAINER_IronBlastFurnace(aPlayerInventory, aBaseMetaTileEntity);
- }
-
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GUI_IronBlastFurnace(aPlayerInventory, aBaseMetaTileEntity);
- }
-
- private boolean checkMachine() {
- int xDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX;
- int zDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ;
- for (int i = -1; i < 2; i++) {
- for (int j = -1; j < 4; j++) { //This is height
- for (int k = -1; k < 2; k++) {
- if ((xDir + i != 0) || (j != 0) || (zDir + k != 0)) {
- if ((i != 0) || (j == -1) || (k != 0)) {
- if ((getBaseMetaTileEntity().getBlockOffset(xDir + i, j, zDir + k) != ModBlocks.blockCasingsMisc) || (getBaseMetaTileEntity().getMetaIDOffset(xDir + i, j, zDir + k) != 10)) {
- return false;
- }
- } else if ((!GT_Utility.arrayContains(getBaseMetaTileEntity().getBlockOffset(xDir + i, j, zDir + k), new Object[]{Blocks.lava, Blocks.flowing_lava, null})) && (!getBaseMetaTileEntity().getAirOffset(xDir + i, j, zDir + k))) {
- return false;
- }
- }
- }
- }
- }
- return true;
- }
-
- @Override
+ return this.mMaxProgresstime;
+ }
+
+ @Override
+ public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntity_IronBlastFurnace(this.mName);
+ }
+
+ @Override
public void onMachineBlockUpdate() {
- this.mUpdate = 30;
- }
-
- @Override
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) {
- if ((aBaseMetaTileEntity.isClientSide()) &&
- (aBaseMetaTileEntity.isActive())) {
- aBaseMetaTileEntity.getWorld().spawnParticle("cloud", aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1) + Math.random(), aBaseMetaTileEntity.getOffsetY(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1) + Math.random(), 0.0D, 0.3D, 0.0D);
- }
- if (aBaseMetaTileEntity.isServerSide()) {
- if (this.mUpdate-- == 0) {
- this.mMachine = checkMachine();
- }
- if (this.mMachine) {
- if (this.mMaxProgresstime > 0) {
- if (++this.mProgresstime >= this.mMaxProgresstime) {
- addOutputProducts();
- this.mOutputItem1 = null;
- this.mOutputItem2 = null;
- this.mProgresstime = 0;
- this.mMaxProgresstime = 0;
- try {
- // GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "steel");
- } catch (Exception e) {
- }
- }
- } else if (aBaseMetaTileEntity.isAllowedToWork()) {
- checkRecipe();
- }
- }
- aBaseMetaTileEntity.setActive((this.mMaxProgresstime > 0) && (this.mMachine));
- if (aBaseMetaTileEntity.isActive()) {
- if (aBaseMetaTileEntity.getAir(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1))) {
- aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), Blocks.lava, 1, 2);
- this.mUpdate = 1;
- }
- if (aBaseMetaTileEntity.getAir(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord() + 1, aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1))) {
- aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord() + 1, aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), Blocks.lava, 1, 2);
- this.mUpdate = 1;
- }
- } else {
- if (aBaseMetaTileEntity.getBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1)) == Blocks.lava) {
- aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), Blocks.air, 0, 2);
- this.mUpdate = 1;
- }
- if (aBaseMetaTileEntity.getBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord() + 1, aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1)) == Blocks.lava) {
- aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord() + 1, aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), Blocks.air, 0, 2);
- this.mUpdate = 1;
- }
- }
- }
- }
-
- private void addOutputProducts() {
- if (this.mOutputItem1 != null) {
- if (this.mInventory[2] == null) {
- this.mInventory[2] = GT_Utility.copy(new Object[]{this.mOutputItem1});
- } else if (GT_Utility.areStacksEqual(this.mInventory[2], this.mOutputItem1)) {
- this.mInventory[2].stackSize = Math.min(this.mOutputItem1.getMaxStackSize(), this.mOutputItem1.stackSize + this.mInventory[2].stackSize);
- }
- }
- if (this.mOutputItem2 != null) {
- if (this.mInventory[3] == null) {
- this.mInventory[3] = GT_Utility.copy(new Object[]{this.mOutputItem2});
- } else if (GT_Utility.areStacksEqual(this.mInventory[3], this.mOutputItem2)) {
- this.mInventory[3].stackSize = Math.min(this.mOutputItem2.getMaxStackSize(), this.mOutputItem2.stackSize + this.mInventory[3].stackSize);
- }
- }
- }
-
- private boolean spaceForOutput(ItemStack aStack1, ItemStack aStack2) {
- if (((this.mInventory[2] == null) || (aStack1 == null) || ((this.mInventory[2].stackSize + aStack1.stackSize <= this.mInventory[2].getMaxStackSize()) && (GT_Utility.areStacksEqual(this.mInventory[2], aStack1)))) && (
- (this.mInventory[3] == null) || (aStack2 == null) || ((this.mInventory[3].stackSize + aStack2.stackSize <= this.mInventory[3].getMaxStackSize()) && (GT_Utility.areStacksEqual(this.mInventory[3], aStack2))))) {
- return true;
- }
- return false;
- }
-
- private boolean checkRecipe() {
- if (!this.mMachine) {
- return false;
- }
- if ((this.mInventory[0] != null) && (this.mInventory[1] != null) && (this.mInventory[0].stackSize >= 1)) {
- if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "dustIron")) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "ingotIron"))) {
- if ((this.mInventory[1].getItem() == Items.coal) && (this.mInventory[1].stackSize >= 4) && (spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 4L)))) {
- getBaseMetaTileEntity().decrStackSize(0, 1);
- getBaseMetaTileEntity().decrStackSize(1, 4*3);
- this.mMaxProgresstime = 36000;
- return true;
- }
- if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "fuelCoke")) && (this.mInventory[1].stackSize >= 2) && (spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 4L)))) {
- getBaseMetaTileEntity().decrStackSize(0, 1);
- getBaseMetaTileEntity().decrStackSize(1, 2*3);
- this.mMaxProgresstime = 4800*5;
- return true;
- }
- if ((this.mInventory[0].stackSize >= 9) && ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCoal")) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCharcoal"))) && (this.mInventory[1].stackSize >= 4) && (spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 4L)))) {
- getBaseMetaTileEntity().decrStackSize(0, 9);
- getBaseMetaTileEntity().decrStackSize(1, 4*3);
- this.mMaxProgresstime = 64800*5;
- return true;
- }
- } else if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "dustSteel")) {
- if ((this.mInventory[1].getItem() == Items.coal) && (this.mInventory[1].stackSize >= 2) && (spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 2L)))) {
- getBaseMetaTileEntity().decrStackSize(0, 1);
- getBaseMetaTileEntity().decrStackSize(1, 2*3);
- this.mMaxProgresstime = 3600*5;
- return true;
- }
- if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "fuelCoke")) && (this.mInventory[1].stackSize >= 1) && (spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 2L)))) {
- getBaseMetaTileEntity().decrStackSize(0, 1);
- getBaseMetaTileEntity().decrStackSize(1, 1*3);
- this.mMaxProgresstime = 2400*5;
- return true;
- }
- if ((this.mInventory[0].stackSize >= 9) && ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCoal")) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCharcoal"))) && (this.mInventory[1].stackSize >= 2) && (spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 2L)))) {
- getBaseMetaTileEntity().decrStackSize(0, 9);
- getBaseMetaTileEntity().decrStackSize(1, 2*3);
- this.mMaxProgresstime = 32400*5;
- return true;
- }
- } else if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "blockIron")) {
- if ((this.mInventory[1].getItem() == Items.coal) && (this.mInventory[1].stackSize >= 36) && (spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 4L)))) {
- getBaseMetaTileEntity().decrStackSize(0, 1);
- getBaseMetaTileEntity().decrStackSize(1, 64);
- this.mMaxProgresstime = 64800*9;
- return true;
- }
- if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "fuelCoke")) && (this.mInventory[1].stackSize >= 18) && (spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 4L)))) {
- getBaseMetaTileEntity().decrStackSize(0, 1);
- getBaseMetaTileEntity().decrStackSize(1, 18*3);
- this.mMaxProgresstime = 43200*5;
- return true;
- }
- if (((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCoal")) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCharcoal"))) && (this.mInventory[1].stackSize >= 4) && (spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 4L)))) {
- getBaseMetaTileEntity().decrStackSize(0, 1);
- getBaseMetaTileEntity().decrStackSize(1, 4*3);
- this.mMaxProgresstime = 64800*5;
- return true;
- }
- }
- }
- this.mOutputItem1 = null;
- this.mOutputItem2 = null;
- return false;
- }
-
- @Override
- public boolean isGivingInformation() {
- return false;
- }
-
- @Override
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return aIndex > 1;
- }
-
- @Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- if (aIndex < 2) {
- }
- return !GT_Utility.areStacksEqual(aStack, this.mInventory[0]);
- }
-
- @Override
- public byte getTileEntityBaseType() {
- return 0;
- }
+ this.mUpdate = 30;
+ }
+
+ @Override
+ public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTimer) {
+ if (aBaseMetaTileEntity.isClientSide() && aBaseMetaTileEntity.isActive()) {
+ aBaseMetaTileEntity.getWorld().spawnParticle("cloud",
+ aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1) + Math.random(),
+ aBaseMetaTileEntity.getOffsetY(aBaseMetaTileEntity.getBackFacing(), 1),
+ aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1) + Math.random(), 0.0D, 0.3D,
+ 0.0D);
+ }
+ if (aBaseMetaTileEntity.isServerSide()) {
+ if (this.mUpdate-- == 0) {
+ this.mMachine = this.checkMachine();
+ }
+ if (this.mMachine) {
+ if (this.mMaxProgresstime > 0) {
+ if (++this.mProgresstime >= this.mMaxProgresstime) {
+ this.addOutputProducts();
+ this.mOutputItem1 = null;
+ this.mOutputItem2 = null;
+ this.mProgresstime = 0;
+ this.mMaxProgresstime = 0;
+ try {
+ // GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()),
+ // "steel");
+ }
+ catch (final Exception e) {
+ }
+ }
+ }
+ else if (aBaseMetaTileEntity.isAllowedToWork()) {
+ this.checkRecipe();
+ }
+ }
+ aBaseMetaTileEntity.setActive(this.mMaxProgresstime > 0 && this.mMachine);
+ if (aBaseMetaTileEntity.isActive()) {
+ if (aBaseMetaTileEntity.getAir(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1),
+ aBaseMetaTileEntity.getYCoord(),
+ aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1))) {
+ aBaseMetaTileEntity.getWorld().setBlock(
+ aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1),
+ aBaseMetaTileEntity.getYCoord(),
+ aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), Blocks.lava, 1, 2);
+ this.mUpdate = 1;
+ }
+ if (aBaseMetaTileEntity.getAir(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1),
+ aBaseMetaTileEntity.getYCoord() + 1,
+ aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1))) {
+ aBaseMetaTileEntity.getWorld().setBlock(
+ aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1),
+ aBaseMetaTileEntity.getYCoord() + 1,
+ aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), Blocks.lava, 1, 2);
+ this.mUpdate = 1;
+ }
+ }
+ else {
+ if (aBaseMetaTileEntity.getBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1),
+ aBaseMetaTileEntity.getYCoord(),
+ aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1)) == Blocks.lava) {
+ aBaseMetaTileEntity.getWorld().setBlock(
+ aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1),
+ aBaseMetaTileEntity.getYCoord(),
+ aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), Blocks.air, 0, 2);
+ this.mUpdate = 1;
+ }
+ if (aBaseMetaTileEntity.getBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1),
+ aBaseMetaTileEntity.getYCoord() + 1,
+ aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1)) == Blocks.lava) {
+ aBaseMetaTileEntity.getWorld().setBlock(
+ aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1),
+ aBaseMetaTileEntity.getYCoord() + 1,
+ aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), Blocks.air, 0, 2);
+ this.mUpdate = 1;
+ }
+ }
+ }
+ }
+
+ @Override
+ public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) {
+ if (aBaseMetaTileEntity.isClientSide()) {
+ return true;
+ }
+ aBaseMetaTileEntity.openGUI(aPlayer);
+ return true;
+ }
+
+ @Override
+ public void saveNBTData(final NBTTagCompound aNBT) {
+ aNBT.setInteger("mProgresstime", this.mProgresstime);
+ aNBT.setInteger("mMaxProgresstime", this.mMaxProgresstime);
+ if (this.mOutputItem1 != null) {
+ final NBTTagCompound tNBT = new NBTTagCompound();
+ this.mOutputItem1.writeToNBT(tNBT);
+ aNBT.setTag("mOutputItem1", tNBT);
+ }
+ if (this.mOutputItem2 != null) {
+ final NBTTagCompound tNBT = new NBTTagCompound();
+ this.mOutputItem2.writeToNBT(tNBT);
+ aNBT.setTag("mOutputItem2", tNBT);
+ }
+ }
+
+ private boolean spaceForOutput(final ItemStack aStack1, final ItemStack aStack2) {
+ if ((this.mInventory[2] == null || aStack1 == null
+ || this.mInventory[2].stackSize + aStack1.stackSize <= this.mInventory[2].getMaxStackSize()
+ && GT_Utility.areStacksEqual(this.mInventory[2], aStack1))
+ && (this.mInventory[3] == null || aStack2 == null
+ || this.mInventory[3].stackSize + aStack2.stackSize <= this.mInventory[3].getMaxStackSize()
+ && GT_Utility.areStacksEqual(this.mInventory[3], aStack2))) {
+ return true;
+ }
+ return false;
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MassFabricator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MassFabricator.java
index b69fd8f8e1..42ded10622 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MassFabricator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MassFabricator.java
@@ -28,110 +28,212 @@ import net.minecraftforge.fluids.FluidStack;
public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlockBase {
- public static int sUUAperUUM = 1;
- public static int sUUASpeedBonus = 4;
- public static int sDurationMultiplier = 3215;
- public static boolean sRequiresUUA = false;
- private int mAmplifierUsed = 0;
- private int mMatterProduced = 0;
- ItemStack scrapPile = ItemUtils.getSimpleStack(ItemUtils.getItem("IC2:itemScrap"));
- ItemStack scrapBox = ItemUtils.getSimpleStack(ItemUtils.getItem("IC2:itemScrapbox"));
-
- private static Block IC2Glass = Block.getBlockFromItem(ItemUtils.getItem("IC2:blockAlloyGlass"));
- FluidStack tempFake = FluidUtils.getFluidStack("uuamplifier", 1);
- GT_Recipe fakeRecipe;
-
- public int getAmplifierUsed(){
- return mAmplifierUsed;
- }
-
- public int getMatterProduced(){
- return mMatterProduced;
- }
-
- public GregtechMetaTileEntity_MassFabricator(int aID, String aName, String aNameRegional) {
+ public static int sUUAperUUM = 1;
+ public static int sUUASpeedBonus = 4;
+ public static int sDurationMultiplier = 3215;
+ public static boolean sRequiresUUA = false;
+ private static Block IC2Glass = Block.getBlockFromItem(ItemUtils.getItem("IC2:blockAlloyGlass"));
+ private int mAmplifierUsed = 0;
+ private int mMatterProduced = 0;
+ ItemStack scrapPile = ItemUtils.getSimpleStack(ItemUtils.getItem("IC2:itemScrap"));
+
+ ItemStack scrapBox = ItemUtils.getSimpleStack(ItemUtils.getItem("IC2:itemScrapbox"));
+ FluidStack tempFake = FluidUtils.getFluidStack("uuamplifier", 1);
+ GT_Recipe fakeRecipe;
+
+ public GregtechMetaTileEntity_MassFabricator(final int aID, final String aName, final String aNameRegional) {
super(aID, aName, aNameRegional);
}
- public GregtechMetaTileEntity_MassFabricator(String aName) {
+ public GregtechMetaTileEntity_MassFabricator(final String aName) {
super(aName);
}
@Override
- public String[] getDescription() {
- return new String[]{
- "Controller Block for the Matter Fabricator",
- "Produces UU-Matter from UU-Amplifier",
- "Size(WxHxD): 5x4x5, Controller (Bottom center)",
- "3x1x3 Matter Generation Coils (Inside bottom 5x1x5 layer)",
- "9x Matter Generation Coils (Centered 3x1x3 area in Bottom layer)",
- "1x Input Hatch (Any bottom layer casing)",
- "1x Output Hatch (Any bottom layer casing)",
- "1x Maintenance Hatch (Any bottom layer casing)",
- "1x Muffler Hatch (Centered 3x1x3 area in Top layer)",
- "1x Energy Hatch (Any bottom layer casing)",
- "24x IC2 Reinforced Glass for the walls",
- "Matter Fabricator Casings for the edges & top (40 at least!)",
- CORE.GT_Tooltip};
- }
+ public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
+ final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 2;
+ final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 2;
+ for (int i = -2; i < 3; i++) {
+ for (int j = -2; j < 3; j++) {
+ for (int h = 0; h < 4; h++) {
- @Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- if (aSide == aFacing) {
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[66],
- new GT_RenderedTexture(aActive ? TexturesGtBlock.Casing_Machine_Screen_3 : TexturesGtBlock.Casing_Machine_Screen_1)};
- }
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[66]};
- }
+ // Utils.LOG_INFO("Logging Variables - xDir:"+xDir+"
+ // zDir:"+zDir+" h:"+h+" i:"+i+" j:"+j);
+
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i,
+ h, zDir + j);
+ /*
+ * if (tTileEntity !=
+ * Block.getBlockFromItem(UtilsItems.getItem(
+ * "IC2:blockAlloyGlass"))) { Utils.LOG_INFO("h:"+h+" i:"+i+
+ * " j:"+j); double tX = tTileEntity.getXCoord(); double tY
+ * = tTileEntity.getYCoord(); double tZ =
+ * tTileEntity.getZCoord(); Utils.LOG_INFO(
+ * "Found Glass at X:"+tX+" Y:"+tY+" Z:"+tZ); //return
+ * false; }
+ */
+ if (i != -2 && i != 2 && j != -2 && j != 2) {// innerer 3x3
+ // ohne h�he
+ if (h == 0) {// innen boden (kantal coils)
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h,
+ zDir + j) != ModBlocks.blockCasingsMisc) {
+ Utils.LOG_INFO("Matter Generation Coils missings from the bottom layer, inner 3x3.");
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 8) {
+ Utils.LOG_INFO("Matter Generation Coils missings from the bottom layer, inner 3x3.");
+ return false;
+ }
+ }
+ else if (h == 3) {// innen decke (ulv casings + input +
+ // muffler)
+ if (!this.addMufflerToMachineList(tTileEntity, 66)) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h,
+ zDir + j) != ModBlocks.blockCasingsMisc) {
+ Utils.LOG_INFO(
+ "Matter Fabricator Casings Missing from one of the top layers inner 3x3.");
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 9) {
+ Utils.LOG_INFO(
+ "Matter Fabricator Casings Missing from one of the top layers inner 3x3.");
+ return false;
+ }
+ }
+ }
+ else {// innen air
+ if (!aBaseMetaTileEntity.getAirOffset(xDir + i, h, zDir + j)) {
+ Utils.LOG_INFO("Make sure the inner 3x3 of the Multiblock is Air.");
+ return false;
+ }
+ }
+ }
+ else {// Outer 5x5
+ if (h == 0) {// au�en boden (controller, output, energy,
+ // maintainance, rest ulv casings)
+ if (!this.addMaintenanceToMachineList(tTileEntity, 66)
+ && !this.addInputToMachineList(tTileEntity, 66)
+ && !this.addOutputToMachineList(tTileEntity, 66)
+ && !this.addEnergyInputToMachineList(tTileEntity, 66)) {
+ if (xDir + i != 0 || zDir + j != 0) {// no
+ // controller
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h,
+ zDir + j) != ModBlocks.blockCasingsMisc) {
+ Utils.LOG_INFO(
+ "Matter Fabricator Casings Missing from one of the edges of the bottom layer.");
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 9) {
+ Utils.LOG_INFO(
+ "Matter Fabricator Casings Missing from one of the edges of the bottom layer.");
+ return false;
+ }
+ }
+ }
+ }
+ else {// au�en �ber boden (ulv casings)
+ if (h == 1) {
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GUI_MatterFab(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MatterFabricator.png");
- }
+ if ((i == -2 || i == 2) && (j == -2 || j == 2)) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h,
+ zDir + j) != ModBlocks.blockCasingsMisc) {
+ Utils.LOG_INFO(
+ "Matter Fabricator Casings Missing from one of the corners in the second layer.");
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 9) {
+ Utils.LOG_INFO(
+ "Matter Fabricator Casings Missing from one of the corners in the second layer.");
+ return false;
+ }
+ }
- @Override
- public void onConfigLoad(GT_Config aConfig) {
- super.onConfigLoad(aConfig);
- sDurationMultiplier = aConfig.get(ConfigCategories.machineconfig, "Massfabricator.UUM_Duration_Multiplier", sDurationMultiplier);
- sUUAperUUM = aConfig.get(ConfigCategories.machineconfig, "Massfabricator.UUA_per_UUM", sUUAperUUM);
- sUUASpeedBonus = aConfig.get(ConfigCategories.machineconfig, "Massfabricator.UUA_Speed_Bonus", sUUASpeedBonus);
- sRequiresUUA = aConfig.get(ConfigCategories.machineconfig, "Massfabricator.UUA_Requirement", sRequiresUUA);
- Materials.UUAmplifier.mChemicalFormula = ("Mass Fabricator Eff/Speed Bonus: x" + sUUASpeedBonus);
+ else if ((i != -2 || i != 2) && (j != -2 || j != 2)) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h,
+ zDir + j) != GregtechMetaTileEntity_MassFabricator.IC2Glass) {
+ Utils.LOG_INFO("Glass Casings Missing from somewhere in the second layer.");
+ return false;
+ }
+ }
+ }
+ if (h == 2) {
+ if ((i == -2 || i == 2) && (j == -2 || j == 2)) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h,
+ zDir + j) != ModBlocks.blockCasingsMisc) {
+ Utils.LOG_INFO(
+ "Matter Fabricator Casings Missing from one of the corners in the third layer.");
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 9) {
+ Utils.LOG_INFO(
+ "Matter Fabricator Casings Missing from one of the corners in the third layer.");
+ return false;
+ }
+ }
+
+ else if ((i != -2 || i != 2) && (j != -2 || j != 2)) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h,
+ zDir + j) != GregtechMetaTileEntity_MassFabricator.IC2Glass) {
+ Utils.LOG_INFO("Glass Casings Missing from somewhere in the third layer.");
+ return false;
+ }
+ }
+ }
+ if (h == 3) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h,
+ zDir + j) != ModBlocks.blockCasingsMisc) {
+ Utils.LOG_INFO(
+ "Matter Fabricator Casings Missing from one of the edges on the top layer.");
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 9) {
+ Utils.LOG_INFO(
+ "Matter Fabricator Casings Missing from one of the edges on the top layer.");
+ return false;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ Utils.LOG_INFO("Multiblock Formed.");
+ return true;
}
@Override
- public boolean checkRecipe(ItemStack aStack) {
+ public boolean checkRecipe(final ItemStack aStack) {
Utils.LOG_INFO("Fabricating Matter.");
- if (mInputHatches.size() != 1){
- Utils.LOG_INFO("Too many input hatches. Found: "+mInputHatches.size()+" | Expected: 1");
+ if (this.mInputHatches.size() != 1) {
+ Utils.LOG_INFO("Too many input hatches. Found: " + this.mInputHatches.size() + " | Expected: 1");
return false;
}
- ArrayList<ItemStack> tInputList = getStoredInputs();
+ final ArrayList<ItemStack> tInputList = this.getStoredInputs();
for (int i = 0; i < tInputList.size() - 1; i++) {
for (int j = i + 1; j < tInputList.size(); j++) {
- if (GT_Utility.areStacksEqual((ItemStack) tInputList.get(i), (ItemStack) tInputList.get(j))) {
- if (((ItemStack) tInputList.get(i)).stackSize >= ((ItemStack) tInputList.get(j)).stackSize) {
+ if (GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) {
+ if (tInputList.get(i).stackSize >= tInputList.get(j).stackSize) {
tInputList.remove(j--);
- } else {
+ }
+ else {
tInputList.remove(i--);
break;
}
}
}
- }
-
- ItemStack[] tInputs = (ItemStack[]) Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
-
+ }
+ final ItemStack[] tInputs = Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
- ArrayList<FluidStack> tFluidList = getStoredFluids();
+ final ArrayList<FluidStack> tFluidList = this.getStoredFluids();
for (int i = 0; i < tFluidList.size() - 1; i++) {
for (int j = i + 1; j < tFluidList.size(); j++) {
- if (GT_Utility.areFluidsEqual((FluidStack) tFluidList.get(i), (FluidStack) tFluidList.get(j))) {
- if (((FluidStack) tFluidList.get(i)).amount >= ((FluidStack) tFluidList.get(j)).amount) {
+ if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) {
+ if (tFluidList.get(i).amount >= tFluidList.get(j).amount) {
tFluidList.remove(j--);
- } else {
+ }
+ else {
tFluidList.remove(i--);
break;
}
@@ -139,99 +241,109 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
}
}
- long tVoltage = getMaxInputVoltage();
- byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
- FluidStack[] tFluids = (FluidStack[]) Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tFluidList.size()]), 0, tFluidList.size());
-
-
- for (int scrapSlots=0;scrapSlots<tInputs.length;scrapSlots++){
- if (tInputs[scrapSlots].getItem() == scrapPile.getItem()){
- if (tInputs[scrapSlots].stackSize >= 9 ){
- Utils.LOG_INFO("Found enough scrap for a special recipe. x"+tInputs[scrapSlots].stackSize);
- for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches) {
- if (isValidMetaTileEntity(tHatch)) {
+ final long tVoltage = this.getMaxInputVoltage();
+ final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
+ final FluidStack[] tFluids = Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tFluidList.size()]), 0,
+ tFluidList.size());
+
+ for (int scrapSlots = 0; scrapSlots < tInputs.length; scrapSlots++) {
+ if (tInputs[scrapSlots].getItem() == this.scrapPile.getItem()) {
+ if (tInputs[scrapSlots].stackSize >= 9) {
+ Utils.LOG_INFO("Found enough scrap for a special recipe. x" + tInputs[scrapSlots].stackSize);
+ for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) {
+ if (GregtechMeta_MultiBlockBase.isValidMetaTileEntity(tHatch)) {
Utils.LOG_INFO("Input fluid empty - Time to generate 1UU-A.");
- if (tHatch.mFluid == null){
+ if (tHatch.mFluid == null) {
tHatch.mFluid = FluidUtils.getFluidStack("uuamplifier", 2);
}
- else{
+ else {
tHatch.mFluid.amount++;
tHatch.mFluid.amount++;
}
tInputs[scrapSlots].stackSize = tInputs[scrapSlots].stackSize - 9;
- Utils.LOG_INFO("Remaining after recipe. x"+tInputs[scrapSlots].stackSize);
+ Utils.LOG_INFO("Remaining after recipe. x" + tInputs[scrapSlots].stackSize);
}
}
- }
+ }
}
}
-
if (tFluids.length > 0) {
Utils.LOG_INFO("Input fluid found");
- for(int i = 0;i<tFluids.length;i++){
- GT_Recipe tRecipe = Recipe_GT.Gregtech_Recipe_Map.sMatterFab2Recipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], new FluidStack[]{tFluids[i]}, new ItemStack[]{});
+ for (int i = 0; i < tFluids.length; i++) {
+ final GT_Recipe tRecipe = Recipe_GT.Gregtech_Recipe_Map.sMatterFab2Recipes.findRecipe(
+ this.getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], new FluidStack[] {
+ tFluids[i]
+ }, new ItemStack[] {});
if (tRecipe != null) {
- if (tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[]{})) {
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
+ if (tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[] {})) {
+ this.mEfficiency = 10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000;
this.mEfficiencyIncrease = 10000;
if (tRecipe.mEUt <= 16) {
- this.mEUt = (tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1));
- this.mMaxProgresstime = ((tRecipe.mDuration/**sDurationMultiplier*/) / (1 << tTier - 1));
- } else {
+ this.mEUt = tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1);
+ this.mMaxProgresstime = tRecipe.mDuration / (1 << tTier - 1);
+ }
+ else {
this.mEUt = tRecipe.mEUt;
- this.mMaxProgresstime = (tRecipe.mDuration/**sDurationMultiplier*/);
- while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
+ this.mMaxProgresstime = tRecipe.mDuration;
+ while (this.mEUt <= gregtech.api.enums.GT_Values.V[tTier - 1]) {
this.mEUt *= 2;
this.mMaxProgresstime /= 4;
}
}
if (this.mEUt > 0) {
- this.mEUt = (-this.mEUt);
+ this.mEUt = -this.mEUt;
}
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
- this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0)};
+ this.mOutputItems = new ItemStack[] {
+ tRecipe.getOutput(0)
+ };
this.mOutputFluids = tRecipe.mFluidOutputs.clone();
- ArrayUtils.reverse(mOutputFluids);
- mMatterProduced++;
- mAmplifierUsed++;
- updateSlots();
- //Utils.LOG_INFO("Recipes Finished: "+mMatterProduced);
+ ArrayUtils.reverse(this.mOutputFluids);
+ this.mMatterProduced++;
+ this.mAmplifierUsed++;
+ this.updateSlots();
+ // Utils.LOG_INFO("Recipes Finished: "+mMatterProduced);
return true;
}
}
else {
- //Utils.LOG_INFO("Invalid Recipe");
+ // Utils.LOG_INFO("Invalid Recipe");
return false;
}
}
}
else if (tFluids.length == 0) {
Utils.LOG_INFO("Input fluid not found");
- fakeRecipe = Recipe_GT.Gregtech_Recipe_Map.sMatterFab2Recipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], new FluidStack[]{tempFake}, new ItemStack[]{});
+ this.fakeRecipe = Recipe_GT.Gregtech_Recipe_Map.sMatterFab2Recipes.findRecipe(this.getBaseMetaTileEntity(),
+ false, gregtech.api.enums.GT_Values.V[tTier], new FluidStack[] {
+ this.tempFake
+ }, new ItemStack[] {});
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
+ this.mEfficiency = 10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000;
this.mEfficiencyIncrease = 10000;
this.mEUt = 32;
- this.mMaxProgresstime = (160*20);
- while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
+ this.mMaxProgresstime = 160 * 20;
+ while (this.mEUt <= gregtech.api.enums.GT_Values.V[tTier - 1]) {
this.mEUt *= 4;
this.mMaxProgresstime /= 2;
}
if (this.mEUt > 0) {
- this.mEUt = (-this.mEUt);
+ this.mEUt = -this.mEUt;
}
- if (fakeRecipe != null) {
+ if (this.fakeRecipe != null) {
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
- this.mOutputItems = new ItemStack[]{fakeRecipe.getOutput(0)};
- this.mOutputFluids = fakeRecipe.mFluidOutputs.clone();
- ArrayUtils.reverse(mOutputFluids);
- mMatterProduced++;
- updateSlots();
- //Utils.LOG_INFO("Recipes Finished: "+mMatterProduced);
+ this.mOutputItems = new ItemStack[] {
+ this.fakeRecipe.getOutput(0)
+ };
+ this.mOutputFluids = this.fakeRecipe.mFluidOutputs.clone();
+ ArrayUtils.reverse(this.mOutputFluids);
+ this.mMatterProduced++;
+ this.updateSlots();
+ // Utils.LOG_INFO("Recipes Finished: "+mMatterProduced);
return true;
}
}
@@ -243,147 +355,85 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
}
@Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 2;
- int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 2;
- for (int i = -2; i < 3; i++) {
- for (int j = -2; j < 3; j++) {
- for (int h = 0; h < 4; h++) {
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
+ return false;
+ }
- //Utils.LOG_INFO("Logging Variables - xDir:"+xDir+" zDir:"+zDir+" h:"+h+" i:"+i+" j:"+j);
-
- IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
- /*if (tTileEntity != Block.getBlockFromItem(UtilsItems.getItem("IC2:blockAlloyGlass"))) {
- Utils.LOG_INFO("h:"+h+" i:"+i+" j:"+j);
- double tX = tTileEntity.getXCoord();
- double tY = tTileEntity.getYCoord();
- double tZ = tTileEntity.getZCoord();
- Utils.LOG_INFO("Found Glass at X:"+tX+" Y:"+tY+" Z:"+tZ);
- //return false;
- }*/
- if ((i != -2 && i != 2) && (j != -2 && j != 2)) {// innerer 3x3 ohne h�he
- if (h == 0) {// innen boden (kantal coils)
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- Utils.LOG_INFO("Matter Generation Coils missings from the bottom layer, inner 3x3.");
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 8) {
- Utils.LOG_INFO("Matter Generation Coils missings from the bottom layer, inner 3x3.");
- return false;
- }
- } else if (h == 3) {// innen decke (ulv casings + input + muffler)
- if ((!addMufflerToMachineList(tTileEntity, 66))) {
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the top layers inner 3x3.");
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 9) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the top layers inner 3x3.");
- return false;
- }
- }
- } else {// innen air
- if (!aBaseMetaTileEntity.getAirOffset(xDir + i, h, zDir + j)) {
- Utils.LOG_INFO("Make sure the inner 3x3 of the Multiblock is Air.");
- return false;
- }
- }
- } else {// Outer 5x5
- if (h == 0) {// au�en boden (controller, output, energy, maintainance, rest ulv casings)
- if ((!addMaintenanceToMachineList(tTileEntity, 66)) && (!addInputToMachineList(tTileEntity, 66)) && (!addOutputToMachineList(tTileEntity, 66)) && (!addEnergyInputToMachineList(tTileEntity, 66))) {
- if ((xDir + i != 0) || (zDir + j != 0)) {//no controller
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the edges of the bottom layer.");
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 9) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the edges of the bottom layer.");
- return false;
- }
- }
- }
- } else {// au�en �ber boden (ulv casings)
- if (h == 1) {
+ @Override
+ public int getAmountOfOutputs() {
+ return 10;
+ }
- if ((i == -2 || i == 2) && (j == -2 || j == 2)){
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the corners in the second layer.");
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 9) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the corners in the second layer.");
- return false;
- }
- }
+ public int getAmplifierUsed() {
+ return this.mAmplifierUsed;
+ }
- else if ((i != -2 || i != 2) && (j != -2 || j != 2)){
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != IC2Glass) {
- Utils.LOG_INFO("Glass Casings Missing from somewhere in the second layer.");
- return false;
- }
- }
- }
- if (h == 2) {
- if ((i == -2 || i == 2) && (j == -2 || j == 2)){
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the corners in the third layer.");
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 9) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the corners in the third layer.");
- return false;
- }
- }
+ @Override
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory,
+ final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GUI_MatterFab(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "MatterFabricator.png");
+ }
- else if ((i != -2 || i != 2) && (j != -2 || j != 2)){
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != IC2Glass) {
- Utils.LOG_INFO("Glass Casings Missing from somewhere in the third layer.");
- return false;
- }
- }
- }
- if (h == 3) {
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the edges on the top layer.");
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 9) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the edges on the top layer.");
- return false;
- }
- }
- }
- }
- }
- }
- }
- Utils.LOG_INFO("Multiblock Formed.");
- return true;
+ @Override
+ public String[] getDescription() {
+ return new String[] {
+ "Controller Block for the Matter Fabricator", "Produces UU-Matter from UU-Amplifier",
+ "Size(WxHxD): 5x4x5, Controller (Bottom center)",
+ "3x1x3 Matter Generation Coils (Inside bottom 5x1x5 layer)",
+ "9x Matter Generation Coils (Centered 3x1x3 area in Bottom layer)",
+ "1x Input Hatch (Any bottom layer casing)", "1x Output Hatch (Any bottom layer casing)",
+ "1x Maintenance Hatch (Any bottom layer casing)", "1x Muffler Hatch (Centered 3x1x3 area in Top layer)",
+ "1x Energy Hatch (Any bottom layer casing)", "24x IC2 Reinforced Glass for the walls",
+ "Matter Fabricator Casings for the edges & top (40 at least!)", CORE.GT_Tooltip
+ };
+ }
+
+ public int getMatterProduced() {
+ return this.mMatterProduced;
}
@Override
- public int getMaxEfficiency(ItemStack aStack) {
+ public int getMaxEfficiency(final ItemStack aStack) {
return 10000;
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
+ public int getPollutionPerTick(final ItemStack aStack) {
return 0;
}
@Override
- public int getAmountOfOutputs() {
- return 10;
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ if (aSide == aFacing) {
+ return new ITexture[] {
+ Textures.BlockIcons.CASING_BLOCKS[66], new GT_RenderedTexture(
+ aActive ? TexturesGtBlock.Casing_Machine_Screen_3 : TexturesGtBlock.Casing_Machine_Screen_1)
+ };
+ }
+ return new ITexture[] {
+ Textures.BlockIcons.CASING_BLOCKS[66]
+ };
}
@Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
- return false;
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntity_MassFabricator(this.mName);
}
@Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GregtechMetaTileEntity_MassFabricator(this.mName);
+ public void onConfigLoad(final GT_Config aConfig) {
+ super.onConfigLoad(aConfig);
+ GregtechMetaTileEntity_MassFabricator.sDurationMultiplier = aConfig.get(ConfigCategories.machineconfig,
+ "Massfabricator.UUM_Duration_Multiplier", GregtechMetaTileEntity_MassFabricator.sDurationMultiplier);
+ GregtechMetaTileEntity_MassFabricator.sUUAperUUM = aConfig.get(ConfigCategories.machineconfig,
+ "Massfabricator.UUA_per_UUM", GregtechMetaTileEntity_MassFabricator.sUUAperUUM);
+ GregtechMetaTileEntity_MassFabricator.sUUASpeedBonus = aConfig.get(ConfigCategories.machineconfig,
+ "Massfabricator.UUA_Speed_Bonus", GregtechMetaTileEntity_MassFabricator.sUUASpeedBonus);
+ GregtechMetaTileEntity_MassFabricator.sRequiresUUA = aConfig.get(ConfigCategories.machineconfig,
+ "Massfabricator.UUA_Requirement", GregtechMetaTileEntity_MassFabricator.sRequiresUUA);
+ Materials.UUAmplifier.mChemicalFormula = "Mass Fabricator Eff/Speed Bonus: x"
+ + GregtechMetaTileEntity_MassFabricator.sUUASpeedBonus;
}
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MultiTank.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MultiTank.java
index 1dea443d98..b4f272bdf3 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MultiTank.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MultiTank.java
@@ -24,365 +24,399 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
-public class GregtechMetaTileEntity_MultiTank
-extends GregtechMeta_MultiBlockBase {
- public GregtechMetaTileEntity_MultiTank(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional);
- }
-
- private long fluidStored = 0;
- private short multiblockCasingCount = 0;
- private short storageMultiplier = getStorageMultiplier();
- private long maximumFluidStorage = getMaximumTankStorage();
- private FluidStack internalStorageTank = null;
-
- @Override
- public void saveNBTData(NBTTagCompound aNBT) {
- aNBT.setInteger("mEUt", mEUt);
- aNBT.setInteger("mProgresstime", mProgresstime);
- aNBT.setInteger("mMaxProgresstime", mMaxProgresstime);
- aNBT.setInteger("mEfficiencyIncrease", mEfficiencyIncrease);
- aNBT.setInteger("mEfficiency", mEfficiency);
- aNBT.setInteger("mPollution", mPollution);
- aNBT.setInteger("mRuntime", mRuntime);
- aNBT.setLong("mFluidStored", fluidStored);
- aNBT.setShort("mStorageMultiplier", storageMultiplier);
- aNBT.setLong("mMaxFluidStored", maximumFluidStorage);
- aNBT.setShort("mCasingCount", multiblockCasingCount);
-
- if (mOutputItems != null) for (int i = 0; i < mOutputItems.length; i++)
- if (mOutputItems[i] != null) {
- NBTTagCompound tNBT = new NBTTagCompound();
- mOutputItems[i].writeToNBT(tNBT);
- aNBT.setTag("mOutputItem" + i, tNBT);
- }
- if (mOutputFluids != null) for (int i = 0; i < mOutputFluids.length; i++)
- if (mOutputFluids[i] != null) {
- NBTTagCompound tNBT = new NBTTagCompound();
- mOutputFluids[i].writeToNBT(tNBT);
- aNBT.setTag("mOutputFluids" + i, tNBT);
- }
-
- aNBT.setBoolean("mWrench", mWrench);
- aNBT.setBoolean("mScrewdriver", mScrewdriver);
- aNBT.setBoolean("mSoftHammer", mSoftHammer);
- aNBT.setBoolean("mHardHammer", mHardHammer);
- aNBT.setBoolean("mSolderingTool", mSolderingTool);
- aNBT.setBoolean("mCrowbar", mCrowbar);
- }
-
- private short getStorageMultiplier(){
- int tempstorageMultiplier = (1*multiblockCasingCount);
- if (tempstorageMultiplier <= 0){
- return 1;
- }
- return (short) tempstorageMultiplier;
- }
-
- private long getMaximumTankStorage(){
- int multiplier = getStorageMultiplier();
- Utils.LOG_WARNING("x = "+multiplier+" * 96000");
- long tempTankStorageMax = (96000*multiplier);
- Utils.LOG_WARNING("x = "+tempTankStorageMax);
- if (tempTankStorageMax <= 0){
- return 96000;
- }
- return tempTankStorageMax;
- }
-
+public class GregtechMetaTileEntity_MultiTank extends GregtechMeta_MultiBlockBase {
+ private long fluidStored = 0;
- @Override
- public void loadNBTData(NBTTagCompound aNBT) {
- mEUt = aNBT.getInteger("mEUt");
- mProgresstime = aNBT.getInteger("mProgresstime");
- mMaxProgresstime = aNBT.getInteger("mMaxProgresstime");
- if (mMaxProgresstime > 0) mRunningOnLoad = true;
- mEfficiencyIncrease = aNBT.getInteger("mEfficiencyIncrease");
- mEfficiency = aNBT.getInteger("mEfficiency");
- mPollution = aNBT.getInteger("mPollution");
- mRuntime = aNBT.getInteger("mRuntime");
- fluidStored = aNBT.getLong("mFluidStored");
- storageMultiplier = aNBT.getShort("mStorageMultiplier");
- maximumFluidStorage = aNBT.getLong("mMaxFluidStored");
- multiblockCasingCount = aNBT.getShort("mCasingCount");
- mOutputItems = new ItemStack[getAmountOfOutputs()];
- for (int i = 0; i < mOutputItems.length; i++) mOutputItems[i] = GT_Utility.loadItem(aNBT, "mOutputItem" + i);
- mOutputFluids = new FluidStack[getAmountOfOutputs()];
- for (int i = 0; i < mOutputFluids.length; i++)
- mOutputFluids[i] = GT_Utility.loadFluid(aNBT, "mOutputFluids" + i);
- mWrench = aNBT.getBoolean("mWrench");
- mScrewdriver = aNBT.getBoolean("mScrewdriver");
- mSoftHammer = aNBT.getBoolean("mSoftHammer");
- mHardHammer = aNBT.getBoolean("mHardHammer");
- mSolderingTool = aNBT.getBoolean("mSolderingTool");
- mCrowbar = aNBT.getBoolean("mCrowbar");
+ private short multiblockCasingCount = 0;
+ private short storageMultiplier = this.getStorageMultiplier();
+ private long maximumFluidStorage = this.getMaximumTankStorage();
+ private FluidStack internalStorageTank = null;
+ public GregtechMetaTileEntity_MultiTank(final int aID, final String aName, final String aNameRegional) {
+ super(aID, aName, aNameRegional);
}
- public GregtechMetaTileEntity_MultiTank(String aName) {
+ public GregtechMetaTileEntity_MultiTank(final String aName) {
super(aName);
}
@Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GregtechMetaTileEntity_MultiTank(this.mName);
- }
-
- @Override
- public String[] getDescription() {
- return new String[]{
- "Controller Block for the Multitank",
- "Size: 3xHx3 (Block behind controller must be air)",
- "Structure must be at least 4 blocks tall, maximum 20.",
- "Each casing within the structure adds 96000L storage.",
- "Controller (front centered)",
- "1x Input hatch (anywhere)",
- "1x Output hatch (anywhere)",
- "1x Energy Hatch (anywhere)",
- "1x Maintenance Hatch (anywhere)",
- "Multitank Exterior Casings for the rest (16 at least!)",
- "Stored Fluid: "+fluidStored};
- }
-
- @Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- if (aSide == aFacing) {
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[68], new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Screen_Logo : TexturesGtBlock.Overlay_Machine_Screen_Logo)};
+ public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
+ final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
+ final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
+ if (!aBaseMetaTileEntity.getAirOffset(xDir, 0, zDir)) {
+ Utils.LOG_INFO("Must be hollow.");
+ return false;
}
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[68]};
- }
-
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "VacuumFreezer.png");
- }
-
- @Override
- public GT_Recipe.GT_Recipe_Map getRecipeMap() {
- return null;
- }
-
- @Override
- public boolean isFacingValid(byte aFacing) {
- return aFacing > 1;
+ int tAmount = 0;
+ for (int i = -1; i < 2; i++) {
+ for (int j = -1; j < 2; j++) {
+ for (int h = -1; h < 19; h++) {
+ if (h != 0 || (xDir + i != 0 || zDir + j != 0) && (i != 0 || j != 0)) {
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity
+ .getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
+ if (!this.addMaintenanceToMachineList(tTileEntity, 68)
+ && !this.addInputToMachineList(tTileEntity, 68)
+ && !this.addOutputToMachineList(tTileEntity, 68)
+ && !this.addEnergyInputToMachineList(tTileEntity, 68)) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h,
+ zDir + j) != ModBlocks.blockCasingsMisc) {
+ if (h < 3) {
+ Utils.LOG_INFO("Casing Expected.");
+ return false;
+ }
+ else if (h >= 3) {
+ // Utils.LOG_WARNING("Your Multitank can be
+ // 20 blocks tall.");
+ }
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 11) {
+ if (h < 3) {
+ Utils.LOG_INFO("Wrong Meta.");
+ return false;
+ }
+ else if (h >= 3) {
+ // Utils.LOG_WARNING("Your Multitank can be
+ // 20 blocks tall.");
+ }
+ }
+ if (h < 3) {
+ tAmount++;
+ }
+ else if (h >= 3) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) == Blocks.air
+ || aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j)
+ .getUnlocalizedName().contains("residual")) {
+ Utils.LOG_INFO("Found air");
+ }
+ else {
+ Utils.LOG_INFO("Layer " + (h + 2) + " is complete. Adding " + 64000 * 9
+ + "L storage to the tank.");
+ tAmount++;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ this.multiblockCasingCount = (short) tAmount;
+ Utils.LOG_INFO("Your Multitank can be 20 blocks tall.");
+ Utils.LOG_INFO("Casings Count: " + tAmount + " Valid Multiblock: " + (tAmount >= 16) + " Tank Storage Capacity:"
+ + this.getMaximumTankStorage() + "L");
+ return tAmount >= 16;
}
@Override
- public boolean checkRecipe(ItemStack aStack) {
+ public boolean checkRecipe(final ItemStack aStack) {
Utils.LOG_INFO("Okay");
-
-
-
- ArrayList<ItemStack> tInputList = getStoredInputs();
+
+ final ArrayList<ItemStack> tInputList = this.getStoredInputs();
for (int i = 0; i < tInputList.size() - 1; i++) {
for (int j = i + 1; j < tInputList.size(); j++) {
- if (GT_Utility.areStacksEqual((ItemStack) tInputList.get(i), (ItemStack) tInputList.get(j))) {
- if (((ItemStack) tInputList.get(i)).stackSize >= ((ItemStack) tInputList.get(j)).stackSize) {
+ if (GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) {
+ if (tInputList.get(i).stackSize >= tInputList.get(j).stackSize) {
tInputList.remove(j--);
- } else {
+ }
+ else {
tInputList.remove(i--);
break;
}
}
}
}
- ItemStack[] tInputs = (ItemStack[]) Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
+ final ItemStack[] tInputs = Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
- ArrayList<FluidStack> tFluidList = getStoredFluids();
+ final ArrayList<FluidStack> tFluidList = this.getStoredFluids();
for (int i = 0; i < tFluidList.size() - 1; i++) {
for (int j = i + 1; j < tFluidList.size(); j++) {
- if (GT_Utility.areFluidsEqual((FluidStack) tFluidList.get(i), (FluidStack) tFluidList.get(j))) {
- if (((FluidStack) tFluidList.get(i)).amount >= ((FluidStack) tFluidList.get(j)).amount) {
+ if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) {
+ if (tFluidList.get(i).amount >= tFluidList.get(j).amount) {
tFluidList.remove(j--);
- } else {
+ }
+ else {
tFluidList.remove(i--);
break;
}
}
}
}
- FluidStack[] tFluids = (FluidStack[]) Arrays.copyOfRange(tFluidList.toArray(new FluidStack[1]), 0, 1);
-
- if (tFluids.length >= 2){
+ final FluidStack[] tFluids = Arrays.copyOfRange(tFluidList.toArray(new FluidStack[1]), 0, 1);
+
+ if (tFluids.length >= 2) {
Utils.LOG_INFO("Bad");
return false;
}
-
- ArrayList<Pair<GT_MetaTileEntity_Hatch_Input, Boolean>> rList = new ArrayList<Pair<GT_MetaTileEntity_Hatch_Input, Boolean>>();
+
+ final ArrayList<Pair<GT_MetaTileEntity_Hatch_Input, Boolean>> rList = new ArrayList<Pair<GT_MetaTileEntity_Hatch_Input, Boolean>>();
int slotInputCount = 0;
- for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches) {
+ for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) {
boolean containsFluid = false;
- if (isValidMetaTileEntity(tHatch)) {
+ if (GregtechMeta_MultiBlockBase.isValidMetaTileEntity(tHatch)) {
slotInputCount++;
- for (int i=0; i<tHatch.getBaseMetaTileEntity().getSizeInventory(); i++) {
- if (tHatch.canTankBeEmptied()){containsFluid=true;}
+ for (int i = 0; i < tHatch.getBaseMetaTileEntity().getSizeInventory(); i++) {
+ if (tHatch.canTankBeEmptied()) {
+ containsFluid = true;
+ }
}
rList.add(new Pair<GT_MetaTileEntity_Hatch_Input, Boolean>(tHatch, containsFluid));
}
}
- if (tFluids.length <= 0 || slotInputCount > 1){
+ if (tFluids.length <= 0 || slotInputCount > 1) {
Utils.LOG_INFO("Bad");
return false;
}
-
- Utils.LOG_INFO("Okay - 2");
- if (internalStorageTank == null){
- if (rList.get(0).getKey().mFluid != null && rList.get(0).getKey().mFluid.amount > 0){
- Utils.LOG_INFO("Okay - 1"+" rList.get(0).getKey().mFluid.amount: "+rList.get(0).getKey().mFluid.amount +" internalStorageTank:"+internalStorageTank.amount);
- internalStorageTank = rList.get(0).getKey().mFluid;
- internalStorageTank.amount = rList.get(0).getKey().mFluid.amount;
+
+ Utils.LOG_INFO("Okay - 2");
+ if (this.internalStorageTank == null) {
+ if (rList.get(0).getKey().mFluid != null && rList.get(0).getKey().mFluid.amount > 0) {
+ Utils.LOG_INFO(
+ "Okay - 1" + " rList.get(0).getKey().mFluid.amount: " + rList.get(0).getKey().mFluid.amount
+ + " internalStorageTank:" + this.internalStorageTank.amount);
+ this.internalStorageTank = rList.get(0).getKey().mFluid;
+ this.internalStorageTank.amount = rList.get(0).getKey().mFluid.amount;
rList.get(0).getKey().mFluid.amount = 0;
- Utils.LOG_INFO("Okay - 1.1"+" rList.get(0).getKey().mFluid.amount: "+rList.get(0).getKey().mFluid.amount +" internalStorageTank:"+internalStorageTank.amount);
+ Utils.LOG_INFO(
+ "Okay - 1.1" + " rList.get(0).getKey().mFluid.amount: " + rList.get(0).getKey().mFluid.amount
+ + " internalStorageTank:" + this.internalStorageTank.amount);
return true;
}
Utils.LOG_INFO("No Fluid in hatch.");
- return false;
+ return false;
}
- else if (internalStorageTank.isFluidEqual(rList.get(0).getKey().mFluid)){
- Utils.LOG_INFO("Storing "+rList.get(0).getKey().mFluid.amount+"L");
- Utils.LOG_INFO("Contains "+internalStorageTank.amount+"L");
-
+ else if (this.internalStorageTank.isFluidEqual(rList.get(0).getKey().mFluid)) {
+ Utils.LOG_INFO("Storing " + rList.get(0).getKey().mFluid.amount + "L");
+ Utils.LOG_INFO("Contains " + this.internalStorageTank.amount + "L");
+
int tempAdd = 0;
tempAdd = rList.get(0).getKey().getFluidAmount();
- rList.get(0).getKey().mFluid = null;
- Utils.LOG_INFO("adding "+tempAdd);
- internalStorageTank.amount = internalStorageTank.amount + tempAdd;
- Utils.LOG_INFO("Tank now Contains "+internalStorageTank.amount+"L of "+internalStorageTank.getFluid().getName()+".");
-
- if (mOutputHatches.get(0).mFluid == null || mOutputHatches.isEmpty()){
- Utils.LOG_INFO("Okay - 3");
- int tempCurrentStored = internalStorageTank.amount;
- int tempSubtract = 0;
- int tempResult = 0;
- int tempHatchSize = mOutputHatches.get(0).getCapacity();
- FluidStack tempOutputFluid = internalStorageTank;
- if (tempHatchSize > tempCurrentStored){
- Utils.LOG_INFO("Okay - 3.1.1"+" hatchCapacity: "+tempHatchSize +" tempCurrentStored:"+tempCurrentStored);
- tempOutputFluid.amount = tempHatchSize;
- tempSubtract = tempHatchSize;
- tempResult = tempCurrentStored - tempSubtract;
- Utils.LOG_INFO("Okay - 3.1.2"+" result: "+tempResult +" tempCurrentStored:"+tempCurrentStored);
- mOutputHatches.get(0).mFluid = tempOutputFluid;
- internalStorageTank.amount = tempResult;
- }
- else if (tempCurrentStored >= 5000){
- Utils.LOG_INFO("Okay - 3.2");
- tempOutputFluid.amount = tempCurrentStored;
- tempSubtract = tempOutputFluid.amount;
- tempResult = tempCurrentStored - tempSubtract;
- mOutputHatches.get(0).mFluid = tempOutputFluid;
- internalStorageTank.amount = tempResult;
- }
- Utils.LOG_INFO("Tank");
- return true;
+ rList.get(0).getKey().mFluid = null;
+ Utils.LOG_INFO("adding " + tempAdd);
+ this.internalStorageTank.amount = this.internalStorageTank.amount + tempAdd;
+ Utils.LOG_INFO("Tank now Contains " + this.internalStorageTank.amount + "L of "
+ + this.internalStorageTank.getFluid().getName() + ".");
+
+ if (this.mOutputHatches.get(0).mFluid == null || this.mOutputHatches.isEmpty()) {
+ Utils.LOG_INFO("Okay - 3");
+ final int tempCurrentStored = this.internalStorageTank.amount;
+ int tempSubtract = 0;
+ int tempResult = 0;
+ final int tempHatchSize = this.mOutputHatches.get(0).getCapacity();
+ final FluidStack tempOutputFluid = this.internalStorageTank;
+ if (tempHatchSize > tempCurrentStored) {
+ Utils.LOG_INFO("Okay - 3.1.1" + " hatchCapacity: " + tempHatchSize + " tempCurrentStored:"
+ + tempCurrentStored);
+ tempOutputFluid.amount = tempHatchSize;
+ tempSubtract = tempHatchSize;
+ tempResult = tempCurrentStored - tempSubtract;
+ Utils.LOG_INFO(
+ "Okay - 3.1.2" + " result: " + tempResult + " tempCurrentStored:" + tempCurrentStored);
+ this.mOutputHatches.get(0).mFluid = tempOutputFluid;
+ this.internalStorageTank.amount = tempResult;
+ }
+ else if (tempCurrentStored >= 5000) {
+ Utils.LOG_INFO("Okay - 3.2");
+ tempOutputFluid.amount = tempCurrentStored;
+ tempSubtract = tempOutputFluid.amount;
+ tempResult = tempCurrentStored - tempSubtract;
+ this.mOutputHatches.get(0).mFluid = tempOutputFluid;
+ this.internalStorageTank.amount = tempResult;
+ }
+ Utils.LOG_INFO("Tank");
+ return true;
+ }
+ else if (this.mOutputHatches.get(0).mFluid.isFluidEqual(this.internalStorageTank)) {
+ Utils.LOG_INFO("Okay - 4");
+ final int tempCurrentStored = this.internalStorageTank.amount;
+ int tempSubtract = 0;
+ int tempResult = 0;
+ final int tempHatchSize = this.mOutputHatches.get(0).getCapacity();
+ final FluidStack tempOutputFluid = this.internalStorageTank;
+ if (tempHatchSize > tempCurrentStored) {
+ tempOutputFluid.amount = tempHatchSize;
+ tempSubtract = tempOutputFluid.amount;
+ tempResult = tempCurrentStored - tempSubtract;
+ this.mOutputHatches.get(0).mFluid = tempOutputFluid;
+ this.internalStorageTank.amount = tempResult;
+ }
+ else if (tempCurrentStored >= 5000) {
+ tempOutputFluid.amount = tempCurrentStored;
+ tempSubtract = tempOutputFluid.amount;
+ tempResult = tempCurrentStored - tempSubtract;
+ this.mOutputHatches.get(0).mFluid = tempOutputFluid;
+ this.internalStorageTank.amount = tempResult;
}
- else if (mOutputHatches.get(0).mFluid.isFluidEqual(internalStorageTank)){
- Utils.LOG_INFO("Okay - 4");
- int tempCurrentStored = internalStorageTank.amount;
- int tempSubtract = 0;
- int tempResult = 0;
- int tempHatchSize = mOutputHatches.get(0).getCapacity();
- FluidStack tempOutputFluid = internalStorageTank;
- if (tempHatchSize > tempCurrentStored){
- tempOutputFluid.amount = tempHatchSize;
- tempSubtract = tempOutputFluid.amount;
- tempResult = tempCurrentStored - tempSubtract;
- mOutputHatches.get(0).mFluid = tempOutputFluid;
- internalStorageTank.amount = tempResult;
- }
- else if (tempCurrentStored >= 5000){
- tempOutputFluid.amount = tempCurrentStored;
- tempSubtract = tempOutputFluid.amount;
- tempResult = tempCurrentStored - tempSubtract;
- mOutputHatches.get(0).mFluid = tempOutputFluid;
- internalStorageTank.amount = tempResult;
- }
- Utils.LOG_INFO("Tank");
- return true;
- }
Utils.LOG_INFO("Tank");
+ return true;
+ }
+ Utils.LOG_INFO("Tank");
return true;
}
else {
- Utils.LOG_INFO("Tank Contains "+internalStorageTank.amount+"L of "+internalStorageTank.getFluid().getName()+".");
+ Utils.LOG_INFO("Tank Contains " + this.internalStorageTank.amount + "L of "
+ + this.internalStorageTank.getFluid().getName() + ".");
}
- //this.getBaseMetaTileEntity().(tFluids[0].amount, true);
+ // this.getBaseMetaTileEntity().(tFluids[0].amount, true);
Utils.LOG_INFO("Tank");
return false;
}
@Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
- int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
- if (!aBaseMetaTileEntity.getAirOffset(xDir, 0, zDir)) {
- Utils.LOG_INFO("Must be hollow.");
- return false;
- }
- int tAmount = 0;
- for (int i = -1; i < 2; i++) {
- for (int j = -1; j < 2; j++) {
- for (int h = -1; h < 19; h++) {
- if ((h != 0) || (((xDir + i != 0) || (zDir + j != 0)) && ((i != 0) || (j != 0)))) {
- IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
- if ((!addMaintenanceToMachineList(tTileEntity, 68)) && (!addInputToMachineList(tTileEntity, 68)) && (!addOutputToMachineList(tTileEntity, 68)) && (!addEnergyInputToMachineList(tTileEntity, 68))) {
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- if (h < 3){
- Utils.LOG_INFO("Casing Expected.");
- return false;
- }
- else if (h >= 3){
- //Utils.LOG_WARNING("Your Multitank can be 20 blocks tall.");
- }
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 11) {
- if (h < 3){
- Utils.LOG_INFO("Wrong Meta.");
- return false;
- }
- else if (h >= 3){
- //Utils.LOG_WARNING("Your Multitank can be 20 blocks tall.");
- }
- }
- if (h < 3){
- tAmount++;
- }
- else if (h >= 3){
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) == Blocks.air || aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getUnlocalizedName().contains("residual")){
- Utils.LOG_INFO("Found air");
- }
- else {
- Utils.LOG_INFO("Layer "+(h+2)+" is complete. Adding "+(64000*9)+"L storage to the tank.");
- tAmount++;
- }
- }
- }
- }
- }
- }
- }
- multiblockCasingCount = (short) tAmount;
- Utils.LOG_INFO("Your Multitank can be 20 blocks tall.");
- Utils.LOG_INFO("Casings Count: "+tAmount+" Valid Multiblock: "+(tAmount >= 16)+" Tank Storage Capacity:"+getMaximumTankStorage()+"L");
- return tAmount >= 16;
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
+ return false;
+ }
+
+ @Override
+ public int getAmountOfOutputs() {
+ return 1;
+ }
+
+ @Override
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory,
+ final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(),
+ "VacuumFreezer.png");
}
@Override
- public int getMaxEfficiency(ItemStack aStack) {
+ public String[] getDescription() {
+ return new String[] {
+ "Controller Block for the Multitank", "Size: 3xHx3 (Block behind controller must be air)",
+ "Structure must be at least 4 blocks tall, maximum 20.",
+ "Each casing within the structure adds 96000L storage.", "Controller (front centered)",
+ "1x Input hatch (anywhere)", "1x Output hatch (anywhere)", "1x Energy Hatch (anywhere)",
+ "1x Maintenance Hatch (anywhere)", "Multitank Exterior Casings for the rest (16 at least!)",
+ "Stored Fluid: " + this.fluidStored
+ };
+ }
+
+ @Override
+ public int getMaxEfficiency(final ItemStack aStack) {
return 10000;
}
+ private long getMaximumTankStorage() {
+ final int multiplier = this.getStorageMultiplier();
+ Utils.LOG_WARNING("x = " + multiplier + " * 96000");
+ final long tempTankStorageMax = 96000 * multiplier;
+ Utils.LOG_WARNING("x = " + tempTankStorageMax);
+ if (tempTankStorageMax <= 0) {
+ return 96000;
+ }
+ return tempTankStorageMax;
+ }
+
@Override
- public int getPollutionPerTick(ItemStack aStack) {
+ public int getPollutionPerTick(final ItemStack aStack) {
return 0;
}
@Override
- public int getAmountOfOutputs() {
- return 1;
+ public GT_Recipe.GT_Recipe_Map getRecipeMap() {
+ return null;
+ }
+
+ private short getStorageMultiplier() {
+ final int tempstorageMultiplier = 1 * this.multiblockCasingCount;
+ if (tempstorageMultiplier <= 0) {
+ return 1;
+ }
+ return (short) tempstorageMultiplier;
}
@Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
- return false;
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ if (aSide == aFacing) {
+ return new ITexture[] {
+ Textures.BlockIcons.CASING_BLOCKS[68], new GT_RenderedTexture(aActive
+ ? TexturesGtBlock.Overlay_Machine_Screen_Logo : TexturesGtBlock.Overlay_Machine_Screen_Logo)
+ };
+ }
+ return new ITexture[] {
+ Textures.BlockIcons.CASING_BLOCKS[68]
+ };
+ }
+
+ @Override
+ public boolean isFacingValid(final byte aFacing) {
+ return aFacing > 1;
+ }
+
+ @Override
+ public void loadNBTData(final NBTTagCompound aNBT) {
+ this.mEUt = aNBT.getInteger("mEUt");
+ this.mProgresstime = aNBT.getInteger("mProgresstime");
+ this.mMaxProgresstime = aNBT.getInteger("mMaxProgresstime");
+ if (this.mMaxProgresstime > 0) {
+ this.mRunningOnLoad = true;
+ }
+ this.mEfficiencyIncrease = aNBT.getInteger("mEfficiencyIncrease");
+ this.mEfficiency = aNBT.getInteger("mEfficiency");
+ this.mPollution = aNBT.getInteger("mPollution");
+ this.mRuntime = aNBT.getInteger("mRuntime");
+ this.fluidStored = aNBT.getLong("mFluidStored");
+ this.storageMultiplier = aNBT.getShort("mStorageMultiplier");
+ this.maximumFluidStorage = aNBT.getLong("mMaxFluidStored");
+ this.multiblockCasingCount = aNBT.getShort("mCasingCount");
+ this.mOutputItems = new ItemStack[this.getAmountOfOutputs()];
+ for (int i = 0; i < this.mOutputItems.length; i++) {
+ this.mOutputItems[i] = GT_Utility.loadItem(aNBT, "mOutputItem" + i);
+ }
+ this.mOutputFluids = new FluidStack[this.getAmountOfOutputs()];
+ for (int i = 0; i < this.mOutputFluids.length; i++) {
+ this.mOutputFluids[i] = GT_Utility.loadFluid(aNBT, "mOutputFluids" + i);
+ }
+ this.mWrench = aNBT.getBoolean("mWrench");
+ this.mScrewdriver = aNBT.getBoolean("mScrewdriver");
+ this.mSoftHammer = aNBT.getBoolean("mSoftHammer");
+ this.mHardHammer = aNBT.getBoolean("mHardHammer");
+ this.mSolderingTool = aNBT.getBoolean("mSolderingTool");
+ this.mCrowbar = aNBT.getBoolean("mCrowbar");
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntity_MultiTank(this.mName);
+ }
+
+ @Override
+ public void saveNBTData(final NBTTagCompound aNBT) {
+ aNBT.setInteger("mEUt", this.mEUt);
+ aNBT.setInteger("mProgresstime", this.mProgresstime);
+ aNBT.setInteger("mMaxProgresstime", this.mMaxProgresstime);
+ aNBT.setInteger("mEfficiencyIncrease", this.mEfficiencyIncrease);
+ aNBT.setInteger("mEfficiency", this.mEfficiency);
+ aNBT.setInteger("mPollution", this.mPollution);
+ aNBT.setInteger("mRuntime", this.mRuntime);
+ aNBT.setLong("mFluidStored", this.fluidStored);
+ aNBT.setShort("mStorageMultiplier", this.storageMultiplier);
+ aNBT.setLong("mMaxFluidStored", this.maximumFluidStorage);
+ aNBT.setShort("mCasingCount", this.multiblockCasingCount);
+
+ if (this.mOutputItems != null) {
+ for (int i = 0; i < this.mOutputItems.length; i++) {
+ if (this.mOutputItems[i] != null) {
+ final NBTTagCompound tNBT = new NBTTagCompound();
+ this.mOutputItems[i].writeToNBT(tNBT);
+ aNBT.setTag("mOutputItem" + i, tNBT);
+ }
+ }
+ }
+ if (this.mOutputFluids != null) {
+ for (int i = 0; i < this.mOutputFluids.length; i++) {
+ if (this.mOutputFluids[i] != null) {
+ final NBTTagCompound tNBT = new NBTTagCompound();
+ this.mOutputFluids[i].writeToNBT(tNBT);
+ aNBT.setTag("mOutputFluids" + i, tNBT);
+ }
+ }
+ }
+
+ aNBT.setBoolean("mWrench", this.mWrench);
+ aNBT.setBoolean("mScrewdriver", this.mScrewdriver);
+ aNBT.setBoolean("mSoftHammer", this.mSoftHammer);
+ aNBT.setBoolean("mHardHammer", this.mHardHammer);
+ aNBT.setBoolean("mSolderingTool", this.mSolderingTool);
+ aNBT.setBoolean("mCrowbar", this.mCrowbar);
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_PowerSubStationController.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_PowerSubStationController.java
index 45635ea74d..1006f68da7 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_PowerSubStationController.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_PowerSubStationController.java
@@ -17,131 +17,144 @@ import net.minecraftforge.common.util.ForgeDirection;
public class GregtechMetaTileEntity_PowerSubStationController extends GT_MetaTileEntity_MultiBlockBase {
- private int recipeCounter = 0;
+ private final int recipeCounter = 0;
- public GregtechMetaTileEntity_PowerSubStationController(int aID, String aName, String aNameRegional) {
+ public GregtechMetaTileEntity_PowerSubStationController(final int aID, final String aName,
+ final String aNameRegional) {
super(aID, aName, aNameRegional);
}
- public GregtechMetaTileEntity_PowerSubStationController(String aName) {
+ public GregtechMetaTileEntity_PowerSubStationController(final String aName) {
super(aName);
}
@Override
- public String[] getDescription() {
- return new String[]{
- "Controller Block for the Power Sub-Station",
- "Stores quite a lot of power.",
- "Size(WxHxD): 1x5x1, Controller (One above the Bottom)",
- CORE.GT_Tooltip};
- }
-
- @Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- if (aSide == aFacing) {
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[67],
- new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER)};
- }
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[67]};
- }
-
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MatterFabricator.png");
- }
-
- @Override
- public void onConfigLoad(GT_Config aConfig) {
- super.onConfigLoad(aConfig);
- }
-
- @Override
- public boolean checkRecipe(ItemStack aStack) {
- return false;
- }
-
- @Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
- int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
+ public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
+ final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
+ final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
for (int i = -2; i < 3; i++) {
for (int j = -2; j < 3; j++) {
for (int h = 0; h < 4; h++) {
- //Utils.LOG_INFO("Logging Variables - xDir:"+xDir+" zDir:"+zDir+" h:"+h+" i:"+i+" j:"+j);
-
- IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
- /*if (tTileEntity != Block.getBlockFromItem(UtilsItems.getItem("IC2:blockAlloyGlass"))) {
- Utils.LOG_INFO("h:"+h+" i:"+i+" j:"+j);
- double tX = tTileEntity.getXCoord();
- double tY = tTileEntity.getYCoord();
- double tZ = tTileEntity.getZCoord();
- Utils.LOG_INFO("Found Glass at X:"+tX+" Y:"+tY+" Z:"+tZ);
- //return false;
- }*/
- if ((i != -2 && i != 2) && (j != -2 && j != 2)) {// innerer 3x3 ohne h�he
- if (h == 0 && i != 0 && j != 0) {// innen boden (kantal coils)
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- Utils.LOG_INFO("Matter Generation Coils missings from the bottom layer, inner 3x3. - Wrong Block");
- Utils.LOG_INFO("Found: "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getUnlocalizedName()+" at x:"+(xDir + i)+" y:" +h+" z:"+(zDir + j));
- //tTileEntity.getWorld().setBlock(xDir+i, h, zDir+j, Blocks.diamond_block);
- //Utils.LOG_INFO("Changed into : "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getUnlocalizedName());
+ // Utils.LOG_INFO("Logging Variables - xDir:"+xDir+"
+ // zDir:"+zDir+" h:"+h+" i:"+i+" j:"+j);
+
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i,
+ h, zDir + j);
+ /*
+ * if (tTileEntity !=
+ * Block.getBlockFromItem(UtilsItems.getItem(
+ * "IC2:blockAlloyGlass"))) { Utils.LOG_INFO("h:"+h+" i:"+i+
+ * " j:"+j); double tX = tTileEntity.getXCoord(); double tY
+ * = tTileEntity.getYCoord(); double tZ =
+ * tTileEntity.getZCoord(); Utils.LOG_INFO(
+ * "Found Glass at X:"+tX+" Y:"+tY+" Z:"+tZ); //return
+ * false; }
+ */
+ if (i != -2 && i != 2 && j != -2 && j != 2) {// innerer 3x3
+ // ohne h�he
+ if (h == 0 && i != 0 && j != 0) {// innen boden (kantal
+ // coils)
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h,
+ zDir + j) != ModBlocks.blockCasingsMisc) {
+ Utils.LOG_INFO(
+ "Matter Generation Coils missings from the bottom layer, inner 3x3. - Wrong Block");
+ Utils.LOG_INFO("Found: "
+ + aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getUnlocalizedName()
+ + " at x:" + (xDir + i) + " y:" + h + " z:" + (zDir + j));
+ // tTileEntity.getWorld().setBlock(xDir+i, h,
+ // zDir+j, Blocks.diamond_block);
+ // Utils.LOG_INFO("Changed into :
+ // "+aBaseMetaTileEntity.getBlockOffset(xDir +
+ // i, h, zDir + j).getUnlocalizedName());
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 4) {
- Utils.LOG_INFO("Matter Generation Coils missings from the bottom layer, inner 3x3. - Wrong Meta");
- return false;
- }
- }
- else if (h == 3 && i != 0 && j != 0) {// innen decke (ulv casings + input + muffler)
- //if(j == 0 && i == 0) {
-
- if ((!addMufflerToMachineList(tTileEntity, 66))) {
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- Utils.LOG_INFO("Found: "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getUnlocalizedName()+" at x:"+(xDir + i)+" y:" +h+" z:"+(zDir + j));
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the top layers inner 3x3.");
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 4) {
- Utils.LOG_INFO("Found: "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getUnlocalizedName()+" at x:"+(xDir + i)+" y:" +h+" z:"+(zDir + j));
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the top layers inner 3x3.");
- return false;
- }
- }
- //}
-
- } /*else {// top air
- if ((i != -2 && i != 2) && (j != -2 && j != 2) && h == 3) {
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- Utils.LOG_INFO("Matter Generation Coils missings from the top layer, inner 3x3. - Wrong Block");
- Utils.LOG_INFO("Found: "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getUnlocalizedName()+" at x:"+(xDir + i)+" y:" +h+" z:"+(zDir + j));
- //tTileEntity.getWorld().setBlock(xDir+i, h, zDir+j, Blocks.diamond_block);
- //Utils.LOG_INFO("Changed into : "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getUnlocalizedName());
+ Utils.LOG_INFO(
+ "Matter Generation Coils missings from the bottom layer, inner 3x3. - Wrong Meta");
return false;
}
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 4) {
- Utils.LOG_INFO("Matter Generation Coils missings from the top layer, inner 3x3. - Wrong Meta");
- return false;
+ }
+ else if (h == 3 && i != 0 && j != 0) {// innen decke
+ // (ulv casings
+ // + input +
+ // muffler)
+ // if(j == 0 && i == 0) {
+
+ if (!this.addMufflerToMachineList(tTileEntity, 66)) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h,
+ zDir + j) != ModBlocks.blockCasingsMisc) {
+ Utils.LOG_INFO("Found: "
+ + aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j)
+ .getUnlocalizedName()
+ + " at x:" + (xDir + i) + " y:" + h + " z:" + (zDir + j));
+ Utils.LOG_INFO(
+ "Matter Fabricator Casings Missing from one of the top layers inner 3x3.");
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 4) {
+ Utils.LOG_INFO("Found: "
+ + aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j)
+ .getUnlocalizedName()
+ + " at x:" + (xDir + i) + " y:" + h + " z:" + (zDir + j));
+ Utils.LOG_INFO(
+ "Matter Fabricator Casings Missing from one of the top layers inner 3x3.");
+ return false;
+ }
}
- }
- }*/
- } else {// Outer 5x5
- if (h == 0) {// au�en boden (controller, output, energy, maintainance, rest ulv casings)
- if ((!addEnergyInputToMachineList(tTileEntity, 66) && (!addDynamoToMachineList(tTileEntity, 66)))) {
- if ((xDir + i != 0) || (zDir + j != 0)) {//no controller
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- Utils.LOG_INFO("Found: "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getUnlocalizedName()+" at x:"+(xDir + i)+" y:" +h+" z:"+(zDir + j));
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the edges of the bottom layer. "+(aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()));
+ // }
+
+ } /*
+ * else {// top air if ((i != -2 && i != 2) && (j !=
+ * -2 && j != 2) && h == 3) { if
+ * (aBaseMetaTileEntity.getBlockOffset(xDir + i, h,
+ * zDir + j) != ModBlocks.blockCasingsMisc) {
+ * Utils.LOG_INFO(
+ * "Matter Generation Coils missings from the top layer, inner 3x3. - Wrong Block"
+ * ); Utils.LOG_INFO("Found: "
+ * +aBaseMetaTileEntity.getBlockOffset(xDir + i, h,
+ * zDir + j).getUnlocalizedName()+" at x:"+(xDir +
+ * i)+" y:" +h+" z:"+(zDir + j));
+ * //tTileEntity.getWorld().setBlock(xDir+i, h,
+ * zDir+j, Blocks.diamond_block); //Utils.LOG_INFO(
+ * "Changed into : "
+ * +aBaseMetaTileEntity.getBlockOffset(xDir + i, h,
+ * zDir + j).getUnlocalizedName()); return false; }
+ * if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i,
+ * h, zDir + j) != 4) { Utils.LOG_INFO(
+ * "Matter Generation Coils missings from the top layer, inner 3x3. - Wrong Meta"
+ * ); return false; } } }
+ */
+ }
+ else {// Outer 5x5
+ if (h == 0) {// au�en boden (controller, output, energy,
+ // maintainance, rest ulv casings)
+ if (!this.addEnergyInputToMachineList(tTileEntity, 66)
+ && !this.addDynamoToMachineList(tTileEntity, 66)) {
+ if (xDir + i != 0 || zDir + j != 0) {// no
+ // controller
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h,
+ zDir + j) != ModBlocks.blockCasingsMisc) {
+ Utils.LOG_INFO("Found: "
+ + aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j)
+ .getUnlocalizedName()
+ + " at x:" + (xDir + i) + " y:" + h + " z:" + (zDir + j));
+ Utils.LOG_INFO(
+ "Matter Fabricator Casings Missing from one of the edges of the bottom layer. "
+ + aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j)
+ .getLocalizedName());
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 4) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the edges of the bottom layer. 2");
+ Utils.LOG_INFO(
+ "Matter Fabricator Casings Missing from one of the edges of the bottom layer. 2");
return false;
}
}
}
- } else {
-
+ }
+ else {
+
}
}
}
@@ -152,38 +165,77 @@ public class GregtechMetaTileEntity_PowerSubStationController extends GT_MetaTil
}
@Override
- public boolean isCorrectMachinePart(ItemStack aStack) {
- return true;
+ public boolean checkRecipe(final ItemStack aStack) {
+ return false;
}
@Override
- public int getMaxEfficiency(ItemStack aStack) {
- return 10000;
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
+ return false;
+ }
+
+ @Override
+ public int getAmountOfOutputs() {
+ return 1;
+ }
+
+ @Override
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory,
+ final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "MatterFabricator.png");
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
+ public int getDamageToComponent(final ItemStack aStack) {
return 0;
}
@Override
- public int getDamageToComponent(ItemStack aStack) {
+ public String[] getDescription() {
+ return new String[] {
+ "Controller Block for the Power Sub-Station", "Stores quite a lot of power.",
+ "Size(WxHxD): 1x5x1, Controller (One above the Bottom)", CORE.GT_Tooltip
+ };
+ }
+
+ @Override
+ public int getMaxEfficiency(final ItemStack aStack) {
+ return 10000;
+ }
+
+ @Override
+ public int getPollutionPerTick(final ItemStack aStack) {
return 0;
}
@Override
- public int getAmountOfOutputs() {
- return 1;
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ if (aSide == aFacing) {
+ return new ITexture[] {
+ Textures.BlockIcons.CASING_BLOCKS[67],
+ new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER_ACTIVE
+ : Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER)
+ };
+ }
+ return new ITexture[] {
+ Textures.BlockIcons.CASING_BLOCKS[67]
+ };
}
@Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
- return false;
+ public boolean isCorrectMachinePart(final ItemStack aStack) {
+ return true;
}
@Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
return new GregtechMetaTileEntity_PowerSubStationController(this.mName);
}
+ @Override
+ public void onConfigLoad(final GT_Config aConfig) {
+ super.onConfigLoad(aConfig);
+ }
+
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java
index 7508391f93..eede58d65b 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java
@@ -12,130 +12,108 @@ import gtPlusPlus.core.util.fluid.FluidUtils;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
-public class GT_MetaTileEntity_TieredTank
-extends GT_MetaTileEntity_BasicTank {
+public class GT_MetaTileEntity_TieredTank extends GT_MetaTileEntity_BasicTank {
- private NBTTagCompound mRecipeStuff = new NBTTagCompound();
- private String mFluidName;
- private int mFluidAmount;
+ private NBTTagCompound mRecipeStuff = new NBTTagCompound();
+ private String mFluidName;
+ private int mFluidAmount;
- public GT_MetaTileEntity_TieredTank(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, 3, "Stores " + ((int) (Math.pow(2, aTier) * 32000)) + "L of fluid");
+ public GT_MetaTileEntity_TieredTank(final int aID, final String aName, final String aNameRegional,
+ final int aTier) {
+ super(aID, aName, aNameRegional, aTier, 3, "Stores " + (int) (Math.pow(2, aTier) * 32000) + "L of fluid");
}
- public GT_MetaTileEntity_TieredTank(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_TieredTank(final String aName, final int aTier, final String aDescription,
+ final ITexture[][][] aTextures) {
super(aName, aTier, 3, aDescription, aTextures);
}
@Override
- public ITexture[][][] getTextureSet(ITexture[] aTextures) {
- return new ITexture[0][0][0];
+ public boolean canTankBeEmptied() {
+ return true;
}
@Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- return aSide == 1 ? new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_POTIONBREWER_ACTIVE)} : new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_POTIONBREWER)};
+ public boolean canTankBeFilled() {
+ return true;
}
-
- private boolean setVars(){
- //Utils.LOG_INFO("setting Vars.");
- if (mFluidName.equals("") || !mFluidName.equals(null)){
- if (mFluid != null) mFluidName = mFluid.getFluid().getName();
- }
- else{
- if (mFluid != null){
- if (!mFluidName.equalsIgnoreCase(mFluid.getFluid().getName())){
- mFluidName = mFluid.getFluid().getName();
- }
- }
- else {
- // Leave Values Blank.
- return false;
- }
- }
-
- if (mFluidAmount <= 0){
- if (mFluid != null) mFluidAmount = mFluid.amount;
- }
- else {
- if (mFluid != null){
- if (mFluidAmount != mFluid.amount){
- mFluidAmount = mFluid.amount;
- }
- }
- else {
- // Leave Values Blank.
- return false;
- }
- }
+ @Override
+ public boolean displaysItemStack() {
return true;
}
-
@Override
- public String[] getDescription() {
-
- setVars();
-
-
- if ((mFluidName.equals("Empty")||mFluidName.equals("")) || mFluidAmount <= 0){
- return new String[] {mDescription, CORE.GT_Tooltip};
- }
- return new String[] {mDescription, "Stored Fluid: "+mFluidName, "Stored Amount: "+mFluidAmount+"l", CORE.GT_Tooltip};
+ public boolean displaysStackSize() {
+ return false;
}
-
@Override
- public void saveNBTData(NBTTagCompound aNBT) {
- super.saveNBTData(aNBT);
- setVars();
- mRecipeStuff.setString("mFluidName", mFluidName);
- mRecipeStuff.setInteger("mFluidAmount", mFluidAmount);
- aNBT.setTag("GT.CraftingComponents", mRecipeStuff);
+ public boolean doesEmptyContainers() {
+ return true;
}
@Override
- public void loadNBTData(NBTTagCompound aNBT) {
- super.loadNBTData(aNBT);
- mRecipeStuff = aNBT.getCompoundTag("GT.CraftingComponents");
- mFluidName = mRecipeStuff.getString("mFluidName");
- mFluidAmount = mRecipeStuff.getInteger("mFluidAmount");
- mFluid = FluidUtils.getFluidStack(mFluidName, mFluidAmount);
- setItemNBT(aNBT);
+ public boolean doesFillContainers() {
+ return true;
}
@Override
- public void setItemNBT(NBTTagCompound aNBT) {
- super.setItemNBT(aNBT);
- mRecipeStuff.setString("mFluidName", mFluidName);
- mRecipeStuff.setInteger("mFluidAmount", mFluidAmount);
- aNBT.setTag("GT.CraftingComponents", mRecipeStuff);
+ public int getCapacity() {
+ return (int) (Math.pow(2, this.mTier) * 32000);
}
+ @Override
+ public String[] getDescription() {
+
+ this.setVars();
+
+ if (this.mFluidName.equals("Empty") || this.mFluidName.equals("") || this.mFluidAmount <= 0) {
+ return new String[] {
+ this.mDescription, CORE.GT_Tooltip
+ };
+ }
+ return new String[] {
+ this.mDescription, "Stored Fluid: " + this.mFluidName, "Stored Amount: " + this.mFluidAmount + "l",
+ CORE.GT_Tooltip
+ };
+ }
@Override
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
- if (aBaseMetaTileEntity.isClientSide()){
- return true;
+ public String[] getInfoData() {
+
+ if (this.mFluid == null) {
+ return new String[] {
+ GT_Values.VOLTAGE_NAMES[this.mTier] + " Fluid Tank", "Stored Fluid:", "No Fluid",
+ Integer.toString(0) + "L", Integer.toString(this.getCapacity()) + "L"
+ };
}
- aBaseMetaTileEntity.openGUI(aPlayer);
- return true;
+ return new String[] {
+ GT_Values.VOLTAGE_NAMES[this.mTier] + " Fluid Tank", "Stored Fluid:", this.mFluid.getLocalizedName(),
+ Integer.toString(this.mFluid.amount) + "L", Integer.toString(this.getCapacity()) + "L"
+ };
}
@Override
- public boolean isSimpleMachine() {
- return true;
+ public int getTankPressure() {
+ return 100;
}
@Override
- public boolean isFacingValid(byte aFacing) {
- return true;
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ return aSide == 1 ? new ITexture[] {
+ Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_POTIONBREWER_ACTIVE)
+ } : new ITexture[] {
+ Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1],
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_POTIONBREWER)
+ };
}
@Override
- public boolean isAccessAllowed(EntityPlayer aPlayer) {
- return true;
+ public ITexture[][][] getTextureSet(final ITexture[] aTextures) {
+ return new ITexture[0][0][0];
}
@Override
@@ -144,84 +122,114 @@ extends GT_MetaTileEntity_BasicTank {
}
@Override
- public boolean doesFillContainers() {
+ public boolean isAccessAllowed(final EntityPlayer aPlayer) {
return true;
}
@Override
- public boolean doesEmptyContainers() {
+ public boolean isFacingValid(final byte aFacing) {
return true;
}
@Override
- public boolean canTankBeFilled() {
+ public boolean isGivingInformation() {
return true;
}
@Override
- public boolean canTankBeEmptied() {
+ public boolean isSimpleMachine() {
return true;
}
@Override
- public boolean displaysItemStack() {
- return true;
+ public void loadNBTData(final NBTTagCompound aNBT) {
+ super.loadNBTData(aNBT);
+ this.mRecipeStuff = aNBT.getCompoundTag("GT.CraftingComponents");
+ this.mFluidName = this.mRecipeStuff.getString("mFluidName");
+ this.mFluidAmount = this.mRecipeStuff.getInteger("mFluidAmount");
+ this.mFluid = FluidUtils.getFluidStack(this.mFluidName, this.mFluidAmount);
+ this.setItemNBT(aNBT);
}
@Override
- public boolean displaysStackSize() {
- return false;
+ public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_TieredTank(this.mName, this.mTier, this.mDescription, this.mTextures);
}
@Override
- public String[] getInfoData() {
-
- if (mFluid == null) {
- return new String[]{
- GT_Values.VOLTAGE_NAMES[mTier]+" Fluid Tank",
- "Stored Fluid:",
- "No Fluid",
- Integer.toString(0) + "L",
- Integer.toString(getCapacity()) + "L"};
- }
- return new String[]{
- GT_Values.VOLTAGE_NAMES[mTier]+" Fluid Tank",
- "Stored Fluid:",
- mFluid.getLocalizedName(),
- Integer.toString(mFluid.amount) + "L",
- Integer.toString(getCapacity()) + "L"};
+ public void onMachineBlockUpdate() {
+ this.getBaseMetaTileEntity().markDirty();
+ super.onMachineBlockUpdate();
}
@Override
- public boolean isGivingInformation() {
- return true;
+ public void onRemoval() {
+ this.getBaseMetaTileEntity().markDirty();
+ super.onRemoval();
}
@Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_TieredTank(mName, mTier, mDescription, mTextures);
+ public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) {
+ if (aBaseMetaTileEntity.isClientSide()) {
+ return true;
+ }
+ aBaseMetaTileEntity.openGUI(aPlayer);
+ return true;
}
@Override
- public int getCapacity() {
- return (int) (Math.pow(2, mTier) * 32000);
+ public void saveNBTData(final NBTTagCompound aNBT) {
+ super.saveNBTData(aNBT);
+ this.setVars();
+ this.mRecipeStuff.setString("mFluidName", this.mFluidName);
+ this.mRecipeStuff.setInteger("mFluidAmount", this.mFluidAmount);
+ aNBT.setTag("GT.CraftingComponents", this.mRecipeStuff);
}
@Override
- public int getTankPressure() {
- return 100;
+ public void setItemNBT(final NBTTagCompound aNBT) {
+ super.setItemNBT(aNBT);
+ this.mRecipeStuff.setString("mFluidName", this.mFluidName);
+ this.mRecipeStuff.setInteger("mFluidAmount", this.mFluidAmount);
+ aNBT.setTag("GT.CraftingComponents", this.mRecipeStuff);
}
- @Override
- public void onMachineBlockUpdate() {
- this.getBaseMetaTileEntity().markDirty();
- super.onMachineBlockUpdate();
- }
+ private boolean setVars() {
+ // Utils.LOG_INFO("setting Vars.");
+ if (this.mFluidName.equals("") || !this.mFluidName.equals(null)) {
+ if (this.mFluid != null) {
+ this.mFluidName = this.mFluid.getFluid().getName();
+ }
+ }
+ else {
+ if (this.mFluid != null) {
+ if (!this.mFluidName.equalsIgnoreCase(this.mFluid.getFluid().getName())) {
+ this.mFluidName = this.mFluid.getFluid().getName();
+ }
+ }
+ else {
+ // Leave Values Blank.
+ return false;
+ }
+ }
- @Override
- public void onRemoval() {
- this.getBaseMetaTileEntity().markDirty();
- super.onRemoval();
+ if (this.mFluidAmount <= 0) {
+ if (this.mFluid != null) {
+ this.mFluidAmount = this.mFluid.amount;
+ }
+ }
+ else {
+ if (this.mFluid != null) {
+ if (this.mFluidAmount != this.mFluid.amount) {
+ this.mFluidAmount = this.mFluid.amount;
+ }
+ }
+ else {
+ // Leave Values Blank.
+ return false;
+ }
+ }
+ return true;
}
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Base.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Base.java
index 4c13aa6ca6..0c25018391 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Base.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Base.java
@@ -16,56 +16,67 @@ import net.minecraft.stats.AchievementList;
import net.minecraft.util.*;
import net.minecraftforge.event.world.BlockEvent;
-public abstract class TOOL_Gregtech_Base
-implements Interface_ToolStats {
- public static final Enchantment[] FORTUNE_ENCHANTMENT = {Enchantment.fortune};
- public static final Enchantment[] LOOTING_ENCHANTMENT = {Enchantment.looting};
- public static final Enchantment[] ZERO_ENCHANTMENTS = new Enchantment[0];
- public static final int[] ZERO_ENCHANTMENT_LEVELS = new int[0];
+public abstract class TOOL_Gregtech_Base implements Interface_ToolStats {
+ public static final Enchantment[] FORTUNE_ENCHANTMENT = {
+ Enchantment.fortune
+ };
+ public static final Enchantment[] LOOTING_ENCHANTMENT = {
+ Enchantment.looting
+ };
+ public static final Enchantment[] ZERO_ENCHANTMENTS = new Enchantment[0];
+ public static final int[] ZERO_ENCHANTMENT_LEVELS = new int[0];
@Override
- public int getToolDamagePerBlockBreak() {
- return 100;
+ public boolean canBlock() {
+ return false;
}
@Override
- public int getToolDamagePerDropConversion() {
- return 100;
+ public int convertBlockDrops(final List<ItemStack> aDrops, final ItemStack aStack, final EntityPlayer aPlayer,
+ final Block aBlock, final int aX, final int aY, final int aZ, final byte aMetaData, final int aFortune,
+ final boolean aSilkTouch, final BlockEvent.HarvestDropsEvent aEvent) {
+ return 0;
}
@Override
- public int getToolDamagePerContainerCraft() {
- return 800;
+ public int getBaseQuality() {
+ return 0;
}
@Override
- public int getToolDamagePerEntityAttack() {
- return 200;
+ public String getBreakingSound() {
+ return GregTech_API.sSoundList.get(Integer.valueOf(0));
}
@Override
- public float getSpeedMultiplier() {
- return 1.0F;
+ public ItemStack getBrokenItem(final ItemStack aStack) {
+ return null;
}
@Override
- public float getMaxDurabilityMultiplier() {
- return 1.0F;
+ public String getCraftingSound() {
+ return null;
}
@Override
- public int getHurtResistanceTime(int aOriginalHurtResistance, Entity aEntity) {
- return aOriginalHurtResistance;
+ public DamageSource getDamageSource(final EntityLivingBase aPlayer, final Entity aEntity) {
+ return GT_DamageSources.getCombatDamage(aPlayer instanceof EntityPlayer ? "player" : "mob", aPlayer,
+ aEntity instanceof EntityLivingBase ? this.getDeathMessage(aPlayer, (EntityLivingBase) aEntity) : null);
+ }
+
+ public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) {
+ return new EntityDamageSource(aPlayer instanceof EntityPlayer ? "player" : "mob", aPlayer)
+ .func_151519_b(aEntity);
}
@Override
- public String getMiningSound() {
- return null;
+ public int[] getEnchantmentLevels(final ItemStack aStack) {
+ return TOOL_Gregtech_Base.ZERO_ENCHANTMENT_LEVELS;
}
@Override
- public String getCraftingSound() {
- return null;
+ public Enchantment[] getEnchantments(final ItemStack aStack) {
+ return TOOL_Gregtech_Base.ZERO_ENCHANTMENTS;
}
@Override
@@ -74,100 +85,99 @@ implements Interface_ToolStats {
}
@Override
- public String getBreakingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(0));
+ public int getHurtResistanceTime(final int aOriginalHurtResistance, final Entity aEntity) {
+ return aOriginalHurtResistance;
}
@Override
- public int getBaseQuality() {
- return 0;
+ public float getMagicDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack,
+ final EntityPlayer aPlayer) {
+ return aOriginalDamage;
}
@Override
- public boolean canBlock() {
- return false;
+ public float getMaxDurabilityMultiplier() {
+ return 1.0F;
}
@Override
- public boolean isCrowbar() {
- return false;
+ public String getMiningSound() {
+ return null;
}
@Override
- public boolean isWrench() {
- return false;
+ public float getNormalDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack,
+ final EntityPlayer aPlayer) {
+ return aOriginalDamage;
}
@Override
- public boolean isWeapon() {
- return false;
+ public float getSpeedMultiplier() {
+ return 1.0F;
}
@Override
- public boolean isRangedWeapon() {
- return false;
+ public int getToolDamagePerBlockBreak() {
+ return 100;
}
@Override
- public boolean isMiningTool() {
- return true;
- }
-
- public boolean isChainsaw(){
- return false;
+ public int getToolDamagePerContainerCraft() {
+ return 800;
}
-
-
- public boolean isGrafter(){
- return false;
+
+ @Override
+ public int getToolDamagePerDropConversion() {
+ return 100;
}
-
- public DamageSource getDamageSource(EntityLivingBase aPlayer, Entity aEntity) {
- return GT_DamageSources.getCombatDamage((aPlayer instanceof EntityPlayer) ? "player" : "mob", aPlayer, (aEntity instanceof EntityLivingBase) ? getDeathMessage(aPlayer, (EntityLivingBase) aEntity) : null);
+ @Override
+ public int getToolDamagePerEntityAttack() {
+ return 200;
}
- public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
- return new EntityDamageSource((aPlayer instanceof EntityPlayer) ? "player" : "mob", aPlayer).func_151519_b(aEntity);
+ public boolean isChainsaw() {
+ return false;
}
@Override
- public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) {
- return 0;
+ public boolean isCrowbar() {
+ return false;
}
@Override
- public ItemStack getBrokenItem(ItemStack aStack) {
- return null;
+ public boolean isGrafter() {
+ return false;
}
@Override
- public Enchantment[] getEnchantments(ItemStack aStack) {
- return ZERO_ENCHANTMENTS;
+ public boolean isMiningTool() {
+ return true;
}
@Override
- public int[] getEnchantmentLevels(ItemStack aStack) {
- return ZERO_ENCHANTMENT_LEVELS;
+ public boolean isRangedWeapon() {
+ return false;
}
@Override
- public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) {
- aPlayer.triggerAchievement(AchievementList.openInventory);
- aPlayer.triggerAchievement(AchievementList.mineWood);
- aPlayer.triggerAchievement(AchievementList.buildWorkBench);
+ public boolean isWeapon() {
+ return false;
}
-
- public void onStatsAddedToTool(Gregtech_MetaTool aItem, int aID) {
+
+ @Override
+ public boolean isWrench() {
+ return false;
}
@Override
- public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) {
- return aOriginalDamage;
+ public void onStatsAddedToTool(final Gregtech_MetaTool aItem, final int aID) {
}
@Override
- public float getMagicDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) {
- return aOriginalDamage;
+ public void onToolCrafted(final ItemStack aStack, final EntityPlayer aPlayer) {
+ aPlayer.triggerAchievement(AchievementList.openInventory);
+ aPlayer.triggerAchievement(AchievementList.mineWood);
+ aPlayer.triggerAchievement(AchievementList.buildWorkBench);
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java
index 4a21eaa395..45849ebed8 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java
@@ -23,174 +23,207 @@ import net.minecraft.stats.AchievementList;
import net.minecraft.util.*;
import net.minecraftforge.event.world.BlockEvent;
-public class TOOL_Gregtech_Choocher
- extends TOOL_Gregtech_Base {
-
- public static final List<String> mEffectiveList = Arrays.asList(new String[]{EntityIronGolem.class.getName(), "EntityTowerGuardian"});
-
-
- @Override
- public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) {
- String tName = aEntity.getClass().getName();
- tName = tName.substring(tName.lastIndexOf(".") + 1);
- return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage;
- }
-
- @Override
- public int getToolDamagePerBlockBreak() {
- return 50;
- }
+public class TOOL_Gregtech_Choocher extends TOOL_Gregtech_Base {
- @Override
- public int getToolDamagePerDropConversion() {
- return 100;
- }
-
- @Override
- public int getToolDamagePerContainerCraft() {
- return 400;
- }
+ public static final List<String> mEffectiveList = Arrays.asList(new String[] {
+ EntityIronGolem.class.getName(), "EntityTowerGuardian"
+ });
- @Override
- public int getToolDamagePerEntityAttack() {
- return 100;
- }
+ @Override
+ public boolean canBlock() {
+ return true;
+ }
- @Override
- public int getBaseQuality() {
- return 0;
- }
+ @Override
+ public int convertBlockDrops(final List<ItemStack> aDrops, final ItemStack aStack, final EntityPlayer aPlayer,
+ final Block aBlock, final int aX, final int aY, final int aZ, final byte aMetaData, final int aFortune,
+ final boolean aSilkTouch, final BlockEvent.HarvestDropsEvent aEvent) {
+ int rConversions = 0;
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null,
+ new ItemStack[] {
+ new ItemStack(aBlock, 1, aMetaData)
+ });
+ if (tRecipe == null || aBlock.hasTileEntity(aMetaData)) {
+ for (final ItemStack tDrop : aDrops) {
+ tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null,
+ new ItemStack[] {
+ GT_Utility.copyAmount(1L, new Object[] {
+ tDrop
+ })
+ });
+ if (tRecipe != null) {
+ final ItemStack tHammeringOutput = tRecipe.getOutput(0);
+ if (tHammeringOutput != null) {
+ rConversions += tDrop.stackSize;
+ tDrop.stackSize *= tHammeringOutput.stackSize;
+ tHammeringOutput.stackSize = tDrop.stackSize;
+ GT_Utility.setStack(tDrop, tHammeringOutput);
+ }
+ }
+ }
+ }
+ else {
+ aDrops.clear();
+ aDrops.add(tRecipe.getOutput(0));
+ rConversions++;
+ }
+ return rConversions;
+ }
- @Override
+ @Override
public float getBaseDamage() {
- return 4.0F;
- }
+ return 4.0F;
+ }
- @Override
- public float getSpeedMultiplier() {
- return 0.85F;
- }
+ @Override
+ public int getBaseQuality() {
+ return 0;
+ }
- @Override
- public float getMaxDurabilityMultiplier() {
- return 1.2F;
- }
+ @Override
+ public String getBreakingSound() {
+ return GregTech_API.sSoundList.get(Integer.valueOf(0));
+ }
+
+ @Override
+ public ItemStack getBrokenItem(final ItemStack aStack) {
+ return null;
+ }
- @Override
+ @Override
public String getCraftingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(1));
- }
+ return GregTech_API.sSoundList.get(Integer.valueOf(1));
+ }
- @Override
+ @Override
+ public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) {
+ return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE
+ + " has been Choochered by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName()
+ + EnumChatFormatting.WHITE);
+ }
+
+ @Override
public String getEntityHitSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(2));
- }
+ return GregTech_API.sSoundList.get(Integer.valueOf(2));
+ }
- @Override
- public String getBreakingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(0));
- }
+ @Override
+ public IIconContainer getIcon(final boolean aIsToolHead, final ItemStack aStack) {
+ // Utils.LOG_INFO("Texture:
+ // "+TexturesGtTools.SKOOKUM_CHOOCHER.getTextureFile());
+ return TexturesGtTools.SKOOKUM_CHOOCHER;
+ }
+
+ @Override
+ public float getMaxDurabilityMultiplier() {
+ return 1.2F;
+ }
- @Override
+ @Override
public String getMiningSound() {
- return null;
- }
+ return null;
+ }
- @Override
- public boolean canBlock() {
- return true;
- }
-
- @Override
- public boolean isWrench(){
- return true;
- }
-
- @Override
- public boolean isCrowbar() {
- return false;
- }
+ @Override
+ public float getNormalDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack,
+ final EntityPlayer aPlayer) {
+ String tName = aEntity.getClass().getName();
+ tName = tName.substring(tName.lastIndexOf(".") + 1);
+ return TOOL_Gregtech_Choocher.mEffectiveList.contains(tName) || tName.contains("Golem") ? aOriginalDamage * 2.0F
+ : aOriginalDamage;
+ }
- @Override
- public boolean isWeapon() {
- return true;
- }
-
- @Override
- public boolean isMinableBlock(Block aBlock, byte aMetaData) {
- String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && ((tTool.equals("sword")) || (tTool.equals("wrench")) || (tTool.equals("hammer")) || (tTool.equals("pickaxe")))) || (aBlock.getMaterial() == Material.rock) || (aBlock.getMaterial() == Material.glass) || (aBlock.getMaterial() == Material.piston) || (aBlock == Blocks.hopper) || (aBlock == Blocks.dispenser) || (aBlock == Blocks.dropper) || (aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == Material.packedIce) || (GT_Recipe.GT_Recipe_Map.sHammerRecipes.containsInput(new ItemStack(aBlock, 1, aMetaData))) || (aBlock.getMaterial() == Material.sand) || (aBlock.getMaterial() == Material.grass) || (aBlock.getMaterial() == Material.ground) || (aBlock.getMaterial() == Material.snow) || (aBlock.getMaterial() == Material.clay) || (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.vine) || (aBlock.getMaterial() == Material.wood) || (aBlock.getMaterial() == Material.cactus) || (aBlock.getMaterial() == Material.circuits) || (aBlock.getMaterial() == Material.gourd) || (aBlock.getMaterial() == Material.web) || (aBlock.getMaterial() == Material.cloth) || (aBlock.getMaterial() == Material.carpet) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.cake) || (aBlock.getMaterial() == Material.tnt) || (aBlock.getMaterial() == Material.sponge);
- }
-
- @Override
- public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) {
- int rConversions = 0;
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{new ItemStack(aBlock, 1, aMetaData)});
- if ((tRecipe == null) || (aBlock.hasTileEntity(aMetaData))) {
- for (ItemStack tDrop : aDrops) {
- tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{GT_Utility.copyAmount(1L, new Object[]{tDrop})});
- if (tRecipe != null) {
- ItemStack tHammeringOutput = tRecipe.getOutput(0);
- if (tHammeringOutput != null) {
- rConversions += tDrop.stackSize;
- tDrop.stackSize *= tHammeringOutput.stackSize;
- tHammeringOutput.stackSize = tDrop.stackSize;
- GT_Utility.setStack(tDrop, tHammeringOutput);
- }
- }
- }
- } else {
- aDrops.clear();
- aDrops.add(tRecipe.getOutput(0));
- rConversions++;
- }
- return rConversions;
- }
-
- @Override
- public ItemStack getBrokenItem(ItemStack aStack) {
- return null;
- }
-
- @Override
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- //Utils.LOG_INFO("Texture: "+TexturesGtTools.SKOOKUM_CHOOCHER.getTextureFile());
- return TexturesGtTools.SKOOKUM_CHOOCHER;
- }
-
- @Override
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
+ @Override
+ public short[] getRGBa(final boolean aIsToolHead, final ItemStack aStack) {
return GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa;
}
- /*@Override
- public void onStatsAddedToTool(Gregtech_MetaTool aItem, int aID) {
- aItem.addItemBehavior(aID, new Behaviour_Choocher());
- }*/
+ @Override
+ public float getSpeedMultiplier() {
+ return 0.85F;
+ }
+
+ @Override
+ public int getToolDamagePerBlockBreak() {
+ return 50;
+ }
- @Override
- public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) {
- super.onToolCrafted(aStack, aPlayer);
- aPlayer.triggerAchievement(AchievementList.buildSword);
- try {
- GT_Mod.instance.achievements.issueAchievement(aPlayer, "tools");
- GT_Mod.instance.achievements.issueAchievement(aPlayer, "unitool");
- } catch (Exception e) {
- }
- }
+ @Override
+ public int getToolDamagePerContainerCraft() {
+ return 400;
+ }
- @Override
- public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been Choochered by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE);
- }
+ @Override
+ public int getToolDamagePerDropConversion() {
+ return 100;
+ }
@Override
- public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {
- aItem.addItemBehavior(aID, new Behaviour_Choocher());
+ public int getToolDamagePerEntityAttack() {
+ return 100;
+ }
+
+ @Override
+ public boolean isCrowbar() {
+ return false;
}
@Override
public boolean isGrafter() {
return false;
}
+
+ @Override
+ public boolean isMinableBlock(final Block aBlock, final byte aMetaData) {
+ final String tTool = aBlock.getHarvestTool(aMetaData);
+ return tTool != null
+ && (tTool.equals("sword") || tTool.equals("wrench") || tTool.equals("hammer")
+ || tTool.equals("pickaxe"))
+ || aBlock.getMaterial() == Material.rock || aBlock.getMaterial() == Material.glass
+ || aBlock.getMaterial() == Material.piston || aBlock == Blocks.hopper || aBlock == Blocks.dispenser
+ || aBlock == Blocks.dropper || aBlock.getMaterial() == Material.ice
+ || aBlock.getMaterial() == Material.packedIce
+ || GT_Recipe.GT_Recipe_Map.sHammerRecipes.containsInput(new ItemStack(aBlock, 1, aMetaData))
+ || aBlock.getMaterial() == Material.sand || aBlock.getMaterial() == Material.grass
+ || aBlock.getMaterial() == Material.ground || aBlock.getMaterial() == Material.snow
+ || aBlock.getMaterial() == Material.clay || aBlock.getMaterial() == Material.leaves
+ || aBlock.getMaterial() == Material.vine || aBlock.getMaterial() == Material.wood
+ || aBlock.getMaterial() == Material.cactus || aBlock.getMaterial() == Material.circuits
+ || aBlock.getMaterial() == Material.gourd || aBlock.getMaterial() == Material.web
+ || aBlock.getMaterial() == Material.cloth || aBlock.getMaterial() == Material.carpet
+ || aBlock.getMaterial() == Material.plants || aBlock.getMaterial() == Material.cake
+ || aBlock.getMaterial() == Material.tnt || aBlock.getMaterial() == Material.sponge;
+ }
+
+ /*
+ * @Override public void onStatsAddedToTool(Gregtech_MetaTool aItem, int
+ * aID) { aItem.addItemBehavior(aID, new Behaviour_Choocher()); }
+ */
+
+ @Override
+ public boolean isWeapon() {
+ return true;
+ }
+
+ @Override
+ public boolean isWrench() {
+ return true;
+ }
+
+ @Override
+ public void onStatsAddedToTool(final GT_MetaGenerated_Tool aItem, final int aID) {
+ aItem.addItemBehavior(aID, new Behaviour_Choocher());
+ }
+
+ @Override
+ public void onToolCrafted(final ItemStack aStack, final EntityPlayer aPlayer) {
+ super.onToolCrafted(aStack, aPlayer);
+ aPlayer.triggerAchievement(AchievementList.buildSword);
+ try {
+ GT_Mod.achievements.issueAchievement(aPlayer, "tools");
+ GT_Mod.achievements.issueAchievement(aPlayer, "unitool");
+ }
+ catch (final Exception e) {
+ }
+ }
}