diff options
Diffstat (limited to 'src/main/java/com')
9 files changed, 1617 insertions, 331 deletions
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 14e4b3a090..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 @@ -34,7 +34,8 @@ 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(); + TT_Block_SpacetimeCompressionFieldGenerators.SpacetimeCompressionFieldGenerators = + new SpacetimeCompressionFieldCasing(); TecTech.LOGGER.info("Spacetime Compression Field Casings registered."); TT_Block_TimeAccelerationFieldGenerators.TimeAccelerationFieldGenerator = new TimeAccelerationFieldCasing(); diff --git a/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipe.java b/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipe.java index 112e227fe8..5e7cfac127 100644 --- a/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipe.java +++ b/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipe.java @@ -1,19 +1,18 @@ package com.github.technus.tectech.recipe; +import static com.google.common.math.LongMath.pow; +import static gregtech.api.util.GT_Utility.getPlasmaFuelValueInEUPerLiterFromMaterial; + import gregtech.api.enums.Materials; +import java.util.*; +import java.util.stream.Collectors; +import java.util.stream.Stream; 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 java.util.*; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -import static com.google.common.math.LongMath.pow; -import static gregtech.api.enums.GT_Values.getMaxPlasmaTurbineEfficiency; -import static gregtech.api.util.GT_Utility.getPlasmaFuelValueInEUPerLiterFromMaterial; +import pers.gwyog.gtneioreplugin.util.GT5OreSmallHelper; public class EyeOfHarmonyRecipe { @@ -32,18 +31,19 @@ public class EyeOfHarmonyRecipe { private final long miningTimeSeconds; - - public EyeOfHarmonyRecipe(GT5OreLayerHelper.OreDimensionWrapper dimensionWrapper, - double recipeEnergyEfficiency, - long hydrogenRequirement, - long heliumRequirement, - long miningTimeSeconds, - long spacetimeCasingTierRequired, - long euOutput, - double baseSuccessChance - ) { + 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, + long euOutput, + double baseSuccessChance) { // 6 * 64 = 6 stacks/second. - ArrayList<Pair<Materials, Long>> materialList = processDimension(dimensionWrapper, miningTimeSeconds, 6 * 64); + ArrayList<Pair<Materials, Long>> materialList = + processDimension(normalOreDimensionWrapper, smallOreDimensionWrapper, miningTimeSeconds, 6 * 64); this.outputItems = validDustGenerator(materialList); this.outputFluids = validPlasmaGenerator(materialList, 0.1); @@ -101,12 +101,14 @@ public class EyeOfHarmonyRecipe { return spacetimeCasingTierRequired; } - 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 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}; + static final double[] oreMultiplier = { + primaryMultiplier, secondaryMultiplier, tertiaryMultiplier, quaternaryMultiplier + }; private static class HashMapHelper extends HashMap<Materials, Double> { @@ -124,24 +126,35 @@ public class EyeOfHarmonyRecipe { } static void processHelper(HashMapHelper outputMap, Materials material, double mainMultiplier, double probability) { - outputMap.add(material, (material.mOreMultiplier * 2) * mainMultiplier * probability); + outputMap.add(material.mDirectSmelting, (material.mOreMultiplier * 2) * mainMultiplier * probability); int index = 0; for (Materials byProductMaterial : material.mOreByProducts) { - outputMap.add(byProductMaterial, mainMultiplier * (oreMultiplier[index++] * 2) * probability); + outputMap.add( + byProductMaterial.mDirectSmelting, mainMultiplier * (oreMultiplier[index++] * 2) * probability); } } - static ArrayList<Pair<Materials, Long>> processDimension(GT5OreLayerHelper.OreDimensionWrapper dimWrapper, long timeInSeconds, long miningMultiplier) { + static ArrayList<Pair<Materials, Long>> processDimension( + GT5OreLayerHelper.NormalOreDimensionWrapper normalOreDimWrapper, + GT5OreSmallHelper.SmallOreDimensionWrapper smallOreDimWrapper, + long timeInSeconds, + long miningMultiplier) { HashMapHelper outputMap = new HashMapHelper(); double mainMultiplier = timeInSeconds * miningMultiplier; - dimWrapper.oreVeinToProbabilityInDimension.forEach((veinInfo, probability) -> { + normalOreDimWrapper.oreVeinToProbabilityInDimension.forEach((veinInfo, probability) -> { processHelper(outputMap, veinInfo.mPrimaryVeinMaterial, mainMultiplier, probability); processHelper(outputMap, veinInfo.mSecondaryMaterial, mainMultiplier, probability); - processHelper(outputMap, veinInfo.mBetweenMaterial, mainMultiplier, probability); - processHelper(outputMap, veinInfo.mSporadicMaterial, 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<>(); @@ -151,7 +164,8 @@ public class EyeOfHarmonyRecipe { return outputList; } - static FluidStack[] validPlasmaGenerator(final List<Pair<Materials, Long>> planetList, final double percentageOfPlasma) { + static FluidStack[] validPlasmaGenerator( + final List<Pair<Materials, Long>> planetList, final double percentageOfPlasma) { List<FluidStack> plasmaList = new ArrayList<>(); @@ -163,9 +177,9 @@ public class EyeOfHarmonyRecipe { return plasmaList.toArray(new FluidStack[0]); } - static List<Pair<ItemStack, Long>> validDustGenerator(final List<Pair<Materials, Long>> planetList) { + static ArrayList<Pair<ItemStack, Long>> validDustGenerator(final ArrayList<Pair<Materials, Long>> planetList) { - List<Pair<ItemStack, Long>> dustList = new ArrayList<>(); + ArrayList<Pair<ItemStack, Long>> dustList = new ArrayList<>(); for (Pair<Materials, Long> pair : planetList) { ItemStack dust = pair.getLeft().getDust(1); @@ -186,27 +200,33 @@ public class EyeOfHarmonyRecipe { 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.Niobium, - 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)))); - }}; + 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 index 4c2255a5f4..936228584c 100644 --- a/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipeStorage.java +++ b/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipeStorage.java @@ -1,66 +1,69 @@ package com.github.technus.tectech.recipe; -import com.google.common.math.LongMath; -import gregtech.api.GregTech_API; +import java.util.HashMap; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; -import org.lwjgl.Sys; import pers.gwyog.gtneioreplugin.plugin.block.BlockDimensionDisplay; import pers.gwyog.gtneioreplugin.plugin.block.ModBlocks; import pers.gwyog.gtneioreplugin.util.DimensionHelper; - -import java.util.HashMap; - -import static pers.gwyog.gtneioreplugin.util.GT5OreLayerHelper.dimToOreWrapper; +import pers.gwyog.gtneioreplugin.util.GT5OreLayerHelper; +import pers.gwyog.gtneioreplugin.util.GT5OreSmallHelper; public class EyeOfHarmonyRecipeStorage { -// static final long MILLION = LongMath.pow(10, 6); -// static final long BILLION = LongMath.pow(10, 9); -// static final long TRILLION = LongMath.pow(10, 12); -// static final long QUADRILLION = LongMath.pow(10, 15); -// static final long QUINTILLION = LongMath.pow(10, 18); -// static final long SEXTILLION = LongMath.pow(10, 21); + // static final long MILLION = LongMath.pow(10, 6); + // static final long BILLION = LongMath.pow(10, 9); + // static final long TRILLION = LongMath.pow(10, 12); + // static final long QUADRILLION = LongMath.pow(10, 15); + // static final long QUINTILLION = LongMath.pow(10, 18); + // static final long SEXTILLION = LongMath.pow(10, 21); // Map is unique so this is fine. - HashMap<Block, String> blocksMapInverted = new HashMap<Block, String>() {{ - ModBlocks.blocks.forEach((dimString, dimBlock) -> { - put(dimBlock, dimString); - }); - }}; + 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 a = (BlockDimensionDisplay) ModBlocks.blocks.get(dimAbbreviation); + private final HashMap<String, EyeOfHarmonyRecipe> recipeHashMap = new HashMap<String, EyeOfHarmonyRecipe>() { + { + for (String dimAbbreviation : DimensionHelper.DimNameDisplayed) { + BlockDimensionDisplay a = (BlockDimensionDisplay) ModBlocks.blocks.get(dimAbbreviation); - try { - put(dimAbbreviation, new EyeOfHarmonyRecipe( - dimToOreWrapper.get(dimAbbreviation), - 1.0, - 100, - 100, - 36_000L, - 0, - 100 * 10, - 0.4)); - } catch(Exception e) { - e.printStackTrace(); - System.out.println(dimAbbreviation + " dimension not found in dimToOreWrapper"); + try { + put( + dimAbbreviation, + new EyeOfHarmonyRecipe( + GT5OreLayerHelper.dimToOreWrapper.get(dimAbbreviation), + GT5OreSmallHelper.dimToSmallOreWrapper.get(dimAbbreviation), + 1.0, + 100, + 100, + 36_000L, + 0, + 100 * 10, + 0.4)); + } catch (Exception e) { + e.printStackTrace(); + System.out.println(dimAbbreviation + " dimension not found in dimToOreWrapper"); + } } } - }}; + }; public EyeOfHarmonyRecipe recipeLookUp(ItemStack aStack) { String dimAbbreviation = blocksMapInverted.get(Block.getBlockFromItem(aStack.getItem())); return recipeHashMap.get(dimAbbreviation); } -// public EyeOfHarmonyRecipe overworld = new EyeOfHarmonyRecipe(dimToOreWrapper.get("Ow"), -// 1.0, -// 100, -// 100, -// 36_000L, -// 0, -// 100 * 10, -// 0.4); + // public EyeOfHarmonyRecipe overworld = new EyeOfHarmonyRecipe(dimToOreWrapper.get("Ow"), + // 1.0, + // 100, + // 100, + // 36_000L, + // 0, + // 100 * 10, + // 0.4); } 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 21c83c03d8..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 @@ -486,6 +486,4 @@ public class TT_recipeAdder extends GT_RecipeAdder { check)); return true; } - - } 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 index 92ec8ae390..59d8ff7ef3 100644 --- a/src/main/java/com/github/technus/tectech/thing/casing/SpacetimeCompressionFieldCasing.java +++ b/src/main/java/com/github/technus/tectech/thing/casing/SpacetimeCompressionFieldCasing.java @@ -1,5 +1,7 @@ package com.github.technus.tectech.thing.casing; +import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; + import com.github.technus.tectech.thing.CustomItemList; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -8,6 +10,7 @@ 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; @@ -15,10 +18,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; -import java.util.List; - -import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; - /** * Created by danie_000 on 03.10.2016. */ @@ -30,16 +29,24 @@ public class SpacetimeCompressionFieldCasing extends GT_Block_Casings_Abstract { public SpacetimeCompressionFieldCasing() { super(GT_Item_CasingsBA0.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); + Textures.BlockIcons.casingTexturePages[texturePage][b + START_INDEX] = + new GT_CopiedBlockTexture(this, 6, b); } - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Crude Spacetime Compression Field Generator"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Primitive Spacetime Compression Field Generator"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Stable Spacetime Compression Field Generator"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Superb Spacetime Compression Field Generator"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Resplendent Spacetime Compression Field Generator"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Perfect Spacetime Compression Field Generator"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Tipler Grade Spacetime Compression Field Generator"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".0.name", "Crude Spacetime Compression Field Generator"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".1.name", "Primitive Spacetime Compression Field Generator"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".2.name", "Stable Spacetime Compression Field Generator"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".3.name", "Superb Spacetime Compression Field Generator"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".4.name", "Resplendent Spacetime Compression Field Generator"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".5.name", "Perfect Spacetime Compression Field Generator"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".6.name", "Tipler Grade Spacetime Compression Field Generator"); CustomItemList.SpacetimeCompressionFieldGeneratorTier0.set(new ItemStack(this, 1, 0)); CustomItemList.SpacetimeCompressionFieldGeneratorTier1.set(new ItemStack(this, 1, 1)); @@ -48,7 +55,6 @@ public class SpacetimeCompressionFieldCasing extends GT_Block_Casings_Abstract { CustomItemList.SpacetimeCompressionFieldGeneratorTier4.set(new ItemStack(this, 1, 4)); CustomItemList.SpacetimeCompressionFieldGeneratorTier5.set(new ItemStack(this, 1, 5)); CustomItemList.SpacetimeCompressionFieldGeneratorTier6.set(new ItemStack(this, 1, 6)); - } @Override 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 index 79ecf062e7..05d97b0eb3 100644 --- a/src/main/java/com/github/technus/tectech/thing/casing/StabilisationFieldCasing.java +++ b/src/main/java/com/github/technus/tectech/thing/casing/StabilisationFieldCasing.java @@ -1,5 +1,7 @@ package com.github.technus.tectech.thing.casing; +import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; + import com.github.technus.tectech.thing.CustomItemList; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -8,6 +10,7 @@ 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; @@ -15,10 +18,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; -import java.util.List; - -import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; - public class StabilisationFieldCasing extends GT_Block_Casings_Abstract { private static IIcon texture_tier_0; @@ -27,16 +26,24 @@ public class StabilisationFieldCasing extends GT_Block_Casings_Abstract { public StabilisationFieldCasing() { super(GT_Item_CasingsBA0.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); + Textures.BlockIcons.casingTexturePages[texturePage][b + START_INDEX] = + new GT_CopiedBlockTexture(this, 6, b); } - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Crude Stabilisation Field Generator"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Primitive Stabilisation Field Generator"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Stable Stabilisation Field Generator"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Superb Stabilisation Field Generator"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Resplendent Stabilisation Field Generator"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Perfect Stabilisation Dilation Generator"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Tipler Grade Stabilisation Field Generator"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".0.name", "Crude Stabilisation Field Generator"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".1.name", "Primitive Stabilisation Field Generator"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".2.name", "Stable Stabilisation Field Generator"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".3.name", "Superb Stabilisation Field Generator"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".4.name", "Resplendent Stabilisation Field Generator"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".5.name", "Perfect Stabilisation Dilation Generator"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".6.name", "Tipler Grade Stabilisation Field Generator"); CustomItemList.StabilisationFieldGeneratorTier0.set(new ItemStack(this, 1, 0)); CustomItemList.StabilisationFieldGeneratorTier1.set(new ItemStack(this, 1, 1)); 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 index 101410baec..ecb070aa5c 100644 --- 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 @@ -6,5 +6,4 @@ 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 index baf55af3fd..fc6ec97dd5 100644 --- a/src/main/java/com/github/technus/tectech/thing/casing/TimeAccelerationFieldCasing.java +++ b/src/main/java/com/github/technus/tectech/thing/casing/TimeAccelerationFieldCasing.java @@ -1,5 +1,7 @@ package com.github.technus.tectech.thing.casing; +import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; + import com.github.technus.tectech.thing.CustomItemList; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -8,6 +10,7 @@ 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; @@ -15,10 +18,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; -import java.util.List; - -import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; - public class TimeAccelerationFieldCasing extends GT_Block_Casings_Abstract { private static IIcon texture_tier_0; @@ -27,16 +26,24 @@ public class TimeAccelerationFieldCasing extends GT_Block_Casings_Abstract { public TimeAccelerationFieldCasing() { super(GT_Item_CasingsBA0.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); + Textures.BlockIcons.casingTexturePages[texturePage][b + START_INDEX] = + new GT_CopiedBlockTexture(this, 6, b); } - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Crude Time Dilation Field Generator"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Primitive Time Dilation Field Generator"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Stable Time Dilation Field Generator"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Superb Time Dilation Field Generator"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Resplendent Time Dilation Field Generator"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Perfect Time Temporal Dilation Generator"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Tipler Grade Time Dilation Field Generator"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".0.name", "Crude Time Dilation Field Generator"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".1.name", "Primitive Time Dilation Field Generator"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".2.name", "Stable Time Dilation Field Generator"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".3.name", "Superb Time Dilation Field Generator"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".4.name", "Resplendent Time Dilation Field Generator"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".5.name", "Perfect Time Temporal Dilation Generator"); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + ".6.name", "Tipler Grade Time Dilation Field Generator"); CustomItemList.TimeAccelerationFieldGeneratorTier0.set(new ItemStack(this, 1, 0)); CustomItemList.TimeAccelerationFieldGeneratorTier1.set(new ItemStack(this, 1, 1)); @@ -45,7 +52,6 @@ public class TimeAccelerationFieldCasing extends GT_Block_Casings_Abstract { CustomItemList.TimeAccelerationFieldGeneratorTier4.set(new ItemStack(this, 1, 4)); CustomItemList.TimeAccelerationFieldGeneratorTier5.set(new ItemStack(this, 1, 5)); CustomItemList.TimeAccelerationFieldGeneratorTier6.set(new ItemStack(this, 1, 6)); - } @Override @@ -74,6 +80,7 @@ public class TimeAccelerationFieldCasing extends GT_Block_Casings_Abstract { 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) { 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 index 4c02edf46e..dcc28e9578 100644 --- 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 @@ -1,5 +1,14 @@ 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; @@ -26,6 +35,7 @@ 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; @@ -33,28 +43,18 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.fluids.FluidStack; import org.apache.commons.lang3.tuple.Pair; -import java.util.*; - -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.*; - @SuppressWarnings("SpellCheckingInspection") -public class GT_MetaTileEntity_EM_EyeOfHarmony extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable, IGlobalWirelessEnergy { - //region variables +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 int spacetimeCompressionFieldMetadata = -1; + private int timeAccelerationFieldMetadata = -1; + private int stabilisationFieldMetadata = -1; private String userUUID = ""; private String userName = ""; @@ -63,124 +63,1328 @@ public class GT_MetaTileEntity_EM_EyeOfHarmony extends GT_MetaTileEntity_Multibl private final long[] computationStack = new long[computationTickCacheSize]; // 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 ", " ", " |
