diff options
Diffstat (limited to 'src/main')
34 files changed, 2864 insertions, 2650 deletions
diff --git a/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java b/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java index 436c806da2..89230fa4e1 100644 --- a/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java @@ -844,8 +844,8 @@ public class MachineLoader implements Runnable { Machine_Multi_Annihilation.set( new GT_MetaTileEntity_EM_annihilation(15405, "multimachine.em.annihilation", "Annihilation Generator") .getStackForm(1L)); - Machine_Multi_BHG.set( - new GT_MetaTileEntity_EM_bhg(15410, "multimachine.em.blackholegenerator", "Black Hole Generator") + Machine_Multi_EyeOfHarmony.set( + new GT_MetaTileEntity_EM_EyeOfHarmony(15410, "multimachine.em.eye_of_harmony", "Eye of Harmony") .getStackForm(1L)); // =================================================================================================== diff --git a/src/main/java/com/github/technus/tectech/loader/thing/ThingsLoader.java b/src/main/java/com/github/technus/tectech/loader/thing/ThingsLoader.java index bf02479fc2..bb85ccf170 100644 --- a/src/main/java/com/github/technus/tectech/loader/thing/ThingsLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/thing/ThingsLoader.java @@ -9,10 +9,7 @@ import com.github.technus.tectech.compatibility.openmodularturrets.blocks.turret import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.block.QuantumStuffBlock; import com.github.technus.tectech.thing.block.ReactorSimBlock; -import com.github.technus.tectech.thing.casing.GT_Block_CasingsBA0; -import com.github.technus.tectech.thing.casing.GT_Block_CasingsNH; -import com.github.technus.tectech.thing.casing.GT_Block_CasingsTT; -import com.github.technus.tectech.thing.casing.TT_Container_Casings; +import com.github.technus.tectech.thing.casing.*; import com.github.technus.tectech.thing.item.*; import cpw.mods.fml.common.Loader; import gregtech.api.enums.Textures; @@ -37,6 +34,15 @@ public class ThingsLoader implements Runnable { TT_Container_Casings.sBlockCasingsBA0 = new GT_Block_CasingsBA0(); TecTech.LOGGER.info("Nikolai's Casing registered"); + TT_Block_SpacetimeCompressionFieldGenerators.SpacetimeCompressionFieldGenerators = + new SpacetimeCompressionFieldCasing(); + TecTech.LOGGER.info("Spacetime Compression Field Casings registered."); + + TT_Block_TimeAccelerationFieldGenerators.TimeAccelerationFieldGenerator = new TimeAccelerationFieldCasing(); + TecTech.LOGGER.info("Time Acceleration Field Casings registered."); + + TT_Block_StabilisationFieldGenerators.StabilisationFieldGenerators = new StabilisationFieldCasing(); + QuantumGlassBlock.run(); TecTech.LOGGER.info("Quantum Glass registered"); diff --git a/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipe.java b/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipe.java new file mode 100644 index 0000000000..69064a1ee4 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipe.java @@ -0,0 +1,256 @@ +package com.github.technus.tectech.recipe; + +import static com.google.common.math.LongMath.pow; +import static gregtech.api.util.GT_Utility.getPlasmaFuelValueInEUPerLiterFromMaterial; + +import com.github.technus.tectech.util.ItemStackLong; +import gregtech.api.enums.Materials; +import java.util.*; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import org.apache.commons.lang3.tuple.Pair; +import pers.gwyog.gtneioreplugin.util.GT5OreLayerHelper; +import pers.gwyog.gtneioreplugin.util.GT5OreSmallHelper; + +public class EyeOfHarmonyRecipe { + + private final List<ItemStackLong> outputItems; + private final FluidStack[] outputFluids; + + private final long hydrogenRequirement; + private final long heliumRequirement; + + private final long euOutput; + private final long euStartCost; + + private final double baseSuccessChance; + + private final long spacetimeCasingTierRequired; + + private final long miningTimeSeconds; + + private final ItemStack recipeTriggerItem; + + public EyeOfHarmonyRecipe( + GT5OreLayerHelper.NormalOreDimensionWrapper normalOreDimensionWrapper, + GT5OreSmallHelper.SmallOreDimensionWrapper smallOreDimensionWrapper, + double recipeEnergyEfficiency, // E.g. 90% efficient = 0.9 = lose 10% EU from plasma + EU output. + long hydrogenRequirement, + long heliumRequirement, + long miningTimeSeconds, + long spacetimeCasingTierRequired, + Block block, + long euOutput, + double baseSuccessChance) { + + recipeTriggerItem = new ItemStack(block); + + // 6 * 64 = 6 stacks/second for VM tier 3 + Og gas. + ArrayList<Pair<Materials, Long>> materialList = + processDimension(normalOreDimensionWrapper, smallOreDimensionWrapper, miningTimeSeconds, 6 * 64); + + this.outputItems = validDustGenerator(materialList); + this.outputFluids = validPlasmaGenerator(materialList, 0.1); + + this.spacetimeCasingTierRequired = spacetimeCasingTierRequired; + + // 20 ticks, 2^19 (1A UV) eu/t, mining + long euOfVMRunning = miningTimeSeconds * 20 * pow(2, 19); + long euValueOfPlasmas = plasmaCostCalculator(this.outputFluids); + + this.euStartCost = euOfVMRunning + euValueOfPlasmas; + this.euOutput = euOutput; + + this.hydrogenRequirement = hydrogenRequirement; + this.heliumRequirement = heliumRequirement; + + this.baseSuccessChance = baseSuccessChance; + + this.miningTimeSeconds = miningTimeSeconds; + } + + // Return clone of list. + public ArrayList<ItemStackLong> getOutputItems() { + ArrayList<ItemStackLong> copyOutputList = new ArrayList<>(); + for (ItemStackLong itemStackLong : outputItems) { + copyOutputList.add(new ItemStackLong(itemStackLong)); + } + + return copyOutputList; + } + + public FluidStack[] getOutputFluids() { + ArrayList<FluidStack> copyOutputList = new ArrayList<>(); + + for (FluidStack fluidStack : outputFluids) { + copyOutputList.add(fluidStack.copy()); + } + + return copyOutputList.toArray(new FluidStack[0]); + } + + public long getHydrogenRequirement() { + return hydrogenRequirement; + } + + public long getHeliumRequirement() { + return heliumRequirement; + } + + public long getEUOutput() { + return euOutput; + } + + public long getEUStartCost() { + return euStartCost; + } + + public long getRecipeTimeInTicks() { + return miningTimeSeconds * 20; + } + + public double getBaseRecipeSuccessChance() { + return baseSuccessChance; + } + + public long getSpacetimeCasingTierRequired() { + return spacetimeCasingTierRequired; + } + + public ItemStack getRecipeTriggerItem() { + return recipeTriggerItem; + } + + static final double primaryMultiplier = (0.1 + 1.0 / 9.0); // Byproduct from macerating/washing chance. + static final double secondaryMultiplier = (1.0 / 9.0); // Thermal centrifuge byproduct chance. + static final double tertiaryMultiplier = (0.1); // Macerating thermal centrifuged byproduct chance. + static final double quaternaryMultiplier = (0.7); // Mercury/chem bath processing chance. + + static final double[] oreMultiplier = { + primaryMultiplier, secondaryMultiplier, tertiaryMultiplier, quaternaryMultiplier + }; + + private static class HashMapHelper extends HashMap<Materials, Double> { + + void add(Materials material, double value) { + + // If key already exists. + if (this.containsKey(material)) { + this.put(material, value + this.get(material)); + return; + } + + // Otherwise, add value to hashmap entry. + this.put(material, value); + } + } + + static void processHelper(HashMapHelper outputMap, Materials material, double mainMultiplier, double probability) { + outputMap.add(material.mDirectSmelting, (material.mOreMultiplier * 2) * mainMultiplier * probability); + + int index = 0; + for (Materials byProductMaterial : material.mOreByProducts) { + outputMap.add( + byProductMaterial.mDirectSmelting, mainMultiplier * (oreMultiplier[index++] * 2) * probability); + } + } + + static ArrayList<Pair<Materials, Long>> processDimension( + GT5OreLayerHelper.NormalOreDimensionWrapper normalOreDimWrapper, + GT5OreSmallHelper.SmallOreDimensionWrapper smallOreDimWrapper, + long timeInSeconds, + long miningMultiplier) { + HashMapHelper outputMap = new HashMapHelper(); + + double mainMultiplier = timeInSeconds * miningMultiplier; + + normalOreDimWrapper.oreVeinToProbabilityInDimension.forEach((veinInfo, probability) -> { + processHelper(outputMap, veinInfo.mPrimaryVeinMaterial, mainMultiplier, probability); + processHelper(outputMap, veinInfo.mSecondaryMaterial, mainMultiplier, probability); + // 8.0 to replicate void miner getDropsVanillaVeins method yields. + processHelper(outputMap, veinInfo.mBetweenMaterial, mainMultiplier / 8.0, probability); + processHelper(outputMap, veinInfo.mSporadicMaterial, mainMultiplier / 8.0, probability); + }); + + // Iterate over small ores in dimension and add them, kinda hacky but works and is close enough. + smallOreDimWrapper.oreVeinToProbabilityInDimension.forEach((veinInfo, probability) -> { + processHelper(outputMap, veinInfo.getOreMaterial(), mainMultiplier, probability); + }); + + ArrayList<Pair<Materials, Long>> outputList = new ArrayList<>(); + + outputMap.forEach((material, quantity) -> outputList.add(Pair.of(material, (long) Math.floor(quantity)))); + + return outputList; + } + + static FluidStack[] validPlasmaGenerator( + final List<Pair<Materials, Long>> planetList, final double percentageOfPlasma) { + + List<FluidStack> plasmaList = new ArrayList<>(); + + for (Pair<Materials, Long> pair : planetList) { + if (validPlasmas.contains(pair.getLeft())) { + plasmaList.add(pair.getLeft().getPlasma((int) (pair.getRight() * percentageOfPlasma))); + } + } + return plasmaList.toArray(new FluidStack[0]); + } + + static ArrayList<ItemStackLong> validDustGenerator(final ArrayList<Pair<Materials, Long>> planetList) { + + ArrayList<ItemStackLong> dustList = new ArrayList<>(); + + for (Pair<Materials, Long> pair : planetList) { + ItemStack dust = pair.getLeft().getDust(1); + if (dust != null) { + dustList.add(new ItemStackLong(dust, pair.getRight())); + } + } + return dustList; + } + + static long plasmaCostCalculator(FluidStack[] plasmas) { + long total = 0; + + for (FluidStack plasma : plasmas) { + total += (plasmaEnergyMap.get(plasma.getFluid()) * plasma.amount); + } + + return (long) (total * getMaxPlasmaTurbineEfficiency()); + } + + public static double getMaxPlasmaTurbineEfficiency() { + // I hate Shirabon. + return 3.85; + } + + static final List<Materials> validPlasmas = Stream.of( + Materials.Helium, + Materials.Boron, + Materials.Nitrogen, + Materials.Oxygen, + Materials.Sulfur, + Materials.Calcium, + Materials.Titanium, + Materials.Iron, + Materials.Nickel, + Materials.Zinc, + Materials.Silver, + Materials.Tin, + Materials.Bismuth, + Materials.Americium, + Materials.Niobium) + .collect(Collectors.toList()); + + static HashMap<Fluid, Long> plasmaEnergyMap = new HashMap<Fluid, Long>() { + { + validPlasmas.forEach((material -> put( + material.getPlasma(1).getFluid(), (long) getPlasmaFuelValueInEUPerLiterFromMaterial(material)))); + } + }; +} diff --git a/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipeStorage.java b/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipeStorage.java new file mode 100644 index 0000000000..781d5e5f8d --- /dev/null +++ b/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipeStorage.java @@ -0,0 +1,105 @@ +package com.github.technus.tectech.recipe; + +import static com.github.technus.tectech.recipe.TT_recipe.GT_Recipe_MapTT.sEyeofHarmonyRecipes; + +import com.github.technus.tectech.util.ItemStackLong; +import com.google.common.math.LongMath; +import java.util.ArrayList; +import java.util.HashMap; +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import pers.gwyog.gtneioreplugin.plugin.block.BlockDimensionDisplay; +import pers.gwyog.gtneioreplugin.plugin.block.ModBlocks; +import pers.gwyog.gtneioreplugin.util.DimensionHelper; +import pers.gwyog.gtneioreplugin.util.GT5OreLayerHelper; +import pers.gwyog.gtneioreplugin.util.GT5OreSmallHelper; + +public class EyeOfHarmonyRecipeStorage { + + private static final long BILLION = LongMath.pow(10, 9); + + // Map is unique so this is fine. + HashMap<Block, String> blocksMapInverted = new HashMap<Block, String>() { + { + ModBlocks.blocks.forEach((dimString, dimBlock) -> { + put(dimBlock, dimString); + }); + } + }; + + private final HashMap<String, EyeOfHarmonyRecipe> recipeHashMap = new HashMap<String, EyeOfHarmonyRecipe>() { + { + for (String dimAbbreviation : DimensionHelper.DimNameDisplayed) { + BlockDimensionDisplay blockDimensionDisplay = + (BlockDimensionDisplay) ModBlocks.blocks.get(dimAbbreviation); + + try { + put( + dimAbbreviation, + new EyeOfHarmonyRecipe( + GT5OreLayerHelper.dimToOreWrapper.get(dimAbbreviation), + GT5OreSmallHelper.dimToSmallOreWrapper.get(dimAbbreviation), + 0.5 + blockDimensionDisplay.getDimensionRocketTier() / 10.0, + 100, + 100, // todo: DEBUG ONLY + + // BILLION * + // (blockDimensionDisplay.getDimensionRocketTier() + 1), + // BILLION * + // (blockDimensionDisplay.getDimensionRocketTier() + 1), + // 36_000L, + 2000L, // todo: debug only + blockDimensionDisplay.getDimensionRocketTier(), + blockDimensionDisplay, + 0, + 1.0 - blockDimensionDisplay.getDimensionRocketTier() / 10.0)); + } catch (Exception e) { + e.printStackTrace(); + System.out.println( + dimAbbreviation + " dimension not found in dimToOreWrapper. Report error to GTNH team."); + } + } + } + }; + + public EyeOfHarmonyRecipe recipeLookUp(ItemStack aStack) { + String dimAbbreviation = blocksMapInverted.get(Block.getBlockFromItem(aStack.getItem())); + return recipeHashMap.get(dimAbbreviation); + } + + public EyeOfHarmonyRecipeStorage() { + + for (EyeOfHarmonyRecipe recipe : recipeHashMap.values()) { + + // todo sort items by fake long stack size. + ArrayList<ItemStack> outputItems = new ArrayList<>(); + for (ItemStackLong itemStackLong : recipe.getOutputItems()) { + outputItems.add(itemStackLong.itemStack); + } + + // GT_Recipe addRecipe( + // boolean aOptimize, + // ItemStack[] aInputs, + // ItemStack[] aOutputs, + // Object aSpecial, + // int[] aOutputChances, + // FluidStack[] aFluidInputs, + // FluidStack[] aFluidOutputs, + // int aDuration, + // int aEUt, + // int aSpecialValue) { + + sEyeofHarmonyRecipes.addRecipe( + false, + new ItemStack[] {recipe.getRecipeTriggerItem()}, + outputItems.toArray(new ItemStack[0]), + recipe, + null, + null, + recipe.getOutputFluids(), + (int) recipe.getRecipeTimeInTicks(), + 0, + 0); + } + } +} diff --git a/src/main/java/com/github/technus/tectech/recipe/TT_recipe.java b/src/main/java/com/github/technus/tectech/recipe/TT_recipe.java index 1de1648406..a0d08c6412 100644 --- a/src/main/java/com/github/technus/tectech/recipe/TT_recipe.java +++ b/src/main/java/com/github/technus/tectech/recipe/TT_recipe.java @@ -1,11 +1,16 @@ package com.github.technus.tectech.recipe; +import static gregtech.api.enums.GT_Values.E; +import static gregtech.api.enums.GT_Values.RES_PATH_GUI; + import com.github.technus.tectech.mechanics.elementalMatter.core.definitions.IEMDefinition; import com.github.technus.tectech.mechanics.elementalMatter.core.maps.EMConstantStackMap; import com.github.technus.tectech.mechanics.elementalMatter.core.maps.EMInstanceStackMap; import com.github.technus.tectech.mechanics.elementalMatter.core.maps.IEMMapRead; import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.IEMStack; +import com.gtnewhorizons.modularui.common.widget.ProgressBar; import cpw.mods.fml.common.registry.GameRegistry; +import gregtech.api.gui.modularui.GT_UITextures; import gregtech.api.util.GT_Recipe; import java.util.ArrayList; import java.util.Collection; @@ -238,6 +243,28 @@ public class TT_recipe extends GT_Recipe { } public static class GT_Recipe_MapTT extends GT_Recipe.GT_Recipe_Map { + + public static final GT_Recipe_Map sEyeofHarmonyRecipes = new GT_Recipe_Map( + new HashSet<>(250), + "gt.recipe.eyeofharmony", + "Eye of Harmony", + null, + RES_PATH_GUI + "basicmachines/Extractor", + 1, + 1, + 1, + 0, + 1, + E, + 1, + E, + true, + true) + .setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_CENTRIFUGE) + .setProgressBar(GT_UITextures.PROGRESSBAR_EXTRACT, ProgressBar.Direction.RIGHT) + .setSlotOverlaySteam(false, GT_UITextures.OVERLAY_SLOT_CENTRIFUGE_STEAM) + .setProgressBarSteam(GT_UITextures.PROGRESSBAR_EXTRACT_STEAM); + public static GT_Recipe_MapTT sResearchableFakeRecipes = new GT_Recipe_MapTT( new HashSet<>(32), "gt.recipe.researchStation", diff --git a/src/main/java/com/github/technus/tectech/recipe/TT_recipeAdder.java b/src/main/java/com/github/technus/tectech/recipe/TT_recipeAdder.java index 8cd1b49ddd..559231f846 100644 --- a/src/main/java/com/github/technus/tectech/recipe/TT_recipeAdder.java +++ b/src/main/java/com/github/technus/tectech/recipe/TT_recipeAdder.java @@ -237,13 +237,6 @@ public class TT_recipeAdder extends GT_RecipeAdder { return true; } - /* - (boolean aOptimize, - ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecialItems, int[] aChances, - FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue, - cElementalDefinitionStackMap[] in, cElementalDefinitionStackMap[] out, cElementalDefinitionStackMap[] catalyst, IAdditionalCheck check) - */ - public static boolean addResearchableEMmachineRecipe( ItemStack aResearchItem, int totalComputationRequired, diff --git a/src/main/java/com/github/technus/tectech/thing/CustomItemList.java b/src/main/java/com/github/technus/tectech/thing/CustomItemList.java index d75cbadea3..effb946ba1 100644 --- a/src/main/java/com/github/technus/tectech/thing/CustomItemList.java +++ b/src/main/java/com/github/technus/tectech/thing/CustomItemList.java @@ -331,7 +331,7 @@ public enum CustomItemList implements IItemContainer { Machine_Multi_EMCrafter, Machine_Multi_Wormhole, Machine_Multi_Annihilation, - Machine_Multi_BHG, + Machine_Multi_EyeOfHarmony, hint_0, hint_1, hint_2, @@ -391,7 +391,37 @@ public enum CustomItemList implements IItemContainer { Machine_TeslaCoil_4by4_IV, DATApipeBlock, EMpipeBlock, - LASERpipeBlock; + LASERpipeBlock, + + SpacetimeCompressionFieldGeneratorTier0, + SpacetimeCompressionFieldGeneratorTier1, + SpacetimeCompressionFieldGeneratorTier2, + SpacetimeCompressionFieldGeneratorTier3, + SpacetimeCompressionFieldGeneratorTier4, + SpacetimeCompressionFieldGeneratorTier5, + SpacetimeCompressionFieldGeneratorTier6, + SpacetimeCompressionFieldGeneratorTier7, + SpacetimeCompressionFieldGeneratorTier8, + + TimeAccelerationFieldGeneratorTier0, + TimeAccelerationFieldGeneratorTier1, + TimeAccelerationFieldGeneratorTier2, + TimeAccelerationFieldGeneratorTier3, + TimeAccelerationFieldGeneratorTier4, + TimeAccelerationFieldGeneratorTier5, + TimeAccelerationFieldGeneratorTier6, + TimeAccelerationFieldGeneratorTier7, + TimeAccelerationFieldGeneratorTier8, + + StabilisationFieldGeneratorTier0, + StabilisationFieldGeneratorTier1, + StabilisationFieldGeneratorTier2, + StabilisationFieldGeneratorTier3, + StabilisationFieldGeneratorTier4, + StabilisationFieldGeneratorTier5, + StabilisationFieldGeneratorTier6, + StabilisationFieldGeneratorTier7, + StabilisationFieldGeneratorTier8; private ItemStack mStack; private boolean mHasNotBeenSet = true; diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsBA0.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsBA0.java index 748626fd2e..a2b61b08bd 100644 --- a/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsBA0.java +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsBA0.java @@ -1,6 +1,7 @@ package com.github.technus.tectech.thing.casing; import static com.github.technus.tectech.util.CommonValues.*; +import static gregtech.api.util.GT_Utility.formatNumbers; import static net.minecraft.util.StatCollector.translateToLocal; import gregtech.common.blocks.GT_Item_Casings_Abstract; @@ -18,7 +19,7 @@ public class GT_Item_CasingsBA0 extends GT_Item_Casings_Abstract { @Override public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { if (aStack.getItemDamage() < 15) { - aList.add(BASS_MARK); + aList.add(THETA_MOVEMENT); } else { aList.add(COSMIC_MARK); } @@ -29,8 +30,8 @@ public class GT_Item_CasingsBA0 extends GT_Item_Casings_Abstract { case 3: // "EV Superconductor Primary Tesla Windings" case 4: // "IV Superconductor Primary Tesla Windings" case 5: // "LuV Superconductor Primary Tesla Windings" - aList.add(translateToLocal("gt.blockcasingsBA0.0.desc.0") + " " + V[aStack.getItemDamage() + 1] - + " EU/t"); // Handles up to + aList.add(translateToLocal("gt.blockcasingsBA0.0.desc.0") + " " + + formatNumbers(V[aStack.getItemDamage() + 1]) + " EU/t"); // Handles up to aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockcasingsBA0.0.desc.1")); // What one man calls God, another calls the @@ -55,7 +56,8 @@ public class GT_Item_CasingsBA0 extends GT_Item_Casings_Abstract { + translateToLocal("gt.blockcasingsBA0.8.desc.1")); // Who wouldn't want a 32k epoxy multi? break; case 9: // "ZPM Superconductor Primary Tesla Windings" - aList.add(translateToLocal("gt.blockcasingsBA0.0.desc.0") + " " + V[7] + " EU/t"); // Handles up to + aList.add(translateToLocal("gt.blockcasingsBA0.0.desc.0") + " " + formatNumbers(V[7]) + + " EU/t"); // Handles up to aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockcasingsBA0.0.desc.1")); // What one man calls God, another calls the diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_Casings_Spacetime.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_Casings_Spacetime.java new file mode 100644 index 0000000000..dd7c6e5469 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_Casings_Spacetime.java @@ -0,0 +1,41 @@ +package com.github.technus.tectech.thing.casing; + +import static com.google.common.math.LongMath.pow; +import static gregtech.api.enums.GT_Values.AuthorColen; +import static gregtech.api.util.GT_Utility.formatNumbers; + +import gregtech.common.blocks.GT_Item_Casings_Abstract; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +public class GT_Item_Casings_Spacetime extends GT_Item_Casings_Abstract { + public GT_Item_Casings_Spacetime(Block par1) { + super(par1); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + switch (aStack.getItemDamage()) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + aList.add("Supports an internal spacetime volume of up to " + + formatNumbers(pow(10, 5 + aStack.getItemDamage())) + "km³."); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + + "Capable of running recipes up to tier " + aStack.getItemDamage()); + break; + default: + aList.add(EnumChatFormatting.RED.toString() + EnumChatFormatting.BOLD + "Error, report to GTNH team"); + } + aList.add(AuthorColen); + } +} diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_Casings_Stabilisation.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_Casings_Stabilisation.java new file mode 100644 index 0000000000..2a97851788 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_Casings_Stabilisation.java @@ -0,0 +1,37 @@ +package com.github.technus.tectech.thing.casing; + +import static gregtech.api.enums.GT_Values.AuthorColen; + +import gregtech.common.blocks.GT_Item_Casings_Abstract; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +public class GT_Item_Casings_Stabilisation extends GT_Item_Casings_Abstract { + public GT_Item_Casings_Stabilisation(Block par1) { + super(par1); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + switch (aStack.getItemDamage()) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + + "Increases stability of spacetime field."); + break; + default: + aList.add(EnumChatFormatting.RED.toString() + EnumChatFormatting.BOLD + "Error, report to GTNH team"); + } + aList.add(AuthorColen); + } +} diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_Casings_TimeAcceleration.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_Casings_TimeAcceleration.java new file mode 100644 index 0000000000..69740d0516 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_Casings_TimeAcceleration.java @@ -0,0 +1,36 @@ +package com.github.technus.tectech.thing.casing; + +import static gregtech.api.enums.GT_Values.AuthorColen; + +import gregtech.common.blocks.GT_Item_Casings_Abstract; +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +public class GT_Item_Casings_TimeAcceleration extends GT_Item_Casings_Abstract { + public GT_Item_Casings_TimeAcceleration(Block par1) { + super(par1); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + switch (aStack.getItemDamage()) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Time dilation in a box."); + break; + default: + aList.add(EnumChatFormatting.RED.toString() + EnumChatFormatting.BOLD + "Error, report to GTNH team"); + } + aList.add(AuthorColen); + } +} diff --git a/src/main/java/com/github/technus/tectech/thing/casing/SpacetimeCompressionFieldCasing.java b/src/main/java/com/github/technus/tectech/thing/casing/SpacetimeCompressionFieldCasing.java new file mode 100644 index 0000000000..3ce8c755ed --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/casing/SpacetimeCompressionFieldCasing.java @@ -0,0 +1,101 @@ +package com.github.technus.tectech.thing.casing; + +import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; +import static com.github.technus.tectech.util.CommonValues.EOH_TIER_FANCY_NAMES; + +import com.github.technus.tectech.thing.CustomItemList; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.Textures; +import gregtech.api.objects.GT_CopiedBlockTexture; +import gregtech.api.util.GT_LanguageManager; +import gregtech.common.blocks.GT_Block_Casings_Abstract; +import gregtech.common.blocks.GT_Material_Casings; +import java.util.List; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +@SuppressWarnings("SpellCheckingInspection") +public class SpacetimeCompressionFieldCasing extends GT_Block_Casings_Abstract { + private static IIcon textureTier0; + private static final int maxBlockTier = 9; + + private static final byte START_INDEX = 16; + + public SpacetimeCompressionFieldCasing() { + super( + GT_Item_Casings_Spacetime.class, + "gt.spacetime_compression_field_generator", + GT_Material_Casings.INSTANCE); + for (byte b = 0; b < 16; b = (byte) (b + 1)) { + Textures.BlockIcons.casingTexturePages[texturePage][b + START_INDEX] = + new GT_CopiedBlockTexture(this, 6, b); + } + + for (int i = 0; i < maxBlockTier; i++) { + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + "." + i + ".name", + EOH_TIER_FANCY_NAMES[i] + " Spacetime Compression Field Generator"); + } + + CustomItemList.SpacetimeCompressionFieldGeneratorTier0.set(new ItemStack(this, 1, 0)); + CustomItemList.SpacetimeCompressionFieldGeneratorTier1.set(new ItemStack(this, 1, 1)); + CustomItemList.SpacetimeCompressionFieldGeneratorTier2.set(new ItemStack(this, 1, 2)); + CustomItemList.SpacetimeCompressionFieldGeneratorTier3.set(new ItemStack(this, 1, 3)); + CustomItemList.SpacetimeCompressionFieldGeneratorTier4.set(new ItemStack(this, 1, 4)); + CustomItemList.SpacetimeCompressionFieldGeneratorTier5.set(new ItemStack(this, 1, 5)); + CustomItemList.SpacetimeCompressionFieldGeneratorTier6.set(new ItemStack(this, 1, 6)); + CustomItemList.SpacetimeCompressionFieldGeneratorTier7.set(new ItemStack(this, 1, 7)); + CustomItemList.SpacetimeCompressionFieldGeneratorTier8.set(new ItemStack(this, 1, 8)); + } + + @Override + public void registerBlockIcons(IIconRegister aIconRegister) { + textureTier0 = aIconRegister.registerIcon("gregtech:iconsets/EM_DIM"); + } + + @Override + public IIcon getIcon(int aSide, int aMeta) { + switch (aMeta) { + case 0: + return textureTier0; + case 1: + return textureTier0; + case 2: + return textureTier0; + case 3: + return textureTier0; + case 4: + return textureTier0; + case 5: + return textureTier0; + case 6: + return textureTier0; + case 7: + return textureTier0; + case 8: + return textureTier0; + default: + return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); + } + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, int aSide) { + int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); + return getIcon(aSide, tMeta); + } + + @SuppressWarnings("unchecked") + @Override + public void getSubBlocks(Item aItem, CreativeTabs par2CreativeTabs, List aList) { + for (int i = 0; i < maxBlockTier; i++) { + aList.add(new ItemStack(aItem, 1, i)); + } + } +} diff --git a/src/main/java/com/github/technus/tectech/thing/casing/StabilisationFieldCasing.java b/src/main/java/com/github/technus/tectech/thing/casing/StabilisationFieldCasing.java new file mode 100644 index 0000000000..ec1af39d80 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/casing/StabilisationFieldCasing.java @@ -0,0 +1,98 @@ +package com.github.technus.tectech.thing.casing; + +import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; +import static com.github.technus.tectech.util.CommonValues.EOH_TIER_FANCY_NAMES; + +import com.github.technus.tectech.thing.CustomItemList; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.Textures; +import gregtech.api.objects.GT_CopiedBlockTexture; +import gregtech.api.util.GT_LanguageManager; +import gregtech.common.blocks.GT_Block_Casings_Abstract; +import gregtech.common.blocks.GT_Material_Casings; +import java.util.List; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +@SuppressWarnings("SpellCheckingInspection") +public class StabilisationFieldCasing extends GT_Block_Casings_Abstract { + private static IIcon textureTier0; + private static final int maxBlockTier = 9; + + private static final byte START_INDEX = 16; + + public StabilisationFieldCasing() { + super(GT_Item_Casings_Stabilisation.class, "gt.stabilisation_field_generator", GT_Material_Casings.INSTANCE); + for (byte b = 0; b < 16; b = (byte) (b + 1)) { + Textures.BlockIcons.casingTexturePages[texturePage][b + START_INDEX] = + new GT_CopiedBlockTexture(this, 6, b); + } + + for (int i = 0; i < maxBlockTier; i++) { + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + "." + i + ".name", + EOH_TIER_FANCY_NAMES[i] + " Stabilisation Field Generator"); + } + + CustomItemList.StabilisationFieldGeneratorTier0.set(new ItemStack(this, 1, 0)); + CustomItemList.StabilisationFieldGeneratorTier1.set(new ItemStack(this, 1, 1)); + CustomItemList.StabilisationFieldGeneratorTier2.set(new ItemStack(this, 1, 2)); + CustomItemList.StabilisationFieldGeneratorTier3.set(new ItemStack(this, 1, 3)); + CustomItemList.StabilisationFieldGeneratorTier4.set(new ItemStack(this, 1, 4)); + CustomItemList.StabilisationFieldGeneratorTier5.set(new ItemStack(this, 1, 5)); + CustomItemList.StabilisationFieldGeneratorTier6.set(new ItemStack(this, 1, 6)); + CustomItemList.StabilisationFieldGeneratorTier7.set(new ItemStack(this, 1, 7)); + CustomItemList.StabilisationFieldGeneratorTier8.set(new ItemStack(this, 1, 8)); + } + + @Override + public void registerBlockIcons(IIconRegister aIconRegister) { + textureTier0 = aIconRegister.registerIcon("gregtech:iconsets/EM_TIMESPACE"); + } + + @Override + public IIcon getIcon(int aSide, int aMeta) { + switch (aMeta) { + case 0: + return textureTier0; + case 1: + return textureTier0; + case 2: + return textureTier0; + case 3: + return textureTier0; + case 4: + return textureTier0; + case 5: + return textureTier0; + case 6: + return textureTier0; + case 7: + return textureTier0; + case 8: + return textureTier0; + default: + return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); + } + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, int aSide) { + int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); + return getIcon(aSide, tMeta); + } + + @SuppressWarnings("unchecked") + @Override + public void getSubBlocks(Item aItem, CreativeTabs par2CreativeTabs, List aList) { + for (int i = 0; i < maxBlockTier; i++) { + aList.add(new ItemStack(aItem, 1, i)); + } + } +} diff --git a/src/main/java/com/github/technus/tectech/thing/casing/TT_Block_SpacetimeCompressionFieldGenerators.java b/src/main/java/com/github/technus/tectech/thing/casing/TT_Block_SpacetimeCompressionFieldGenerators.java new file mode 100644 index 0000000000..d2edebf786 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/casing/TT_Block_SpacetimeCompressionFieldGenerators.java @@ -0,0 +1,9 @@ +package com.github.technus.tectech.thing.casing; + +import net.minecraft.block.Block; + +public class TT_Block_SpacetimeCompressionFieldGenerators { + public static Block SpacetimeCompressionFieldGenerators; + + private TT_Block_SpacetimeCompressionFieldGenerators() {} +} diff --git a/src/main/java/com/github/technus/tectech/thing/casing/TT_Block_StabilisationFieldGenerators.java b/src/main/java/com/github/technus/tectech/thing/casing/TT_Block_StabilisationFieldGenerators.java new file mode 100644 index 0000000000..a3561cf082 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/casing/TT_Block_StabilisationFieldGenerators.java @@ -0,0 +1,9 @@ +package com.github.technus.tectech.thing.casing; + +import net.minecraft.block.Block; + +public class TT_Block_StabilisationFieldGenerators { + public static Block StabilisationFieldGenerators; + + private TT_Block_StabilisationFieldGenerators() {} +} diff --git a/src/main/java/com/github/technus/tectech/thing/casing/TT_Block_TimeAccelerationFieldGenerators.java b/src/main/java/com/github/technus/tectech/thing/casing/TT_Block_TimeAccelerationFieldGenerators.java new file mode 100644 index 0000000000..ecb070aa5c --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/casing/TT_Block_TimeAccelerationFieldGenerators.java @@ -0,0 +1,9 @@ +package com.github.technus.tectech.thing.casing; + +import net.minecraft.block.Block; + +public class TT_Block_TimeAccelerationFieldGenerators { + public static Block TimeAccelerationFieldGenerator; + + private TT_Block_TimeAccelerationFieldGenerators() {} +} diff --git a/src/main/java/com/github/technus/tectech/thing/casing/TimeAccelerationFieldCasing.java b/src/main/java/com/github/technus/tectech/thing/casing/TimeAccelerationFieldCasing.java new file mode 100644 index 0000000000..6265084d5d --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/casing/TimeAccelerationFieldCasing.java @@ -0,0 +1,101 @@ +package com.github.technus.tectech.thing.casing; + +import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; +import static com.github.technus.tectech.util.CommonValues.EOH_TIER_FANCY_NAMES; + +import com.github.technus.tectech.thing.CustomItemList; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.Textures; +import gregtech.api.objects.GT_CopiedBlockTexture; +import gregtech.api.util.GT_LanguageManager; +import gregtech.common.blocks.GT_Block_Casings_Abstract; +import gregtech.common.blocks.GT_Material_Casings; +import java.util.List; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +@SuppressWarnings("SpellCheckingInspection") +public class TimeAccelerationFieldCasing extends GT_Block_Casings_Abstract { + private static IIcon textureTier0; + private static final int maxBlockTier = 9; + + private static final byte START_INDEX = 16; + + public TimeAccelerationFieldCasing() { + super( + GT_Item_Casings_TimeAcceleration.class, + "gt.time_acceleration_field_generator", + GT_Material_Casings.INSTANCE); + for (byte b = 0; b < 16; b = (byte) (b + 1)) { + Textures.BlockIcons.casingTexturePages[texturePage][b + START_INDEX] = + new GT_CopiedBlockTexture(this, 6, b); + } + + for (int i = 0; i < maxBlockTier; i++) { + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + "." + i + ".name", + EOH_TIER_FANCY_NAMES[i] + " Time Dilation Field Generator"); + } + + CustomItemList.TimeAccelerationFieldGeneratorTier0.set(new ItemStack(this, 1, 0)); + CustomItemList.TimeAccelerationFieldGeneratorTier1.set(new ItemStack(this, 1, 1)); + CustomItemList.TimeAccelerationFieldGeneratorTier2.set(new ItemStack(this, 1, 2)); + CustomItemList.TimeAccelerationFieldGeneratorTier3.set(new ItemStack(this, 1, 3)); + CustomItemList.TimeAccelerationFieldGeneratorTier4.set(new ItemStack(this, 1, 4)); + CustomItemList.TimeAccelerationFieldGeneratorTier5.set(new ItemStack(this, 1, 5)); + CustomItemList.TimeAccelerationFieldGeneratorTier6.set(new ItemStack(this, 1, 6)); + CustomItemList.TimeAccelerationFieldGeneratorTier7.set(new ItemStack(this, 1, 7)); + CustomItemList.TimeAccelerationFieldGeneratorTier7.set(new ItemStack(this, 1, 8)); + } + + @Override + public void registerBlockIcons(IIconRegister aIconRegister) { + textureTier0 = aIconRegister.registerIcon("gregtech:iconsets/EM_FIELD"); + } + + @Override + public IIcon getIcon(int aSide, int aMeta) { + switch (aMeta) { + case 0: + return textureTier0; + case 1: + return textureTier0; + case 2: + return textureTier0; + case 3: + return textureTier0; + case 4: + return textureTier0; + case 5: + return textureTier0; + case 6: + return textureTier0; + case 7: + return textureTier0; + case 8: + return textureTier0; + default: + return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); + } + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, int aSide) { + int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); + return getIcon(aSide, tMeta); + } + + @SuppressWarnings("unchecked") + @Override + public void getSubBlocks(Item aItem, CreativeTabs par2CreativeTabs, List aList) { + for (int i = 0; i < maxBlockTier; i++) { + aList.add(new ItemStack(aItem, 1, i)); + } + } +} diff --git a/src/main/java/com/github/technus/tectech/thing/item/EnderFluidLinkCover.java b/src/main/java/com/github/technus/tectech/thing/item/EnderFluidLinkCover.java index 43fae5565b..666888d85e 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/EnderFluidLinkCover.java +++ b/src/main/java/com/github/technus/tectech/thing/item/EnderFluidLinkCover.java @@ -26,7 +26,7 @@ public final class EnderFluidLinkCover extends Item { @Override public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) { - aList.add(CommonValues.BASS_MARK); + aList.add(CommonValues.THETA_MOVEMENT); aList.add(translateToLocal("item.tm.enderfluidlinkcover.desc.0")); // Ender-Fluid-Enables Machines! aList.add(EnumChatFormatting.BLUE + translateToLocal( diff --git a/src/main/java/com/github/technus/tectech/thing/item/ParametrizerMemoryCard.java b/src/main/java/com/github/technus/tectech/thing/item/ParametrizerMemoryCard.java index 666a3c4c47..df43c23a2a 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/ParametrizerMemoryCard.java +++ b/src/main/java/com/github/technus/tectech/thing/item/ParametrizerMemoryCard.java @@ -138,7 +138,7 @@ public final class ParametrizerMemoryCard extends Item { @Override public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) { NBTTagCompound tNBT = aStack.getTagCompound(); - aList.add(CommonValues.BASS_MARK); + aList.add(CommonValues.THETA_MOVEMENT); aList.add(translateToLocal("item.em.parametrizerMemoryCard.desc.0")); // Stores Parameters if (aStack.getItemDamage() == 1) { diff --git a/src/main/java/com/github/technus/tectech/thing/item/PowerPassUpgradeCover.java b/src/main/java/com/github/technus/tectech/thing/item/PowerPassUpgradeCover.java index b58d198e38..cd1f651661 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/PowerPassUpgradeCover.java +++ b/src/main/java/com/github/technus/tectech/thing/item/PowerPassUpgradeCover.java @@ -26,7 +26,7 @@ public final class PowerPassUpgradeCover extends Item { @Override public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) { - aList.add(CommonValues.BASS_MARK); + aList.add(CommonValues.THETA_MOVEMENT); aList.add(translateToLocal( "item.tm.powerpassupgradecover.desc.0")); // Add power pass functionality to TecTech Multiblocks aList.add(EnumChatFormatting.BLUE diff --git a/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCapacitor.java b/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCapacitor.java index 9b847b98d6..0070a965a4 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCapacitor.java +++ b/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCapacitor.java @@ -30,7 +30,7 @@ public final class TeslaCoilCapacitor extends Item { @Override public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) { - aList.add(CommonValues.BASS_MARK); + aList.add(CommonValues.THETA_MOVEMENT); if (aStack.getItemDamage() >= 0 && aStack.getItemDamage() <= 6) { aList.add(translateToLocal("item.tm.teslaCoilCapacitor.desc.0") + " " + V[aStack.getItemDamage() + 1] * 512 + " " + translateToLocal("item.tm.teslaCoilCapacitor.desc.1") + " " + V[aStack.getItemDamage() + 1] diff --git a/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilComponent.java b/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilComponent.java index 769ee589b9..8f636b5c5e 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilComponent.java +++ b/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilComponent.java @@ -29,7 +29,7 @@ public final class TeslaCoilComponent extends Item { @Override public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) { - aList.add(CommonValues.BASS_MARK); + aList.add(CommonValues.THETA_MOVEMENT); aList.add(EnumChatFormatting.BLUE + translateToLocal("item.tm.itemTeslaComponent.desc")); // Tesla bois need these! } diff --git a/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCover.java b/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCover.java index b8997f82cd..8bb9b19816 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCover.java +++ b/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCover.java @@ -29,7 +29,7 @@ public final class TeslaCoilCover extends Item { @Override public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) { - aList.add(CommonValues.BASS_MARK); + aList.add(CommonValues.THETA_MOVEMENT); switch (aStack.getItemDamage()) { case 0: aList.add(translateToLocal("item.tm.teslaCover.desc.0")); // Tesla-Enables Machines! diff --git a/src/main/java/com/github/technus/tectech/thing/item/TeslaStaff.java b/src/main/java/com/github/technus/tectech/thing/item/TeslaStaff.java index 3346d57504..e2a6fade93 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/TeslaStaff.java +++ b/src/main/java/com/github/technus/tectech/thing/item/TeslaStaff.java @@ -25,7 +25,7 @@ public final class TeslaStaff extends Item { @Override public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) { - aList.add(CommonValues.BASS_MARK); + aList.add(CommonValues.THETA_MOVEMENT); aList.add(translateToLocal("item.tm.teslaStaff.desc")); } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Capacitor.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Capacitor.java index 041e60eefe..37d08728e1 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Capacitor.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Capacitor.java @@ -119,7 +119,7 @@ public class GT_MetaTileEntity_Hatch_Capacitor extends GT_MetaTileEntity_Hatch i @Override public String[] getDescription() { return new String[] { - CommonValues.BASS_MARK, + CommonValues.THETA_MOVEMENT, translateToLocal("gt.blockmachines.hatch.capacitor.desc.0"), // For Tesla Tower EnumChatFormatting.AQUA + translateToLocal("gt.blockmachines.hatch.capacitor.desc.1") // Stores 'nergy! (for a while) diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_CreativeMaintenance.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_CreativeMaintenance.java index 5e946e2223..b838aa470f 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_CreativeMaintenance.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_CreativeMaintenance.java @@ -33,7 +33,7 @@ public class GT_MetaTileEntity_Hatch_CreativeMaintenance extends GT_MetaTileEnti @Override public String[] getDescription() { return new String[] { - CommonValues.BASS_MARK, + CommonValues.THETA_MOVEMENT, translateToLocal( "gt.blockmachines.debug.tt.maintenance.desc.0"), // For automatically maintaining Multiblocks translateToLocal("gt.blockmachines.debug.tt.maintenance.desc.1"), // Does fix everything but itself. diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_EyeOfHarmony.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_EyeOfHarmony.java new file mode 100644 index 0000000000..74650c1930 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_EyeOfHarmony.java @@ -0,0 +1,1944 @@ +package com.github.technus.tectech.thing.metaTileEntity.multi; + +import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; +import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; +import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static gregtech.api.enums.GT_Values.AuthorColen; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; +import static java.lang.Math.*; +import static net.minecraft.util.EnumChatFormatting.*; + +import com.github.technus.tectech.recipe.EyeOfHarmonyRecipe; +import com.github.technus.tectech.recipe.EyeOfHarmonyRecipeStorage; +import com.github.technus.tectech.thing.casing.TT_Block_SpacetimeCompressionFieldGenerators; +import com.github.technus.tectech.thing.casing.TT_Block_StabilisationFieldGenerators; +import com.github.technus.tectech.thing.casing.TT_Block_TimeAccelerationFieldGenerators; +import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; +import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; +import com.github.technus.tectech.util.CommonValues; +import com.github.technus.tectech.util.ItemStackLong; +import com.google.common.collect.ImmutableList; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.Materials; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IGlobalWirelessEnergy; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Utility; +import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_OutputBus_ME; +import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_Output_ME; +import java.util.*; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.fluids.FluidStack; +import org.apache.commons.lang3.tuple.Pair; + +@SuppressWarnings("SpellCheckingInspection") +public class GT_MetaTileEntity_EM_EyeOfHarmony extends GT_MetaTileEntity_MultiblockBase_EM + implements IConstructable, IGlobalWirelessEnergy { + // Region variables. + private static Textures.BlockIcons.CustomIcon ScreenOFF; + private static Textures.BlockIcons.CustomIcon ScreenON; + + private static EyeOfHarmonyRecipeStorage recipes; + + private int spacetimeCompressionFieldMetadata = -1; + private int timeAccelerationFieldMetadata = -1; + private int stabilisationFieldMetadata = -1; + + private static final double spacetimeCasingDifferenceDiscountPercentage = 0.03; + + private String userUUID = ""; + private String userName = ""; + private long euOutput = 0; + + private final Stack<Long> computationStack = new Stack<>(); + + // Multiblock structure. + private static final IStructureDefinition<GT_MetaTileEntity_EM_EyeOfHarmony> STRUCTURE_DEFINITION = + IStructureDefinition.<GT_MetaTileEntity_EM_EyeOfHarmony>builder() + .addShape("main", transpose(new String[][] { + { + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " C C ", + " C C ", + " C C ", + " CCCCCCCCC ", + " C C ", + " CCCCCCCCC ", + " C C ", + " C C ", + " C C ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " " + }, + { + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " C C ", + " C C ", + " C C ", + " C C ", + " DDDDD ", + " DDCDCDD ", + " CCCCDCCDCCDCCCC ", + " DDDDDDD ", + " CCCCDCCDCCDCCCC ", + " DDCDCDD ", + " DDDDD ", + " C C ", + " C C ", + " C C ", + " C C ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " " + }, + { + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " C C ", + " C C ", + " C C ", + " D ", + " D ", + " DDDDDDD ", + " DD DD ", + " D EEE D ", + " CCC D EAAAE D CCC ", + " DDD EAAAE DDD ", + " CCC D EAAAE D CCC ", + " D EEE D ", + " DD DD ", + " DDDDDDD ", + " D ", + " D ", + " C C ", + " C C ", + " C C ", + " ", + " ", + " ", + " ", + " ", + " ", + " " + }, + { + " ", + " ", + " ", + " ", + " ", + " ", + " C C ", + " C C ", + " D ", + " D ", + " ", + " ", + " ", + " ", + " ", + " CC CC ", + " DD DD ", + " CC CC ", + " ", + " ", + " ", + " ", + " ", + " D ", + " D ", + " C C ", + " C C ", + " ", + " ", + " ", + " ", + " ", + " " + }, + { + " ", + " ", + " ", + " ", + " ", + " C C ", + " CCCCC ", + " D ", + " A ", + " A ", + " ", + " ", + " ", + " ", + " C C ", + " CC CC ", + " CDAA AADC ", + " CC CC ", + " C C ", + " ", + " ", + " ", + " ", + " A ", + " A ", + " D ", + " CCCCC ", + " C C ", + " ", + " ", + " ", + " ", + " " + }, + { + " ", + " ", + " ", + " ", + " C C ", + " C C ", + " D ", + " SEEAEES ", + " ", + " ", + " ", + " ", + " ", + " S S ", + " E E ", + " CC E E CC ", + " DA AD ", + " CC E E CC ", + " E E ", + " S S ", + " ", + " ", + " ", + " ", + " ", + " SEEAEES ", + " D ", + " C C ", + " C C ", + " ", + " ", + " ", + " " + }, + { + " ", + " ", + " ", + " C C ", + " CCCCC ", + " D ", + " A ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " C C ", + " CC CC ", + " CDA ADC ", + " CC CC ", + " C C ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " A ", + " D ", + " CCCCC ", + " C C ", + " ", + " ", + " " + }, + { + " ", + " ", + " C C ", + " C C ", + " D ", + " SEEAEES ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " S S ", + " E E ", + " CC E E CC ", + " DA AD ", + " CC E E CC ", + " E E ", + " S S ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " SEEAEES ", + " D ", + " C C ", + " C C ", + " ", + " " + }, + { + " ", + " ", + " C C ", + " D ", + " A ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " C C ", + " DA AD ", + " C C ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " A ", + " D ", + " C C ", + " ", + " " + }, + { + " ", + " C C ", + " C C ", + " D ", + " A ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " CC CC ", + " DA AD ", + " CC CC ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " A ", + " D ", + " C C ", + " C C ", + " " + }, + { + " ", + " C C ", + " D ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " C C ", + " D D ", + " C C ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " D ", + " C C ", + " " + }, + { + " ", + " C C ", + " D ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " C C ", + " D D ", + " C C ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " D ", + " C C ", + " " + }, + { + " CCCCCCC ", + " C C ", + " DDDDDDD ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " D D ", + " D D ", + "CCD DCC", + " D D ", + "CCD DCC", + " D D ", + " D D ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " DDDDDDD ", + " C C ", + " C C " + }, + { + " CCHHHHHCC ", + " DDDDD ", + " DD DD ", + " ", + " ", + " S S ", + " ", + " S S ", + " ", + " ", + " ", + " ", + " D D ", + " D D ", + " D D ", + "CD DC", + " D D ", + "CD DC", + " D D ", + " D D ", + " D D ", + " ", + " ", + " ", + " ", + " S S ", + " ", + " S S ", + " ", + " ", + " DD DD ", + " DDDDD ", + " C C " + }, + { + " CHHHHHHHC ", + " DDCDCDD ", + " D EEE D ", + " ", + " C C ", + " E E ", + " C C ", + " E E ", + " ", + " ", + " ", + " ", + " D D ", + " D D ", + " D D ", + "CCE ECC", + " DE ED ", + "CCE ECC", + " D D ", + " D D ", + " D D ", + " ", + " ", + " ", + " ", + " E E ", + " C C ", + " E E ", + " C C ", + " ", + " D EEE D ", + " DDCDCDD ", + " C C " + }, + { + " CHHFFFHHC ", + " CCCCDCCDCCDCCCC ", + " CCC D EAAAE D CCC ", + " CC CC ", + " CC CC ", + " CC E E CC ", + " CC CC ", + " CC E E CC ", + " C C ", + " CC CC ", + " C C ", + " C C ", + "CCD DCC", + "CD DC", + "CCE ECC", + "CCA ACC", + "CDA ADC", + "CCA ACC", + "CCE ECC", + "CD DC", + "CCD DCC", + " C C ", + " C C ", + " CC CC ", + " C C ", + " CC E E CC ", + " CC CC ", + " CC E E CC ", + " CC CC ", + " CC CC ", + " CCC D EAAAE D CCC ", + " CCCCDCCDCCDCCCC ", + " CCCCCCCCC " + }, + { + " CHHF~FHHC ", + " DDDDDDD ", + " DDD EAAAE DDD ", + " DD DD ", + " CDAA AADC ", + " DA AD ", + " CDA ADC ", + " DA AD ", + " DA AD ", + " DA AD ", + " D D ", + " D D ", + " D D ", + " D D ", + " DE ED ", + "CDA ADC", + " DA AD ", + "CDA ADC", + " DE ED ", + " D D ", + " D D ", + " D D ", + " D D ", + " DA AD ", + " DA AD ", + " DA AD ", + " CDA ADC ", + " DA AD ", + " CDAA AADC ", + " DD DD ", + " DDD EAAAE DDD ", + " DDDDDDD ", + " C C " + }, + { + " CHHFFFHHC ", + " CCCCDCCDCCDCCCC ", + " CCC D EAAAE D CCC ", + " CC CC ", + " CC CC ", + " CC E E CC ", + " CC CC ", + " CC E E CC ", + " C C ", + " CC CC ", + " C C ", + " C C ", + "CCD DCC", + "CD DC", + "CCE ECC", + "CCA ACC", + "CDA ADC", + "CCA ACC", + "CCE ECC", + "CD DC", + "CCD DCC", + " C C ", + " C C ", + " CC CC ", + " C C ", + " CC E E CC ", + " CC CC ", + " CC E E CC ", + " CC CC ", + " CC CC ", + " CCC D EAAAE D CCC ", + " CCCCDCCDCCDCCCC ", + " CCCCCCCCC " + }, + { + " CHHHHHHHC ", + " DDCDCDD ", + " D EEE D ", + " ", + " C C ", + " E E ", + " C C ", + " E E ", + " ", + " ", + " ", + " ", + " D D ", + " D D ", + " D D ", + "CCE ECC", + " DE ED ", + "CCE ECC", + " D D ", + " D D ", + " D D ", + " ", + " ", + " ", + " ", + " E E ", + " C C ", + " E E ", + " C C ", + " ", + " D EEE D ", + " DDCDCDD ", + " C C " + }, + { + " CCHHHHHCC ", + " DDDDD ", + " DD DD ", + " ", + " ", + " S S ", + " ", + " S S ", + " ", + " ", + " ", + " ", + " D D ", + " D D ", + " D D ", + "CD DC", + " D D ", + "CD DC", + " D D ", + " D D ", + " D D ", + " ", + " ", + " ", + " ", + " S S ", + " ", + " S S ", + " ", + " ", + " DD DD ", + " DDDDD ", + " C C " + }, + { + " CCCCCCC ", + " C C ", + " DDDDDDD ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " D D ", + " D D ", + "CCD DCC", + " D D ", + "CCD DCC", + " D D ", + " D D ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " DDDDDDD ", + " C C ", + " C C " + }, + { + " ", + " C C ", + " D ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " C C ", + " D D ", + " C C ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " D ", + " C C ", + " " + }, + { + " ", + " C C ", + " D ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " C C ", + " D D ", + " C C ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " D ", + " C C ", + " " + }, + { + " ", + " C C ", + " C C ", + " D ", + " A ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " CC CC ", + " DA AD ", + " CC CC ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " A ", + " D ", + " C C ", + " C C ", + " " + }, + { + " ", + " ", + " C C ", + " D ", + " A ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " C C ", + " DA AD ", + " C C ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " A ", + " D ", + " C C ", + " ", + " " + }, + { + " ", + " ", + " C C ", + " C C ", + " D ", + " SEEAEES ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " S S ", + " E E ", + " CC E E CC ", + " DA AD ", + " CC E E CC ", + " E E ", + " S S ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " SEEAEES ", + " D ", + " C C ", + " C C ", + " ", + " " + }, + { + " ", + " ", + " ", + " C C ", + " CCCCC ", + " D ", + " A ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " C C ", + " CC CC ", + " CDA ADC ", + " CC CC ", + " C C ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " A ", + " D ", + " CCCCC ", + " C C ", + " ", + " ", + " " + }, + { + " ", + " ", + " ", + " ", + " C C ", + " C C ", + " D ", + " SEEAEES ", + " ", + " ", + " ", + " ", + " ", + " S S ", + " E E ", + " CC E E CC ", + " DA AD ", + " CC E E CC ", + " E E ", + " S S ", + " ", + " ", + " ", + " ", + " ", + " SEEAEES ", + " D ", + " C C ", + " C C ", + " ", + " ", + " ", + " " + }, + { + " ", + " ", + " ", + " ", + " ", + " C C ", + " CCCCC ", + " D ", + " A ", + " A ", + " ", + " ", + " ", + " ", + " C C ", + " CC CC ", + " CDAA AADC ", + " CC CC ", + " C C ", + " ", + " ", + " ", + " ", + " A ", + " A ", + " D ", + " CCCCC ", + " C C ", + " ", + " ", + " ", + " ", + " " + }, + { + " ", + " ", + " ", + " ", + " ", + " ", + " C C ", + " C C ", + " D ", + " D ", + " ", + " ", + " ", + " ", + " ", + " CC CC ", + " DD DD ", + " CC CC ", + " ", + " ", + " ", + " ", + " ", + " D ", + " D ", + " C C ", + " C C ", + " ", + " ", + " ", + " ", + " ", + " " + }, + { + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " C C ", + " C C ", + " C C ", + " D ", + " D ", + " DDDDDDD ", + " DD DD ", + " D EEE D ", + " CCC D EAAAE D CCC ", + " DDD EAAAE DDD ", + " CCC D EAAAE D CCC ", + " D EEE D ", + " DD DD ", + " DDDDDDD ", + " D ", + " D ", + " C C ", + " C C ", + " C C ", + " ", + " ", + " ", + " ", + " ", + " ", + " " + }, + { + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " C C ", + " C C ", + " C C ", + " C C ", + " DDDDD ", + " DDCDCDD ", + " CCCCDCCDCCDCCCC ", + " DDDDDDD ", + " CCCCDCCDCCDCCCC ", + " DDCDCDD ", + " DDDDD ", + " C C ", + " C C ", + " C C ", + " C C ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " " + }, + { + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " C C ", + " C C ", + " C C ", + " CCCCCCCCC ", + " C C ", + " CCCCCCCCC ", + " C C ", + " C C ", + " C C ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " " + } + })) + .addElement( + 'A', + ofBlocksTiered( + (block, meta) -> block + == TT_Block_SpacetimeCompressionFieldGenerators + .SpacetimeCompressionFieldGenerators + ? meta + : -1, + ImmutableList.of( + Pair.of( + TT_Block_SpacetimeCompressionFieldGenerators + .SpacetimeCompressionFieldGenerators, + 0), + Pair.of( + TT_Block_SpacetimeCompressionFieldGenerators + .SpacetimeCompressionFieldGenerators, + 1), + Pair.of( + TT_Block_SpacetimeCompressionFieldGenerators + .SpacetimeCompressionFieldGenerators, + 2), + Pair.of( + TT_Block_SpacetimeCompressionFieldGenerators + .SpacetimeCompressionFieldGenerators, + 3), + Pair.of( + TT_Block_SpacetimeCompressionFieldGenerators + .SpacetimeCompressionFieldGenerators, + 4), + Pair.of( + TT_Block_SpacetimeCompressionFieldGenerators + .SpacetimeCompressionFieldGenerators, + 5), + Pair.of( + TT_Block_SpacetimeCompressionFieldGenerators + .SpacetimeCompressionFieldGenerators, + 6), + Pair.of( + TT_Block_SpacetimeCompressionFieldGenerators + .SpacetimeCompressionFieldGenerators, + 7), + Pair.of( + TT_Block_SpacetimeCompressionFieldGenerators + .SpacetimeCompressionFieldGenerators, + 8)), + -1, + (t, meta) -> t.spacetimeCompressionFieldMetadata = meta, + t -> t.spacetimeCompressionFieldMetadata)) + .addElement( + 'S', + ofBlocksTiered( + (block, meta) -> + block == TT_Block_StabilisationFieldGenerators.StabilisationFieldGenerators + ? meta + : -1, + ImmutableList.of( + Pair.of( + TT_Block_StabilisationFieldGenerators.StabilisationFieldGenerators, + 0), + Pair.of( + TT_Block_StabilisationFieldGenerators.StabilisationFieldGenerators, + 1), + Pair.of( + TT_Block_StabilisationFieldGenerators.StabilisationFieldGenerators, + 2), + Pair.of( + TT_Block_StabilisationFieldGenerators.StabilisationFieldGenerators, + 3), + Pair.of( + TT_Block_StabilisationFieldGenerators.StabilisationFieldGenerators, + 4), + Pair.of( + TT_Block_StabilisationFieldGenerators.StabilisationFieldGenerators, + 5), + Pair.of( + TT_Block_StabilisationFieldGenerators.StabilisationFieldGenerators, + 6), + Pair.of( + TT_Block_StabilisationFieldGenerators.StabilisationFieldGenerators, + 7), + Pair.of( + TT_Block_StabilisationFieldGenerators.StabilisationFieldGenerators, + 8)), + -1, + (t, meta) -> t.stabilisationFieldMetadata = meta, + t -> t.stabilisationFieldMetadata)) + .addElement('B', ofBlock(sBlockCasingsTT, 11)) + .addElement('C', ofBlock(sBlockCasingsTT, 12)) + .addElement('D', ofBlock(sBlockCasingsTT, 13)) + .addElement( + 'E', + ofBlocksTiered( + (block, meta) -> block + == TT_Block_TimeAccelerationFieldGenerators + .TimeAccelerationFieldGenerator + ? meta + : -1, + ImmutableList.of( + Pair.of( + TT_Block_TimeAccelerationFieldGenerators + .TimeAccelerationFieldGenerator, + 0), + Pair.of( + TT_Block_TimeAccelerationFieldGenerators + .TimeAccelerationFieldGenerator, + 1), + Pair.of( + TT_Block_TimeAccelerationFieldGenerators + .TimeAccelerationFieldGenerator, + 2), + Pair.of( + TT_Block_TimeAccelerationFieldGenerators + .TimeAccelerationFieldGenerator, + 3), + Pair.of( + TT_Block_TimeAccelerationFieldGenerators + .TimeAccelerationFieldGenerator, + 4), + Pair.of( + TT_Block_TimeAccelerationFieldGenerators + .TimeAccelerationFieldGenerator, + 5), + Pair.of( + TT_Block_TimeAccelerationFieldGenerators + .TimeAccelerationFieldGenerator, + 6), + Pair.of( + TT_Block_TimeAccelerationFieldGenerators + .TimeAccelerationFieldGenerator, + 7), + Pair.of( + TT_Block_TimeAccelerationFieldGenerators + .TimeAccelerationFieldGenerator, + 8)), + -1, + (t, meta) -> t.timeAccelerationFieldMetadata = meta, + t -> t.timeAccelerationFieldMetadata)) + .addElement( + 'H', + ofHatchAdderOptional( + GT_MetaTileEntity_EM_EyeOfHarmony::addClassicToMachineList, + textureOffset, + 1, + sBlockCasingsTT, + 0)) + .addElement( + 'F', + ofHatchAdderOptional( + GT_MetaTileEntity_EM_EyeOfHarmony::addElementalToMachineList, + textureOffset + 4, + 2, + sBlockCasingsTT, + 4)) + .build(); + + private double hydrogenOverflowProbabilityAdjustment; + private double heliumOverflowProbabilityAdjustment; + + // Maximum additional chance of recipe success that can be obtained from adding computation. + private static final double maxPercentageChanceGainFromComputationPerSecond = 0.3; + + // todo: make higher on final release. + private static final long ticksBetweenHatchDrain = 20; + + private List<ItemStackLong> outputItems = new ArrayList<>(); + + private void calculateHydrogenHeliumInputExcessValues( + long hydrogen_recipe_requirement, long helium_recipe_requirement) { + + long hydrogen_stored = validFluidMap.get(Materials.Hydrogen.getGas(1L)); + long helium_stored = validFluidMap.get(Materials.Helium.getGas(1L)); + + double hydrogen_excess_percentage = abs(1 - hydrogen_stored / hydrogen_recipe_requirement); + double helium_excess_percentage = abs(1 - helium_stored / helium_recipe_requirement); + + hydrogenOverflowProbabilityAdjustment = 1 - exp(-pow(30 * hydrogen_excess_percentage, 2)); + heliumOverflowProbabilityAdjustment = 1 - exp(-pow(30 * helium_excess_percentage, 2)); + } + + private double recipeChanceCalculator() { + double chance = (currentRecipe.getBaseRecipeSuccessChance() + - timeAccelerationFieldMetadata * 0.1 + + stabilisationFieldMetadata * 0.05 + - hydrogenOverflowProbabilityAdjustment + - heliumOverflowProbabilityAdjustment + + maxPercentageChanceGainFromComputationPerSecond * (1 - exp(-10e-5 * getComputation()))); + + return clamp(chance, 0.0, 1.0); + } + + public static double clamp(double amount, double min, double max) { + return Math.max(min, Math.min(amount, max)); + } + + private double recipeYieldCalculator() { + double yield = 1.0 + - hydrogenOverflowProbabilityAdjustment + - heliumOverflowProbabilityAdjustment + - stabilisationFieldMetadata * 0.05; + + return clamp(yield, 0.0, 1.0); + } + + private int recipeProcessTimeCalculator(long recipeTime, long recipeSpacetimeCasingRequired) { + + // Tier 1 recipe. + // Tier 2 spacetime blocks. + // = 3% discount. + + // Tier 1 recipe. + // Tier 3 spacetime blocks. + // = 3%*3% = 5.91% discount. + + long spacetimeCasingDifference = (recipeSpacetimeCasingRequired - spacetimeCompressionFieldMetadata); + double recipeTimeDiscounted = recipeTime + * pow(2.0, -timeAccelerationFieldMetadata) + * pow(1 - spacetimeCasingDifferenceDiscountPercentage, spacetimeCasingDifference); + return (int) Math.max(recipeTimeDiscounted, 1.0); + } + + @Override + public IStructureDefinition<GT_MetaTileEntity_EM_EyeOfHarmony> getStructure_EM() { + return STRUCTURE_DEFINITION; + } + + public GT_MetaTileEntity_EM_EyeOfHarmony(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GT_MetaTileEntity_EM_EyeOfHarmony(String aName) { + super(aName); + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_EM_EyeOfHarmony(mName); + } + + @Override + public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { + + // Check structure of multi. + if (!structureCheck_EM("main", 16, 16, 0)) { + return false; + } + + // Check if there is 1+ output bus, and they are ME output busses. + { + if (mOutputBusses.size() == 0) { + return false; + } + + for (GT_MetaTileEntity_Hatch_OutputBus hatch : mOutputBusses) { + if (!(hatch instanceof GT_MetaTileEntity_Hatch_OutputBus_ME)) { + return false; + } + } + } + + // Check if there is 1+ output hatch, and they are ME output hatches. + { + if (mOutputHatches.size() == 0) { + return false; + } + + for (GT_MetaTileEntity_Hatch_Output hatch : mOutputHatches) { + if (!(hatch instanceof GT_MetaTileEntity_Hatch_Output_ME)) { + return false; + } + } + } + + // Make sure there are no energy hatches. + { + if (mEnergyHatches.size() > 0) { + return false; + } + + if (mExoticEnergyHatches.size() > 0) { + return false; + } + } + + // Make sure there is 2 input hatches. + if (mInputHatches.size() != 2) { + return false; + } + + // Make sure there is 1 input bus. + if (mInputBusses.size() != 1) { + return false; + } + + // 1 Maintenance hatch, as usual. + return (mMaintenanceHatches.size() == 1); + } + + @Override + public GT_Multiblock_Tooltip_Builder createTooltip() { + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Spacetime Manipulator") + .addInfo(GOLD + "--------------------------------------------------------------------------------") + .addInfo("Creates a pocket of spacetime that is bigger on the inside using") + .addInfo("transdimensional engineering. Certified Time Lord regulation compliant.") + .addInfo("This multi outputs too much EU to be handled with conventional means.") + .addInfo("All EU requirements are handled directly by your wireless EU network.") + .addInfo(GOLD + "--------------------------------------------------------------------------------") + .addInfo("This multiblock will constantly consume hydrogen and helium when it is") + .addInfo("not running. It will store this internally, you can see the totals by") + .addInfo("using a scanner. This multi also has three tiered blocks with " + RED + "9" + GRAY + " tiers") + .addInfo("each. They are as follows and have the associated effects on the multi.") + .addInfo(BLUE + "Spacetime Compression Field Generator:") + .addInfo("- The tier of this block determines what recipes can be run. If the multiblocks") + .addInfo(" spacetime compression field block exceeds the requirements of the recipe it") + .addInfo(" will decrease the processing time by " + RED + "3%" + GRAY + + " per tier over the requirement. This") + .addInfo(" is multiplicative.") + .addInfo(BLUE + "Time Dilation Field Generator:") + .addInfo("- Decreases the time required by a recipe by a factor of " + RED + "2" + GRAY + + " per tier of block.") + .addInfo(" Decreases the probability of a recipe succeeding by " + RED + "10%" + GRAY + + " per tier (additive)") + .addInfo(BLUE + "Stabilisation Field Generator:") + .addInfo("- Increases the probability of a recipe succeeding by " + RED + "5%" + GRAY + + " per tier (additive).") + .addInfo(" Decreases the yield of a recipe by " + RED + "5%" + GRAY + " per tier (additive). ") + .addInfo(GOLD + "--------------------------------------------------------------------------------") + .addInfo("Computation/s provided to the multiblock can increase the chance by up to " + RED + + GT_Utility.formatNumbers(maxPercentageChanceGainFromComputationPerSecond * 100) + GRAY + + "%.") + .addInfo("The associated formula is " + GREEN + + "additional_chance = 0.3 * exp(10^(-5) * computation_per_second)" + GRAY + ".") + .addInfo(GOLD + "--------------------------------------------------------------------------------") + .addInfo("Going over a recipe requirement on hydrogen or helium has a penalty on yield and recipe") + .addInfo( + "chance. All stored hydrogen and helium is consumed during a craft. The associated formulas are:") + .addInfo(GREEN + "percentage_overflow = abs(1 - fluid_stored/recipe_requirement)") + .addInfo(GREEN + "adjustment_value = 1 - exp(-(30 * percentage_overflow)^2)") + .addInfo("The value of adjustment_value is then subtracted from the total yield and recipe chance.") + .addInfo(GOLD + "--------------------------------------------------------------------------------") + .addInfo("It should be noted that base recipe chance is determined per recipe and yield always") + .addInfo("starts at 1 and subtracts depending on penalities. All fluid/item outputs are multiplied") + .addInfo("by the yield calculated.") + .addInfo(GOLD + "--------------------------------------------------------------------------------") + .addInfo("This multiblock can only output to ME output busses/hatches. If no space in the network") + .addInfo( + "is avaliable the items/fluids will be " + UNDERLINE + DARK_RED + "voided" + RESET + GRAY + ".") + .addInfo(GOLD + "--------------------------------------------------------------------------------") + .addInfo("Recipes that fail will return a random amount of the fluid back from the recipe and some") + .addInfo("exotic material that rejects conventional physics.") + .addSeparator() + .addStructureInfo("Eye of Harmony structure is too complex! See schematic for details.") + .addStructureInfo( + EnumChatFormatting.GOLD + "888" + EnumChatFormatting.GRAY + " Ultimate Molecular Casing.") + .addStructureInfo(EnumChatFormatting.GOLD + "534" + EnumChatFormatting.GRAY + + " Ultimate Advanced Molecular Casing.") + .addStructureInfo( + EnumChatFormatting.GOLD + "680" + EnumChatFormatting.GRAY + " Time Dilation Field Generator.") + .addStructureInfo( + EnumChatFormatting.GOLD + "48" + EnumChatFormatting.GRAY + " Stabilisation Field Generator.") + .addStructureInfo(EnumChatFormatting.GOLD + "138" + EnumChatFormatting.GRAY + + " Spacetime Compression Field Generator.") + .addStructureInfo("--------------------------------------------") + .addStructureInfo( + "Requires " + EnumChatFormatting.GOLD + 1 + EnumChatFormatting.GRAY + " maintenance hatch.") + .addStructureInfo( + "Requires " + EnumChatFormatting.GOLD + 2 + EnumChatFormatting.GRAY + " input hatches.") + .addStructureInfo( + "Requires " + EnumChatFormatting.GOLD + 1 + EnumChatFormatting.GRAY + "+ ME output hatch.") + .addStructureInfo( + "Requires " + EnumChatFormatting.GOLD + 1 + EnumChatFormatting.GRAY + " input busses.") + .addStructureInfo( + "Requires " + EnumChatFormatting.GOLD + 1 + EnumChatFormatting.GRAY + " ME output bus.") + .addStructureInfo("--------------------------------------------") + .beginStructureBlock(33, 33, 33, false) + .toolTipFinisher(AuthorColen.substring(8) + EnumChatFormatting.GRAY + "&" + CommonValues.TEC_MARK_EM); + return tt; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister aBlockIconRegister) { + ScreenOFF = new Textures.BlockIcons.CustomIcon("iconsets/EM_BHG"); + ScreenON = new Textures.BlockIcons.CustomIcon("iconsets/EM_BHG_ACTIVE"); + super.registerIcons(aBlockIconRegister); + } + + @Override + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[] { + Textures.BlockIcons.casingTexturePages[texturePage][12], + new TT_RenderedExtendedFacingTexture(aActive ? ScreenON : ScreenOFF) + }; + } + return new ITexture[] {Textures.BlockIcons.casingTexturePages[texturePage][12]}; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + spacetimeCompressionFieldMetadata = -1; + timeAccelerationFieldMetadata = -1; + stabilisationFieldMetadata = -1; + structureBuild_EM("main", 16, 16, 0, stackSize, hintsOnly); + } + + private final Map<FluidStack, Long> validFluidMap = new HashMap<FluidStack, Long>() { + { + put(Materials.Hydrogen.getGas(1), 0L); + put(Materials.Helium.getGas(1), 0L); + } + }; + + private void drainFluidFromHatchesAndStoreInternally() { + for (GT_MetaTileEntity_Hatch_Input inputHatch : mInputHatches) { + FluidStack fluidInHatch = inputHatch.getFluid(); + + if (fluidInHatch == null) { + continue; + } + + // Iterate over valid fluids and store them in a hashmap. + for (FluidStack validFluid : validFluidMap.keySet()) { + if (fluidInHatch.isFluidEqual(validFluid)) { + validFluidMap.put(validFluid, validFluidMap.get(validFluid) + (long) fluidInHatch.amount); + inputHatch.setFillableStack(null); + } + } + } + } + + private EyeOfHarmonyRecipe currentRecipe; + + @Override + public boolean checkRecipe_EM(ItemStack aStack) { + + // No item in multi gui slot. + if (aStack == null) { + return false; + } + + currentRecipe = recipes.recipeLookUp(aStack); + if (processRecipe(currentRecipe)) { + return true; + } + currentRecipe = null; + return false; + } + + private long getHydrogenStored() { + return validFluidMap.get(Materials.Hydrogen.getGas(1)); + } + + private long getHeliumStored() { + return validFluidMap.get(Materials.Helium.getGas(1)); + } + + public boolean processRecipe(EyeOfHarmonyRecipe recipeObject) { + + // todo: fix changing the tier of block causing multi to unform + if ((getHydrogenStored() < currentRecipe.getHydrogenRequirement()) + || (getHeliumStored() < currentRecipe.getHeliumRequirement())) { + return false; + } + + // Check tier of spacetime compression blocks is high enough. + if (spacetimeCompressionFieldMetadata < recipeObject.getSpacetimeCasingTierRequired()) { + return false; + } + + // Remove EU from the users network. + if (!addEUToGlobalEnergyMap(userUUID, -recipeObject.getEUStartCost())) { + return false; + } + + mMaxProgresstime = recipeProcessTimeCalculator( + recipeObject.getRecipeTimeInTicks(), recipeObject.getSpacetimeCasingTierRequired()); + + calculateHydrogenHeliumInputExcessValues( + recipeObject.getHydrogenRequirement(), recipeObject.getHeliumRequirement()); + + // todo: DEBUG ! DELETE THESE TWO LINES: + hydrogenOverflowProbabilityAdjustment = 0; + heliumOverflowProbabilityAdjustment = 0; + + successChance = recipeChanceCalculator(); + + // Determine EU recipe output. + euOutput = recipeObject.getEUOutput(); + + // Set expected recipe computation. + eRequiredData = getComputation(); + + // Reduce internal storage by hydrogen and helium quantity required for recipe. + validFluidMap.put(Materials.Hydrogen.getGas(1), 0L); + validFluidMap.put(Materials.Helium.getGas(1), 0L); + + double yield = recipeYieldCalculator(); + successChance = 1; // todo debug, remove. + + // Return copies of the output objects. + mOutputFluids = recipeObject.getOutputFluids(); + outputItems = recipeObject.getOutputItems(); + + if (yield != 1.0) { + // Iterate over item output list and apply yield values. + for (ItemStackLong itemStackLong : outputItems) { + itemStackLong.stackSize *= yield; + } + + // Iterate over fluid output list and apply yield values. + for (FluidStack fluidStack : mOutputFluids) { + fluidStack.amount *= yield; + } + } + + updateSlots(); + + recipeRunning = true; + return true; + } + + private double successChance; + + private void outputFailedChance() {} + + @Override + public void stopMachine() { + super.stopMachine(); + recipeRunning = false; + } + + public void outputAfterRecipe_EM() { + recipeRunning = false; + eRequiredData = 0L; + + if (successChance < random()) { + outputFailedChance(); + outputItems = new ArrayList<>(); + return; + } + + addEUToGlobalEnergyMap(userUUID, euOutput); + euOutput = 0; + + for (ItemStackLong itemStack : outputItems) { + outputItemToAENetwork(itemStack.itemStack, itemStack.stackSize); + } + + // Clear the array list for new recipes. + outputItems = new ArrayList<>(); + + // Do other stuff from TT superclasses. E.g. outputting fluids. + super.outputAfterRecipe_EM(); + } + + private void pushComputation() { + if (computationStack.size() == computationTickCacheSize) { + computationStack.remove(0); + } + computationStack.push(eAvailableData); + } + + @Override + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPreTick(aBaseMetaTileEntity, aTick); + + if (aTick == 1) { + userUUID = String.valueOf(getBaseMetaTileEntity().getOwnerUuid()); + userName = getBaseMetaTileEntity().getOwnerName(); + strongCheckOrAddUser(userUUID, userName); + + // If no multi exists this will set the recipe storage. + // This must be done after game load otherwise it fails. + if (recipes == null) { + recipes = new EyeOfHarmonyRecipeStorage(); + } + } + + // Add computation to stack. Prevents small interruptions causing issues. + pushComputation(); + + if (!recipeRunning) { + if ((aTick % ticksBetweenHatchDrain) == 0) { + drainFluidFromHatchesAndStoreInternally(); + } + } + } + + private boolean recipeRunning = false; + private static final int computationTickCacheSize = 5; + + private long getComputation() { + return Collections.max(computationStack); + } + + // Will void if AE network is full. + private void outputItemToAENetwork(ItemStack item, long amount) { + + if ((item == null) || (amount <= 0)) { + return; + } + + if (amount < Integer.MAX_VALUE) { + ItemStack tmpItem = item.copy(); + tmpItem.stackSize = (int) amount; + ((GT_MetaTileEntity_Hatch_OutputBus_ME) mOutputBusses.get(0)).store(tmpItem); + } else { + // For item stacks > Int max. + while (amount >= Integer.MAX_VALUE) { + ItemStack tmpItem = item.copy(); + tmpItem.stackSize = Integer.MAX_VALUE; + ((GT_MetaTileEntity_Hatch_OutputBus_ME) mOutputBusses.get(0)).store(tmpItem); + amount -= Integer.MAX_VALUE; + } + ItemStack tmpItem = item.copy(); + tmpItem.stackSize = (int) amount; + ((GT_MetaTileEntity_Hatch_OutputBus_ME) mOutputBusses.get(0)).store(tmpItem); + } + } + + @Override + public String[] getInfoData() { + ArrayList<String> str = new ArrayList<>(Arrays.asList(super.getInfoData())); + str.add(GOLD + "---------------- Control Block Statistics ----------------"); + str.add("Spacetime Compression Field Grade: " + BLUE + spacetimeCompressionFieldMetadata); + str.add("Time Dilation Field Grade: " + BLUE + timeAccelerationFieldMetadata); + str.add("Stabilisation Field Grade: " + BLUE + stabilisationFieldMetadata); + str.add(GOLD + "----------------- Internal Fluids Stored ----------------"); + validFluidMap.forEach((key, value) -> + str.add(BLUE + key.getLocalizedName() + RESET + " : " + RED + GT_Utility.formatNumbers(value))); + str.add(GOLD + "-----------------------------------------------------"); + return str.toArray(new String[0]); + } + + @Override + public String[] getStructureDescription(ItemStack stackSize) { + return new String[] {"Eye of Harmony multiblock"}; + } + + // NBT save/load strings. + private static final String eyeOfHarmony = "eyeOfHarmonyOutput"; + private static final String numberOfItemsNBTTag = eyeOfHarmony + "numberOfItems"; + private static final String itemOutputNBTTag = eyeOfHarmony + "itemOutput"; + private static final String recipeRunningNBTTag = eyeOfHarmony + "recipeRunning"; + private static final String recipeEUOutputNBTTag = eyeOfHarmony + "euOutput"; + private static final String recipeSuccessChanceNBTTag = eyeOfHarmony + "recipeSuccessChance"; + + // Sub tags, less specific names required. + private static final String stackSizeNBTTag = "stackSize"; + private static final String itemStackNBTTag = "itemStack"; + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + // Save the quantity of fluid stored inside the controller. + validFluidMap.forEach((key, value) -> aNBT.setLong("stored." + key.getUnlocalizedName(), value)); + + aNBT.setBoolean(recipeRunningNBTTag, recipeRunning); + aNBT.setLong(recipeEUOutputNBTTag, euOutput); + aNBT.setDouble(recipeSuccessChanceNBTTag, successChance); + + // Store damage values/stack sizes of GT items being outputted. + NBTTagCompound itemStackListNBTTag = new NBTTagCompound(); + itemStackListNBTTag.setLong(numberOfItemsNBTTag, outputItems.size()); + + int index = 0; + for (ItemStackLong itemStackLong : outputItems) { + // Save stack size to NBT. + itemStackListNBTTag.setLong(index + stackSizeNBTTag, itemStackLong.stackSize); + + // Save ItemStack to NBT. + aNBT.setTag(index + itemStackNBTTag, itemStackLong.itemStack.writeToNBT(new NBTTagCompound())); + + index++; + } + + aNBT.setTag(itemOutputNBTTag, itemStackListNBTTag); + + super.saveNBTData(aNBT); + } + + @Override + public void loadNBTData(final NBTTagCompound aNBT) { + + // Load the quantity of fluid stored inside the controller. + validFluidMap.forEach( + (key, value) -> validFluidMap.put(key, aNBT.getLong("stored." + key.getUnlocalizedName()))); + + // Load other stuff from NBT. + recipeRunning = aNBT.getBoolean(recipeRunningNBTTag); + euOutput = aNBT.getLong(recipeEUOutputNBTTag); + successChance = aNBT.getDouble(recipeSuccessChanceNBTTag); + + // Load damage values/stack sizes of GT items being outputted and convert back to items. + NBTTagCompound tempItemTag = aNBT.getCompoundTag(itemOutputNBTTag); + + // Iterate over all stored items. + for (int index = 0; index < tempItemTag.getInteger(numberOfItemsNBTTag); index++) { + + // Load stack size from NBT. + long stackSize = tempItemTag.getLong(index + stackSizeNBTTag); + + // Load ItemStack from NBT. + ItemStack itemStack = ItemStack.loadItemStackFromNBT(aNBT.getCompoundTag(index + itemStackNBTTag)); + + outputItems.add(new ItemStackLong(itemStack, stackSize)); + } + + super.loadNBTData(aNBT); + } +} diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java deleted file mode 100644 index 9d595339d0..0000000000 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java +++ /dev/null @@ -1,2611 +0,0 @@ -package com.github.technus.tectech.thing.metaTileEntity.multi; - -import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; -import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; -import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; -import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_decay.URANIUM_INGOT_MASS_DIFF; -import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_decay.URANIUM_MASS_TO_EU_INSTANT; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; -import static net.minecraft.util.StatCollector.translateToLocal; - -import com.github.technus.tectech.thing.block.QuantumGlassBlock; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; -import com.github.technus.tectech.util.CommonValues; -import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; -import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; - -/** - * Created by danie_000 on 17.12.2016. - */ -public class GT_MetaTileEntity_EM_bhg extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { - // region variables - private static Textures.BlockIcons.CustomIcon ScreenOFF; - private static Textures.BlockIcons.CustomIcon ScreenON; - - // todo CHECK VALUES - private static final double NEUTRONIUM_BLOCK_MASS = 4.1E17; - private static final double NEUTRONIUM_BLOCK_ATOM_COUNT = 2.4478671E44; - private static final double NEUTRONIUM_BLOCK_TO_EU_INSTANT = URANIUM_MASS_TO_EU_INSTANT - * NEUTRONIUM_BLOCK_MASS - / (URANIUM_INGOT_MASS_DIFF * 1.78266191e-36); // ~ 5.314e40 - private static final double NEUTRON_TO_EU_INSTANT = - NEUTRONIUM_BLOCK_TO_EU_INSTANT / NEUTRONIUM_BLOCK_ATOM_COUNT; // ~ 0.00021708694 - - public boolean glassDome = false; - // endregion - - // Time dillatation - to slow down the explosion thing but REALLY REDUCE POWER OUTPUT - // Startcodes to startup - // per dim disable thingies - - // region structure actual - private static final IStructureDefinition<GT_MetaTileEntity_EM_bhg> STRUCTURE_DEFINITION = - IStructureDefinition.<GT_MetaTileEntity_EM_bhg>builder() - .addShape("main_t1", transpose(new String[][] { - { - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " C C ", - " C C ", - " C C ", - " CCCCCCCCC ", - " C C ", - " CCCCCCCCC ", - " C C ", - " C C ", - " C C ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " " - }, - { - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " C C ", - " C C ", - " C C ", - " C C ", - " DDDDD ", - " DDCDCDD ", - " CCCCDCCDCCDCCCC ", - " DDDDDDD ", - " CCCCDCCDCCDCCCC ", - " DDCDCDD ", - " DDDDD ", - " C C ", - " C C ", - " C C ", - " C C ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " " - }, - { - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " C C ", - " C C ", - " C C ", - " D ", - " D ", - " DDDDDDD ", - " DD DD ", - " D EEE D ", - " CCC D EAAAE D CCC ", - " DDD EAAAE DDD ", - " CCC D EAAAE D CCC ", - " D EEE D ", - " DD DD ", - " DDDDDDD ", - " D ", - " D ", - " C C ", - " C C ", - " C C ", - " ", - " ", - " ", - " ", - " ", - " ", - " " - }, - { - " ", - " ", - " ", - " ", - " ", - " ", - " C C ", - " C C ", - " D ", - " D ", - " ", - " ", - " ", - " ", - " ", - " CC CC ", - " DD DD ", - " CC CC ", - " ", - " ", - " ", - " ", - " ", - " D ", - " D ", - " C C ", - " C C ", - " ", - " ", - " ", - " ", - " ", - " " - }, - { - " ", - " ", - " ", - " ", - " ", - " C C ", - " CCCCC ", - " D ", - " B ", - " B ", - " ", - " ", - " ", - " ", - " C C ", - " CC CC ", - " CDBB BBDC ", - " CC CC ", - " C C ", - " ", - " ", - " ", - " ", - " B ", - " B ", - " D ", - " CCCCC ", - " C C ", - " ", - " ", - " ", - " ", - " " - }, - { - " ", - " ", - " ", - " ", - " C C ", - " C C ", - " D ", - " EEEBEEE ", - " ", - " ", - " ", - " ", - " ", - " E E ", - " E E ", - " CC E E CC ", - " DB BD ", - " CC E E CC ", - " E E ", - " E E ", - " ", - " ", - " ", - " ", - " ", - " EEEBEEE ", - " D ", - " C C ", - " C C ", - " ", - " ", - " ", - " " - }, - { - " ", - " ", - " ", - " C C ", - " CCCCC ", - " D ", - " B ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " C C ", - " CC CC ", - " CDB BDC ", - " CC CC ", - " C C ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " B ", - " D ", - " CCCCC ", - " C C ", - " ", - " ", - " " - }, - { - " ", - " ", - " C C ", - " C C ", - " D ", - " EEEBEEE ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " E E ", - " E E ", - " CC E E CC ", - " DB BD ", - " CC E E CC ", - " E E ", - " E E ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " EEEBEEE ", - " D ", - " C C ", - " C C ", - " ", - " " - }, - { - " ", - " ", - " C C ", - " D ", - " B ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " C C ", - " DB BD ", - " C C ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " B ", - " D ", - " C C ", - " ", - " " - }, - { - " ", - " C C ", - " C C ", - " D ", - " B ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " CC CC ", - " DB BD ", - " CC CC ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " B ", - " D ", - " C C ", - " C C ", - " " - }, - { - " ", - " C C ", - " D ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " C C ", - " D D ", - " C C ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " D ", - " C C ", - " " - }, - { - " ", - " C C ", - " D ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " C C ", - " D D ", - " C C ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " D ", - " C C ", - " " - }, - { - " CCCCCCC ", - " C C ", - " DDDDDDD ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " D D ", - " D D ", - "CCD DCC", - " D D ", - "CCD DCC", - " D D ", - " D D ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " DDDDDDD ", - " C C ", - " C C " - }, - { - " CCHHHHHCC ", - " DDDDD ", - " DD DD ", - " ", - " ", - " E E ", - " ", - " E E ", - " ", - " ", - " ", - " ", - " D D ", - " D D ", - " D D ", - "CD DC", - " D D ", - "CD DC", - " D D ", - " D D ", - " D D ", - " ", - " ", - " ", - " ", - " E E ", - " ", - " E E ", - " ", - " ", - " DD DD ", - " DDDDD ", - " C C " - }, - { - " CHHHHHHHC ", - " DDCDCDD ", - " D EEE D ", - " ", - " C C ", - " E E ", - " C C ", - " E E ", - " ", - " ", - " ", - " ", - " D D ", - " D D ", - " D D ", - "CCE ECC", - " DE ED ", - "CCE ECC", - " D D ", - " D D ", - " D D ", - " ", - " ", - " ", - " ", - " E E ", - " C C ", - " E E ", - " C C ", - " ", - " D EEE D ", - " DDCDCDD ", - " C C " - }, - { - " CHHFFFHHC ", - " CCCCDCCDCCDCCCC ", - " CCC D EAAAE D CCC ", - " CC CC ", - " CC CC ", - " CC E E CC ", - " CC CC ", - " CC E E CC ", - " C C ", - " CC CC ", - " C C ", - " C C ", - "CCD DCC", - "CD DC", - "CCE ECC", - "CCA ACC", - "CDA ADC", - "CCA ACC", - "CCE ECC", - "CD DC", - "CCD DCC", - " C C ", - " C C ", - " CC CC ", - " C C ", - " CC E E CC ", - " CC CC ", - " CC E E CC ", - " CC CC ", - " CC CC ", - " CCC D EAAAE D CCC ", - " CCCCDCCDCCDCCCC ", - " CCCCCCCCC " - }, - { - " CHHF~FHHC ", - " DDDDDDD ", - " DDD EAAAE DDD ", - " DD DD ", - " CDBB BBDC ", - " DB BD ", - " CDB BDC ", - " DB BD ", - " DB BD ", - " DB BD ", - " D D ", - " D D ", - " D D ", - " D D ", - " DE ED ", - "CDA ADC", - " DA AD ", - "CDA ADC", - " DE ED ", - " D D ", - " D D ", - " D D ", - " D D ", - " DB BD ", - " DB BD ", - " DB BD ", - " CDB BDC ", - " DB BD ", - " CDBB BBDC ", - " DD DD ", - " DDD EAAAE DDD ", - " DDDDDDD ", - " C C " - }, - { - " CHHFFFHHC ", - " CCCCDCCDCCDCCCC ", - " CCC D EAAAE D CCC ", - " CC CC ", - " CC CC ", - " CC E E CC ", - " CC CC ", - " CC E E CC ", - " C C ", - " CC CC ", - " C C ", - " C C ", - "CCD DCC", - "CD DC", - "CCE ECC", - "CCA ACC", - "CDA ADC", - "CCA ACC", - "CCE ECC", - "CD DC", - "CCD DCC", - " C C ", - " C C ", - " CC CC ", - " C C ", - " CC E E CC ", - " CC CC ", - " CC E E CC ", - " CC CC ", - " CC CC ", - " CCC D EAAAE D CCC ", - " CCCCDCCDCCDCCCC ", - " CCCCCCCCC " - }, - { - " CHHHHHHHC ", - " DDCDCDD ", - " D EEE D ", - " ", - " C C ", - " E E ", - " C C ", - " E E ", - " ", - " ", - " ", - " ", - " D D ", - " D D ", - " D D ", - "CCE ECC", - " DE ED ", - "CCE ECC", - " D D ", - " D D ", - " D D ", - " ", - " ", - " ", - " ", - " E E ", - " C C ", - " E E ", - " C C ", - " ", - " D EEE D ", - " DDCDCDD ", - " C C " - }, - { - " CCHHHHHCC ", - " DDDDD ", - " DD DD ", - " ", - " ", - " E E ", - " ", - " E E ", - " ", - " ", - " ", - " ", - " D D ", - " D D ", - " D D ", - "CD DC", - " D D ", - "CD DC", - " D D ", - " D D ", - " D D ", - " ", - " ", - " ", - " ", - " E E ", - " ", - " E E ", - " ", - " ", - " DD DD ", - " DDDDD ", - " C C " - }, - { - " CCCCCCC ", - " C C ", - " DDDDDDD ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " D D ", - " D D ", - "CCD DCC", - " D D ", - "CCD DCC", - " D D ", - " D D ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " DDDDDDD ", - " C C ", - " C C " - }, - { - " ", - " C C ", - " D ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " C C ", - " D D ", - " C C ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " D ", - " C C ", - " " - }, - { - " ", - " C C ", - " D ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " C C ", - " D D ", - " C C ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " D ", - " C C ", - " " - }, - { - " ", - " C C ", - " C C ", - " D ", - " B ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " CC CC ", - " DB BD ", - " CC CC ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " B ", - " D ", - " C C ", - " C C ", - " " - }, - { - " ", - " ", - " C C ", - " D ", - " B ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " C C ", - " DB BD ", - " C C ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " B ", - " D ", - " C C ", - " ", - " " - }, - { - " ", - " ", - " C C ", - " C C ", - " D ", - " EEEBEEE ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " E E ", - " E E ", - " CC E E CC ", - " DB BD ", - " CC E E CC ", - " E E ", - " E E ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " EEEBEEE ", - " D ", - " C C ", - " C C ", - " ", - " " - }, - { - " ", - " ", - " ", - " C C ", - " CCCCC ", - " D ", - " B ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " C C ", - " CC CC ", - " CDB BDC ", - " CC CC ", - " C C ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " B ", - " D ", - " CCCCC ", - " C C ", - " ", - " ", - " " - }, - { - " ", - " ", - " ", - " ", - " C C ", - " C C ", - " D ", - " EEEBEEE ", - " ", - " ", - " ", - " ", - " ", - " E E ", - " E E ", - " CC E E CC ", - " DB BD ", - " CC E E CC ", - " E E ", - " E E ", - " ", - " ", - " ", - " ", - " ", - " EEEBEEE ", - " D ", - " C C ", - " C C ", - " ", - " ", - " ", - " " - }, - { - " ", - " ", - " ", - " ", - " ", - " C C ", - " CCCCC ", - " D ", - " B ", - " B ", - " ", - " ", - " ", - " ", - " C C ", - " CC CC ", - " CDBB BBDC ", - " CC CC ", - " C C ", - " ", - " ", - " ", - " ", - " B ", - " B ", - " D ", - " CCCCC ", - " C C ", - " ", - " ", - " ", - " ", - " " - }, - { - " ", - " ", - " ", - " ", - " ", - " ", - " C C ", - " C C ", - " D ", - " D ", - " ", - " ", - " ", - " ", - " ", - " CC CC ", - " DD DD ", - " CC CC ", - " ", - " ", - " ", - " D ", - " D ", - " D ", - " D ", - " C C ", - " C C ", - " ", - " ", - " ", - " ", - " ", - " " - }, - { - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " C C ", - " C C ", - " C C ", - " D ", - " D ", - " DDDDDDD ", - " DD DD ", - " D EEE D ", - " CCC D EAAAE D CCC ", - " DDD EAAAE DDD ", - " CCC D EAAAE D CCC ", - " D EEE D ", - " DD DD ", - " DDDDDDD ", - " D ", - " D ", - " C C ", - " C C ", - " C C ", - " ", - " ", - " ", - " ", - " ", - " ", - " " - }, - { - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " C C ", - " C C ", - " C C ", - " C C ", - " DDDDD ", - " DDCDCDD ", - " CCCCDCCDCCDCCCC ", - " DDDDDDD ", - " CCCCDCCDCCDCCCC ", - " DDCDCDD ", - " DDDDD ", - " C C ", - " C C ", - " C C ", - " C C ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " " - }, - { - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " C C ", - " C C ", - " C C ", - " CCCCCCCCC ", - " C C ", - " CCCCCCCCC ", - " C C ", - " C C ", - " C C ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " " - } - })) - .addShape("main_t2", transpose(new String[][] { - { - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " C C ", - " C C ", - " C C ", - " CCCCCCCCC ", - " C C ", - " CCCCCCCCC ", - " C C ", - " C C ", - " C C ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " " - }, - { - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " C C ", - " GGC CGG ", - " GGGC CGGG ", - " GGGGC CGGGG ", - " GGGGDDDDDGGGG ", - " GGGDDCDCDDGGG ", - " CCCCDCCDCCDCCCC ", - " DDDDDDD ", - " CCCCDCCDCCDCCCC ", - " GGGDDCDCDDGGG ", - " GGGGDDDDDGGGG ", - " GGGGC CGGGG ", - " GGGC CGGG ", - " GGC CGG ", - " C C ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " " - }, - { - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " C C ", - " GGC CGG ", - " GGGGC CGGGG ", - " GGG D GGG ", - " GGG D GGG ", - " GG DDDDDDD GG ", - " GG DD DD GG ", - " GG D EEE D GG ", - " CCC D EAAAE D CCC ", - " DDD EAAAE DDD ", - " CCC D EAAAE D CCC ", - " GG D EEE D GG ", - " GG DD DD GG ", - " GG DDDDDDD GG ", - " GGG D GGG ", - " GGG D GGG ", - " GGGGC CGGGG ", - " GGC CGG ", - " C C ", - " ", - " ", - " ", - " ", - " ", - " ", - " " - }, - { - " ", - " ", - " ", - " ", - " ", - " ", - " C C ", - " GGGC CGGG ", - " GGG D GGG ", - " GG D GG ", - " GG GG ", - " G G ", - " GG GG ", - " G G ", - " G G ", - " CC CC ", - " DD DD ", - " CC CC ", - " G G ", - " G G ", - " GG GG ", - " G G ", - " GG GG ", - " GG D GG ", - " GGG D GGG ", - " GGGC CGGG ", - " C C ", - " ", - " ", - " ", - " ", - " ", - " " - }, - { - " ", - " ", - " ", - " ", - " ", - " C C ", - " GGGCCCCCGGG ", - " GGG D GGG ", - " GG B GG ", - " GG B GG ", - " G G ", - " GG GG ", - " G G ", - " G G ", - " C C ", - " CC CC ", - " CDBB BBDC ", - " CC CC ", - " C C ", - " G G ", - " G G ", - " GG GG ", - " G G ", - " GG B GG ", - " GG B GG ", - " GGG D GGG ", - " GGGCCCCCGGG ", - " C C ", - " ", - " ", - " ", - " ", - " " - }, - { - " ", - " ", - " ", - " ", - " C C ", - " GGGGGC CGGGGG ", - " GGG D GGG ", - " GG EEEBEEE GG ", - " GG GG ", - " G G ", - " GG GG ", - " G G ", - " G G ", - " G E E G ", - " G E E G ", - " CC E E CC ", - " DB BD ", - " CC E E CC ", - " G E E G ", - " G E E G ", - " G G ", - " G G ", - " GG GG ", - " G G ", - " GG GG ", - " GG EEEBEEE GG ", - " GGG D GGG ", - " GGGGGC CGGGGG ", - " C C ", - " ", - " ", - " ", - " " - }, - { - " ", - " ", - " ", - " C C ", - " GGGCCCCCGGG ", - " GGG D GGG ", - " GG B GG ", - " G G ", - " GG GG ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " C C ", - " CC CC ", - " CDB BDC ", - " CC CC ", - " C C ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " GG GG ", - " G G ", - " GG B GG ", - " GGG D GGG ", - " GGGCCCCCGGG ", - " C C ", - " ", - " ", - " " - }, - { - " ", - " ", - " C C ", - " GGGC CGGG ", - " GGG D GGG ", - " GG EEEBEEE GG ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G E E G ", - " G E E G ", - " CC E E CC ", - " DB BD ", - " CC E E CC ", - " G E E G ", - " G E E G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " GG EEEBEEE GG ", - " GGG D GGG ", - " GGGC CGGG ", - " C C ", - " ", - " " - }, - { - " ", - " ", - " GGC CGG ", - " GGG D GGG ", - " GG B GG ", - " GG GG ", - " GG GG ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " C C ", - " DB BD ", - " C C ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " GG GG ", - " GG GG ", - " GG B GG ", - " GGG D GGG ", - " GGC CGG ", - " ", - " " - }, - { - " ", - " C C ", - " GGGGC CGGGG ", - " GG D GG ", - " GG B GG ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " CC CC ", - " DB BD ", - " CC CC ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " GG B GG ", - " GG D GG ", - " GGGGC CGGGG ", - " C C ", - " " - }, - { - " ", - " GGC CGG ", - " GGG D GGG ", - " GG GG ", - " G G ", - " GG GG ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " C C ", - " D D ", - " C C ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " GG GG ", - " G G ", - " GG GG ", - " GGG D GGG ", - " GGC CGG ", - " " - }, - { - " ", - " GGGC CGGG ", - " GGG D GGG ", - " G G ", - " GG GG ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " C C ", - " D D ", - " C C ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " GG GG ", - " G G ", - " GGG D GGG ", - " GGGC CGGG ", - " " - }, - { - " CCCCCCC ", - " GGGGC CGGGG ", - " GG DDDDDDD GG ", - " GG GG ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " GD DG ", - " GD DG ", - "CCD DCC", - " D D ", - "CCD DCC", - " GD DG ", - " GD DG ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " GG GG ", - " GG DDDDDDD GG ", - " GGGGC CGGGG ", - " C C " - }, - { - " CCHHHHHCC ", - " GGGGDDDDDGGGG ", - " GG DD DD GG ", - " G G ", - " G G ", - " G E E G ", - " G G ", - " G E E G ", - " G G ", - " G G ", - " G G ", - " G G ", - " GD DG ", - " GD DG ", - " D D ", - "CD DC", - " D D ", - "CD DC", - " D D ", - " GD DG ", - " GD DG ", - " G G ", - " G G ", - " G G ", - " G G ", - " G E E G ", - " G G ", - " G E E G ", - " G G ", - " G G ", - " GG DD DD GG ", - " GGGGDDDDDGGGG ", - " C C " - }, - { - " CHHHHHHHC ", - " GGGDDCDCDDGGG ", - " GG D EEE D GG ", - " G G ", - " C C ", - " G E E G ", - " C C ", - " G E E G ", - " G G ", - " G G ", - " G G ", - " G G ", - " GD DG ", - " D D ", - " D D ", - "CCE ECC", - " DE ED ", - "CCE ECC", - " D D ", - " D D ", - " GD DG ", - " G G ", - " G G ", - " G G ", - " G G ", - " G E E G ", - " C C ", - " G E E G ", - " C C ", - " G G ", - " GG D EEE D GG ", - " GGGDDCDCDDGGG ", - " C C " - }, - { - " CHHFFFHHC ", - " CCCCDCCDCCDCCCC ", - " CCC D EAAAE D CCC ", - " CC CC ", - " CC CC ", - " CC E E CC ", - " CC CC ", - " CC E E CC ", - " C C ", - " CC CC ", - " C C ", - " C C ", - "CCD DCC", - "CD DC", - "CCE ECC", - "CCA ACC", - "CDA ADC", - "CCA ACC", - "CCE ECC", - "CD DC", - "CCD DCC", - " C C ", - " C C ", - " CC CC ", - " C C ", - " CC E E CC ", - " CC CC ", - " CC E E CC ", - " CC CC ", - " CC CC ", - " CCC D EAAAE D CCC ", - " CCCCDCCDCCDCCCC ", - " CCCCCCCCC " - }, - { - " CHHF~FHHC ", - " DDDDDDD ", - " DDD EAAAE DDD ", - " DD DD ", - " CDBB BBDC ", - " DB BD ", - " CDB BDC ", - " DB BD ", - " DB BD ", - " DB BD ", - " D D ", - " D D ", - " D D ", - " D D ", - " DE ED ", - "CDA ADC", - " DA AD ", - "CDA ADC", - " DE ED ", - " D D ", - " D D ", - " D D ", - " D D ", - " DB BD ", - " DB BD ", - " DB BD ", - " CDB BDC ", - " DB BD ", - " CDBB BBDC ", - " DD DD ", - " DDD EAAAE DDD ", - " DDDDDDD ", - " C C " - }, - { - " CHHFFFHHC ", - " CCCCDCCDCCDCCCC ", - " CCC D EAAAE D CCC ", - " CC CC ", - " CC CC ", - " CC E E CC ", - " CC CC ", - " CC E E CC ", - " C C ", - " CC CC ", - " C C ", - " C C ", - "CCD DCC", - "CD DC", - "CCE ECC", - "CCA ACC", - "CDA ADC", - "CCA ACC", - "CCE ECC", - "CD DC", - "CCD DCC", - " C C ", - " C C ", - " CC CC ", - " C C ", - " CC E E CC ", - " CC CC ", - " CC E E CC ", - " CC CC ", - " CC CC ", - " CCC D EAAAE D CCC ", - " CCCCDCCDCCDCCCC ", - " CCCCCCCCC " - }, - { - " CHHHHHHHC ", - " GGGDDCDCDDGGG ", - " GG D EEE D GG ", - " G G ", - " C C ", - " G E E G ", - " C C ", - " G E E G ", - " G G ", - " G G ", - " G G ", - " G G ", - " GD DG ", - " D D ", - " D D ", - "CCE ECC", - " DE ED ", - "CCE ECC", - " D D ", - " D D ", - " GD DG ", - " G G ", - " G G ", - " G G ", - " G G ", - " G E E G ", - " C C ", - " G E E G ", - " C C ", - " G G ", - " GG D EEE D GG ", - " GGGDDCDCDDGGG ", - " C C " - }, - { - " CCHHHHHCC ", - " GGGGDDDDDGGGG ", - " GG DD DD GG ", - " G G ", - " G G ", - " G E E G ", - " G G ", - " G E E G ", - " G G ", - " G G ", - " G G ", - " G G ", - " GD DG ", - " GD DG ", - " D D ", - "CD DC", - " D D ", - "CD DC", - " D D ", - " GD DG ", - " GD DG ", - " G G ", - " G G ", - " G G ", - " G G ", - " G E E G ", - " G G ", - " G E E G ", - " G G ", - " G G ", - " GG DD DD GG ", - " GGGGDDDDDGGGG ", - " C C " - }, - { - " CCCCCCC ", - " GGGGC CGGGG ", - " GG DDDDDDD GG ", - " GG GG ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " GD DG ", - " GD DG ", - "CCD DCC", - " D D ", - "CCD DCC", - " GD DG ", - " GD DG ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " GG GG ", - " GG DDDDDDD GG ", - " GGGGC CGGGG ", - " C C " - }, - { - " ", - " GGGC CGGG ", - " GGG D GGG ", - " G G ", - " GG GG ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " C C ", - " D D ", - " C C ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " GG GG ", - " G G ", - " GGG D GGG ", - " GGGC CGGG ", - " " - }, - { - " ", - " GGC CGG ", - " GGG D GGG ", - " GG GG ", - " G G ", - " GG GG ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " C C ", - " D D ", - " C C ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " GG GG ", - " G G ", - " GG GG ", - " GGG D GGG ", - " GGC CGG ", - " " - }, - { - " ", - " C C ", - " GGGGC CGGGG ", - " GG D GG ", - " GG B GG ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " CC CC ", - " DB BD ", - " CC CC ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " GG B GG ", - " GG D GG ", - " GGGGC CGGGG ", - " C C ", - " " - }, - { - " ", - " ", - " GGC CGG ", - " GGG D GGG ", - " GG B GG ", - " GG GG ", - " GG GG ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " C C ", - " DB BD ", - " C C ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " GG GG ", - " GG GG ", - " GG B GG ", - " GGG D GGG ", - " GGC CGG ", - " ", - " " - }, - { - " ", - " ", - " C C ", - " GGGC CGGG ", - " GGG D GGG ", - " GG EEEBEEE GG ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G E E G ", - " G E E G ", - " CC E E CC ", - " DB BD ", - " CC E E CC ", - " G E E G ", - " G E E G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " GG EEEBEEE GG ", - " GGG D GGG ", - " GGGC CGGG ", - " C C ", - " ", - " " - }, - { - " ", - " ", - " ", - " C C ", - " GGGCCCCCGGG ", - " GGG D GGG ", - " GG B GG ", - " G G ", - " GG GG ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " C C ", - " CC CC ", - " CDB BDC ", - " CC CC ", - " C C ", - " G G ", - " G G ", - " G G ", - " G G ", - " G G ", - " GG GG ", - " G G ", - " GG B GG ", - " GGG D GGG ", - " GGGCCCCCGGG ", - " C C ", - " ", - " ", - " " - }, - { - " ", - " ", - " ", - " ", - " C C ", - " GGGGGC CGGGGG ", - " GGG D GGG ", - " GG EEEBEEE GG ", - " GG GG ", - " G G ", - " GG GG ", - " G G ", - " G G ", - " G E E G ", - " G E E G ", - " CC E E CC ", - " DB BD ", - " CC E E CC ", - " G E E G ", - " G E E G ", - " G G ", - " G G ", - " GG GG ", - " G G ", - " GG GG ", - " GG EEEBEEE GG ", - " GGG D GGG ", - " GGGGGC CGGGGG ", - " C C ", - " ", - " ", - " ", - " " - }, - { - " ", - " ", - " ", - " ", - " ", - " C C ", - " GGGCCCCCGGG ", - " GGG D GGG ", - " GG B GG ", - " GG B GG ", - " G G ", - " GG GG ", - " G G ", - " G G ", - " C C ", - " CC CC ", - " CDBB BBDC ", - " CC CC ", - " C C ", - " G G ", - " G G ", - " GG GG ", - " G G ", - " GG B GG ", - " GG B GG ", - " GGG D GGG ", - " GGGCCCCCGGG ", - " C C ", - " ", - " ", - " ", - " ", - " " - }, - { - " ", - " ", - " ", - " ", - " ", - " ", - " C C ", - " GGGC CGGG ", - " GGG D GGG ", - " GG D GG ", - " GG GG ", - " G G ", - " GG GG ", - " G G ", - " G G ", - " CC CC ", - " DD DD ", - " CC CC ", - " G G ", - " G G ", - " GG GG ", - " G D G ", - " GG D GG ", - " GG D GG ", - " GGG D GGG ", - " GGGC CGGG ", - " C C ", - " ", - " ", - " ", - " ", - " ", - " " - }, - { - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " C C ", - " GGC CGG ", - " GGGGC CGGGG ", - " GGG D GGG ", - " GGG D GGG ", - " GG DDDDDDD GG ", - " GG DD DD GG ", - " GG D EEE D GG ", - " CCC D EAAAE D CCC ", - " DDD EAAAE DDD ", - " CCC D EAAAE D CCC ", - " GG D EEE D GG ", - " GG DD DD GG ", - " GG DDDDDDD GG ", - " GGG D GGG ", - " GGG D GGG ", - " GGGGC CGGGG ", - " GGC CGG ", - " C C ", - " ", - " ", - " ", - " ", - " ", - " ", - " " - }, - { - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " C C ", - " GGC CGG ", - " GGGC CGGG ", - " GGGGC CGGGG ", - " GGGGDDDDDGGGG ", - " GGGDDCDCDDGGG ", - " CCCCDCCDCCDCCCC ", - " DDDDDDD ", - " CCCCDCCDCCDCCCC ", - " GGGDDCDCDDGGG ", - " GGGGDDDDDGGGG ", - " GGGGC CGGGG ", - " GGGC CGGG ", - " GGC CGG ", - " C C ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " " - }, - { - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " C C ", - " C C ", - " C C ", - " CCCCCCCCC ", - " C C ", - " CCCCCCCCC ", - " C C ", - " C C ", - " C C ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " " - } - })) - .addElement('A', ofBlock(sBlockCasingsTT, 10)) - .addElement('B', ofBlock(sBlockCasingsTT, 11)) - .addElement('C', ofBlock(sBlockCasingsTT, 12)) - .addElement('D', ofBlock(sBlockCasingsTT, 13)) - .addElement('E', ofBlock(sBlockCasingsTT, 14)) - .addElement('G', ofBlock(QuantumGlassBlock.INSTANCE, 0)) - .addElement( - 'H', - ofHatchAdderOptional( - GT_MetaTileEntity_EM_bhg::addClassicToMachineList, - textureOffset, - 1, - sBlockCasingsTT, - 0)) - .addElement( - 'F', - ofHatchAdderOptional( - GT_MetaTileEntity_EM_bhg::addElementalToMachineList, - textureOffset + 4, - 2, - sBlockCasingsTT, - 4)) - .build(); - - @Override - public IStructureDefinition<GT_MetaTileEntity_EM_bhg> getStructure_EM() { - return STRUCTURE_DEFINITION; - } - - private static final String[] description = new String[] { - EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", - translateToLocal( - "gt.blockmachines.multimachine.em.blackholegenerator.hint.0"), // 1 - Classic Hatches or High Power - // Casing - translateToLocal( - "gt.blockmachines.multimachine.em.blackholegenerator.hint.1"), // 2 - Elemental Hatches or Molecular - // Casing - }; - // endregion - - public GT_MetaTileEntity_EM_bhg(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GT_MetaTileEntity_EM_bhg(String aName) { - super(aName); - } - - /** - * Black hole event horizon radius calculator - * - * @param massKg mass in kg - * @return radius in meters - */ - private static double getSchwarzschildRadius(double massKg) { - return massKg * 1.48523238761875E-27; - } - - /** - * Black hole event horizon surface area calculator - * - * @param massKg mass in kg - * @return area in meters^2 - */ - private static double getSchwarzschildArea(double massKg) { - return Math.pow(getSchwarzschildRadius(massKg), 2) * 12.566370614359172; - } - - /** - * Black hole event horizon temperature calculator - * - * @param massKg mass in kg - * @return temperature in K - */ - private static double getTemperature(double massKg) { - return 2.841438513199716E-9 / (2.3159488515170722E-32 * massKg); - } - - /** - * Black hole luminosity calculator - * - * @param massKg mass in kg - * @return luminosity in watts - */ - private static double getLuminosity(double massKg) { - return getSchwarzschildArea(massKg) * 5.670373e-8 * Math.pow(getTemperature(massKg), 4); - } - - /** - * Black hole acretion disk luminosity calculator - * - * @param massKgPer1s mass injection kg per s - * @return luminosity in watts - */ - private static double getAcretionDiskLuminosity(double massKgPer1s) { - return massKgPer1s * 7.48962648947348E15; - } - - /** - * Black hole gravity field calculator, should be used for gravity blasting - * - * @param massKg mass in kg - * @param distanceSq distance squared in meters - * @return gravity field - */ - private static double getGravityField(double massKg, double distanceSq) { - return massKg * 6.6743015e-11 / distanceSq; - } - - /** - * Black hole containment force calculator - * - * @param massKg mass in kg - * @param radiusSq radius squared in meters - * @return force in newtons - */ - private static double getContainmentForce(double massKg, double radiusSq) { - return Math.pow(massKg, 2) * 6.6743015e-11 / radiusSq; - } - - /** - * Black hole containment pressure calculator F/s, should be used for bhg initial release explosion? - * - * @param massKg mass in kg - * @param radiusSq radius squared in meters - * @return pressure in pascals - */ - private static double getContainmentPressure(double massKg, double radiusSq) { - return getContainmentForce(massKg, radiusSq) / (12.566370614359172 * radiusSq); - } - - /** - * Black hole containment energy calculator, assuming F*s, and 100% efficient gravity force field - * - * @param massKg mass in kg - * @return power in watts - */ - private static double getContainmentPower(double massKg) { - return Math.pow(massKg, 2) * 8.387174624097334E-10; - } - - /** - * Black hole power balance, zero at mass ~= 2.5525e10 (T~=4.8067e12) - * - * @param massKg mass in kg - * @param massKgPer1s mass injection kg per s - * @return power in watts - */ - @Deprecated - private static double getContainmentPowerBalance(double massKg, double massKgPer1s) { - return getLuminosity(massKg) + getAcretionDiskLuminosity(massKgPer1s) - getContainmentPower(massKg); - } - - // todo compaction energy 8 * Long.MAx_VALUE? - - // todo neutronium decay gen? 0.0007186885 mass diff - actually compute hydrogen amount... - - @Override - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_EM_bhg(mName); - } - - @Override - public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - if (structureCheck_EM("t2", 16, 16, 0)) { - glassDome = true; - return true; - } - if (structureCheck_EM("t1", 16, 16, 0)) { - glassDome = false; - return true; - } - // todo check tiers of hatches!!!! - return false; - } - - @Override - public GT_Multiblock_Tooltip_Builder createTooltip() { - final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType(translateToLocal( - "gt.blockmachines.multimachine.em.blackholegenerator.name")) // Machine Type: Black Hole - // Generator - .addInfo(translateToLocal( - "gt.blockmachines.multimachine.em.blackholegenerator.desc.0")) // Controller block of - // the Black Hole - // Generator - .addInfo(translateToLocal( - "gt.blockmachines.multimachine.em.blackholegenerator.desc.1")) // Uses a black hole to - // generate power - .addInfo(translateToLocal("tt.keyword.Structure.StructureTooComplex")) // The structure is too complex! - .addSeparator() - .beginStructureBlock(33, 33, 33, false) - .addEnergyHatch( - translateToLocal("tt.keyword.Structure.AnyHighPowerCasing1D"), - 1) // Energy Hatch: Any High Power Casing with 1 dot - .addMaintenanceHatch( - translateToLocal("tt.keyword.Structure.AnyHighPowerCasing1D"), - 1) // Maintenance Hatch: Any High Power Casing with 1 dot - .toolTipFinisher(CommonValues.TEC_MARK_EM); - return tt; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister aBlockIconRegister) { - ScreenOFF = new Textures.BlockIcons.CustomIcon("iconsets/EM_BHG"); - ScreenON = new Textures.BlockIcons.CustomIcon("iconsets/EM_BHG_ACTIVE"); - super.registerIcons(aBlockIconRegister); - } - - @Override - public ITexture[] getTexture( - IGregTechTileEntity aBaseMetaTileEntity, - byte aSide, - byte aFacing, - byte aColorIndex, - boolean aActive, - boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[] { - Textures.BlockIcons.casingTexturePages[texturePage][12], - new TT_RenderedExtendedFacingTexture(aActive ? ScreenON : ScreenOFF) - }; - } - return new ITexture[] {Textures.BlockIcons.casingTexturePages[texturePage][12]}; - } - - @Override - public void construct(ItemStack stackSize, boolean hintsOnly) { - try { - structureBuild_EM((stackSize.stackSize & 1) == 1 ? "main_t1" : "main_t2", 16, 16, 0, stackSize, hintsOnly); - } catch (Exception e) { - e.printStackTrace(); - } - } - - @Override - public String[] getStructureDescription(ItemStack stackSize) { - return description; - } -} diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java index 112405ff05..d910d02939 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java @@ -234,7 +234,7 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock .addMaintenanceHatch( translateToLocal("tt.keyword.Structure.AnyOuterCasingOnBottom"), 1) // Maintenance Hatch: Any outer casing on the bottom layer - .toolTipFinisher(CommonValues.BASS_MARK); + .toolTipFinisher(CommonValues.THETA_MOVEMENT); return tt; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java index 00b99036c4..7bc6888cfb 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java @@ -672,7 +672,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock .addMaintenanceHatch( translateToLocal("tt.keyword.Structure.AnyTeslaBaseCasingOuter"), 1) // Maintenance Hatch: Any outer Tesla Base Casing - .toolTipFinisher(CommonValues.BASS_MARK); + .toolTipFinisher(CommonValues.THETA_MOVEMENT); return tt; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java index d4990878ee..ae1f7fbf56 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java @@ -992,9 +992,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt } /** - * if u want to use gt recipe maps... - * - * @return + * If you want to use GT recipe maps. */ @Override public GT_Recipe.GT_Recipe_Map getRecipeMap() { diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java index 899ebc603c..ff3410d29b 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java @@ -76,7 +76,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB @Override public String[] getDescription() { String[] jargon = new String[] { - CommonValues.BASS_MARK, + CommonValues.THETA_MOVEMENT, translateToLocal("gt.blockmachines.machine.tt.tesla.desc.0"), // Your Tesla I/O machine of choice EnumChatFormatting.AQUA + translateToLocal("gt.blockmachines.machine.tt.tesla.desc.1") // Lightning stoves for the rich diff --git a/src/main/java/com/github/technus/tectech/util/CommonValues.java b/src/main/java/com/github/technus/tectech/util/CommonValues.java index 5b3ee851d1..a42ffa7f9b 100644 --- a/src/main/java/com/github/technus/tectech/util/CommonValues.java +++ b/src/main/java/com/github/technus/tectech/util/CommonValues.java @@ -6,13 +6,13 @@ import net.minecraft.util.EnumChatFormatting; /** * Created by danie_000 on 11.01.2017. */ +@SuppressWarnings("SpellCheckingInspection") public final class CommonValues { public static final String TEC_MARK_SHORT = EnumChatFormatting.BLUE + "Tec" + EnumChatFormatting.DARK_BLUE + "Tech"; public static final String TEC_MARK_GENERAL = TEC_MARK_SHORT + EnumChatFormatting.BLUE + ": Interdimensional"; public static final String TEC_MARK_EM = TEC_MARK_SHORT + EnumChatFormatting.BLUE + ": Elemental Matter"; - public static final String BASS_MARK = TEC_MARK_SHORT + EnumChatFormatting.BLUE + ": Theta Movement"; - public static final String COSMIC_MARK = TEC_MARK_SHORT + EnumChatFormatting.BLUE - + ": Cosmic"; // TODO get a better name than cosmic for *UNDEFINED* thing + public static final String THETA_MOVEMENT = TEC_MARK_SHORT + EnumChatFormatting.BLUE + ": Theta Movement"; + public static final String COSMIC_MARK = TEC_MARK_SHORT + EnumChatFormatting.BLUE + ": Cosmic"; public static final byte DECAY_AT = 0; // hatches compute decays public static final byte MULTI_PURGE_1_AT = 2; // multiblocks clean their hatches 1 @@ -21,16 +21,19 @@ public final class CommonValues { public static final byte MULTI_PURGE_2_AT = 8; // multiblocks clean their hatches 2 public static final byte OVERFLOW_AT = 10; // then hatches clean themselves // - in case some hatches are not in multiblock structure - public static final byte MULTI_CHECK_AT = 12; // multiblock checks it's state + public static final byte MULTI_CHECK_AT = 12; // multiblock checks its state public static final byte DISPERSE_AT = 14; // overflow hatches perform disperse public static final byte TRANSFER_AT = 16; public static final long[] AatV = new long[] { 268435455, 67108863, 16777215, 4194303, 1048575, 262143, 65535, 16383, 4095, 1023, 255, 63, 15, 3, 1, 1 }; - public static final String[] VOLTAGE_NAMES = GT_Values.VOLTAGE_NAMES; public static final String[] VN = GT_Values.VN; public static final long[] V = GT_Values.V; + public static final String[] EOH_TIER_FANCY_NAMES = { + "Crude", "Primitive", "Stable", "Advanced", "Superb", "Exotic", "Perfect", "Tipler", "Gallifreyan" + }; + private CommonValues() {} } diff --git a/src/main/java/com/github/technus/tectech/util/ItemStackLong.java b/src/main/java/com/github/technus/tectech/util/ItemStackLong.java new file mode 100644 index 0000000000..68a7bafd04 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/util/ItemStackLong.java @@ -0,0 +1,20 @@ +package com.github.technus.tectech.util; + +import net.minecraft.item.ItemStack; + +public class ItemStackLong { + + public final ItemStack itemStack; + public long stackSize; + + public ItemStackLong(ItemStack itemStack, long stackSize) { + this.itemStack = itemStack; + this.stackSize = stackSize; + } + + // Copy constructor. + public ItemStackLong(ItemStackLong itemStackLong) { + this.itemStack = itemStackLong.itemStack; + this.stackSize = itemStackLong.stackSize; + } +} |