From 4be0eeceb24d9112fe549a34827ac586b2be6638 Mon Sep 17 00:00:00 2001 From: Bass Date: Thu, 24 Jan 2019 13:29:13 +0000 Subject: Smoll tesla boi time --- .../single/GT_MetaTileEntity_TeslaCoil.java | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java (limited to 'src/main/java') 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 new file mode 100644 index 0000000000..a0868ea5da --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java @@ -0,0 +1,62 @@ +package com.github.technus.tectech.thing.metaTileEntity.single; + +import com.github.technus.tectech.Reference; +import com.github.technus.tectech.Util; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicBatteryBuffer; +import gregtech.api.util.GT_ModHandler; +import net.minecraft.item.ItemStack; + +import java.util.ArrayList; + +import static com.github.technus.tectech.CommonValues.V; + +public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryBuffer { + public boolean ePowerPass = false; + public boolean teslaCompatible = true; + + private int scanTime = 0; + private int scanRadius = 64;//TODO Generate depending on power stored + private long euTOutMax = V[9] / 8;//TODO Generate depending on count and kind of capacitors + private ArrayList eTeslaList = new ArrayList<>(); + + public GT_MetaTileEntity_TeslaCoil(int aID, String aName, String aNameRegional, int aTier, int aSlotCount) { + super(aID, aName, aNameRegional, aTier, "Tesla Coil Transceiver", aSlotCount); + Util.setTier(aTier, this); + } + + public GT_MetaTileEntity_TeslaCoil(String aName, int aTier, String aDescription, ITexture[][][] aTextures, int aSlotCount) { + super(aName, aTier, aDescription, aTextures, aSlotCount); + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_TeslaCoil(mName, mTier, mDescription, mTextures, mInventory.length); + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if (aBaseMetaTileEntity.isServerSide()) { + this.mCharge = aBaseMetaTileEntity.getStoredEU() / 2L > aBaseMetaTileEntity.getEUCapacity() / 3L; + this.mDecharge = aBaseMetaTileEntity.getStoredEU() < aBaseMetaTileEntity.getEUCapacity() / 3L; + this.mBatteryCount = 0; + this.mChargeableCount = 0; + ItemStack[] var4 = this.mInventory; + int var5 = var4.length; + + for (int var6 = 0; var6 < var5; ++var6) { + ItemStack tStack = var4[var6]; + if (GT_ModHandler.isElectricItem(tStack, this.mTier)) { + if (GT_ModHandler.isChargerItem(tStack)) { + ++this.mBatteryCount; + } + ++this.mChargeableCount; + } + } + //This is where most things happen~~ + } + } +} -- cgit From 21dddd2bd5e7944dfbcdc12c2c5db8599d6a5588 Mon Sep 17 00:00:00 2001 From: bass Date: Fri, 25 Jan 2019 12:29:51 +0000 Subject: Actually load the Teslas, not that they work LO --- .../tectech/loader/thing/MachineLoader.java | 698 +++++++++++---------- .../technus/tectech/thing/CustomItemList.java | 466 +++++++------- 2 files changed, 600 insertions(+), 564 deletions(-) (limited to 'src/main/java') 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 c1b78523c5..61ce45c031 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 @@ -1,333 +1,365 @@ -package com.github.technus.tectech.loader.thing; - -import com.github.technus.tectech.Reference; -import com.github.technus.tectech.compatibility.dreamcraft.NoDreamCraftMachineLoader; -import com.github.technus.tectech.compatibility.thaumcraft.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_essentiaDequantizer; -import com.github.technus.tectech.compatibility.thaumcraft.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_essentiaQuantizer; -import com.github.technus.tectech.thing.metaTileEntity.hatch.*; -import com.github.technus.tectech.thing.metaTileEntity.multi.*; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; -import com.github.technus.tectech.thing.metaTileEntity.multi.em_machine.GT_MetaTileEntity_EM_machine; -import com.github.technus.tectech.thing.metaTileEntity.pipe.GT_MetaTileEntity_Pipe_Data; -import com.github.technus.tectech.thing.metaTileEntity.pipe.GT_MetaTileEntity_Pipe_EM; -import com.github.technus.tectech.thing.metaTileEntity.single.*; -import cpw.mods.fml.common.Loader; - -import static com.github.technus.tectech.thing.CustomItemList.*; - -/** - * Created by danie_000 on 16.11.2016. - */ -public class MachineLoader implements Runnable { - @Override - public void run() { - // =================================================================================================== - // eM IN - // =================================================================================================== - - eM_in_UV.set(new GT_MetaTileEntity_Hatch_InputElemental( - 15000, "hatch.emin.tier.08", "UV Elemental Input Hatch", 8).getStackForm(1L)); - - eM_in_UHV.set(new GT_MetaTileEntity_Hatch_InputElemental( - 15001, "hatch.emin.tier.09", "UHV Elemental Input Hatch", 9).getStackForm(1L)); - - eM_in_UEV.set(new GT_MetaTileEntity_Hatch_InputElemental( - 15002, "hatch.emin.tier.10", "UEV Elemental Input Hatch", 10).getStackForm(1L)); - - eM_in_UIV.set(new GT_MetaTileEntity_Hatch_InputElemental( - 15003, "hatch.emin.tier.11", "UIV Elemental Input Hatch", 11).getStackForm(1L)); - - eM_in_UMV.set(new GT_MetaTileEntity_Hatch_InputElemental( - 15004, "hatch.emin.tier.12", "UMV Elemental Input Hatch", 12).getStackForm(1L)); - - eM_in_UXV.set(new GT_MetaTileEntity_Hatch_InputElemental( - 15005, "hatch.emin.tier.13", "UXV Elemental Input Hatch", 13).getStackForm(1L)); - - // =================================================================================================== - // eM OUT - // =================================================================================================== - - eM_out_UV.set(new GT_MetaTileEntity_Hatch_OutputElemental( - 15010, "hatch.emout.tier.08", "UV Elemental Output Hatch", 8).getStackForm(1L)); - - eM_out_UHV.set(new GT_MetaTileEntity_Hatch_OutputElemental( - 15011, "hatch.emout.tier.09", "UHV Elemental Output Hatch", 9).getStackForm(1L)); - - eM_out_UEV.set(new GT_MetaTileEntity_Hatch_OutputElemental( - 15012, "hatch.emout.tier.10", "UEV Elemental Output Hatch", 10).getStackForm(1L)); - - eM_out_UIV.set(new GT_MetaTileEntity_Hatch_OutputElemental( - 15013, "hatch.emout.tier.11", "UIV Elemental Output Hatch", 11).getStackForm(1L)); - - eM_out_UMV.set(new GT_MetaTileEntity_Hatch_OutputElemental( - 15014, "hatch.emout.tier.12", "UMV Elemental Output Hatch", 12).getStackForm(1L)); - - eM_out_UXV.set(new GT_MetaTileEntity_Hatch_OutputElemental( - 15015, "hatch.emout.tier.13", "UXV Elemental Output Hatch", 13).getStackForm(1L)); - - // =================================================================================================== - // eM Waste OUT - // =================================================================================================== - - eM_muffler_UV.set(new GT_MetaTileEntity_Hatch_OverflowElemental( - 15020, "hatch.emmuffler.tier.08", "UV Overflow Output Hatch", 8, 1e10f).getStackForm(1L)); - - eM_muffler_UHV.set(new GT_MetaTileEntity_Hatch_OverflowElemental( - 15021, "hatch.emmuffler.tier.09", "UHV Overflow Output Hatch", 9, 5e10f).getStackForm(1L)); - - eM_muffler_UEV.set(new GT_MetaTileEntity_Hatch_OverflowElemental( - 15022, "hatch.emmuffler.tier.10", "UEV Overflow Output Hatch", 10, 25e10f).getStackForm(1L)); - - eM_muffler_UIV.set(new GT_MetaTileEntity_Hatch_OverflowElemental( - 15023, "hatch.emmuffler.tier.11", "UIV Overflow Output Hatch", 11, 125e10f).getStackForm(1L)); - - eM_muffler_UMV.set(new GT_MetaTileEntity_Hatch_OverflowElemental( - 15024, "hatch.emmuffler.tier.12", "UMV Overflow Output Hatch", 12, 125e11f).getStackForm(1L)); - - eM_muffler_UXV.set(new GT_MetaTileEntity_Hatch_OverflowElemental( - 15025, "hatch.emmuffler.tier.13", "UXV Overflow Output Hatch", 13, 125e12f).getStackForm(1L)); - - // =================================================================================================== - // Multi AMP Power INPUTS - // =================================================================================================== - - eM_energymulti4_IV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15100, "hatch.energymulti04.tier.05", "IV 4A Energy Hatch", 5, 4).getStackForm(1L)); - eM_energymulti16_IV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15110, "hatch.energymulti16.tier.05", "IV 16A Energy Hatch", 5, 16).getStackForm(1L)); - eM_energymulti64_IV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15120, "hatch.energymulti64.tier.05", "IV 64A Energy Hatch", 5, 64).getStackForm(1L)); - - eM_energymulti4_LuV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15101, "hatch.energymulti04.tier.06", "LuV 4A Energy Hatch", 6, 4).getStackForm(1L)); - eM_energymulti16_LuV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15111, "hatch.energymulti16.tier.06", "LuV 16A Energy Hatch", 6, 16).getStackForm(1L)); - eM_energymulti64_LuV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15121, "hatch.energymulti64.tier.06", "LuV 64A Energy Hatch", 6, 64).getStackForm(1L)); - - eM_energymulti4_ZPM.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15102, "hatch.energymulti04.tier.07", "ZPM 4A Energy Hatch", 7, 4).getStackForm(1L)); - eM_energymulti16_ZPM.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15112, "hatch.energymulti16.tier.07", "ZPM 16A Energy Hatch", 7, 16).getStackForm(1L)); - eM_energymulti64_ZPM.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15122, "hatch.energymulti64.tier.07", "ZPM 64A Energy Hatch", 7, 64).getStackForm(1L)); - - eM_energymulti4_UV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15103, "hatch.energymulti04.tier.08", "UV 4A Energy Hatch", 8, 4).getStackForm(1L)); - eM_energymulti16_UV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15113, "hatch.energymulti16.tier.08", "UV 16A Energy Hatch", 8, 16).getStackForm(1L)); - eM_energymulti64_UV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15123, "hatch.energymulti64.tier.08", "UV 64A Energy Hatch", 8, 64).getStackForm(1L)); - - eM_energymulti4_UHV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15104, "hatch.energymulti04.tier.09", "UHV 4A Energy Hatch", 9, 4).getStackForm(1L)); - eM_energymulti16_UHV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15114, "hatch.energymulti16.tier.09", "UHV 16A Energy Hatch", 9, 16).getStackForm(1L)); - eM_energymulti64_UHV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15124, "hatch.energymulti64.tier.09", "UHV 64A Energy Hatch", 9, 64).getStackForm(1L)); - - eM_energymulti4_UEV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15105, "hatch.energymulti04.tier.10", "UEV 4A Energy Hatch", 10, 4).getStackForm(1L)); - eM_energymulti16_UEV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15115, "hatch.energymulti16.tier.10", "UEV 16A Energy Hatch", 10, 16).getStackForm(1L)); - eM_energymulti64_UEV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15125, "hatch.energymulti64.tier.10", "UEV 64A Energy Hatch", 10, 64).getStackForm(1L)); - - eM_energymulti4_UIV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15106, "hatch.energymulti04.tier.11", "UIV 4A Energy Hatch", 11, 4).getStackForm(1L)); - eM_energymulti16_UIV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15116, "hatch.energymulti16.tier.11", "UIV 16A Energy Hatch", 11, 16).getStackForm(1L)); - eM_energymulti64_UIV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15126, "hatch.energymulti64.tier.11", "UIV 64A Energy Hatch", 11, 64).getStackForm(1L)); - - eM_energymulti4_UMV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15107, "hatch.energymulti04.tier.12", "UMV 4A Energy Hatch", 12, 4).getStackForm(1L)); - eM_energymulti16_UMV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15117, "hatch.energymulti16.tier.12", "UMV 16A Energy Hatch", 12, 16).getStackForm(1L)); - eM_energymulti64_UMV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15127, "hatch.energymulti64.tier.12", "UMV 64A Energy Hatch", 12, 64).getStackForm(1L)); - - eM_energymulti4_UXV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15108, "hatch.energymulti04.tier.13", "UXV 4A Energy Hatch", 13, 4).getStackForm(1L)); - eM_energymulti16_UXV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15118, "hatch.energymulti16.tier.13", "UXV 16A Energy Hatch", 13, 16).getStackForm(1L)); - eM_energymulti64_UXV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15128, "hatch.energymulti64.tier.13", "UXV 64A Energy Hatch", 13, 64).getStackForm(1L)); - - // =================================================================================================== - // Multi AMP Power OUTPUTS - // =================================================================================================== - - - eM_dynamomulti4_IV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15200, "hatch.dynamomulti04.tier.05", "IV 4A Dynamo Hatch", 5, 4).getStackForm(1L)); - eM_dynamomulti16_IV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15210, "hatch.dynamomulti16.tier.05", "IV 16A Dynamo Hatch", 5, 16).getStackForm(1L)); - eM_dynamomulti64_IV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15220, "hatch.dynamomulti64.tier.05", "IV 64A Dynamo Hatch", 5, 64).getStackForm(1L)); - - eM_dynamomulti4_LuV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15201, "hatch.dynamomulti04.tier.06", "LuV 4A Dynamo Hatch", 6, 4).getStackForm(1L)); - eM_dynamomulti16_LuV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15211, "hatch.dynamomulti16.tier.06", "LuV 16A Dynamo Hatch", 6, 16).getStackForm(1L)); - eM_dynamomulti64_LuV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15221, "hatch.dynamomulti64.tier.06", "LuV 64A Dynamo Hatch", 6, 64).getStackForm(1L)); - - eM_dynamomulti4_ZPM.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15202, "hatch.dynamomulti04.tier.07", "ZPM 4A Dynamo Hatch", 7, 4).getStackForm(1L)); - eM_dynamomulti16_ZPM.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15212, "hatch.dynamomulti16.tier.07", "ZPM 16A Dynamo Hatch", 7, 16).getStackForm(1L)); - eM_dynamomulti64_ZPM.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15222, "hatch.dynamomulti64.tier.07", "ZPM 64A Dynamo Hatch", 7, 64).getStackForm(1L)); - - eM_dynamomulti4_UV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15203, "hatch.dynamomulti04.tier.08", "UV 4A Dynamo Hatch", 8, 4).getStackForm(1L)); - eM_dynamomulti16_UV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15213, "hatch.dynamomulti16.tier.08", "UV 16A Dynamo Hatch", 8, 16).getStackForm(1L)); - eM_dynamomulti64_UV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15223, "hatch.dynamomulti64.tier.08", "UV 64A Dynamo Hatch", 8, 64).getStackForm(1L)); - - eM_dynamomulti4_UHV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15204, "hatch.dynamomulti04.tier.09", "UHV 4A Dynamo Hatch", 9, 4).getStackForm(1L)); - eM_dynamomulti16_UHV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15214, "hatch.dynamomulti16.tier.09", "UHV 16A Dynamo Hatch", 9, 16).getStackForm(1L)); - eM_dynamomulti64_UHV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15224, "hatch.dynamomulti64.tier.09", "UHV 64A Dynamo Hatch", 9, 64).getStackForm(1L)); - - eM_dynamomulti4_UEV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15205, "hatch.dynamomulti04.tier.10", "UEV 4A Dynamo Hatch", 10, 4).getStackForm(1L)); - eM_dynamomulti16_UEV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15215, "hatch.dynamomulti16.tier.10", "UEV 16A Dynamo Hatch", 10, 16).getStackForm(1L)); - eM_dynamomulti64_UEV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15225, "hatch.dynamomulti64.tier.10", "UEV 64A Dynamo Hatch", 10, 64).getStackForm(1L)); - - eM_dynamomulti4_UIV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15206, "hatch.dynamomulti04.tier.11", "UIV 4A Dynamo Hatch", 11, 4).getStackForm(1L)); - eM_dynamomulti16_UIV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15216, "hatch.dynamomulti16.tier.11", "UIV 16A Dynamo Hatch", 11, 16).getStackForm(1L)); - eM_dynamomulti64_UIV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15226, "hatch.dynamomulti64.tier.11", "UIV 64A Dynamo Hatch", 11, 64).getStackForm(1L)); - - eM_dynamomulti4_UMV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15207, "hatch.dynamomulti04.tier.12", "UMV 4A Dynamo Hatch", 12, 4).getStackForm(1L)); - eM_dynamomulti16_UMV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15217, "hatch.dynamomulti16.tier.12", "UMV 16A Dynamo Hatch", 12, 16).getStackForm(1L)); - eM_dynamomulti64_UMV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15227, "hatch.dynamomulti64.tier.12", "UMV 64A Dynamo Hatch", 12, 64).getStackForm(1L)); - - eM_dynamomulti4_UXV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15208, "hatch.dynamomulti04.tier.13", "UXV 4A Dynamo Hatch", 13, 4).getStackForm(1L)); - eM_dynamomulti16_UXV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15218, "hatch.dynamomulti16.tier.13", "UXV 16A Dynamo Hatch", 13, 16).getStackForm(1L)); - eM_dynamomulti64_UXV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15228, "hatch.dynamomulti64.tier.13", "UXV 64A Dynamo Hatch", 13, 64).getStackForm(1L)); - - // =================================================================================================== - // MULTIBLOCKS - // =================================================================================================== - - Machine_Multi_Transformer.set(new GT_MetaTileEntity_EM_transformer(15300, "multimachine.em.transformer", "Active Transformer").getStackForm(1L)); - - Machine_Multi_Switch.set(new GT_MetaTileEntity_EM_switch(15310, "multimachine.em.switch", "Network Switch With QoS").getStackForm(1L)); - Machine_Multi_Computer.set(new GT_MetaTileEntity_EM_computer(15311, "multimachine.em.computer", "Quantum Computer").getStackForm(1L)); - Machine_Multi_Microwave.set(new GT_MetaTileEntity_TM_microwave(15312, "multimachine.tm.microwave", "Microwave Grinder").getStackForm(1L)); - Machine_Multi_DataBank.set(new GT_MetaTileEntity_EM_dataBank(15313, "multimachine.em.databank", "Data Bank").getStackForm(1L)); - Machine_Multi_teslaCoil.set(new GT_MetaTileEntity_TM_teslaCoil(15314, "multimachine.tm.teslaCoil", "Tesla Coil").getStackForm(1L)); - - Machine_Multi_EMjunction.set(new GT_MetaTileEntity_EM_junction(15320, "multimachine.em.junction", "Matter Junction").getStackForm(1L)); - Machine_Multi_MatterToEM.set(new GT_MetaTileEntity_EM_quantizer(15321, "multimachine.em.mattertoem", "Matter Quantizer").getStackForm(1L)); - Machine_Multi_EMToMatter.set(new GT_MetaTileEntity_EM_dequantizer(15322, "multimachine.em.emtomatter", "Matter Dequantizer").getStackForm(1L)); - - // COMPAT - Machine_Multi_EssentiaToEM.set(new GT_MetaTileEntity_EM_essentiaQuantizer(15323, "multimachine.em.essentiatoem", "Essentia Quantizer").getStackForm(1L)); - Machine_Multi_EMToEssentia.set(new GT_MetaTileEntity_EM_essentiaDequantizer(15324, "multimachine.em.emtoessentia", "Essentia Dequantizer").getStackForm(1L)); - - Machine_Multi_Scanner.set(new GT_MetaTileEntity_EM_scanner(15330, "multimachine.em.scanner", "Elemental Scanner").getStackForm(1L)); - Machine_Multi_Research.set(new GT_MetaTileEntity_EM_research(15331, "multimachine.em.research", "Research station").getStackForm(1L)); - - Machine_Multi_Collider.set(new GT_MetaTileEntity_EM_collider(15340, "multimachine.em.collider", "Matter Collider").getStackForm(1L)); - - Machine_Multi_Infuser.set(new GT_MetaTileEntity_EM_infuser(15350, "multimachine.em.infuser", "Energy Infuser").getStackForm(1)); - - Machine_Multi_EMmachine.set(new GT_MetaTileEntity_EM_machine(15360, "multimachine.em.processing", "Quantum Processing Machine").getStackForm(1L)); - - Machine_Multi_EMCrafter.set(new GT_MetaTileEntity_EM_crafting(15370, "multimachine.em.crafter", "Matter Assembler").getStackForm(1L)); - - Machine_Multi_Stabilizer.set(new GT_MetaTileEntity_EM_stabilizer(15380, "multimachine.em.stabilizer", "Elemental Stabilizer").getStackForm(1L)); - - Machine_Multi_Wormhole.set(new GT_MetaTileEntity_EM_wormhole(15390, "multimachine.em.wormhole", "Wormhole").getStackForm(1L)); - - Machine_Multi_Decay.set(new GT_MetaTileEntity_EM_decay(15400, "multimachine.em.decay", "Decay Generator").getStackForm(1L)); - 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").getStackForm(1L)); - - // =================================================================================================== - // Hatches - // =================================================================================================== - - Parametrizer_Hatch.set(new GT_MetaTileEntity_Hatch_Param(15420, "hatch.param.tier.07", "Parametrizer", 7).getStackForm(1L)); - ParametrizerX_Hatch.set(new GT_MetaTileEntity_Hatch_Param(15421, "hatch.param.tier.10", "Parametrizer X", 10).getStackForm(1L)); - - Uncertainty_Hatch.set(new GT_MetaTileEntity_Hatch_Uncertainty(15430, "hatch.certain.tier.07", "Uncertainty Resolver", 7).getStackForm(1L)); - UncertaintyX_Hatch.set(new GT_MetaTileEntity_Hatch_Uncertainty(15431, "hatch.certain.tier.10", "Uncertainty Resolver X", 10).getStackForm(1L)); - - dataIn_Hatch.set(new GT_MetaTileEntity_Hatch_InputData(15440, "hatch.datain.tier.07", "Optical Slave Connector", 7).getStackForm(1L)); - dataOut_Hatch.set(new GT_MetaTileEntity_Hatch_OutputData(15441, "hatch.dataout.tier.07", "Optical Master Connector", 7).getStackForm(1L)); - dataInAss_Hatch.set(new GT_MetaTileEntity_Hatch_InputDataItems(15442, "hatch.datainass.tier.07", "Assembly line Slave Connector", 7).getStackForm(1L)); - dataOutAss_Hatch.set(new GT_MetaTileEntity_Hatch_OutputDataItems(15443, "hatch.dataoutass.tier.07", "Data Bank Master Connector", 7).getStackForm(1L)); - - rack_Hatch.set(new GT_MetaTileEntity_Hatch_Rack(15450, "hatch.rack.tier.08", "Computer Rack", 8, "4 Slot Rack").getStackForm(1L)); - holder_Hatch.set(new GT_MetaTileEntity_Hatch_Holder(15451, "hatch.holder.tier.09", "Object Holder", 8, "For Research Station").getStackForm(1L)); - - capacitor_Hatch.set(new GT_MetaTileEntity_Hatch_Capacitor(15452, "hatch.capacitor.tier.05", "Capacitor Hatch", 5, "For Tesla Coil").getStackForm(1L)); - - // =================================================================================================== - // Pipes - // =================================================================================================== - - EMpipe.set(new GT_MetaTileEntity_Pipe_EM(15460, "pipe.elementalmatter", "Quantum \"Tunnel\"").getStackForm(1L)); - - DATApipe.set(new GT_MetaTileEntity_Pipe_Data(15470, "pipe.datastream", "Optical Fiber Cable").getStackForm(1L)); - - // =================================================================================================== - // Single Blocks - // =================================================================================================== - - Machine_OwnerDetector.set(new GT_MetaTileEntity_OwnerDetector(15480, "machine.tt.ownerdetector", "Owner detector", 3).getStackForm(1L)); - Machine_DataReader.set(new GT_MetaTileEntity_DataReader(15481, "machine.tt.datareader", "Data Reader", 5).getStackForm(1L)); - - Machine_BuckConverter_IV.set(new GT_MetaTileEntity_BuckConverter(15485, "machine.tt.buck.05", "Insane Buck Converter", 5).getStackForm(1L)); - Machine_BuckConverter_LuV.set(new GT_MetaTileEntity_BuckConverter(15486, "machine.tt.buck.06", "Ludicrous Buck Converter", 6).getStackForm(1L)); - Machine_BuckConverter_ZPM.set(new GT_MetaTileEntity_BuckConverter(15487, "machine.tt.buck.07", "ZPM Voltage Buck Converter", 7).getStackForm(1L)); - Machine_BuckConverter_UV.set(new GT_MetaTileEntity_BuckConverter(15488, "machine.tt.buck.08", "Ultimate Power Buck Converter", 8).getStackForm(1L)); - Machine_BuckConverter_UHV.set(new GT_MetaTileEntity_BuckConverter(15489, "machine.tt.buck.09", "Highly Ultimate Buck Converter", 9).getStackForm(1L)); - Machine_BuckConverter_UEV.set(new GT_MetaTileEntity_BuckConverter(15490, "machine.tt.buck.10", "Extremely Ultimate Buck Converter", 10).getStackForm(1L)); - Machine_BuckConverter_UIV.set(new GT_MetaTileEntity_BuckConverter(15491, "machine.tt.buck.11", "Insanely Ultimate Buck Converter", 11).getStackForm(1L)); - Machine_BuckConverter_UMV.set(new GT_MetaTileEntity_BuckConverter(15492, "machine.tt.buck.12", "Mega Ultimate Buck Converter", 12).getStackForm(1L)); - Machine_BuckConverter_UXV.set(new GT_MetaTileEntity_BuckConverter(15493, "machine.tt.buck.13", "Extended Mega Ultimate Buck Converter", 13).getStackForm(1L)); - - // =================================================================================================== - // Debug Stuff - // =================================================================================================== - hatch_CreativeMaitenance.set(new GT_MetaTileEntity_Hatch_CreativeMaintenance(15497, "debug.tt.maintenance", "Debug Maintenance Hatch", 15).getStackForm(1L)); - Machine_DebugGenny.set(new GT_MetaTileEntity_DebugPowerGenerator(15498, "debug.tt.genny", "Debug Power Generator", 15).getStackForm(1L)); - Machine_DebugWriter.set(new GT_MetaTileEntity_DebugStructureWriter(15499, "debug.tt.writer", "Debug Structure Writer", 15).getStackForm(1L)); - - // =================================================================================================== - // MetaTE init - // =================================================================================================== - - GT_MetaTileEntity_MultiblockBase_EM.run(); - GT_MetaTileEntity_Hatch_Rack.run(); - GT_MetaTileEntity_EM_computer.run(); - GT_MetaTileEntity_EM_research.run(); - GT_MetaTileEntity_EM_dataBank.run(); - GT_MetaTileEntity_TM_teslaCoil.run(); - - GT_MetaTileEntity_DataReader.run(); - - if (!Loader.isModLoaded(Reference.DREAMCRAFT)) { - new NoDreamCraftMachineLoader().run(); - } - } -} +package com.github.technus.tectech.loader.thing; + +import com.github.technus.tectech.Reference; +import com.github.technus.tectech.compatibility.dreamcraft.NoDreamCraftMachineLoader; +import com.github.technus.tectech.compatibility.thaumcraft.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_essentiaDequantizer; +import com.github.technus.tectech.compatibility.thaumcraft.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_essentiaQuantizer; +import com.github.technus.tectech.thing.metaTileEntity.hatch.*; +import com.github.technus.tectech.thing.metaTileEntity.multi.*; +import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; +import com.github.technus.tectech.thing.metaTileEntity.multi.em_machine.GT_MetaTileEntity_EM_machine; +import com.github.technus.tectech.thing.metaTileEntity.pipe.GT_MetaTileEntity_Pipe_Data; +import com.github.technus.tectech.thing.metaTileEntity.pipe.GT_MetaTileEntity_Pipe_EM; +import com.github.technus.tectech.thing.metaTileEntity.single.*; +import cpw.mods.fml.common.Loader; + +import static com.github.technus.tectech.thing.CustomItemList.*; + +/** + * Created by danie_000 on 16.11.2016. + */ +public class MachineLoader implements Runnable { + @Override + public void run() { + // =================================================================================================== + // eM IN + // =================================================================================================== + + eM_in_UV.set(new GT_MetaTileEntity_Hatch_InputElemental( + 15000, "hatch.emin.tier.08", "UV Elemental Input Hatch", 8).getStackForm(1L)); + + eM_in_UHV.set(new GT_MetaTileEntity_Hatch_InputElemental( + 15001, "hatch.emin.tier.09", "UHV Elemental Input Hatch", 9).getStackForm(1L)); + + eM_in_UEV.set(new GT_MetaTileEntity_Hatch_InputElemental( + 15002, "hatch.emin.tier.10", "UEV Elemental Input Hatch", 10).getStackForm(1L)); + + eM_in_UIV.set(new GT_MetaTileEntity_Hatch_InputElemental( + 15003, "hatch.emin.tier.11", "UIV Elemental Input Hatch", 11).getStackForm(1L)); + + eM_in_UMV.set(new GT_MetaTileEntity_Hatch_InputElemental( + 15004, "hatch.emin.tier.12", "UMV Elemental Input Hatch", 12).getStackForm(1L)); + + eM_in_UXV.set(new GT_MetaTileEntity_Hatch_InputElemental( + 15005, "hatch.emin.tier.13", "UXV Elemental Input Hatch", 13).getStackForm(1L)); + + // =================================================================================================== + // eM OUT + // =================================================================================================== + + eM_out_UV.set(new GT_MetaTileEntity_Hatch_OutputElemental( + 15010, "hatch.emout.tier.08", "UV Elemental Output Hatch", 8).getStackForm(1L)); + + eM_out_UHV.set(new GT_MetaTileEntity_Hatch_OutputElemental( + 15011, "hatch.emout.tier.09", "UHV Elemental Output Hatch", 9).getStackForm(1L)); + + eM_out_UEV.set(new GT_MetaTileEntity_Hatch_OutputElemental( + 15012, "hatch.emout.tier.10", "UEV Elemental Output Hatch", 10).getStackForm(1L)); + + eM_out_UIV.set(new GT_MetaTileEntity_Hatch_OutputElemental( + 15013, "hatch.emout.tier.11", "UIV Elemental Output Hatch", 11).getStackForm(1L)); + + eM_out_UMV.set(new GT_MetaTileEntity_Hatch_OutputElemental( + 15014, "hatch.emout.tier.12", "UMV Elemental Output Hatch", 12).getStackForm(1L)); + + eM_out_UXV.set(new GT_MetaTileEntity_Hatch_OutputElemental( + 15015, "hatch.emout.tier.13", "UXV Elemental Output Hatch", 13).getStackForm(1L)); + + // =================================================================================================== + // eM Waste OUT + // =================================================================================================== + + eM_muffler_UV.set(new GT_MetaTileEntity_Hatch_OverflowElemental( + 15020, "hatch.emmuffler.tier.08", "UV Overflow Output Hatch", 8, 1e10f).getStackForm(1L)); + + eM_muffler_UHV.set(new GT_MetaTileEntity_Hatch_OverflowElemental( + 15021, "hatch.emmuffler.tier.09", "UHV Overflow Output Hatch", 9, 5e10f).getStackForm(1L)); + + eM_muffler_UEV.set(new GT_MetaTileEntity_Hatch_OverflowElemental( + 15022, "hatch.emmuffler.tier.10", "UEV Overflow Output Hatch", 10, 25e10f).getStackForm(1L)); + + eM_muffler_UIV.set(new GT_MetaTileEntity_Hatch_OverflowElemental( + 15023, "hatch.emmuffler.tier.11", "UIV Overflow Output Hatch", 11, 125e10f).getStackForm(1L)); + + eM_muffler_UMV.set(new GT_MetaTileEntity_Hatch_OverflowElemental( + 15024, "hatch.emmuffler.tier.12", "UMV Overflow Output Hatch", 12, 125e11f).getStackForm(1L)); + + eM_muffler_UXV.set(new GT_MetaTileEntity_Hatch_OverflowElemental( + 15025, "hatch.emmuffler.tier.13", "UXV Overflow Output Hatch", 13, 125e12f).getStackForm(1L)); + + // =================================================================================================== + // Multi AMP Power INPUTS + // =================================================================================================== + + eM_energymulti4_IV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( + 15100, "hatch.energymulti04.tier.05", "IV 4A Energy Hatch", 5, 4).getStackForm(1L)); + eM_energymulti16_IV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( + 15110, "hatch.energymulti16.tier.05", "IV 16A Energy Hatch", 5, 16).getStackForm(1L)); + eM_energymulti64_IV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( + 15120, "hatch.energymulti64.tier.05", "IV 64A Energy Hatch", 5, 64).getStackForm(1L)); + + eM_energymulti4_LuV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( + 15101, "hatch.energymulti04.tier.06", "LuV 4A Energy Hatch", 6, 4).getStackForm(1L)); + eM_energymulti16_LuV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( + 15111, "hatch.energymulti16.tier.06", "LuV 16A Energy Hatch", 6, 16).getStackForm(1L)); + eM_energymulti64_LuV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( + 15121, "hatch.energymulti64.tier.06", "LuV 64A Energy Hatch", 6, 64).getStackForm(1L)); + + eM_energymulti4_ZPM.set(new GT_MetaTileEntity_Hatch_EnergyMulti( + 15102, "hatch.energymulti04.tier.07", "ZPM 4A Energy Hatch", 7, 4).getStackForm(1L)); + eM_energymulti16_ZPM.set(new GT_MetaTileEntity_Hatch_EnergyMulti( + 15112, "hatch.energymulti16.tier.07", "ZPM 16A Energy Hatch", 7, 16).getStackForm(1L)); + eM_energymulti64_ZPM.set(new GT_MetaTileEntity_Hatch_EnergyMulti( + 15122, "hatch.energymulti64.tier.07", "ZPM 64A Energy Hatch", 7, 64).getStackForm(1L)); + + eM_energymulti4_UV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( + 15103, "hatch.energymulti04.tier.08", "UV 4A Energy Hatch", 8, 4).getStackForm(1L)); + eM_energymulti16_UV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( + 15113, "hatch.energymulti16.tier.08", "UV 16A Energy Hatch", 8, 16).getStackForm(1L)); + eM_energymulti64_UV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( + 15123, "hatch.energymulti64.tier.08", "UV 64A Energy Hatch", 8, 64).getStackForm(1L)); + + eM_energymulti4_UHV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( + 15104, "hatch.energymulti04.tier.09", "UHV 4A Energy Hatch", 9, 4).getStackForm(1L)); + eM_energymulti16_UHV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( + 15114, "hatch.energymulti16.tier.09", "UHV 16A Energy Hatch", 9, 16).getStackForm(1L)); + eM_energymulti64_UHV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( + 15124, "hatch.energymulti64.tier.09", "UHV 64A Energy Hatch", 9, 64).getStackForm(1L)); + + eM_energymulti4_UEV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( + 15105, "hatch.energymulti04.tier.10", "UEV 4A Energy Hatch", 10, 4).getStackForm(1L)); + eM_energymulti16_UEV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( + 15115, "hatch.energymulti16.tier.10", "UEV 16A Energy Hatch", 10, 16).getStackForm(1L)); + eM_energymulti64_UEV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( + 15125, "hatch.energymulti64.tier.10", "UEV 64A Energy Hatch", 10, 64).getStackForm(1L)); + + eM_energymulti4_UIV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( + 15106, "hatch.energymulti04.tier.11", "UIV 4A Energy Hatch", 11, 4).getStackForm(1L)); + eM_energymulti16_UIV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( + 15116, "hatch.energymulti16.tier.11", "UIV 16A Energy Hatch", 11, 16).getStackForm(1L)); + eM_energymulti64_UIV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( + 15126, "hatch.energymulti64.tier.11", "UIV 64A Energy Hatch", 11, 64).getStackForm(1L)); + + eM_energymulti4_UMV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( + 15107, "hatch.energymulti04.tier.12", "UMV 4A Energy Hatch", 12, 4).getStackForm(1L)); + eM_energymulti16_UMV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( + 15117, "hatch.energymulti16.tier.12", "UMV 16A Energy Hatch", 12, 16).getStackForm(1L)); + eM_energymulti64_UMV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( + 15127, "hatch.energymulti64.tier.12", "UMV 64A Energy Hatch", 12, 64).getStackForm(1L)); + + eM_energymulti4_UXV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( + 15108, "hatch.energymulti04.tier.13", "UXV 4A Energy Hatch", 13, 4).getStackForm(1L)); + eM_energymulti16_UXV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( + 15118, "hatch.energymulti16.tier.13", "UXV 16A Energy Hatch", 13, 16).getStackForm(1L)); + eM_energymulti64_UXV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( + 15128, "hatch.energymulti64.tier.13", "UXV 64A Energy Hatch", 13, 64).getStackForm(1L)); + + // =================================================================================================== + // Multi AMP Power OUTPUTS + // =================================================================================================== + + + eM_dynamomulti4_IV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( + 15200, "hatch.dynamomulti04.tier.05", "IV 4A Dynamo Hatch", 5, 4).getStackForm(1L)); + eM_dynamomulti16_IV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( + 15210, "hatch.dynamomulti16.tier.05", "IV 16A Dynamo Hatch", 5, 16).getStackForm(1L)); + eM_dynamomulti64_IV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( + 15220, "hatch.dynamomulti64.tier.05", "IV 64A Dynamo Hatch", 5, 64).getStackForm(1L)); + + eM_dynamomulti4_LuV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( + 15201, "hatch.dynamomulti04.tier.06", "LuV 4A Dynamo Hatch", 6, 4).getStackForm(1L)); + eM_dynamomulti16_LuV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( + 15211, "hatch.dynamomulti16.tier.06", "LuV 16A Dynamo Hatch", 6, 16).getStackForm(1L)); + eM_dynamomulti64_LuV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( + 15221, "hatch.dynamomulti64.tier.06", "LuV 64A Dynamo Hatch", 6, 64).getStackForm(1L)); + + eM_dynamomulti4_ZPM.set(new GT_MetaTileEntity_Hatch_DynamoMulti( + 15202, "hatch.dynamomulti04.tier.07", "ZPM 4A Dynamo Hatch", 7, 4).getStackForm(1L)); + eM_dynamomulti16_ZPM.set(new GT_MetaTileEntity_Hatch_DynamoMulti( + 15212, "hatch.dynamomulti16.tier.07", "ZPM 16A Dynamo Hatch", 7, 16).getStackForm(1L)); + eM_dynamomulti64_ZPM.set(new GT_MetaTileEntity_Hatch_DynamoMulti( + 15222, "hatch.dynamomulti64.tier.07", "ZPM 64A Dynamo Hatch", 7, 64).getStackForm(1L)); + + eM_dynamomulti4_UV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( + 15203, "hatch.dynamomulti04.tier.08", "UV 4A Dynamo Hatch", 8, 4).getStackForm(1L)); + eM_dynamomulti16_UV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( + 15213, "hatch.dynamomulti16.tier.08", "UV 16A Dynamo Hatch", 8, 16).getStackForm(1L)); + eM_dynamomulti64_UV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( + 15223, "hatch.dynamomulti64.tier.08", "UV 64A Dynamo Hatch", 8, 64).getStackForm(1L)); + + eM_dynamomulti4_UHV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( + 15204, "hatch.dynamomulti04.tier.09", "UHV 4A Dynamo Hatch", 9, 4).getStackForm(1L)); + eM_dynamomulti16_UHV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( + 15214, "hatch.dynamomulti16.tier.09", "UHV 16A Dynamo Hatch", 9, 16).getStackForm(1L)); + eM_dynamomulti64_UHV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( + 15224, "hatch.dynamomulti64.tier.09", "UHV 64A Dynamo Hatch", 9, 64).getStackForm(1L)); + + eM_dynamomulti4_UEV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( + 15205, "hatch.dynamomulti04.tier.10", "UEV 4A Dynamo Hatch", 10, 4).getStackForm(1L)); + eM_dynamomulti16_UEV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( + 15215, "hatch.dynamomulti16.tier.10", "UEV 16A Dynamo Hatch", 10, 16).getStackForm(1L)); + eM_dynamomulti64_UEV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( + 15225, "hatch.dynamomulti64.tier.10", "UEV 64A Dynamo Hatch", 10, 64).getStackForm(1L)); + + eM_dynamomulti4_UIV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( + 15206, "hatch.dynamomulti04.tier.11", "UIV 4A Dynamo Hatch", 11, 4).getStackForm(1L)); + eM_dynamomulti16_UIV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( + 15216, "hatch.dynamomulti16.tier.11", "UIV 16A Dynamo Hatch", 11, 16).getStackForm(1L)); + eM_dynamomulti64_UIV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( + 15226, "hatch.dynamomulti64.tier.11", "UIV 64A Dynamo Hatch", 11, 64).getStackForm(1L)); + + eM_dynamomulti4_UMV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( + 15207, "hatch.dynamomulti04.tier.12", "UMV 4A Dynamo Hatch", 12, 4).getStackForm(1L)); + eM_dynamomulti16_UMV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( + 15217, "hatch.dynamomulti16.tier.12", "UMV 16A Dynamo Hatch", 12, 16).getStackForm(1L)); + eM_dynamomulti64_UMV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( + 15227, "hatch.dynamomulti64.tier.12", "UMV 64A Dynamo Hatch", 12, 64).getStackForm(1L)); + + eM_dynamomulti4_UXV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( + 15208, "hatch.dynamomulti04.tier.13", "UXV 4A Dynamo Hatch", 13, 4).getStackForm(1L)); + eM_dynamomulti16_UXV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( + 15218, "hatch.dynamomulti16.tier.13", "UXV 16A Dynamo Hatch", 13, 16).getStackForm(1L)); + eM_dynamomulti64_UXV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( + 15228, "hatch.dynamomulti64.tier.13", "UXV 64A Dynamo Hatch", 13, 64).getStackForm(1L)); + + // =================================================================================================== + // MULTIBLOCKS + // =================================================================================================== + + Machine_Multi_Transformer.set(new GT_MetaTileEntity_EM_transformer(15300, "multimachine.em.transformer", "Active Transformer").getStackForm(1L)); + + Machine_Multi_Switch.set(new GT_MetaTileEntity_EM_switch(15310, "multimachine.em.switch", "Network Switch With QoS").getStackForm(1L)); + Machine_Multi_Computer.set(new GT_MetaTileEntity_EM_computer(15311, "multimachine.em.computer", "Quantum Computer").getStackForm(1L)); + Machine_Multi_Microwave.set(new GT_MetaTileEntity_TM_microwave(15312, "multimachine.tm.microwave", "Microwave Grinder").getStackForm(1L)); + Machine_Multi_DataBank.set(new GT_MetaTileEntity_EM_dataBank(15313, "multimachine.em.databank", "Data Bank").getStackForm(1L)); + Machine_Multi_teslaCoil.set(new GT_MetaTileEntity_TM_teslaCoil(15314, "multimachine.tm.teslaCoil", "Tesla Coil").getStackForm(1L)); + + Machine_Multi_EMjunction.set(new GT_MetaTileEntity_EM_junction(15320, "multimachine.em.junction", "Matter Junction").getStackForm(1L)); + Machine_Multi_MatterToEM.set(new GT_MetaTileEntity_EM_quantizer(15321, "multimachine.em.mattertoem", "Matter Quantizer").getStackForm(1L)); + Machine_Multi_EMToMatter.set(new GT_MetaTileEntity_EM_dequantizer(15322, "multimachine.em.emtomatter", "Matter Dequantizer").getStackForm(1L)); + + // COMPAT + Machine_Multi_EssentiaToEM.set(new GT_MetaTileEntity_EM_essentiaQuantizer(15323, "multimachine.em.essentiatoem", "Essentia Quantizer").getStackForm(1L)); + Machine_Multi_EMToEssentia.set(new GT_MetaTileEntity_EM_essentiaDequantizer(15324, "multimachine.em.emtoessentia", "Essentia Dequantizer").getStackForm(1L)); + + Machine_Multi_Scanner.set(new GT_MetaTileEntity_EM_scanner(15330, "multimachine.em.scanner", "Elemental Scanner").getStackForm(1L)); + Machine_Multi_Research.set(new GT_MetaTileEntity_EM_research(15331, "multimachine.em.research", "Research station").getStackForm(1L)); + + Machine_Multi_Collider.set(new GT_MetaTileEntity_EM_collider(15340, "multimachine.em.collider", "Matter Collider").getStackForm(1L)); + + Machine_Multi_Infuser.set(new GT_MetaTileEntity_EM_infuser(15350, "multimachine.em.infuser", "Energy Infuser").getStackForm(1)); + + Machine_Multi_EMmachine.set(new GT_MetaTileEntity_EM_machine(15360, "multimachine.em.processing", "Quantum Processing Machine").getStackForm(1L)); + + Machine_Multi_EMCrafter.set(new GT_MetaTileEntity_EM_crafting(15370, "multimachine.em.crafter", "Matter Assembler").getStackForm(1L)); + + Machine_Multi_Stabilizer.set(new GT_MetaTileEntity_EM_stabilizer(15380, "multimachine.em.stabilizer", "Elemental Stabilizer").getStackForm(1L)); + + Machine_Multi_Wormhole.set(new GT_MetaTileEntity_EM_wormhole(15390, "multimachine.em.wormhole", "Wormhole").getStackForm(1L)); + + Machine_Multi_Decay.set(new GT_MetaTileEntity_EM_decay(15400, "multimachine.em.decay", "Decay Generator").getStackForm(1L)); + 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").getStackForm(1L)); + + // =================================================================================================== + // Hatches + // =================================================================================================== + + Parametrizer_Hatch.set(new GT_MetaTileEntity_Hatch_Param(15420, "hatch.param.tier.07", "Parametrizer", 7).getStackForm(1L)); + ParametrizerX_Hatch.set(new GT_MetaTileEntity_Hatch_Param(15421, "hatch.param.tier.10", "Parametrizer X", 10).getStackForm(1L)); + + Uncertainty_Hatch.set(new GT_MetaTileEntity_Hatch_Uncertainty(15430, "hatch.certain.tier.07", "Uncertainty Resolver", 7).getStackForm(1L)); + UncertaintyX_Hatch.set(new GT_MetaTileEntity_Hatch_Uncertainty(15431, "hatch.certain.tier.10", "Uncertainty Resolver X", 10).getStackForm(1L)); + + dataIn_Hatch.set(new GT_MetaTileEntity_Hatch_InputData(15440, "hatch.datain.tier.07", "Optical Slave Connector", 7).getStackForm(1L)); + dataOut_Hatch.set(new GT_MetaTileEntity_Hatch_OutputData(15441, "hatch.dataout.tier.07", "Optical Master Connector", 7).getStackForm(1L)); + dataInAss_Hatch.set(new GT_MetaTileEntity_Hatch_InputDataItems(15442, "hatch.datainass.tier.07", "Assembly line Slave Connector", 7).getStackForm(1L)); + dataOutAss_Hatch.set(new GT_MetaTileEntity_Hatch_OutputDataItems(15443, "hatch.dataoutass.tier.07", "Data Bank Master Connector", 7).getStackForm(1L)); + + rack_Hatch.set(new GT_MetaTileEntity_Hatch_Rack(15450, "hatch.rack.tier.08", "Computer Rack", 8, "4 Slot Rack").getStackForm(1L)); + holder_Hatch.set(new GT_MetaTileEntity_Hatch_Holder(15451, "hatch.holder.tier.09", "Object Holder", 8, "For Research Station").getStackForm(1L)); + + capacitor_Hatch.set(new GT_MetaTileEntity_Hatch_Capacitor(15452, "hatch.capacitor.tier.05", "Capacitor Hatch", 5, "For Tesla Coil").getStackForm(1L)); + + // =================================================================================================== + // Pipes + // =================================================================================================== + + EMpipe.set(new GT_MetaTileEntity_Pipe_EM(15460, "pipe.elementalmatter", "Quantum \"Tunnel\"").getStackForm(1L)); + + DATApipe.set(new GT_MetaTileEntity_Pipe_Data(15470, "pipe.datastream", "Optical Fiber Cable").getStackForm(1L)); + + // =================================================================================================== + // Single Blocks + // =================================================================================================== + + Machine_OwnerDetector.set(new GT_MetaTileEntity_OwnerDetector(15480, "machine.tt.ownerdetector", "Owner detector", 3).getStackForm(1L)); + Machine_DataReader.set(new GT_MetaTileEntity_DataReader(15481, "machine.tt.datareader", "Data Reader", 5).getStackForm(1L)); + + // =================================================================================================== + // Buck Converters + // =================================================================================================== + + Machine_BuckConverter_IV.set(new GT_MetaTileEntity_BuckConverter(15485, "machine.tt.buck.05", "Insane Buck Converter", 5).getStackForm(1L)); + Machine_BuckConverter_LuV.set(new GT_MetaTileEntity_BuckConverter(15486, "machine.tt.buck.06", "Ludicrous Buck Converter", 6).getStackForm(1L)); + Machine_BuckConverter_ZPM.set(new GT_MetaTileEntity_BuckConverter(15487, "machine.tt.buck.07", "ZPM Voltage Buck Converter", 7).getStackForm(1L)); + Machine_BuckConverter_UV.set(new GT_MetaTileEntity_BuckConverter(15488, "machine.tt.buck.08", "Ultimate Power Buck Converter", 8).getStackForm(1L)); + Machine_BuckConverter_UHV.set(new GT_MetaTileEntity_BuckConverter(15489, "machine.tt.buck.09", "Highly Ultimate Buck Converter", 9).getStackForm(1L)); + Machine_BuckConverter_UEV.set(new GT_MetaTileEntity_BuckConverter(15490, "machine.tt.buck.10", "Extremely Ultimate Buck Converter", 10).getStackForm(1L)); + Machine_BuckConverter_UIV.set(new GT_MetaTileEntity_BuckConverter(15491, "machine.tt.buck.11", "Insanely Ultimate Buck Converter", 11).getStackForm(1L)); + Machine_BuckConverter_UMV.set(new GT_MetaTileEntity_BuckConverter(15492, "machine.tt.buck.12", "Mega Ultimate Buck Converter", 12).getStackForm(1L)); + Machine_BuckConverter_UXV.set(new GT_MetaTileEntity_BuckConverter(15493, "machine.tt.buck.13", "Extended Mega Ultimate Buck Converter", 13).getStackForm(1L)); + + // =================================================================================================== + // Tesla Transceiver + // =================================================================================================== + + Machine_TeslaCoil_LV_1A.set(new GT_MetaTileEntity_TeslaCoil(16000, "machine.tt.tesla.01", "Basic Tesla Transceiver", 1,1).getStackForm(1L)); + Machine_TeslaCoil_MV_1A.set(new GT_MetaTileEntity_TeslaCoil(16001, "machine.tt.tesla.02", "Advanced Tesla Transceiver", 2, 1).getStackForm(1L)); + Machine_TeslaCoil_HV_1A.set(new GT_MetaTileEntity_TeslaCoil(16002, "machine.tt.tesla.03", "Epyc Tesla Transceiver", 3, 1).getStackForm(1L)); + Machine_TeslaCoil_EV_1A.set(new GT_MetaTileEntity_TeslaCoil(16003, "machine.tt.tesla.04", "Ultimate Power Tesla Transceiver", 4, 1).getStackForm(1L)); + Machine_TeslaCoil_IV_1A.set(new GT_MetaTileEntity_TeslaCoil(16004, "machine.tt.tesla.05", "Insane Tesla Transceiver", 5, 1).getStackForm(1L)); + + Machine_TeslaCoil_LV_4A.set(new GT_MetaTileEntity_TeslaCoil(16005, "machine.tt.tesla.01", "Basic Tesla Transceiver", 1,4).getStackForm(1L)); + Machine_TeslaCoil_MV_4A.set(new GT_MetaTileEntity_TeslaCoil(16006, "machine.tt.tesla.02", "Advanced Tesla Transceiver", 2, 4).getStackForm(1L)); + Machine_TeslaCoil_HV_4A.set(new GT_MetaTileEntity_TeslaCoil(16007, "machine.tt.tesla.03", "Epyc Tesla Transceiver", 3, 4).getStackForm(1L)); + Machine_TeslaCoil_EV_4A.set(new GT_MetaTileEntity_TeslaCoil(16008, "machine.tt.tesla.04", "Ultimate Power Tesla Transceiver", 4, 4).getStackForm(1L)); + Machine_TeslaCoil_IV_4A.set(new GT_MetaTileEntity_TeslaCoil(16009, "machine.tt.tesla.05", "Insane Tesla Transceiver", 5, 4).getStackForm(1L)); + + Machine_TeslaCoil_LV_9A.set(new GT_MetaTileEntity_TeslaCoil(16010, "machine.tt.tesla.01", "Basic Tesla Transceiver", 1,9).getStackForm(1L)); + Machine_TeslaCoil_MV_9A.set(new GT_MetaTileEntity_TeslaCoil(16011, "machine.tt.tesla.02", "Advanced Tesla Transceiver", 2, 9).getStackForm(1L)); + Machine_TeslaCoil_HV_9A.set(new GT_MetaTileEntity_TeslaCoil(16012, "machine.tt.tesla.03", "Epyc Tesla Transceiver", 3, 9).getStackForm(1L)); + Machine_TeslaCoil_EV_9A.set(new GT_MetaTileEntity_TeslaCoil(16013, "machine.tt.tesla.04", "Ultimate Power Tesla Transceiver", 4, 9).getStackForm(1L)); + Machine_TeslaCoil_IV_9A.set(new GT_MetaTileEntity_TeslaCoil(16014, "machine.tt.tesla.05", "Insane Tesla Transceiver", 5, 9).getStackForm(1L)); + + Machine_TeslaCoil_LV_16A.set(new GT_MetaTileEntity_TeslaCoil(16015, "machine.tt.tesla.01", "Basic Tesla Transceiver", 1,16).getStackForm(1L)); + Machine_TeslaCoil_MV_16A.set(new GT_MetaTileEntity_TeslaCoil(16016, "machine.tt.tesla.02", "Advanced Tesla Transceiver", 2, 16).getStackForm(1L)); + Machine_TeslaCoil_HV_16A.set(new GT_MetaTileEntity_TeslaCoil(16017, "machine.tt.tesla.03", "Epyc Tesla Transceiver", 3, 16).getStackForm(1L)); + Machine_TeslaCoil_EV_16A.set(new GT_MetaTileEntity_TeslaCoil(16018, "machine.tt.tesla.04", "Ultimate Power Tesla Transceiver", 4, 16).getStackForm(1L)); + Machine_TeslaCoil_IV_16A.set(new GT_MetaTileEntity_TeslaCoil(16019, "machine.tt.tesla.05", "Insane Tesla Transceiver", 5, 16).getStackForm(1L)); + + // =================================================================================================== + // Debug Stuff + // =================================================================================================== + hatch_CreativeMaitenance.set(new GT_MetaTileEntity_Hatch_CreativeMaintenance(15497, "debug.tt.maintenance", "Debug Maintenance Hatch", 15).getStackForm(1L)); + Machine_DebugGenny.set(new GT_MetaTileEntity_DebugPowerGenerator(15498, "debug.tt.genny", "Debug Power Generator", 15).getStackForm(1L)); + Machine_DebugWriter.set(new GT_MetaTileEntity_DebugStructureWriter(15499, "debug.tt.writer", "Debug Structure Writer", 15).getStackForm(1L)); + + // =================================================================================================== + // MetaTE init + // =================================================================================================== + + GT_MetaTileEntity_MultiblockBase_EM.run(); + GT_MetaTileEntity_Hatch_Rack.run(); + GT_MetaTileEntity_EM_computer.run(); + GT_MetaTileEntity_EM_research.run(); + GT_MetaTileEntity_EM_dataBank.run(); + GT_MetaTileEntity_TM_teslaCoil.run(); + + GT_MetaTileEntity_DataReader.run(); + + if (!Loader.isModLoaded(Reference.DREAMCRAFT)) { + new NoDreamCraftMachineLoader().run(); + } + } +} 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 a062693db4..5e45ead4f8 100644 --- a/src/main/java/com/github/technus/tectech/thing/CustomItemList.java +++ b/src/main/java/com/github/technus/tectech/thing/CustomItemList.java @@ -1,231 +1,235 @@ -package com.github.technus.tectech.thing; - -import gregtech.api.interfaces.IItemContainer; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -import static gregtech.api.enums.GT_Values.W; - -public enum CustomItemList implements IItemContainer { - Casing_UEV,Casing_UIV,Casing_UMV,Casing_UXV,Casing_OPV,Casing_MAXV, - Hull_UEV,Hull_UIV,Hull_UMV,Hull_UXV,Hull_OPV,Hull_MAXV, - Transformer_UEV_UHV,Transformer_UIV_UEV,Transformer_UMV_UIV, - Transformer_UXV_UMV,Transformer_OPV_UXV,Transformer_MAXV_OPV, - WetTransformer_LV_ULV,WetTransformer_MV_LV,WetTransformer_HV_MV,WetTransformer_EV_HV, - WetTransformer_IV_EV,WetTransformer_LuV_IV,WetTransformer_ZPM_LuV,WetTransformer_UV_ZPM, - WetTransformer_UHV_UV,WetTransformer_UEV_UHV,WetTransformer_UIV_UEV,WetTransformer_UMV_UIV, - WetTransformer_UXV_UMV,WetTransformer_OPV_UXV,WetTransformer_MAXV_OPV, - - Transformer_HA_UEV_UHV,Transformer_HA_UIV_UEV,Transformer_HA_UMV_UIV,Transformer_HA_UXV_UMV, - Transformer_HA_OPV_UXV,Transformer_HA_MAXV_OPV, - - hatch_CreativeMaitenance, - Machine_OwnerDetector,Machine_DataReader, - Machine_BuckConverter_IV,Machine_BuckConverter_LuV,Machine_BuckConverter_ZPM, - Machine_BuckConverter_UV,Machine_BuckConverter_UHV,Machine_BuckConverter_UEV, - Machine_BuckConverter_UIV,Machine_BuckConverter_UMV, Machine_BuckConverter_UXV, - Machine_DebugWriter,Machine_DebugGenny, - EMpipe, DATApipe, rack_Hatch, holder_Hatch, capacitor_Hatch, - - eM_dynamomulti4_IV, eM_dynamomulti16_IV, eM_dynamomulti64_IV, - eM_dynamomulti4_LuV, eM_dynamomulti16_LuV, eM_dynamomulti64_LuV, - eM_dynamomulti4_ZPM, eM_dynamomulti16_ZPM, eM_dynamomulti64_ZPM, - eM_dynamomulti4_UV, eM_dynamomulti16_UV, eM_dynamomulti64_UV, - eM_dynamomulti4_UHV, eM_dynamomulti16_UHV, eM_dynamomulti64_UHV, - eM_dynamomulti4_UEV, eM_dynamomulti16_UEV, eM_dynamomulti64_UEV, - eM_dynamomulti4_UIV, eM_dynamomulti16_UIV, eM_dynamomulti64_UIV, - eM_dynamomulti4_UMV, eM_dynamomulti16_UMV, eM_dynamomulti64_UMV, - eM_dynamomulti4_UXV, eM_dynamomulti16_UXV, eM_dynamomulti64_UXV, - - eM_energymulti4_IV, eM_energymulti16_IV, eM_energymulti64_IV, - eM_energymulti4_LuV, eM_energymulti16_LuV, eM_energymulti64_LuV, - eM_energymulti4_ZPM, eM_energymulti16_ZPM, eM_energymulti64_ZPM, - eM_energymulti4_UV, eM_energymulti16_UV, eM_energymulti64_UV, - eM_energymulti4_UHV, eM_energymulti16_UHV, eM_energymulti64_UHV, - eM_energymulti4_UEV, eM_energymulti16_UEV, eM_energymulti64_UEV, - eM_energymulti4_UIV, eM_energymulti16_UIV, eM_energymulti64_UIV, - eM_energymulti4_UMV, eM_energymulti16_UMV, eM_energymulti64_UMV, - eM_energymulti4_UXV, eM_energymulti16_UXV, eM_energymulti64_UXV, - - eM_in_UV, eM_in_UHV, eM_in_UEV, eM_in_UIV, eM_in_UMV, eM_in_UXV, - eM_out_UV, eM_out_UHV, eM_out_UEV, eM_out_UIV, eM_out_UMV, eM_out_UXV, - eM_muffler_UV, eM_muffler_UHV, eM_muffler_UEV, eM_muffler_UIV, eM_muffler_UMV, eM_muffler_UXV, - Parametrizer_Hatch, ParametrizerX_Hatch, Uncertainty_Hatch, UncertaintyX_Hatch, dataIn_Hatch, dataOut_Hatch, dataInAss_Hatch, dataOutAss_Hatch, - eM_Containment, eM_Containment_Field, eM_Containment_Advanced, eM_Coil, eM_Teleportation, eM_Dimensional, eM_Ultimate_Containment, eM_Ultimate_Containment_Advanced, eM_Ultimate_Containment_Field, eM_Spacetime, eM_Computer_Casing, eM_Computer_Bus, eM_Computer_Vent, eM_Hollow, eM_Power, - debugBlock, - Machine_Multi_Microwave, Machine_Multi_teslaCoil, - Machine_Multi_Transformer, - Machine_Multi_Computer, Machine_Multi_Switch, Machine_Multi_Research, Machine_Multi_DataBank, - Machine_Multi_MatterToEM, Machine_Multi_EMToMatter, Machine_Multi_EMjunction, Machine_Multi_Scanner, - Machine_Multi_EssentiaToEM, Machine_Multi_EMToEssentia, - Machine_Multi_Infuser, Machine_Multi_Collider, - Machine_Multi_Decay, Machine_Multi_EMmachine, - Machine_Multi_Stabilizer, Machine_Multi_EMCrafter, - Machine_Multi_Wormhole, Machine_Multi_Annihilation, - Machine_Multi_BHG, - hint_0,hint_1,hint_2,hint_3,hint_4,hint_5,hint_6,hint_7,hint_8,hint_9,hint_10,hint_11, hint_general,hint_air,hint_noAir,hint_error, - - scanContainer,parametrizerMemory; - - - private ItemStack mStack; - private boolean mHasNotBeenSet = true; - - //public static Fluid sOilExtraHeavy, sOilHeavy, sOilMedium, sOilLight, sNaturalGas; - - @Override - public IItemContainer set(Item aItem) { - mHasNotBeenSet = false; - if (aItem == null) { - return this; - } - ItemStack aStack = new ItemStack(aItem, 1, 0); - mStack = GT_Utility.copyAmount(1, aStack); - return this; - } - - @Override - public IItemContainer set(ItemStack aStack) { - mHasNotBeenSet = false; - mStack = GT_Utility.copyAmount(1, aStack); - return this; - } - - @Override - public Item getItem() { - if (mHasNotBeenSet) { - throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); - } - if (GT_Utility.isStackInvalid(mStack)) { - return null; - } - return mStack.getItem(); - } - - @Override - public Block getBlock() { - if (mHasNotBeenSet) { - throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); - } - return GT_Utility.getBlockFromStack(new ItemStack(getItem())); - } - - @Override - public final boolean hasBeenSet() { - return !mHasNotBeenSet; - } - - @Override - public boolean isStackEqual(Object aStack) { - return isStackEqual(aStack, false, false); - } - - @Override - public boolean isStackEqual(Object aStack, boolean aWildcard, boolean aIgnoreNBT) { - if (GT_Utility.isStackInvalid(aStack)) { - return false; - } - return GT_Utility.areUnificationsEqual((ItemStack) aStack, aWildcard ? getWildcard(1) : get(1), aIgnoreNBT); - } - - @Override - public ItemStack get(long aAmount, Object... aReplacements) { - if (mHasNotBeenSet) { - throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); - } - if (GT_Utility.isStackInvalid(mStack)) { - return GT_Utility.copyAmount(aAmount, aReplacements); - } - return GT_Utility.copyAmount(aAmount, GT_OreDictUnificator.get(mStack)); - } - - @Override - public ItemStack getWildcard(long aAmount, Object... aReplacements) { - if (mHasNotBeenSet) { - throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); - } - if (GT_Utility.isStackInvalid(mStack)) { - return GT_Utility.copyAmount(aAmount, aReplacements); - } - return GT_Utility.copyAmountAndMetaData(aAmount, W, GT_OreDictUnificator.get(mStack)); - } - - @Override - public ItemStack getUndamaged(long aAmount, Object... aReplacements) { - if (mHasNotBeenSet) { - throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); - } - if (GT_Utility.isStackInvalid(mStack)) { - return GT_Utility.copyAmount(aAmount, aReplacements); - } - return GT_Utility.copyAmountAndMetaData(aAmount, 0, GT_OreDictUnificator.get(mStack)); - } - - @Override - public ItemStack getAlmostBroken(long aAmount, Object... aReplacements) { - if (mHasNotBeenSet) { - throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); - } - if (GT_Utility.isStackInvalid(mStack)) { - return GT_Utility.copyAmount(aAmount, aReplacements); - } - return GT_Utility.copyAmountAndMetaData(aAmount, mStack.getMaxDamage() - 1, GT_OreDictUnificator.get(mStack)); - } - - @Override - public ItemStack getWithName(long aAmount, String aDisplayName, Object... aReplacements) { - ItemStack rStack = get(1, aReplacements); - if (GT_Utility.isStackInvalid(rStack)) { - return null; - } - rStack.setStackDisplayName(aDisplayName); - return GT_Utility.copyAmount(aAmount, rStack); - } - - @Override - public ItemStack getWithCharge(long aAmount, int aEnergy, Object... aReplacements) { - ItemStack rStack = get(1, aReplacements); - if (GT_Utility.isStackInvalid(rStack)) { - return null; - } - GT_ModHandler.chargeElectricItem(rStack, aEnergy, Integer.MAX_VALUE, true, false); - return GT_Utility.copyAmount(aAmount, rStack); - } - - @Override - public ItemStack getWithDamage(long aAmount, long aMetaValue, Object... aReplacements) { - if (mHasNotBeenSet) { - throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); - } - if (GT_Utility.isStackInvalid(mStack)) { - return GT_Utility.copyAmount(aAmount, aReplacements); - } - return GT_Utility.copyAmountAndMetaData(aAmount, aMetaValue, GT_OreDictUnificator.get(mStack)); - } - - @Override - public IItemContainer registerOre(Object... aOreNames) { - if (mHasNotBeenSet) { - throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); - } - for (Object tOreName : aOreNames) { - GT_OreDictUnificator.registerOre(tOreName, get(1)); - } - return this; - } - - @Override - public IItemContainer registerWildcardAsOre(Object... aOreNames) { - if (mHasNotBeenSet) { - throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); - } - for (Object tOreName : aOreNames) { - GT_OreDictUnificator.registerOre(tOreName, getWildcard(1)); - } - return this; - } -} +package com.github.technus.tectech.thing; + +import gregtech.api.interfaces.IItemContainer; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +import static gregtech.api.enums.GT_Values.W; + +public enum CustomItemList implements IItemContainer { + Casing_UEV,Casing_UIV,Casing_UMV,Casing_UXV,Casing_OPV,Casing_MAXV, + Hull_UEV,Hull_UIV,Hull_UMV,Hull_UXV,Hull_OPV,Hull_MAXV, + Transformer_UEV_UHV,Transformer_UIV_UEV,Transformer_UMV_UIV, + Transformer_UXV_UMV,Transformer_OPV_UXV,Transformer_MAXV_OPV, + WetTransformer_LV_ULV,WetTransformer_MV_LV,WetTransformer_HV_MV,WetTransformer_EV_HV, + WetTransformer_IV_EV,WetTransformer_LuV_IV,WetTransformer_ZPM_LuV,WetTransformer_UV_ZPM, + WetTransformer_UHV_UV,WetTransformer_UEV_UHV,WetTransformer_UIV_UEV,WetTransformer_UMV_UIV, + WetTransformer_UXV_UMV,WetTransformer_OPV_UXV,WetTransformer_MAXV_OPV, + + Transformer_HA_UEV_UHV,Transformer_HA_UIV_UEV,Transformer_HA_UMV_UIV,Transformer_HA_UXV_UMV, + Transformer_HA_OPV_UXV,Transformer_HA_MAXV_OPV, + + hatch_CreativeMaitenance, + Machine_OwnerDetector,Machine_DataReader, + Machine_BuckConverter_IV,Machine_BuckConverter_LuV,Machine_BuckConverter_ZPM, + Machine_BuckConverter_UV,Machine_BuckConverter_UHV,Machine_BuckConverter_UEV, + Machine_BuckConverter_UIV,Machine_BuckConverter_UMV, Machine_BuckConverter_UXV, + Machine_DebugWriter,Machine_DebugGenny, + EMpipe, DATApipe, rack_Hatch, holder_Hatch, capacitor_Hatch, + + eM_dynamomulti4_IV, eM_dynamomulti16_IV, eM_dynamomulti64_IV, + eM_dynamomulti4_LuV, eM_dynamomulti16_LuV, eM_dynamomulti64_LuV, + eM_dynamomulti4_ZPM, eM_dynamomulti16_ZPM, eM_dynamomulti64_ZPM, + eM_dynamomulti4_UV, eM_dynamomulti16_UV, eM_dynamomulti64_UV, + eM_dynamomulti4_UHV, eM_dynamomulti16_UHV, eM_dynamomulti64_UHV, + eM_dynamomulti4_UEV, eM_dynamomulti16_UEV, eM_dynamomulti64_UEV, + eM_dynamomulti4_UIV, eM_dynamomulti16_UIV, eM_dynamomulti64_UIV, + eM_dynamomulti4_UMV, eM_dynamomulti16_UMV, eM_dynamomulti64_UMV, + eM_dynamomulti4_UXV, eM_dynamomulti16_UXV, eM_dynamomulti64_UXV, + + eM_energymulti4_IV, eM_energymulti16_IV, eM_energymulti64_IV, + eM_energymulti4_LuV, eM_energymulti16_LuV, eM_energymulti64_LuV, + eM_energymulti4_ZPM, eM_energymulti16_ZPM, eM_energymulti64_ZPM, + eM_energymulti4_UV, eM_energymulti16_UV, eM_energymulti64_UV, + eM_energymulti4_UHV, eM_energymulti16_UHV, eM_energymulti64_UHV, + eM_energymulti4_UEV, eM_energymulti16_UEV, eM_energymulti64_UEV, + eM_energymulti4_UIV, eM_energymulti16_UIV, eM_energymulti64_UIV, + eM_energymulti4_UMV, eM_energymulti16_UMV, eM_energymulti64_UMV, + eM_energymulti4_UXV, eM_energymulti16_UXV, eM_energymulti64_UXV, + + eM_in_UV, eM_in_UHV, eM_in_UEV, eM_in_UIV, eM_in_UMV, eM_in_UXV, + eM_out_UV, eM_out_UHV, eM_out_UEV, eM_out_UIV, eM_out_UMV, eM_out_UXV, + eM_muffler_UV, eM_muffler_UHV, eM_muffler_UEV, eM_muffler_UIV, eM_muffler_UMV, eM_muffler_UXV, + Parametrizer_Hatch, ParametrizerX_Hatch, Uncertainty_Hatch, UncertaintyX_Hatch, dataIn_Hatch, dataOut_Hatch, dataInAss_Hatch, dataOutAss_Hatch, + eM_Containment, eM_Containment_Field, eM_Containment_Advanced, eM_Coil, eM_Teleportation, eM_Dimensional, eM_Ultimate_Containment, eM_Ultimate_Containment_Advanced, eM_Ultimate_Containment_Field, eM_Spacetime, eM_Computer_Casing, eM_Computer_Bus, eM_Computer_Vent, eM_Hollow, eM_Power, + debugBlock, + Machine_Multi_Microwave, Machine_Multi_teslaCoil, + Machine_Multi_Transformer, + Machine_Multi_Computer, Machine_Multi_Switch, Machine_Multi_Research, Machine_Multi_DataBank, + Machine_Multi_MatterToEM, Machine_Multi_EMToMatter, Machine_Multi_EMjunction, Machine_Multi_Scanner, + Machine_Multi_EssentiaToEM, Machine_Multi_EMToEssentia, + Machine_Multi_Infuser, Machine_Multi_Collider, + Machine_Multi_Decay, Machine_Multi_EMmachine, + Machine_Multi_Stabilizer, Machine_Multi_EMCrafter, + Machine_Multi_Wormhole, Machine_Multi_Annihilation, + Machine_Multi_BHG, + hint_0,hint_1,hint_2,hint_3,hint_4,hint_5,hint_6,hint_7,hint_8,hint_9,hint_10,hint_11, hint_general,hint_air,hint_noAir,hint_error, + + scanContainer,parametrizerMemory, + + Machine_TeslaCoil_LV_1A, Machine_TeslaCoil_MV_1A, Machine_TeslaCoil_HV_1A, Machine_TeslaCoil_EV_1A, Machine_TeslaCoil_IV_1A, + Machine_TeslaCoil_LV_4A, Machine_TeslaCoil_MV_4A, Machine_TeslaCoil_HV_4A, Machine_TeslaCoil_EV_4A, Machine_TeslaCoil_IV_4A, + Machine_TeslaCoil_LV_9A, Machine_TeslaCoil_MV_9A, Machine_TeslaCoil_HV_9A, Machine_TeslaCoil_EV_9A, Machine_TeslaCoil_IV_9A, + Machine_TeslaCoil_LV_16A, Machine_TeslaCoil_MV_16A, Machine_TeslaCoil_HV_16A, Machine_TeslaCoil_EV_16A, Machine_TeslaCoil_IV_16A; + + private ItemStack mStack; + private boolean mHasNotBeenSet = true; + + //public static Fluid sOilExtraHeavy, sOilHeavy, sOilMedium, sOilLight, sNaturalGas; + + @Override + public IItemContainer set(Item aItem) { + mHasNotBeenSet = false; + if (aItem == null) { + return this; + } + ItemStack aStack = new ItemStack(aItem, 1, 0); + mStack = GT_Utility.copyAmount(1, aStack); + return this; + } + + @Override + public IItemContainer set(ItemStack aStack) { + mHasNotBeenSet = false; + mStack = GT_Utility.copyAmount(1, aStack); + return this; + } + + @Override + public Item getItem() { + if (mHasNotBeenSet) { + throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); + } + if (GT_Utility.isStackInvalid(mStack)) { + return null; + } + return mStack.getItem(); + } + + @Override + public Block getBlock() { + if (mHasNotBeenSet) { + throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); + } + return GT_Utility.getBlockFromStack(new ItemStack(getItem())); + } + + @Override + public final boolean hasBeenSet() { + return !mHasNotBeenSet; + } + + @Override + public boolean isStackEqual(Object aStack) { + return isStackEqual(aStack, false, false); + } + + @Override + public boolean isStackEqual(Object aStack, boolean aWildcard, boolean aIgnoreNBT) { + if (GT_Utility.isStackInvalid(aStack)) { + return false; + } + return GT_Utility.areUnificationsEqual((ItemStack) aStack, aWildcard ? getWildcard(1) : get(1), aIgnoreNBT); + } + + @Override + public ItemStack get(long aAmount, Object... aReplacements) { + if (mHasNotBeenSet) { + throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); + } + if (GT_Utility.isStackInvalid(mStack)) { + return GT_Utility.copyAmount(aAmount, aReplacements); + } + return GT_Utility.copyAmount(aAmount, GT_OreDictUnificator.get(mStack)); + } + + @Override + public ItemStack getWildcard(long aAmount, Object... aReplacements) { + if (mHasNotBeenSet) { + throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); + } + if (GT_Utility.isStackInvalid(mStack)) { + return GT_Utility.copyAmount(aAmount, aReplacements); + } + return GT_Utility.copyAmountAndMetaData(aAmount, W, GT_OreDictUnificator.get(mStack)); + } + + @Override + public ItemStack getUndamaged(long aAmount, Object... aReplacements) { + if (mHasNotBeenSet) { + throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); + } + if (GT_Utility.isStackInvalid(mStack)) { + return GT_Utility.copyAmount(aAmount, aReplacements); + } + return GT_Utility.copyAmountAndMetaData(aAmount, 0, GT_OreDictUnificator.get(mStack)); + } + + @Override + public ItemStack getAlmostBroken(long aAmount, Object... aReplacements) { + if (mHasNotBeenSet) { + throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); + } + if (GT_Utility.isStackInvalid(mStack)) { + return GT_Utility.copyAmount(aAmount, aReplacements); + } + return GT_Utility.copyAmountAndMetaData(aAmount, mStack.getMaxDamage() - 1, GT_OreDictUnificator.get(mStack)); + } + + @Override + public ItemStack getWithName(long aAmount, String aDisplayName, Object... aReplacements) { + ItemStack rStack = get(1, aReplacements); + if (GT_Utility.isStackInvalid(rStack)) { + return null; + } + rStack.setStackDisplayName(aDisplayName); + return GT_Utility.copyAmount(aAmount, rStack); + } + + @Override + public ItemStack getWithCharge(long aAmount, int aEnergy, Object... aReplacements) { + ItemStack rStack = get(1, aReplacements); + if (GT_Utility.isStackInvalid(rStack)) { + return null; + } + GT_ModHandler.chargeElectricItem(rStack, aEnergy, Integer.MAX_VALUE, true, false); + return GT_Utility.copyAmount(aAmount, rStack); + } + + @Override + public ItemStack getWithDamage(long aAmount, long aMetaValue, Object... aReplacements) { + if (mHasNotBeenSet) { + throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); + } + if (GT_Utility.isStackInvalid(mStack)) { + return GT_Utility.copyAmount(aAmount, aReplacements); + } + return GT_Utility.copyAmountAndMetaData(aAmount, aMetaValue, GT_OreDictUnificator.get(mStack)); + } + + @Override + public IItemContainer registerOre(Object... aOreNames) { + if (mHasNotBeenSet) { + throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); + } + for (Object tOreName : aOreNames) { + GT_OreDictUnificator.registerOre(tOreName, get(1)); + } + return this; + } + + @Override + public IItemContainer registerWildcardAsOre(Object... aOreNames) { + if (mHasNotBeenSet) { + throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); + } + for (Object tOreName : aOreNames) { + GT_OreDictUnificator.registerOre(tOreName, getWildcard(1)); + } + return this; + } +} -- cgit From db58222c493de79c84160a89c2cc9bea0e3b1fe8 Mon Sep 17 00:00:00 2001 From: bass Date: Wed, 6 Feb 2019 18:30:07 +0000 Subject: Tesla Power Transfer Read title --- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 211 +++++++++++++++++---- .../single/GT_MetaTileEntity_TeslaCoil.java | 1 - 2 files changed, 172 insertions(+), 40 deletions(-) (limited to 'src/main/java') 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 82722e76f9..3b141e42b8 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 @@ -6,6 +6,7 @@ import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_H import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoMulti; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; +import com.github.technus.tectech.thing.metaTileEntity.single.GT_MetaTileEntity_TeslaCoil; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; @@ -39,10 +40,35 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private final ArrayList eCaps = new ArrayList<>(); private int tier = 0; private int orientation = 0; - private int scanTime = 0; - private int scanRadius = 64;//TODO Generate depending on power stored - private long euTOutMax = V[9] / 8;//TODO Generate depending on count and kind of capacitors - private ArrayList eTeslaList = new ArrayList<>(); +// private boolean ePowerPass = false; //TODO Make sure this only in the small tesla + + private int scanTime = 0; //Sets scan time to Z E R O :epic: + private int scanTimeMin = 100; //Min scan time in ticks + private int scanTimeTill = scanTimeMin; //Set default scan time + + private ArrayList eTeslaList = new ArrayList<>(); //Makes a list of Smol Teslas + private ArrayList eTeslaTowerList = new ArrayList<>(); //Makes a list for BIGG Teslas + + private float histLow = 0.25F; //Power pass is disabled if power is under this fraction + private float histHigh = 0.75F; //Power pass is enabled if power is over this fraction + + private int scanRadius = 64; //Radius for small to tower transfers + private int scanRadiusTower = scanRadius * 2; //Radius for tower to tower transfers + + private long outputVoltage = 512L; //Tesla Voltage Output + private long outputCurrent = 1; //Tesla Current Output + private long outputEuT = outputVoltage * outputCurrent; //Tesla Power Output + + private boolean parametrized = false; //Assumes no parametrizer on initialisation + //Default parametrized variables + private long histLowParam = 0; + private long histHighParam = 0; + private long histScaleParam = 0; + private int scanRadiusParam = 0; + private int scanRadiusTowerParam = 0; + private long outputVoltageParam = 0; + private long outputCurrentParam = 0; + private int scanTimeMinParam = 0; //region structure private static final String[][] shape0 = new String[][]{//3 16 0 @@ -256,53 +282,160 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock return true; } - if (!ePowerPass && getEUVar() > maxEUStore() / 2 * 0.8) { + //Parametrizer hatch loader TODO Add parametrizer detection + if (false) { + parametrized = true; + histLowParam = 0; + histHighParam = 0; + histScaleParam = 0; + scanRadiusParam = 0; + scanRadiusTowerParam = 0; + outputVoltageParam = 0; + outputCurrentParam = 0; + scanTimeMin = 0; + } else { + parametrized = false; + } + + ////Hysteresis based ePowerPass Config + long energyMax = maxEUStore() / 2; + long energyStored = getEUVar(); + + float energyFrac = (float)energyStored/energyMax; + + System.out.println(energyFrac); + + if (parametrized && histScaleParam > 0 && histLowParam > 0 && histScaleParam <= histHighParam && histLowParam < histHighParam) { + //TODO Ugly Math because someone I am bad at datatypes :( + histLow = (float)histLowParam/histScaleParam; + histHigh = (float)histHighParam/histScaleParam; + } + + //ePowerPass hist toggle + if (!ePowerPass && energyFrac > histHigh) { ePowerPass = true; - } else if (ePowerPass && getEUVar() < maxEUStore() / 2 * 0.2) { + } else if (ePowerPass && energyFrac < histLow) { ePowerPass = false; } - if (ePowerPass) { - scanTime++; - if (scanTime == 100) { - scanTime = 0; - eTeslaList.clear(); - - for (int xPosOffset = -scanRadius; xPosOffset <= scanRadius; xPosOffset++) { - for (int yPosOffset = -scanRadius; yPosOffset <= scanRadius; yPosOffset++) { - for (int zPosOffset = -scanRadius; zPosOffset <= scanRadius; zPosOffset++) { - IGregTechTileEntity node = mte.getIGregTechTileEntityOffset(xPosOffset, yPosOffset, zPosOffset); - if (node == null) { - continue; - } - IMetaTileEntity nodeInside = node.getMetaTileEntity(); - if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive()) { - eTeslaList.add((GT_MetaTileEntity_TM_teslaCoil) nodeInside); - } + ////Scanning for active teslas + + + if (parametrized && scanTimeMinParam > scanTimeMin) { + scanTimeTill = scanTimeMinParam; + } + + scanTime++; + if (scanTime >= scanTimeTill) { + scanTime = 0; + + scanRadius = 64; //TODO Generate depending on power stored + eTeslaList.clear(); + + if (parametrized && scanRadiusParam > 0 && scanRadiusParam < scanRadius) { + scanRadius = scanRadiusParam; + } + + for (int xPosOffset = -scanRadius; xPosOffset <= scanRadius; xPosOffset++) { + for (int yPosOffset = -scanRadius; yPosOffset <= scanRadius; yPosOffset++) { + for (int zPosOffset = -scanRadius; zPosOffset <= scanRadius; zPosOffset++) { + if (xPosOffset == 0 && yPosOffset == 0 && zPosOffset == 0){ + continue; } - } - } + + IGregTechTileEntity node = mte.getIGregTechTileEntityOffset(xPosOffset, yPosOffset, zPosOffset); + if (node == null) { + continue; + } + + IMetaTileEntity nodeInside = node.getMetaTileEntity(); + if (nodeInside instanceof GT_MetaTileEntity_TeslaCoil){ + eTeslaList.add((GT_MetaTileEntity_TeslaCoil) nodeInside); + } + } + } + } + + scanRadiusTower = scanRadius * 2; + eTeslaTowerList.clear(); + + if (parametrized && scanRadiusTowerParam > 0 && scanRadiusTowerParam < scanRadiusTower) { + scanRadiusTower = scanRadiusTowerParam; + } + + for (int xPosOffset = -scanRadiusTower; xPosOffset <= scanRadiusTower; xPosOffset++) { + for (int yPosOffset = -scanRadiusTower; yPosOffset <= scanRadiusTower; yPosOffset++) { + for (int zPosOffset = -scanRadiusTower; zPosOffset <= scanRadiusTower; zPosOffset++) { + if (xPosOffset == 0 && yPosOffset == 0 && zPosOffset == 0){ + continue; + } + + IGregTechTileEntity node = mte.getIGregTechTileEntityOffset(xPosOffset, yPosOffset, zPosOffset); + if (node == null) { + continue; + } + + IMetaTileEntity nodeInside = node.getMetaTileEntity(); + if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive()){ + eTeslaTowerList.add((GT_MetaTileEntity_TM_teslaCoil) nodeInside); + } + } + } + } + + } + + //Stuff to do if ePowerPass + if (ePowerPass) { + outputVoltage = 512;//TODO Generate depending on kind of capacitors + outputCurrent = 1;//TODO Generate depending on count of capacitors + + if (parametrized && outputVoltageParam > 0 && outputVoltage > outputVoltageParam){ + outputVoltage = outputVoltageParam;} + + if (parametrized && outputCurrentParam > 0 && outputCurrent > outputCurrentParam){ + outputCurrent = outputCurrentParam;} + + outputEuT = outputVoltage * outputCurrent; + + long requestedSumEU = 0; + + //Clean the Smol Tesla list + for (GT_MetaTileEntity_TeslaCoil Rx : eTeslaList.toArray(new GT_MetaTileEntity_TeslaCoil[eTeslaList.size()])) { + try { + requestedSumEU += Rx.maxEUStore() - Rx.getEUVar(); + } catch (Exception e) { + eTeslaList.remove(Rx); + } + } + + //Clean the large tesla list + for (GT_MetaTileEntity_TM_teslaCoil Rx : eTeslaTowerList.toArray(new GT_MetaTileEntity_TM_teslaCoil[eTeslaTowerList.size()])) { + try { + requestedSumEU += Rx.maxEUStore() - Rx.getEUVar(); + } catch (Exception e) { + eTeslaTowerList.remove(Rx); + } } - float xPos = mte.getXCoord() + 0.5f; - float yPos = mte.getYCoord() + 0.5f; - float zPos = mte.getZCoord() + 0.5f; - long reqSum = 0; - for (GT_MetaTileEntity_TM_teslaCoil Rx : eTeslaList.toArray(new GT_MetaTileEntity_TM_teslaCoil[eTeslaList.size()])) { - try { - reqSum += Rx.maxEUStore() - Rx.getEUVar(); - } catch (Exception e) { - eTeslaList.remove(Rx); + //Try to send EU to the smol teslas + for (GT_MetaTileEntity_TeslaCoil Rx : eTeslaList) { + if (!Rx.ePowerPass) { + long euTran = outputVoltage; + if (Rx.getBaseMetaTileEntity().injectEnergyUnits((byte)6, euTran, 1L) > 0L) { + setEUVar(getEUVar() - euTran); + } + } else { } } - for (GT_MetaTileEntity_TM_teslaCoil Rx : eTeslaList) { + //Try to send EU to big teslas + for (GT_MetaTileEntity_TM_teslaCoil Rx : eTeslaTowerList) { if (!Rx.ePowerPass) { - long euTran = (euTOutMax * (Rx.maxEUStore() - Rx.getEUVar())) / reqSum; - if (Rx.getEUVar() + euTran <= Rx.maxEUStore() && getEUVar() - euTran >= 0) { + long euTran = outputVoltage; + if (Rx.getEUVar() + euTran <= (Rx.maxEUStore()/2)) { setEUVar(getEUVar() - euTran); - Rx.getBaseMetaTileEntity().increaseStoredEnergyUnits(euTran, true);//might work QUESTION POINT; - //mte.getWorld().playSoundEffect(xPos, yPos, zPos, Reference.MODID + ":microwave_ding", 1, 1); + Rx.getBaseMetaTileEntity().increaseStoredEnergyUnits(euTran, true); } } } 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 a0868ea5da..2ed96c709a 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 @@ -16,7 +16,6 @@ import static com.github.technus.tectech.CommonValues.V; public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryBuffer { public boolean ePowerPass = false; - public boolean teslaCompatible = true; private int scanTime = 0; private int scanRadius = 64;//TODO Generate depending on power stored -- cgit From 0e68e9a2907f879d4ea7af142e0222addecfd51d Mon Sep 17 00:00:00 2001 From: bass Date: Wed, 6 Feb 2019 18:30:07 +0000 Subject: Tesla Power Transfer Read title --- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 208 +++++++++++++++++---- .../single/GT_MetaTileEntity_TeslaCoil.java | 1 - 2 files changed, 169 insertions(+), 40 deletions(-) (limited to 'src/main/java') 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 82722e76f9..228bc27ffe 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 @@ -6,6 +6,7 @@ import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_H import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoMulti; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; +import com.github.technus.tectech.thing.metaTileEntity.single.GT_MetaTileEntity_TeslaCoil; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; @@ -39,10 +40,35 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private final ArrayList eCaps = new ArrayList<>(); private int tier = 0; private int orientation = 0; - private int scanTime = 0; - private int scanRadius = 64;//TODO Generate depending on power stored - private long euTOutMax = V[9] / 8;//TODO Generate depending on count and kind of capacitors - private ArrayList eTeslaList = new ArrayList<>(); +// private boolean ePowerPass = false; //TODO Make sure this only in the small tesla + + private int scanTime = 0; //Sets scan time to Z E R O :epic: + private int scanTimeMin = 100; //Min scan time in ticks + private int scanTimeTill = scanTimeMin; //Set default scan time + + private ArrayList eTeslaList = new ArrayList<>(); //Makes a list of Smol Teslas + private ArrayList eTeslaTowerList = new ArrayList<>(); //Makes a list for BIGG Teslas + + private float histLow = 0.25F; //Power pass is disabled if power is under this fraction + private float histHigh = 0.75F; //Power pass is enabled if power is over this fraction + + private int scanRadius = 64; //Radius for small to tower transfers + private int scanRadiusTower = scanRadius * 2; //Radius for tower to tower transfers + + private long outputVoltage = 512L; //Tesla Voltage Output + private long outputCurrent = 1; //Tesla Current Output + private long outputEuT = outputVoltage * outputCurrent; //Tesla Power Output + + private boolean parametrized = false; //Assumes no parametrizer on initialisation + //Default parametrized variables + private long histLowParam = 0; + private long histHighParam = 0; + private long histScaleParam = 0; + private int scanRadiusParam = 0; + private int scanRadiusTowerParam = 0; + private long outputVoltageParam = 0; + private long outputCurrentParam = 0; + private int scanTimeMinParam = 0; //region structure private static final String[][] shape0 = new String[][]{//3 16 0 @@ -256,53 +282,157 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock return true; } - if (!ePowerPass && getEUVar() > maxEUStore() / 2 * 0.8) { + //Parametrizer hatch loader TODO Add parametrizer detection + if (false) { + parametrized = true; + histLowParam = 0; + histHighParam = 0; + histScaleParam = 0; + scanRadiusParam = 0; + scanRadiusTowerParam = 0; + outputVoltageParam = 0; + outputCurrentParam = 0; + scanTimeMin = 0; + } else { + parametrized = false; + } + + ////Hysteresis based ePowerPass Config + long energyMax = maxEUStore() / 2; + long energyStored = getEUVar(); + + float energyFrac = (float)energyStored/energyMax; + + if (parametrized && histScaleParam > 0 && histLowParam > 0 && histScaleParam <= histHighParam && histLowParam < histHighParam) { + histLow = (float)histLowParam/histScaleParam; + histHigh = (float)histHighParam/histScaleParam; + } + + //ePowerPass hist toggle + if (!ePowerPass && energyFrac > histHigh) { ePowerPass = true; - } else if (ePowerPass && getEUVar() < maxEUStore() / 2 * 0.2) { + } else if (ePowerPass && energyFrac < histLow) { ePowerPass = false; } - if (ePowerPass) { - scanTime++; - if (scanTime == 100) { - scanTime = 0; - eTeslaList.clear(); - - for (int xPosOffset = -scanRadius; xPosOffset <= scanRadius; xPosOffset++) { - for (int yPosOffset = -scanRadius; yPosOffset <= scanRadius; yPosOffset++) { - for (int zPosOffset = -scanRadius; zPosOffset <= scanRadius; zPosOffset++) { - IGregTechTileEntity node = mte.getIGregTechTileEntityOffset(xPosOffset, yPosOffset, zPosOffset); - if (node == null) { - continue; - } - IMetaTileEntity nodeInside = node.getMetaTileEntity(); - if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive()) { - eTeslaList.add((GT_MetaTileEntity_TM_teslaCoil) nodeInside); - } + ////Scanning for active teslas + + + if (parametrized && scanTimeMinParam > scanTimeMin) { + scanTimeTill = scanTimeMinParam; + } + + scanTime++; + if (scanTime >= scanTimeTill) { + scanTime = 0; + + scanRadius = 64; //TODO Generate depending on power stored + eTeslaList.clear(); + + if (parametrized && scanRadiusParam > 0 && scanRadiusParam < scanRadius) { + scanRadius = scanRadiusParam; + } + + for (int xPosOffset = -scanRadius; xPosOffset <= scanRadius; xPosOffset++) { + for (int yPosOffset = -scanRadius; yPosOffset <= scanRadius; yPosOffset++) { + for (int zPosOffset = -scanRadius; zPosOffset <= scanRadius; zPosOffset++) { + if (xPosOffset == 0 && yPosOffset == 0 && zPosOffset == 0){ + continue; } - } - } + + IGregTechTileEntity node = mte.getIGregTechTileEntityOffset(xPosOffset, yPosOffset, zPosOffset); + if (node == null) { + continue; + } + + IMetaTileEntity nodeInside = node.getMetaTileEntity(); + if (nodeInside instanceof GT_MetaTileEntity_TeslaCoil){ + eTeslaList.add((GT_MetaTileEntity_TeslaCoil) nodeInside); + } + } + } + } + + scanRadiusTower = scanRadius * 2; + eTeslaTowerList.clear(); + + if (parametrized && scanRadiusTowerParam > 0 && scanRadiusTowerParam < scanRadiusTower) { + scanRadiusTower = scanRadiusTowerParam; + } + + for (int xPosOffset = -scanRadiusTower; xPosOffset <= scanRadiusTower; xPosOffset++) { + for (int yPosOffset = -scanRadiusTower; yPosOffset <= scanRadiusTower; yPosOffset++) { + for (int zPosOffset = -scanRadiusTower; zPosOffset <= scanRadiusTower; zPosOffset++) { + if (xPosOffset == 0 && yPosOffset == 0 && zPosOffset == 0){ + continue; + } + + IGregTechTileEntity node = mte.getIGregTechTileEntityOffset(xPosOffset, yPosOffset, zPosOffset); + if (node == null) { + continue; + } + + IMetaTileEntity nodeInside = node.getMetaTileEntity(); + if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive()){ + eTeslaTowerList.add((GT_MetaTileEntity_TM_teslaCoil) nodeInside); + } + } + } } - float xPos = mte.getXCoord() + 0.5f; - float yPos = mte.getYCoord() + 0.5f; - float zPos = mte.getZCoord() + 0.5f; - long reqSum = 0; - for (GT_MetaTileEntity_TM_teslaCoil Rx : eTeslaList.toArray(new GT_MetaTileEntity_TM_teslaCoil[eTeslaList.size()])) { - try { - reqSum += Rx.maxEUStore() - Rx.getEUVar(); - } catch (Exception e) { - eTeslaList.remove(Rx); + } + + //Stuff to do if ePowerPass + if (ePowerPass) { + outputVoltage = 512;//TODO Generate depending on kind of capacitors + outputCurrent = 1;//TODO Generate depending on count of capacitors + + if (parametrized && outputVoltageParam > 0 && outputVoltage > outputVoltageParam){ + outputVoltage = outputVoltageParam;} + + if (parametrized && outputCurrentParam > 0 && outputCurrent > outputCurrentParam){ + outputCurrent = outputCurrentParam;} + + outputEuT = outputVoltage * outputCurrent; + + long requestedSumEU = 0; + + //Clean the Smol Tesla list + for (GT_MetaTileEntity_TeslaCoil Rx : eTeslaList.toArray(new GT_MetaTileEntity_TeslaCoil[eTeslaList.size()])) { + try { + requestedSumEU += Rx.maxEUStore() - Rx.getEUVar(); + } catch (Exception e) { + eTeslaList.remove(Rx); + } + } + + //Clean the large tesla list + for (GT_MetaTileEntity_TM_teslaCoil Rx : eTeslaTowerList.toArray(new GT_MetaTileEntity_TM_teslaCoil[eTeslaTowerList.size()])) { + try { + requestedSumEU += Rx.maxEUStore() - Rx.getEUVar(); + } catch (Exception e) { + eTeslaTowerList.remove(Rx); + } + } + + //Try to send EU to the smol teslas + for (GT_MetaTileEntity_TeslaCoil Rx : eTeslaList) { + if (!Rx.ePowerPass) { + long euTran = outputVoltage; + if (Rx.getBaseMetaTileEntity().injectEnergyUnits((byte)6, euTran, 1L) > 0L) { + setEUVar(getEUVar() - euTran); + } + } else { } } - for (GT_MetaTileEntity_TM_teslaCoil Rx : eTeslaList) { + //Try to send EU to big teslas + for (GT_MetaTileEntity_TM_teslaCoil Rx : eTeslaTowerList) { if (!Rx.ePowerPass) { - long euTran = (euTOutMax * (Rx.maxEUStore() - Rx.getEUVar())) / reqSum; - if (Rx.getEUVar() + euTran <= Rx.maxEUStore() && getEUVar() - euTran >= 0) { + long euTran = outputVoltage; + if (Rx.getEUVar() + euTran <= (Rx.maxEUStore()/2)) { setEUVar(getEUVar() - euTran); - Rx.getBaseMetaTileEntity().increaseStoredEnergyUnits(euTran, true);//might work QUESTION POINT; - //mte.getWorld().playSoundEffect(xPos, yPos, zPos, Reference.MODID + ":microwave_ding", 1, 1); + Rx.getBaseMetaTileEntity().increaseStoredEnergyUnits(euTran, true); } } } 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 a0868ea5da..2ed96c709a 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 @@ -16,7 +16,6 @@ import static com.github.technus.tectech.CommonValues.V; public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryBuffer { public boolean ePowerPass = false; - public boolean teslaCompatible = true; private int scanTime = 0; private int scanRadius = 64;//TODO Generate depending on power stored -- cgit From dfdcceeadccbdb7ef06d3952ea14eeeb38d72725 Mon Sep 17 00:00:00 2001 From: bass Date: Wed, 6 Feb 2019 18:44:37 +0000 Subject: Fixed Merge issue --- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 46 ---------------------- .../single/GT_MetaTileEntity_TeslaCoil.java | 1 + 2 files changed, 1 insertion(+), 46 deletions(-) (limited to 'src/main/java') 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 e4b34add2e..d60fc0bfbe 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 @@ -303,14 +303,9 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock float energyFrac = (float)energyStored/energyMax; -<<<<<<< HEAD - if (parametrized && histScaleParam > 0 && histLowParam > 0 && histScaleParam <= histHighParam && histLowParam < histHighParam) { -======= - System.out.println(energyFrac); if (parametrized && histScaleParam > 0 && histLowParam > 0 && histScaleParam <= histHighParam && histLowParam < histHighParam) { //TODO Ugly Math because someone I am bad at datatypes :( ->>>>>>> bassAdditions histLow = (float)histLowParam/histScaleParam; histHigh = (float)histHighParam/histScaleParam; } @@ -385,47 +380,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } } } -<<<<<<< HEAD } - - } - - //Stuff to do if ePowerPass - if (ePowerPass) { - outputVoltage = 512;//TODO Generate depending on kind of capacitors - outputCurrent = 1;//TODO Generate depending on count of capacitors - - if (parametrized && outputVoltageParam > 0 && outputVoltage > outputVoltageParam){ - outputVoltage = outputVoltageParam;} - - if (parametrized && outputCurrentParam > 0 && outputCurrent > outputCurrentParam){ - outputCurrent = outputCurrentParam;} - - outputEuT = outputVoltage * outputCurrent; - - long requestedSumEU = 0; - - //Clean the Smol Tesla list - for (GT_MetaTileEntity_TeslaCoil Rx : eTeslaList.toArray(new GT_MetaTileEntity_TeslaCoil[eTeslaList.size()])) { - try { - requestedSumEU += Rx.maxEUStore() - Rx.getEUVar(); - } catch (Exception e) { - eTeslaList.remove(Rx); - } - } - - //Clean the large tesla list - for (GT_MetaTileEntity_TM_teslaCoil Rx : eTeslaTowerList.toArray(new GT_MetaTileEntity_TM_teslaCoil[eTeslaTowerList.size()])) { - try { - requestedSumEU += Rx.maxEUStore() - Rx.getEUVar(); - } catch (Exception e) { - eTeslaTowerList.remove(Rx); - } - } - -======= - } - } //Stuff to do if ePowerPass @@ -461,7 +416,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } } ->>>>>>> bassAdditions //Try to send EU to the smol teslas for (GT_MetaTileEntity_TeslaCoil Rx : eTeslaList) { if (!Rx.ePowerPass) { 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 2ed96c709a..a0868ea5da 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 @@ -16,6 +16,7 @@ import static com.github.technus.tectech.CommonValues.V; public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryBuffer { public boolean ePowerPass = false; + public boolean teslaCompatible = true; private int scanTime = 0; private int scanRadius = 64;//TODO Generate depending on power stored -- cgit From 02efda37470793e017f15e971dd03e4121ed9ffa Mon Sep 17 00:00:00 2001 From: bass Date: Wed, 6 Feb 2019 22:23:11 +0000 Subject: More Tesla Work Small teslas can play too :D --- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 39 ++++--- .../single/GT_MetaTileEntity_TeslaCoil.java | 115 +++++++++++++++++++-- 2 files changed, 129 insertions(+), 25 deletions(-) (limited to 'src/main/java') 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 d60fc0bfbe..605f958177 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 @@ -40,7 +40,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private final ArrayList eCaps = new ArrayList<>(); private int tier = 0; private int orientation = 0; -// private boolean ePowerPass = false; //TODO Make sure this only in the small tesla private int scanTime = 0; //Sets scan time to Z E R O :epic: private int scanTimeMin = 100; //Min scan time in ticks @@ -52,13 +51,18 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private float histLow = 0.25F; //Power pass is disabled if power is under this fraction private float histHigh = 0.75F; //Power pass is enabled if power is over this fraction + private float histLowLimit = 0.05F; //How low can you configure it? + private float histHighLimit = 0.95F; //How high can you configure it? + private int scanRadius = 64; //Radius for small to tower transfers private int scanRadiusTower = scanRadius * 2; //Radius for tower to tower transfers - private long outputVoltage = 512L; //Tesla Voltage Output + private long outputVoltage = 512; //Tesla Voltage Output private long outputCurrent = 1; //Tesla Current Output private long outputEuT = outputVoltage * outputCurrent; //Tesla Power Output + public boolean powerPassToggle = false; //Power Pass for public viewing + private boolean parametrized = false; //Assumes no parametrizer on initialisation //Default parametrized variables private long histLowParam = 0; @@ -303,11 +307,21 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock float energyFrac = (float)energyStored/energyMax; - + //Hysteresis Parameters sanity check if (parametrized && histScaleParam > 0 && histLowParam > 0 && histScaleParam <= histHighParam && histLowParam < histHighParam) { - //TODO Ugly Math because someone I am bad at datatypes :( - histLow = (float)histLowParam/histScaleParam; - histHigh = (float)histHighParam/histScaleParam; + float histLowt = (float)histLowParam/histScaleParam; + if (histLowt >= histLowLimit){ + histLow = histLowt; + } else { + histLow = histLowLimit; + } + + float histHight = (float)histHighParam/histScaleParam; + if (histHight <= histHighLimit){ + histHigh = histHight; + } else { + histHigh = histHighLimit; + } } //ePowerPass hist toggle @@ -316,10 +330,10 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } else if (ePowerPass && energyFrac < histLow) { ePowerPass = false; } + powerPassToggle = ePowerPass; ////Scanning for active teslas - if (parametrized && scanTimeMinParam > scanTimeMin) { scanTimeTill = scanTimeMinParam; } @@ -341,12 +355,10 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock if (xPosOffset == 0 && yPosOffset == 0 && zPosOffset == 0){ continue; } - IGregTechTileEntity node = mte.getIGregTechTileEntityOffset(xPosOffset, yPosOffset, zPosOffset); if (node == null) { continue; } - IMetaTileEntity nodeInside = node.getMetaTileEntity(); if (nodeInside instanceof GT_MetaTileEntity_TeslaCoil){ eTeslaList.add((GT_MetaTileEntity_TeslaCoil) nodeInside); @@ -368,12 +380,10 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock if (xPosOffset == 0 && yPosOffset == 0 && zPosOffset == 0){ continue; } - IGregTechTileEntity node = mte.getIGregTechTileEntityOffset(xPosOffset, yPosOffset, zPosOffset); if (node == null) { continue; } - IMetaTileEntity nodeInside = node.getMetaTileEntity(); if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive()){ eTeslaTowerList.add((GT_MetaTileEntity_TM_teslaCoil) nodeInside); @@ -384,7 +394,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } //Stuff to do if ePowerPass - if (ePowerPass) { + if (powerPassToggle) { outputVoltage = 512;//TODO Generate depending on kind of capacitors outputCurrent = 1;//TODO Generate depending on count of capacitors @@ -418,18 +428,17 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock //Try to send EU to the smol teslas for (GT_MetaTileEntity_TeslaCoil Rx : eTeslaList) { - if (!Rx.ePowerPass) { + if (!Rx.powerPassToggle) { long euTran = outputVoltage; if (Rx.getBaseMetaTileEntity().injectEnergyUnits((byte)6, euTran, 1L) > 0L) { setEUVar(getEUVar() - euTran); } - } else { } } //Try to send EU to big teslas for (GT_MetaTileEntity_TM_teslaCoil Rx : eTeslaTowerList) { - if (!Rx.ePowerPass) { + if (!Rx.powerPassToggle) { long euTran = outputVoltage; if (Rx.getEUVar() + euTran <= (Rx.maxEUStore()/2)) { setEUVar(getEUVar() - euTran); 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 a0868ea5da..c623ba7448 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 @@ -1,27 +1,41 @@ package com.github.technus.tectech.thing.metaTileEntity.single; -import com.github.technus.tectech.Reference; import com.github.technus.tectech.Util; +import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_TM_teslaCoil; +import eu.usrv.yamcore.auxiliary.PlayerChatHelper; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicBatteryBuffer; import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; - import java.util.ArrayList; -import static com.github.technus.tectech.CommonValues.V; public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryBuffer { - public boolean ePowerPass = false; - public boolean teslaCompatible = true; + public boolean powerPassToggle = false; //Power Pass for public viewing + + private int scanTime = 0; //Sets scan time to Z E R O :epic: + private int scanTimeMin = 100; //Min scan time in ticks + private int scanTimeTill = scanTimeMin; //Set default scan time + + private ArrayList eTeslaTowerList = new ArrayList<>(); //Makes a list for BIGG Teslas + + private float histLow = 0.25F; //Power pass is disabled if power is under this fraction + private float histHigh = 0.75F; //Power pass is enabled if power is over this fraction + + private float histLowLimit = 0.25F; //How low can you configure it? + private float histHighLimit = 0.75F; //How high can you configure it? + + private int scanRadiusTower = 64; //Radius for tower to tower transfers + + private long outputVoltage = 512; //Tesla Voltage Output + private long outputCurrent = 1; //Tesla Current Output + private long outputEuT = outputVoltage * outputCurrent; //Tesla Power Output - private int scanTime = 0; - private int scanRadius = 64;//TODO Generate depending on power stored - private long euTOutMax = V[9] / 8;//TODO Generate depending on count and kind of capacitors - private ArrayList eTeslaList = new ArrayList<>(); public GT_MetaTileEntity_TeslaCoil(int aID, String aName, String aNameRegional, int aTier, int aSlotCount) { super(aID, aName, aNameRegional, aTier, "Tesla Coil Transceiver", aSlotCount); @@ -32,6 +46,15 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB super(aName, aTier, aDescription, aTextures, aSlotCount); } + //TODO Redo the string formatting to be actually sane-ish + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (aPlayer.isSneaking()) { + PlayerChatHelper.SendInfo(aPlayer, String.join("", String.format("Hysteresis High Changed to %d ", histHigh*100), "%")); + } else { + PlayerChatHelper.SendInfo(aPlayer, String.join("", String.format("Hysteresis Low Changed to %d ", histLow*100), "%")); + } + } + @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_TeslaCoil(mName, mTier, mDescription, mTextures, mInventory.length); @@ -40,6 +63,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (aBaseMetaTileEntity.isServerSide()) { + IGregTechTileEntity mte = getBaseMetaTileEntity(); this.mCharge = aBaseMetaTileEntity.getStoredEU() / 2L > aBaseMetaTileEntity.getEUCapacity() / 3L; this.mDecharge = aBaseMetaTileEntity.getStoredEU() < aBaseMetaTileEntity.getEUCapacity() / 3L; this.mBatteryCount = 0; @@ -56,7 +80,78 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB ++this.mChargeableCount; } } - //This is where most things happen~~ + + ////Hysteresis based ePowerPass Config + long energyMax = getStoredEnergy()[1]; + long energyStored = getStoredEnergy()[0]; + + float energyFrac = (float)energyStored/energyMax; + System.err.println(energyFrac); + + //ePowerPass hist toggle + if (!powerPassToggle && energyFrac > histHigh) { + powerPassToggle = true; + } else if (powerPassToggle && energyFrac < histLow) { + powerPassToggle = false; + } + + ////Scanning for active teslas + scanTime++; + if (scanTime >= scanTimeTill) { + scanTime = 0; + + scanRadiusTower = 64; //TODO Generate depending on power stored + eTeslaTowerList.clear(); + + for (int xPosOffset = -scanRadiusTower; xPosOffset <= scanRadiusTower; xPosOffset++) { + for (int yPosOffset = -scanRadiusTower; yPosOffset <= scanRadiusTower; yPosOffset++) { + for (int zPosOffset = -scanRadiusTower; zPosOffset <= scanRadiusTower; zPosOffset++) { + if (xPosOffset == 0 && yPosOffset == 0 && zPosOffset == 0){ + continue; + } + IGregTechTileEntity node = mte.getIGregTechTileEntityOffset(xPosOffset, yPosOffset, zPosOffset); + if (node == null) { + continue; + } + IMetaTileEntity nodeInside = node.getMetaTileEntity(); + if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive()){ + eTeslaTowerList.add((GT_MetaTileEntity_TM_teslaCoil) nodeInside); + } + } + } + } + } + + //Stuff to do if ePowerPass + if (powerPassToggle) { + outputVoltage = 512;//TODO Set Depending On Tier + outputCurrent = 1;//TODO Generate depending on count of batteries + + outputEuT = outputVoltage * outputCurrent; + + long requestedSumEU = 0; + + //Clean the large tesla list + for (GT_MetaTileEntity_TM_teslaCoil Rx : eTeslaTowerList.toArray(new GT_MetaTileEntity_TM_teslaCoil[eTeslaTowerList.size()])) { + try { + requestedSumEU += Rx.maxEUStore() - Rx.getEUVar(); + } catch (Exception e) { + eTeslaTowerList.remove(Rx); + } + } + + //Try to send EU to big teslas + for (GT_MetaTileEntity_TM_teslaCoil Rx : eTeslaTowerList) { + if (!Rx.powerPassToggle) { + long euTran = outputVoltage; + if (Rx.getEUVar() + euTran <= (Rx.maxEUStore()/2)) { + setEUVar(getEUVar() - euTran); + Rx.getBaseMetaTileEntity().increaseStoredEnergyUnits(euTran, true); + System.err.println("Energy Sent!"); + } + } + } + } } } } -- cgit From 0954868ae218f3a77c408eb2eea6d20691c894ac Mon Sep 17 00:00:00 2001 From: Bass Date: Thu, 7 Feb 2019 11:44:35 +0000 Subject: Screwdriver mess around Honestly I'm just using git to sync my laptop to my desktop lol --- .../single/GT_MetaTileEntity_TeslaCoil.java | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'src/main/java') 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 c623ba7448..bc0a402822 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 @@ -24,11 +24,11 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB private ArrayList eTeslaTowerList = new ArrayList<>(); //Makes a list for BIGG Teslas + private float histStep = 0.05F; //Hysteresis Resolution private float histLow = 0.25F; //Power pass is disabled if power is under this fraction private float histHigh = 0.75F; //Power pass is enabled if power is over this fraction - - private float histLowLimit = 0.25F; //How low can you configure it? - private float histHighLimit = 0.75F; //How high can you configure it? + private float histLowLimit = 0.05F; //How low can you configure it? + private float histHighLimit = 0.95F; //How high can you configure it? private int scanRadiusTower = 64; //Radius for tower to tower transfers @@ -49,9 +49,19 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB //TODO Redo the string formatting to be actually sane-ish public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (aPlayer.isSneaking()) { - PlayerChatHelper.SendInfo(aPlayer, String.join("", String.format("Hysteresis High Changed to %d ", histHigh*100), "%")); + if (histHigh < histHighLimit && histHigh - histStep != histLow) { + histHigh += histStep; + } else { + histHigh = histLow + histStep; + } + PlayerChatHelper.SendInfo(aPlayer, "Hysteresis High Changed to " + (histHigh * 100F)+ "%"); } else { - PlayerChatHelper.SendInfo(aPlayer, String.join("", String.format("Hysteresis Low Changed to %d ", histLow*100), "%")); + if (histLow > histLowLimit && histLow - histStep != histLow) { + histLow -= histStep; + } else { + histLow = histHigh - histStep; + } + PlayerChatHelper.SendInfo(aPlayer, "Hysteresis Low Changed to " + (histLow * 100F)+ "%"); } } -- cgit From 3218e5bdbfbf2c4769ae57f61c312af26ae315d6 Mon Sep 17 00:00:00 2001 From: Bass Date: Thu, 7 Feb 2019 12:53:38 +0000 Subject: Added rounding to fix hist value range I really dislike ever having to deal with any floats ever. --- .../single/GT_MetaTileEntity_TeslaCoil.java | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'src/main/java') 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 bc0a402822..83d1e4e7df 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 @@ -14,6 +14,8 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import java.util.ArrayList; +import static java.lang.Math.round; + public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryBuffer { public boolean powerPassToggle = false; //Power Pass for public viewing @@ -36,6 +38,14 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB private long outputCurrent = 1; //Tesla Current Output private long outputEuT = outputVoltage * outputCurrent; //Tesla Power Output + //All credit to ivan-stin who gave a solution at https://stackoverflow.com/questions/8911356/whats-the-best-practice-to-round-a-float-to-2-decimals + public static float round2(float number, int scale) { + int pow = 10; + for (int i = 1; i < scale; i++) + pow *= 10; + float tmp = number * pow; + return ( (float) ( (int) ((tmp - (int) tmp) >= 0.5f ? tmp + 1 : tmp) ) ) / pow; + } public GT_MetaTileEntity_TeslaCoil(int aID, String aName, String aNameRegional, int aTier, int aSlotCount) { super(aID, aName, aNameRegional, aTier, "Tesla Coil Transceiver", aSlotCount); @@ -46,22 +56,23 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB super(aName, aTier, aDescription, aTextures, aSlotCount); } - //TODO Redo the string formatting to be actually sane-ish public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (aPlayer.isSneaking()) { - if (histHigh < histHighLimit && histHigh - histStep != histLow) { + if (histHigh < histHighLimit) { histHigh += histStep; } else { histHigh = histLow + histStep; } - PlayerChatHelper.SendInfo(aPlayer, "Hysteresis High Changed to " + (histHigh * 100F)+ "%"); + histHigh = round2(histHigh,2); + PlayerChatHelper.SendInfo(aPlayer, "Hysteresis High Changed to " + round(histHigh * 100F) + "%"); } else { - if (histLow > histLowLimit && histLow - histStep != histLow) { + if (histLow > histLowLimit) { histLow -= histStep; } else { histLow = histHigh - histStep; } - PlayerChatHelper.SendInfo(aPlayer, "Hysteresis Low Changed to " + (histLow * 100F)+ "%"); + histLow = round2(histLow,2); + PlayerChatHelper.SendInfo(aPlayer, "Hysteresis Low Changed to " + round(histLow * 100F) + "%"); } } -- cgit From 9a0d99ffd15ef9332f206293b5f0a56f2c8c13d4 Mon Sep 17 00:00:00 2001 From: Bass Date: Tue, 12 Feb 2019 11:26:39 +0000 Subject: Float counting is bad? --- .../single/GT_MetaTileEntity_TeslaCoil.java | 39 ++++++++++------------ 1 file changed, 17 insertions(+), 22 deletions(-) (limited to 'src/main/java') 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 83d1e4e7df..162204de01 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 @@ -26,11 +26,15 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB private ArrayList eTeslaTowerList = new ArrayList<>(); //Makes a list for BIGG Teslas - private float histStep = 0.05F; //Hysteresis Resolution - private float histLow = 0.25F; //Power pass is disabled if power is under this fraction - private float histHigh = 0.75F; //Power pass is enabled if power is over this fraction - private float histLowLimit = 0.05F; //How low can you configure it? - private float histHighLimit = 0.95F; //How high can you configure it? + private int histSteps = 20; //Hysteresis Resolution + private int histSettingLow = 3; + private int histSettingHigh = 15; + private int histLowLimit = 1; //How low can you configure it? + private int histHighLimit = histSteps-1; //How high can you configure it? + + private float histLow = (float)histSettingLow/histSteps; //Power pass is disabled if power is under this fraction + private float histHigh = (float)histSettingHigh/histSteps; //Power pass is enabled if power is over this fraction + private int scanRadiusTower = 64; //Radius for tower to tower transfers @@ -38,15 +42,6 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB private long outputCurrent = 1; //Tesla Current Output private long outputEuT = outputVoltage * outputCurrent; //Tesla Power Output - //All credit to ivan-stin who gave a solution at https://stackoverflow.com/questions/8911356/whats-the-best-practice-to-round-a-float-to-2-decimals - public static float round2(float number, int scale) { - int pow = 10; - for (int i = 1; i < scale; i++) - pow *= 10; - float tmp = number * pow; - return ( (float) ( (int) ((tmp - (int) tmp) >= 0.5f ? tmp + 1 : tmp) ) ) / pow; - } - public GT_MetaTileEntity_TeslaCoil(int aID, String aName, String aNameRegional, int aTier, int aSlotCount) { super(aID, aName, aNameRegional, aTier, "Tesla Coil Transceiver", aSlotCount); Util.setTier(aTier, this); @@ -58,20 +53,20 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (aPlayer.isSneaking()) { - if (histHigh < histHighLimit) { - histHigh += histStep; + if (histSettingHigh histLowLimit) { - histLow -= histStep; + if (histSettingLow>histLowLimit) { + histSettingLow--; } else { - histLow = histHigh - histStep; + histSettingLow=histSettingHigh-1; } - histLow = round2(histLow,2); + histLow = (float)histSettingLow/histSteps; PlayerChatHelper.SendInfo(aPlayer, "Hysteresis Low Changed to " + round(histLow * 100F) + "%"); } } -- cgit From 931a053db161acddf1240093af3741ddf43d38af Mon Sep 17 00:00:00 2001 From: Bass Date: Thu, 14 Feb 2019 05:20:58 +0000 Subject: Tesla scanning (sync to my pc lol) Mostly this is just for me to have my code backed up lol --- .../single/GT_MetaTileEntity_TeslaCoil.java | 38 ++++++++++++++++++++-- 1 file changed, 35 insertions(+), 3 deletions(-) (limited to 'src/main/java') 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 162204de01..d8dd6efadb 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 @@ -9,10 +9,10 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicBatteryBuffer; import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import java.util.ArrayList; + +import java.util.*; import static java.lang.Math.round; @@ -25,6 +25,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB private int scanTimeTill = scanTimeMin; //Set default scan time private ArrayList eTeslaTowerList = new ArrayList<>(); //Makes a list for BIGG Teslas + private Map eTeslaTowerMap = new HashMap(); private int histSteps = 20; //Hysteresis Resolution private int histSettingLow = 3; @@ -35,13 +36,26 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB private float histLow = (float)histSettingLow/histSteps; //Power pass is disabled if power is under this fraction private float histHigh = (float)histSettingHigh/histSteps; //Power pass is enabled if power is over this fraction - private int scanRadiusTower = 64; //Radius for tower to tower transfers private long outputVoltage = 512; //Tesla Voltage Output private long outputCurrent = 1; //Tesla Current Output private long outputEuT = outputVoltage * outputCurrent; //Tesla Power Output + static > SortedSet> entriesSortedByValues(Map map) { + SortedSet> sortedEntries = new TreeSet>( + new Comparator>() { + @Override public int compare(Map.Entry e1, Map.Entry e2) { + int res = e1.getValue().compareTo(e2.getValue()); + return res != 0 ? res : 1; // Special fix to preserve items with equal values + } + } + ); + sortedEntries.addAll(map.entrySet()); + return sortedEntries; + } + + public GT_MetaTileEntity_TeslaCoil(int aID, String aName, String aNameRegional, int aTier, int aSlotCount) { super(aID, aName, aNameRegional, aTier, "Tesla Coil Transceiver", aSlotCount); Util.setTier(aTier, this); @@ -118,6 +132,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB scanRadiusTower = 64; //TODO Generate depending on power stored eTeslaTowerList.clear(); + eTeslaTowerMap.clear(); for (int xPosOffset = -scanRadiusTower; xPosOffset <= scanRadiusTower; xPosOffset++) { for (int yPosOffset = -scanRadiusTower; yPosOffset <= scanRadiusTower; yPosOffset++) { @@ -132,12 +147,29 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB IMetaTileEntity nodeInside = node.getMetaTileEntity(); if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive()){ eTeslaTowerList.add((GT_MetaTileEntity_TM_teslaCoil) nodeInside); + int distance = (int)round(Math.abs(Math.sqrt(xPosOffset^2 + yPosOffset^2 + zPosOffset^2))); + eTeslaTowerMap.put(node,distance); } } } } } + for (Map.Entry Rx : entriesSortedByValues(eTeslaTowerMap)) { + System.out.println("yote @ : " + Rx.getValue()); + } + + for (IGregTechTileEntity RxRee : eTeslaTowerMap.keySet()) { + GT_MetaTileEntity_TM_teslaCoil Rx = (GT_MetaTileEntity_TM_teslaCoil) RxRee.getMetaTileEntity(); + if (!Rx.powerPassToggle) { + long euTran = outputVoltage; + if (Rx.getEUVar() + euTran <= (Rx.maxEUStore() / 2)) { + setEUVar(getEUVar() - euTran); + Rx.getBaseMetaTileEntity().increaseStoredEnergyUnits(euTran, true); + System.err.println("Energy Sent!"); + } + } + } //Stuff to do if ePowerPass if (powerPassToggle) { outputVoltage = 512;//TODO Set Depending On Tier -- cgit From 2dcceaf0de0221b4c9dc38b8592b57ca7e7b0a24 Mon Sep 17 00:00:00 2001 From: Bass Date: Thu, 14 Feb 2019 17:30:19 +0000 Subject: Tesla Cover Work Lord forgive me for this is fucked --- .../github/technus/tectech/loader/MainLoader.java | 7 ++- .../technus/tectech/loader/thing/CoverLoader.java | 19 ++++++++ .../technus/tectech/loader/thing/ThingsLoader.java | 3 ++ .../tectech/thing/cover/GT_Cover_TM_TeslaCoil.java | 17 ++++++++ .../technus/tectech/thing/item/TeslaCoilCover.java | 51 ++++++++++++++++++++++ .../single/GT_MetaTileEntity_TeslaCoil.java | 25 +++-------- src/main/resources/assets/tectech/lang/en_US.lang | 2 + src/main/resources/assets/tectech/lang/zh_CN.lang | 2 + 8 files changed, 107 insertions(+), 19 deletions(-) create mode 100644 src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java create mode 100644 src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil.java create mode 100644 src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCover.java (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/loader/MainLoader.java b/src/main/java/com/github/technus/tectech/loader/MainLoader.java index de53fb225f..3c9eeac800 100644 --- a/src/main/java/com/github/technus/tectech/loader/MainLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/MainLoader.java @@ -12,6 +12,7 @@ import com.github.technus.tectech.loader.gui.ModGuiHandler; import com.github.technus.tectech.loader.mechanics.ElementalLoader; import com.github.technus.tectech.loader.recipe.RecipeLoader; import com.github.technus.tectech.loader.thing.ComponentLoader; +import com.github.technus.tectech.loader.thing.CoverLoader; import com.github.technus.tectech.loader.thing.MachineLoader; import com.github.technus.tectech.loader.thing.ThingsLoader; import com.github.technus.tectech.thing.casing.TT_Container_Casings; @@ -74,7 +75,7 @@ public final class MainLoader { } public static void load() { - ProgressManager.ProgressBar progressBarLoad = ProgressManager.push("TecTech Loader", 8); + ProgressManager.ProgressBar progressBarLoad = ProgressManager.push("TecTech Loader", 9); progressBarLoad.step("Elemental Things"); new ElementalLoader().run(); @@ -96,6 +97,10 @@ public final class MainLoader { new MachineLoader().run(); LOGGER.info("Machine Init Done"); + progressBarLoad.step("Cover Things"); + new CoverLoader().run(); + LOGGER.info("Cover Init Done"); + progressBarLoad.step("Register entities"); new EntityLoader().run(); LOGGER.info("Entities registered"); diff --git a/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java b/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java new file mode 100644 index 0000000000..198fd4ac01 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java @@ -0,0 +1,19 @@ +package com.github.technus.tectech.loader.thing; + +import com.github.technus.tectech.TecTech; + +import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; + +public class CoverLoader implements Runnable { + @Override + public void run() { + //TODO Create a techTechModItem method, but for now I need it to actually USE the tesla cover item + //GregTech_API.registerCover(GT_ModHandler.getModItem("tectech", "tm.teslaCoilCover", 1L), new GT_RenderedTexture(Textures.BlockIcons.VENT_ADVANCED), new GT_Cover_TM_TeslaCoil()); + GregTech_API.registerCover(GT_ModHandler.getIC2Item("reactorReflector", 1L, 1), new GT_RenderedTexture(Textures.BlockIcons.VENT_ADVANCED), new GT_Cover_TM_TeslaCoil()); + TecTech.LOGGER.info("Cover functionality registered"); + } +} 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 b422688a70..e9967a3e62 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 @@ -53,6 +53,9 @@ public class ThingsLoader implements Runnable { ReactorSimBlock.run(); TecTech.LOGGER.info("Reactor Simulator registered"); + TeslaCoilCover.run(); + TecTech.LOGGER.info("Covers Items registered"); + ConstructableTriggerItem.run(); FrontRotationTriggerItem.run(); ParametrizerMemoryCard.run(); diff --git a/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil.java b/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil.java new file mode 100644 index 0000000000..a9349dd2ee --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil.java @@ -0,0 +1,17 @@ +package com.github.technus.tectech.thing.cover; + +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.util.GT_CoverBehavior; + +public class GT_Cover_TM_TeslaCoil extends GT_CoverBehavior { + public GT_Cover_TM_TeslaCoil() { + } + + public boolean teslaCompatibiliy(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + if (aSide != 1) { + return false; + } else { + return true; + } + } +} \ No newline at end of file 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 new file mode 100644 index 0000000000..abf1bd90a0 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCover.java @@ -0,0 +1,51 @@ +package com.github.technus.tectech.thing.item; + +import com.github.technus.tectech.CommonValues; +import com.github.technus.tectech.Util; +import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Param; +import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +import java.util.List; + +import static com.github.technus.tectech.Reference.MODID; +import static com.github.technus.tectech.thing.CustomItemList.parametrizerMemory; + + +public final class TeslaCoilCover extends Item { + public static TeslaCoilCover INSTANCE; + + public TeslaCoilCover() { + setUnlocalizedName("tm.teslaCoilCover"); + setTextureName(MODID + ":itemParametrizerMemoryCardUnlocked"); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) { + aList.add(CommonValues.BASS_MARK); + aList.add("Tesla-Enables Machines!"); + aList.add(EnumChatFormatting.BLUE + "Use on a machine to apply Tesla capabilities"); + aList.add(EnumChatFormatting.BLUE + "Who the hell need cables anyway?"); + } + + public static void run() { + INSTANCE = new TeslaCoilCover(); + System.out.print(INSTANCE.getUnlocalizedName()); + GameRegistry.registerItem(INSTANCE, INSTANCE.getUnlocalizedName()); + } +} 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 d8dd6efadb..2feca75c7c 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 @@ -116,7 +116,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB long energyStored = getStoredEnergy()[0]; float energyFrac = (float)energyStored/energyMax; - System.err.println(energyFrac); + //System.err.println(energyFrac); Debug energy fraction display //ePowerPass hist toggle if (!powerPassToggle && energyFrac > histHigh) { @@ -147,7 +147,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB IMetaTileEntity nodeInside = node.getMetaTileEntity(); if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive()){ eTeslaTowerList.add((GT_MetaTileEntity_TM_teslaCoil) nodeInside); - int distance = (int)round(Math.abs(Math.sqrt(xPosOffset^2 + yPosOffset^2 + zPosOffset^2))); + int distance = (int)Math.ceil(Math.sqrt(xPosOffset*xPosOffset + yPosOffset*yPosOffset + zPosOffset*zPosOffset)); eTeslaTowerMap.put(node,distance); } } @@ -156,20 +156,9 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB } for (Map.Entry Rx : entriesSortedByValues(eTeslaTowerMap)) { - System.out.println("yote @ : " + Rx.getValue()); + System.out.println("yote @: " + Rx.getValue()); } - for (IGregTechTileEntity RxRee : eTeslaTowerMap.keySet()) { - GT_MetaTileEntity_TM_teslaCoil Rx = (GT_MetaTileEntity_TM_teslaCoil) RxRee.getMetaTileEntity(); - if (!Rx.powerPassToggle) { - long euTran = outputVoltage; - if (Rx.getEUVar() + euTran <= (Rx.maxEUStore() / 2)) { - setEUVar(getEUVar() - euTran); - Rx.getBaseMetaTileEntity().increaseStoredEnergyUnits(euTran, true); - System.err.println("Energy Sent!"); - } - } - } //Stuff to do if ePowerPass if (powerPassToggle) { outputVoltage = 512;//TODO Set Depending On Tier @@ -188,14 +177,14 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB } } - //Try to send EU to big teslas - for (GT_MetaTileEntity_TM_teslaCoil Rx : eTeslaTowerList) { + for (IGregTechTileEntity RxRee : eTeslaTowerMap.keySet()) { + GT_MetaTileEntity_TM_teslaCoil Rx = (GT_MetaTileEntity_TM_teslaCoil) RxRee.getMetaTileEntity(); if (!Rx.powerPassToggle) { long euTran = outputVoltage; - if (Rx.getEUVar() + euTran <= (Rx.maxEUStore()/2)) { + if (Rx.getEUVar() + euTran <= (Rx.maxEUStore() / 2)) { setEUVar(getEUVar() - euTran); Rx.getBaseMetaTileEntity().increaseStoredEnergyUnits(euTran, true); - System.err.println("Energy Sent!"); + //System.err.println("Energy Sent!"); Debug energy sent message } } } diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index ccb17a8a0c..2c748a18d7 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -9,6 +9,8 @@ item.em.frontRotate.name=Front Rotation Scrench item.em.parametrizerMemoryCard.name=Parametrizer Memory Card item.em.EuMeterGT.name=GT EU meter +item.tm.teslaCoilCover.name=Tesla Coil Cover + death.attack.microwaving=%1$s was dehydrated by radiation. death.attack.microwaving.player=%1$s was dehydrated by radiation while fighting %2$s. diff --git a/src/main/resources/assets/tectech/lang/zh_CN.lang b/src/main/resources/assets/tectech/lang/zh_CN.lang index 5359f04e9b..47912d245d 100644 --- a/src/main/resources/assets/tectech/lang/zh_CN.lang +++ b/src/main/resources/assets/tectech/lang/zh_CN.lang @@ -6,6 +6,8 @@ item.em.definitionContainer.name=EM配方指引 item.em.debugBuilder.name=多方块机器蓝图 item.em.parametrizerMemoryCard.name=参量机记忆卡 +item.tm.teslaCoilCover.name=Tesla Coil Cover + death.attack.microwaving=%1$s 被辐射脱水 death.attack.microwaving.player=%1$s 在与 %2$s 战斗中被辐射脱水 -- cgit From efe018ba6922e9dbaa2cfdbb3ff7e229de9aec50 Mon Sep 17 00:00:00 2001 From: Bass Date: Thu, 14 Feb 2019 18:09:49 +0000 Subject: Cover Loader Fix TecTech Cover Loader now actually working :D --- .../com/github/technus/tectech/loader/thing/CoverLoader.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java b/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java index 198fd4ac01..ca81427e03 100644 --- a/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java @@ -3,17 +3,15 @@ package com.github.technus.tectech.loader.thing; import com.github.technus.tectech.TecTech; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil; +import com.github.technus.tectech.thing.item.TeslaCoilCover; import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_ModHandler; +import net.minecraft.item.ItemStack; public class CoverLoader implements Runnable { - @Override - public void run() { - //TODO Create a techTechModItem method, but for now I need it to actually USE the tesla cover item - //GregTech_API.registerCover(GT_ModHandler.getModItem("tectech", "tm.teslaCoilCover", 1L), new GT_RenderedTexture(Textures.BlockIcons.VENT_ADVANCED), new GT_Cover_TM_TeslaCoil()); - GregTech_API.registerCover(GT_ModHandler.getIC2Item("reactorReflector", 1L, 1), new GT_RenderedTexture(Textures.BlockIcons.VENT_ADVANCED), new GT_Cover_TM_TeslaCoil()); + public void run(){ + GregTech_API.registerCover(new ItemStack(TeslaCoilCover.INSTANCE, 1), new GT_RenderedTexture(Textures.BlockIcons.VENT_ADVANCED), new GT_Cover_TM_TeslaCoil()); TecTech.LOGGER.info("Cover functionality registered"); } } -- cgit From 659365e3541c6295aaf3fd8f46aadb550bf9ecb5 Mon Sep 17 00:00:00 2001 From: Bass Date: Fri, 15 Feb 2019 06:58:33 +0000 Subject: Tesla Cover (part (math.random()*10)) More Tesla cover work, we are getting there fam. --- .../tectech/thing/cover/GT_Cover_TM_TeslaCoil.java | 9 ---- .../single/GT_MetaTileEntity_TeslaCoil.java | 51 ++++++++++++++-------- 2 files changed, 34 insertions(+), 26 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil.java b/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil.java index a9349dd2ee..e1e1b9d595 100644 --- a/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil.java +++ b/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil.java @@ -1,17 +1,8 @@ package com.github.technus.tectech.thing.cover; -import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.util.GT_CoverBehavior; public class GT_Cover_TM_TeslaCoil extends GT_CoverBehavior { public GT_Cover_TM_TeslaCoil() { } - - public boolean teslaCompatibiliy(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - if (aSide != 1) { - return false; - } else { - return true; - } - } } \ No newline at end of file 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 2feca75c7c..a8797682e6 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 @@ -1,6 +1,7 @@ package com.github.technus.tectech.thing.metaTileEntity.single; import com.github.technus.tectech.Util; +import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil; import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_TM_teslaCoil; import eu.usrv.yamcore.auxiliary.PlayerChatHelper; import gregtech.api.interfaces.ITexture; @@ -24,7 +25,6 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB private int scanTimeMin = 100; //Min scan time in ticks private int scanTimeTill = scanTimeMin; //Set default scan time - private ArrayList eTeslaTowerList = new ArrayList<>(); //Makes a list for BIGG Teslas private Map eTeslaTowerMap = new HashMap(); private int histSteps = 20; //Hysteresis Resolution @@ -101,6 +101,10 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB ItemStack[] var4 = this.mInventory; int var5 = var4.length; + if (aBaseMetaTileEntity.getCoverBehaviorAtSide((byte)1) instanceof GT_Cover_TM_TeslaCoil && scanTime == 0){ + System.out.println("I myself feel quite tesla enabled indeed!"); + } + for (int var6 = 0; var6 < var5; ++var6) { ItemStack tStack = var4[var6]; if (GT_ModHandler.isElectricItem(tStack, this.mTier)) { @@ -131,7 +135,6 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB scanTime = 0; scanRadiusTower = 64; //TODO Generate depending on power stored - eTeslaTowerList.clear(); eTeslaTowerMap.clear(); for (int xPosOffset = -scanRadiusTower; xPosOffset <= scanRadiusTower; xPosOffset++) { @@ -145,10 +148,8 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB continue; } IMetaTileEntity nodeInside = node.getMetaTileEntity(); - if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive()){ - eTeslaTowerList.add((GT_MetaTileEntity_TM_teslaCoil) nodeInside); - int distance = (int)Math.ceil(Math.sqrt(xPosOffset*xPosOffset + yPosOffset*yPosOffset + zPosOffset*zPosOffset)); - eTeslaTowerMap.put(node,distance); + if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive() || (node.getCoverBehaviorAtSide((byte)1) instanceof GT_Cover_TM_TeslaCoil)){ + eTeslaTowerMap.put(node,(int)Math.ceil(Math.sqrt(xPosOffset*xPosOffset + yPosOffset*yPosOffset + zPosOffset*zPosOffset))); } } } @@ -166,25 +167,41 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB outputEuT = outputVoltage * outputCurrent; - long requestedSumEU = 0; + long requestedSumEU = 0;//TODO Find a use for requestedSumEU - //Clean the large tesla list - for (GT_MetaTileEntity_TM_teslaCoil Rx : eTeslaTowerList.toArray(new GT_MetaTileEntity_TM_teslaCoil[eTeslaTowerList.size()])) { + //Clean the node list SMALL INSTANCE REAPING DOESN'T WORK + for (Map.Entry Rx : entriesSortedByValues(eTeslaTowerMap)) { + IGregTechTileEntity node = Rx.getKey(); + if (node == null) { + eTeslaTowerMap.remove(Rx.getKey()); + System.err.println("Dead Tesla Reaped!"); + continue; + } + IMetaTileEntity nodeInside = node.getMetaTileEntity(); try { - requestedSumEU += Rx.maxEUStore() - Rx.getEUVar(); + if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive()) { + GT_MetaTileEntity_TM_teslaCoil teslaTower = (GT_MetaTileEntity_TM_teslaCoil) nodeInside; + requestedSumEU += teslaTower.maxEUStore() - teslaTower.getEUVar(); + } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil)) { + requestedSumEU += node.getEUCapacity() - node.getStoredEU(); + } else { + eTeslaTowerMap.remove(Rx.getKey()); + System.err.println("Dead Tesla Reaped!"); + } } catch (Exception e) { - eTeslaTowerList.remove(Rx); + eTeslaTowerMap.remove(Rx.getKey()); + System.err.println("Dead Tesla Reaped!"); } } - for (IGregTechTileEntity RxRee : eTeslaTowerMap.keySet()) { - GT_MetaTileEntity_TM_teslaCoil Rx = (GT_MetaTileEntity_TM_teslaCoil) RxRee.getMetaTileEntity(); - if (!Rx.powerPassToggle) { + for (Map.Entry Rx : entriesSortedByValues(eTeslaTowerMap)) { + GT_MetaTileEntity_TM_teslaCoil nodeInside = (GT_MetaTileEntity_TM_teslaCoil) Rx.getKey().getMetaTileEntity(); + if (!nodeInside.powerPassToggle) { long euTran = outputVoltage; - if (Rx.getEUVar() + euTran <= (Rx.maxEUStore() / 2)) { + if (nodeInside.getEUVar() + euTran <= (nodeInside.maxEUStore() / 2)) { setEUVar(getEUVar() - euTran); - Rx.getBaseMetaTileEntity().increaseStoredEnergyUnits(euTran, true); - //System.err.println("Energy Sent!"); Debug energy sent message + nodeInside.getBaseMetaTileEntity().increaseStoredEnergyUnits(euTran, true); + System.err.println("Energy Sent!"); } } } -- cgit From 14d4eef90b2fc83c81857de5b91a79a0d5f95299 Mon Sep 17 00:00:00 2001 From: Bass Date: Sat, 16 Feb 2019 04:39:00 +0000 Subject: Theta Movement machines don't explode if broken Might roll this back, though honestly I just need to find how to set the explosion flag to off in the config xd --- .../thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java | 3 +++ .../thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java | 3 +++ 2 files changed, 6 insertions(+) (limited to 'src/main/java') 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 67c390ab7c..7e3a51da4f 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 @@ -74,6 +74,9 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock return new GT_MetaTileEntity_TM_microwave(mName); } + @Override + public void onRemoval(){}//Literally stops this machine from exploding if you break it with some power left, it doesn't deal with any EM ffs + @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { if (aSide == aFacing) { 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 605f958177..bb7c815416 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 @@ -142,6 +142,9 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock return new GT_MetaTileEntity_TM_teslaCoil(mName); } + @Override + public void onRemoval(){}//Literally stops this machine from exploding if you break it with some power left, it doesn't deal with any EM ffs + @Override @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister aBlockIconRegister) { -- cgit From ee4bd9f91d4b8f85b550730aa1e3c63d91b3be2f Mon Sep 17 00:00:00 2001 From: Bass Date: Sat, 16 Feb 2019 08:14:14 +0000 Subject: Tesla WIP Both types of tesla now map other teslas After talking to 0laf, I think a super high tier Tesla Cover for straight tower to machine transfers. --- .../technus/tectech/loader/thing/CoverLoader.java | 6 +- .../technus/tectech/loader/thing/ThingsLoader.java | 1 + .../tectech/thing/cover/GT_Cover_TM_TeslaCoil.java | 2 +- .../cover/GT_Cover_TM_TeslaCoil_Ultimate.java | 8 + .../tectech/thing/item/TeslaCoilCoverUltimate.java | 36 +++++ .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 178 ++++++++++++--------- .../single/GT_MetaTileEntity_TeslaCoil.java | 122 +++++++------- src/main/resources/assets/tectech/lang/en_US.lang | 1 + src/main/resources/assets/tectech/lang/zh_CN.lang | 1 + 9 files changed, 210 insertions(+), 145 deletions(-) create mode 100644 src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil_Ultimate.java create mode 100644 src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCoverUltimate.java (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java b/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java index ca81427e03..e71489339e 100644 --- a/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java @@ -3,15 +3,17 @@ package com.github.technus.tectech.loader.thing; import com.github.technus.tectech.TecTech; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil; +import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil_Ultimate; import com.github.technus.tectech.thing.item.TeslaCoilCover; +import com.github.technus.tectech.thing.item.TeslaCoilCoverUltimate; import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; import gregtech.api.objects.GT_RenderedTexture; import net.minecraft.item.ItemStack; - public class CoverLoader implements Runnable { public void run(){ - GregTech_API.registerCover(new ItemStack(TeslaCoilCover.INSTANCE, 1), new GT_RenderedTexture(Textures.BlockIcons.VENT_ADVANCED), new GT_Cover_TM_TeslaCoil()); + GregTech_API.registerCover(new ItemStack(TeslaCoilCover.INSTANCE, 1), new GT_RenderedTexture(Textures.BlockIcons.VENT_NORMAL), new GT_Cover_TM_TeslaCoil()); + GregTech_API.registerCover(new ItemStack(TeslaCoilCoverUltimate.INSTANCE, 1), new GT_RenderedTexture(Textures.BlockIcons.VENT_ADVANCED), new GT_Cover_TM_TeslaCoil_Ultimate()); TecTech.LOGGER.info("Cover functionality registered"); } } 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 e9967a3e62..6951ef6533 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 @@ -54,6 +54,7 @@ public class ThingsLoader implements Runnable { TecTech.LOGGER.info("Reactor Simulator registered"); TeslaCoilCover.run(); + TeslaCoilCoverUltimate.run(); TecTech.LOGGER.info("Covers Items registered"); ConstructableTriggerItem.run(); diff --git a/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil.java b/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil.java index e1e1b9d595..bfb4ae9208 100644 --- a/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil.java +++ b/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil.java @@ -1,6 +1,6 @@ package com.github.technus.tectech.thing.cover; -import gregtech.api.util.GT_CoverBehavior; + import gregtech.api.util.GT_CoverBehavior; public class GT_Cover_TM_TeslaCoil extends GT_CoverBehavior { public GT_Cover_TM_TeslaCoil() { diff --git a/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil_Ultimate.java b/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil_Ultimate.java new file mode 100644 index 0000000000..7ad6bc6f5f --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil_Ultimate.java @@ -0,0 +1,8 @@ +package com.github.technus.tectech.thing.cover; + + import gregtech.api.util.GT_CoverBehavior; + +public class GT_Cover_TM_TeslaCoil_Ultimate extends GT_CoverBehavior { + public GT_Cover_TM_TeslaCoil_Ultimate() { + } +} \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCoverUltimate.java b/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCoverUltimate.java new file mode 100644 index 0000000000..115f3a34c6 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCoverUltimate.java @@ -0,0 +1,36 @@ +package com.github.technus.tectech.thing.item; + +import com.github.technus.tectech.CommonValues; +import cpw.mods.fml.common.registry.GameRegistry; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +import java.util.List; + +import static com.github.technus.tectech.Reference.MODID; + + +public final class TeslaCoilCoverUltimate extends Item { + public static TeslaCoilCoverUltimate INSTANCE; + + public TeslaCoilCoverUltimate() { + setUnlocalizedName("tm.teslaCoilCoverUltimate"); + setTextureName(MODID + ":itemParametrizerMemoryCardUnlocked"); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) { + aList.add(CommonValues.BASS_MARK); + aList.add("Tesla-Enables Machines! (BUT LOUDER!!)"); + aList.add(EnumChatFormatting.BLUE + "Use on a machine to apply Tesla capabilities"); + aList.add(EnumChatFormatting.BLUE + "Who the hell need cables anyway?"); + } + + public static void run() { + INSTANCE = new TeslaCoilCoverUltimate(); + System.out.print(INSTANCE.getUnlocalizedName()); + GameRegistry.registerItem(INSTANCE, INSTANCE.getUnlocalizedName()); + } +} 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 bb7c815416..926c5e5d30 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 @@ -1,6 +1,7 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.CommonValues; +import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil_Ultimate; import com.github.technus.tectech.thing.metaTileEntity.IConstructable; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Capacitor; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoMulti; @@ -20,7 +21,7 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -import java.util.ArrayList; +import java.util.*; import static com.github.technus.tectech.CommonValues.V; import static com.github.technus.tectech.Util.StructureBuilder; @@ -45,8 +46,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private int scanTimeMin = 100; //Min scan time in ticks private int scanTimeTill = scanTimeMin; //Set default scan time - private ArrayList eTeslaList = new ArrayList<>(); //Makes a list of Smol Teslas - private ArrayList eTeslaTowerList = new ArrayList<>(); //Makes a list for BIGG Teslas + private Map eTeslaMap = new HashMap();//Tesla Map to map them tesla bois! private float histLow = 0.25F; //Power pass is disabled if power is under this fraction private float histHigh = 0.75F; //Power pass is enabled if power is over this fraction @@ -54,8 +54,11 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private float histLowLimit = 0.05F; //How low can you configure it? private float histHighLimit = 0.95F; //How high can you configure it? - private int scanRadius = 64; //Radius for small to tower transfers - private int scanRadiusTower = scanRadius * 2; //Radius for tower to tower transfers + private int scanRadius = 64; //Tesla scan radius + + private int transferRadiusTower = 32; //Radius for tower to tower transfers + private int transferRadiusTransceiver = 16; //Radius for tower to transceiver transfers + private int transferRadiusCoverUltimate = 16; //Radius for tower to ultimate cover transfers private long outputVoltage = 512; //Tesla Voltage Output private long outputCurrent = 1; //Tesla Current Output @@ -68,12 +71,27 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private long histLowParam = 0; private long histHighParam = 0; private long histScaleParam = 0; - private int scanRadiusParam = 0; - private int scanRadiusTowerParam = 0; + private int transferRadiusTowerParam = 0; + private int transferRadiusTransceiverParam = 0; + private int transferRadiusCoverUltimateParam = 0; private long outputVoltageParam = 0; private long outputCurrentParam = 0; private int scanTimeMinParam = 0; + static > SortedSet> entriesSortedByValues(Map map) { + SortedSet> sortedEntries = new TreeSet>( + new Comparator>() { + @Override + public int compare(Map.Entry e1, Map.Entry e2) { + int res = e1.getValue().compareTo(e2.getValue()); + return res != 0 ? res : 1; // Special fix to preserve items with equal values + } + } + ); + sortedEntries.addAll(map.entrySet()); + return sortedEntries; + } + //region structure private static final String[][] shape0 = new String[][]{//3 16 0 {"\u000F", "A . ",}, @@ -295,8 +313,9 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock histLowParam = 0; histHighParam = 0; histScaleParam = 0; - scanRadiusParam = 0; - scanRadiusTowerParam = 0; + transferRadiusTowerParam = 0; + transferRadiusTransceiverParam = 0; + transferRadiusCoverUltimateParam = 0; outputVoltageParam = 0; outputCurrentParam = 0; scanTimeMin = 0; @@ -344,55 +363,24 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock scanTime++; if (scanTime >= scanTimeTill) { scanTime = 0; - - scanRadius = 64; //TODO Generate depending on power stored - eTeslaList.clear(); - - if (parametrized && scanRadiusParam > 0 && scanRadiusParam < scanRadius) { - scanRadius = scanRadiusParam; - } + eTeslaMap.clear(); for (int xPosOffset = -scanRadius; xPosOffset <= scanRadius; xPosOffset++) { - for (int yPosOffset = -scanRadius; yPosOffset <= scanRadius; yPosOffset++) { - for (int zPosOffset = -scanRadius; zPosOffset <= scanRadius; zPosOffset++) { - if (xPosOffset == 0 && yPosOffset == 0 && zPosOffset == 0){ + for (int yPosOffset = -scanRadius; yPosOffset <= scanRadius; yPosOffset++) { + for (int zPosOffset = -scanRadius; zPosOffset <= scanRadius; zPosOffset++) { + if (xPosOffset == 0 && yPosOffset == 0 && zPosOffset == 0) { continue; } IGregTechTileEntity node = mte.getIGregTechTileEntityOffset(xPosOffset, yPosOffset, zPosOffset); - if (node == null) { - continue; - } - IMetaTileEntity nodeInside = node.getMetaTileEntity(); - if (nodeInside instanceof GT_MetaTileEntity_TeslaCoil){ - eTeslaList.add((GT_MetaTileEntity_TeslaCoil) nodeInside); - } - } - } - } - - scanRadiusTower = scanRadius * 2; - eTeslaTowerList.clear(); - - if (parametrized && scanRadiusTowerParam > 0 && scanRadiusTowerParam < scanRadiusTower) { - scanRadiusTower = scanRadiusTowerParam; - } - - for (int xPosOffset = -scanRadiusTower; xPosOffset <= scanRadiusTower; xPosOffset++) { - for (int yPosOffset = -scanRadiusTower; yPosOffset <= scanRadiusTower; yPosOffset++) { - for (int zPosOffset = -scanRadiusTower; zPosOffset <= scanRadiusTower; zPosOffset++) { - if (xPosOffset == 0 && yPosOffset == 0 && zPosOffset == 0){ + if (node == null) { continue; } - IGregTechTileEntity node = mte.getIGregTechTileEntityOffset(xPosOffset, yPosOffset, zPosOffset); - if (node == null) { - continue; - } - IMetaTileEntity nodeInside = node.getMetaTileEntity(); - if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive()){ - eTeslaTowerList.add((GT_MetaTileEntity_TM_teslaCoil) nodeInside); - } - } - } + IMetaTileEntity nodeInside = node.getMetaTileEntity(); + if (nodeInside instanceof GT_MetaTileEntity_TeslaCoil || nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive() || (node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil_Ultimate)) { + eTeslaMap.put(node, (int) Math.ceil(Math.sqrt(xPosOffset * xPosOffset + yPosOffset * yPosOffset + zPosOffset * zPosOffset))); + } + } + } } } @@ -402,50 +390,80 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock outputCurrent = 1;//TODO Generate depending on count of capacitors if (parametrized && outputVoltageParam > 0 && outputVoltage > outputVoltageParam){ - outputVoltage = outputVoltageParam;} + outputVoltage = outputVoltageParam; + } if (parametrized && outputCurrentParam > 0 && outputCurrent > outputCurrentParam){ - outputCurrent = outputCurrentParam;} + outputCurrent = outputCurrentParam; + } outputEuT = outputVoltage * outputCurrent; - long requestedSumEU = 0; + transferRadiusTower = 32; //TODO generate based on power stored + transferRadiusTransceiver = 16; //TODO generate based on power stored + transferRadiusCoverUltimate = 16; //TODO generate based on power stored - //Clean the Smol Tesla list - for (GT_MetaTileEntity_TeslaCoil Rx : eTeslaList.toArray(new GT_MetaTileEntity_TeslaCoil[eTeslaList.size()])) { - try { - requestedSumEU += Rx.maxEUStore() - Rx.getEUVar(); - } catch (Exception e) { - eTeslaList.remove(Rx); - } + if(parametrized && transferRadiusTowerParam > 0 && transferRadiusTowerParam < transferRadiusTower){ + transferRadiusTower = transferRadiusTowerParam; } - //Clean the large tesla list - for (GT_MetaTileEntity_TM_teslaCoil Rx : eTeslaTowerList.toArray(new GT_MetaTileEntity_TM_teslaCoil[eTeslaTowerList.size()])) { - try { - requestedSumEU += Rx.maxEUStore() - Rx.getEUVar(); - } catch (Exception e) { - eTeslaTowerList.remove(Rx); - } + if(parametrized && transferRadiusTransceiverParam > 0 && transferRadiusTransceiverParam < transferRadiusTransceiver){ + transferRadiusTransceiver = transferRadiusTransceiverParam; } - //Try to send EU to the smol teslas - for (GT_MetaTileEntity_TeslaCoil Rx : eTeslaList) { - if (!Rx.powerPassToggle) { - long euTran = outputVoltage; - if (Rx.getBaseMetaTileEntity().injectEnergyUnits((byte)6, euTran, 1L) > 0L) { - setEUVar(getEUVar() - euTran); + if(parametrized && transferRadiusCoverUltimateParam > 0 && transferRadiusCoverUltimateParam < transferRadiusCoverUltimate){ + transferRadiusCoverUltimate = transferRadiusCoverUltimateParam; + } + + //Clean the eTeslaMap + for (Map.Entry Rx : entriesSortedByValues(eTeslaMap)) { + IGregTechTileEntity node = Rx.getKey(); + if (node != null) { + IMetaTileEntity nodeInside = node.getMetaTileEntity(); + try { + if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive()) { + GT_MetaTileEntity_TM_teslaCoil teslaTower = (GT_MetaTileEntity_TM_teslaCoil) nodeInside; + if (teslaTower.maxEUStore() > 0) { + continue; + } + } else if (nodeInside instanceof GT_MetaTileEntity_TeslaCoil) { + GT_MetaTileEntity_TeslaCoil teslaCoil = (GT_MetaTileEntity_TeslaCoil) nodeInside; + if (teslaCoil.getStoredEnergy()[1] > 0) { + continue; + } + } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil_Ultimate) && node.getEUCapacity() > 0) { + continue; + } + } catch (Exception e) { } } + eTeslaMap.remove(Rx.getKey()); } - //Try to send EU to big teslas - for (GT_MetaTileEntity_TM_teslaCoil Rx : eTeslaTowerList) { - if (!Rx.powerPassToggle) { - long euTran = outputVoltage; - if (Rx.getEUVar() + euTran <= (Rx.maxEUStore()/2)) { + //Power transfer + for (Map.Entry Rx : entriesSortedByValues(eTeslaMap)) { + IGregTechTileEntity node = Rx.getKey(); + IMetaTileEntity nodeInside = node.getMetaTileEntity(); + long euTran = outputVoltage; + + if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && Rx.getValue() <= transferRadiusTower) { + GT_MetaTileEntity_TM_teslaCoil nodeTesla = (GT_MetaTileEntity_TM_teslaCoil) nodeInside; + if (!nodeTesla.powerPassToggle) { + if (nodeTesla.getEUVar() + euTran <= (nodeTesla.maxEUStore() / 2)) { + setEUVar(getEUVar() - euTran); + node.increaseStoredEnergyUnits(euTran, true); + } + } + } else if (nodeInside instanceof GT_MetaTileEntity_TeslaCoil && Rx.getValue() <= transferRadiusTransceiver) { + GT_MetaTileEntity_TeslaCoil nodeTesla = (GT_MetaTileEntity_TeslaCoil) nodeInside; + if (!nodeTesla.powerPassToggle) { + if (node.injectEnergyUnits((byte)6, euTran, 1L) > 0L) { + setEUVar(getEUVar() - euTran); + } + } + } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil_Ultimate) && Rx.getValue() <= transferRadiusCoverUltimate){ + if (node.injectEnergyUnits((byte)6, euTran, 1L) > 0L) { setEUVar(getEUVar() - euTran); - Rx.getBaseMetaTileEntity().increaseStoredEnergyUnits(euTran, true); } } } 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 a8797682e6..906ce556f7 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 @@ -25,27 +25,32 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB private int scanTimeMin = 100; //Min scan time in ticks private int scanTimeTill = scanTimeMin; //Set default scan time - private Map eTeslaTowerMap = new HashMap(); + private Map eTeslaMap = new HashMap();//Tesla Map to map them tesla bois! private int histSteps = 20; //Hysteresis Resolution private int histSettingLow = 3; private int histSettingHigh = 15; private int histLowLimit = 1; //How low can you configure it? - private int histHighLimit = histSteps-1; //How high can you configure it? + private int histHighLimit = histSteps - 1; //How high can you configure it? - private float histLow = (float)histSettingLow/histSteps; //Power pass is disabled if power is under this fraction - private float histHigh = (float)histSettingHigh/histSteps; //Power pass is enabled if power is over this fraction + private float histLow = (float) histSettingLow / histSteps; //Power pass is disabled if power is under this fraction + private float histHigh = (float) histSettingHigh / histSteps; //Power pass is enabled if power is over this fraction + + private int scanRadius = 32; //Tesla scan radius + + private int transferRadiusTower = 32; //Radius for transceiver to tower transfers + private int transferRadiusCover = 16; //Radius for transceiver to cover transfers - private int scanRadiusTower = 64; //Radius for tower to tower transfers private long outputVoltage = 512; //Tesla Voltage Output private long outputCurrent = 1; //Tesla Current Output private long outputEuT = outputVoltage * outputCurrent; //Tesla Power Output - static > SortedSet> entriesSortedByValues(Map map) { - SortedSet> sortedEntries = new TreeSet>( - new Comparator>() { - @Override public int compare(Map.Entry e1, Map.Entry e2) { + static > SortedSet> entriesSortedByValues(Map map) { + SortedSet> sortedEntries = new TreeSet>( + new Comparator>() { + @Override + public int compare(Map.Entry e1, Map.Entry e2) { int res = e1.getValue().compareTo(e2.getValue()); return res != 0 ? res : 1; // Special fix to preserve items with equal values } @@ -67,20 +72,20 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (aPlayer.isSneaking()) { - if (histSettingHighhistLowLimit) { + if (histSettingLow > histLowLimit) { histSettingLow--; } else { - histSettingLow=histSettingHigh-1; + histSettingLow = histSettingHigh - 1; } - histLow = (float)histSettingLow/histSteps; + histLow = (float) histSettingLow / histSteps; PlayerChatHelper.SendInfo(aPlayer, "Hysteresis Low Changed to " + round(histLow * 100F) + "%"); } } @@ -101,10 +106,6 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB ItemStack[] var4 = this.mInventory; int var5 = var4.length; - if (aBaseMetaTileEntity.getCoverBehaviorAtSide((byte)1) instanceof GT_Cover_TM_TeslaCoil && scanTime == 0){ - System.out.println("I myself feel quite tesla enabled indeed!"); - } - for (int var6 = 0; var6 < var5; ++var6) { ItemStack tStack = var4[var6]; if (GT_ModHandler.isElectricItem(tStack, this.mTier)) { @@ -119,8 +120,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB long energyMax = getStoredEnergy()[1]; long energyStored = getStoredEnergy()[0]; - float energyFrac = (float)energyStored/energyMax; - //System.err.println(energyFrac); Debug energy fraction display + float energyFrac = (float) energyStored / energyMax; //ePowerPass hist toggle if (!powerPassToggle && energyFrac > histHigh) { @@ -133,14 +133,12 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB scanTime++; if (scanTime >= scanTimeTill) { scanTime = 0; + eTeslaMap.clear(); - scanRadiusTower = 64; //TODO Generate depending on power stored - eTeslaTowerMap.clear(); - - for (int xPosOffset = -scanRadiusTower; xPosOffset <= scanRadiusTower; xPosOffset++) { - for (int yPosOffset = -scanRadiusTower; yPosOffset <= scanRadiusTower; yPosOffset++) { - for (int zPosOffset = -scanRadiusTower; zPosOffset <= scanRadiusTower; zPosOffset++) { - if (xPosOffset == 0 && yPosOffset == 0 && zPosOffset == 0){ + for (int xPosOffset = -scanRadius; xPosOffset <= scanRadius; xPosOffset++) { + for (int yPosOffset = -scanRadius; yPosOffset <= scanRadius; yPosOffset++) { + for (int zPosOffset = -scanRadius; zPosOffset <= scanRadius; zPosOffset++) { + if (xPosOffset == 0 && yPosOffset == 0 && zPosOffset == 0) { continue; } IGregTechTileEntity node = mte.getIGregTechTileEntityOffset(xPosOffset, yPosOffset, zPosOffset); @@ -148,18 +146,14 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB continue; } IMetaTileEntity nodeInside = node.getMetaTileEntity(); - if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive() || (node.getCoverBehaviorAtSide((byte)1) instanceof GT_Cover_TM_TeslaCoil)){ - eTeslaTowerMap.put(node,(int)Math.ceil(Math.sqrt(xPosOffset*xPosOffset + yPosOffset*yPosOffset + zPosOffset*zPosOffset))); + if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive() || (node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil)) { + eTeslaMap.put(node, (int) Math.ceil(Math.sqrt(xPosOffset * xPosOffset + yPosOffset * yPosOffset + zPosOffset * zPosOffset))); } } } } } - for (Map.Entry Rx : entriesSortedByValues(eTeslaTowerMap)) { - System.out.println("yote @: " + Rx.getValue()); - } - //Stuff to do if ePowerPass if (powerPassToggle) { outputVoltage = 512;//TODO Set Depending On Tier @@ -167,41 +161,45 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB outputEuT = outputVoltage * outputCurrent; - long requestedSumEU = 0;//TODO Find a use for requestedSumEU + transferRadiusTower = 32; //TODO generate based on power stored + transferRadiusCover = 16; //TODO generate based on power stored - //Clean the node list SMALL INSTANCE REAPING DOESN'T WORK - for (Map.Entry Rx : entriesSortedByValues(eTeslaTowerMap)) { + //Clean the eTeslaMap + for (Map.Entry Rx : entriesSortedByValues(eTeslaMap)) { IGregTechTileEntity node = Rx.getKey(); - if (node == null) { - eTeslaTowerMap.remove(Rx.getKey()); - System.err.println("Dead Tesla Reaped!"); - continue; - } - IMetaTileEntity nodeInside = node.getMetaTileEntity(); - try { - if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive()) { - GT_MetaTileEntity_TM_teslaCoil teslaTower = (GT_MetaTileEntity_TM_teslaCoil) nodeInside; - requestedSumEU += teslaTower.maxEUStore() - teslaTower.getEUVar(); - } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil)) { - requestedSumEU += node.getEUCapacity() - node.getStoredEU(); - } else { - eTeslaTowerMap.remove(Rx.getKey()); - System.err.println("Dead Tesla Reaped!"); + if (node != null) { + IMetaTileEntity nodeInside = node.getMetaTileEntity(); + try { + if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive()) { + GT_MetaTileEntity_TM_teslaCoil teslaTower = (GT_MetaTileEntity_TM_teslaCoil) nodeInside; + if (teslaTower.maxEUStore() > 0) { + continue; + } + } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil) && node.getEUCapacity() > 0) { + continue; + } + } catch (Exception e) { } - } catch (Exception e) { - eTeslaTowerMap.remove(Rx.getKey()); - System.err.println("Dead Tesla Reaped!"); } + eTeslaMap.remove(Rx.getKey()); } - for (Map.Entry Rx : entriesSortedByValues(eTeslaTowerMap)) { - GT_MetaTileEntity_TM_teslaCoil nodeInside = (GT_MetaTileEntity_TM_teslaCoil) Rx.getKey().getMetaTileEntity(); - if (!nodeInside.powerPassToggle) { - long euTran = outputVoltage; - if (nodeInside.getEUVar() + euTran <= (nodeInside.maxEUStore() / 2)) { + //Power transfer + for (Map.Entry Rx : entriesSortedByValues(eTeslaMap)) { + IGregTechTileEntity node = Rx.getKey(); + IMetaTileEntity nodeInside = node.getMetaTileEntity(); + long euTran = outputVoltage; + if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && Rx.getValue() <= transferRadiusTower) { + GT_MetaTileEntity_TM_teslaCoil nodeTesla = (GT_MetaTileEntity_TM_teslaCoil) nodeInside; + if (!nodeTesla.powerPassToggle) { + if (nodeTesla.getEUVar() + euTran <= (nodeTesla.maxEUStore() / 2)) { + setEUVar(getEUVar() - euTran); + node.increaseStoredEnergyUnits(euTran, true); + } + } + } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil) && Rx.getValue() <= transferRadiusCover){ + if (node.injectEnergyUnits((byte)6, euTran, 1L) > 0L) { setEUVar(getEUVar() - euTran); - nodeInside.getBaseMetaTileEntity().increaseStoredEnergyUnits(euTran, true); - System.err.println("Energy Sent!"); } } } diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index 2c748a18d7..f01a74a0a2 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -10,6 +10,7 @@ item.em.parametrizerMemoryCard.name=Parametrizer Memory Card item.em.EuMeterGT.name=GT EU meter item.tm.teslaCoilCover.name=Tesla Coil Cover +item.tm.teslaCoilCoverUltimate=Tesla Coil Cover Rich Edition death.attack.microwaving=%1$s was dehydrated by radiation. death.attack.microwaving.player=%1$s was dehydrated by radiation while fighting %2$s. diff --git a/src/main/resources/assets/tectech/lang/zh_CN.lang b/src/main/resources/assets/tectech/lang/zh_CN.lang index 47912d245d..52ae6c594d 100644 --- a/src/main/resources/assets/tectech/lang/zh_CN.lang +++ b/src/main/resources/assets/tectech/lang/zh_CN.lang @@ -7,6 +7,7 @@ item.em.debugBuilder.name=多方块机器蓝图 item.em.parametrizerMemoryCard.name=参量机记忆卡 item.tm.teslaCoilCover.name=Tesla Coil Cover +item.tm.teslaCoilCoverUltimate=Tesla Coil Cover Rich Edition death.attack.microwaving=%1$s 被辐射脱水 death.attack.microwaving.player=%1$s 在与 %2$s 战斗中被辐射脱水 -- cgit From 88124a202a65445e33697416fa6ee97ca8c024f5 Mon Sep 17 00:00:00 2001 From: Tec Date: Sat, 16 Feb 2019 10:00:48 +0100 Subject: Move to util --- src/main/java/com/github/technus/tectech/Util.java | 15 +++++++++++++-- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 15 +-------------- .../single/GT_MetaTileEntity_TeslaCoil.java | 16 +--------------- 3 files changed, 15 insertions(+), 31 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/Util.java b/src/main/java/com/github/technus/tectech/Util.java index 1fd479939c..7a5366f337 100644 --- a/src/main/java/com/github/technus/tectech/Util.java +++ b/src/main/java/com/github/technus/tectech/Util.java @@ -24,8 +24,7 @@ import org.apache.commons.lang3.StringUtils; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.List; +import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -39,6 +38,18 @@ public final class Util { private Util() { } + @SuppressWarnings("ComparatorMethodParameterNotUsed") + public static > SortedSet> entriesSortedByValues(Map map) { + SortedSet> sortedEntries = new TreeSet>( + (e1, e2) -> { + int res = e1.getValue().compareTo(e2.getValue()); + return res != 0 ? res : 1; // Special fix to preserve items with equal values + } + ); + sortedEntries.addAll(map.entrySet()); + return sortedEntries; + } + public static String intBitsToString(int number) { StringBuilder result = new StringBuilder(16); 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 926c5e5d30..eca3dde6cb 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 @@ -25,6 +25,7 @@ import java.util.*; import static com.github.technus.tectech.CommonValues.V; import static com.github.technus.tectech.Util.StructureBuilder; +import static com.github.technus.tectech.Util.entriesSortedByValues; import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static gregtech.api.GregTech_API.*; @@ -78,20 +79,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private long outputCurrentParam = 0; private int scanTimeMinParam = 0; - static > SortedSet> entriesSortedByValues(Map map) { - SortedSet> sortedEntries = new TreeSet>( - new Comparator>() { - @Override - public int compare(Map.Entry e1, Map.Entry e2) { - int res = e1.getValue().compareTo(e2.getValue()); - return res != 0 ? res : 1; // Special fix to preserve items with equal values - } - } - ); - sortedEntries.addAll(map.entrySet()); - return sortedEntries; - } - //region structure private static final String[][] shape0 = new String[][]{//3 16 0 {"\u000F", "A . ",}, 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 906ce556f7..c556ca2ef6 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 @@ -15,6 +15,7 @@ import net.minecraft.item.ItemStack; import java.util.*; +import static com.github.technus.tectech.Util.entriesSortedByValues; import static java.lang.Math.round; @@ -41,25 +42,10 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB private int transferRadiusTower = 32; //Radius for transceiver to tower transfers private int transferRadiusCover = 16; //Radius for transceiver to cover transfers - private long outputVoltage = 512; //Tesla Voltage Output private long outputCurrent = 1; //Tesla Current Output private long outputEuT = outputVoltage * outputCurrent; //Tesla Power Output - static > SortedSet> entriesSortedByValues(Map map) { - SortedSet> sortedEntries = new TreeSet>( - new Comparator>() { - @Override - public int compare(Map.Entry e1, Map.Entry e2) { - int res = e1.getValue().compareTo(e2.getValue()); - return res != 0 ? res : 1; // Special fix to preserve items with equal values - } - } - ); - sortedEntries.addAll(map.entrySet()); - return sortedEntries; - } - public GT_MetaTileEntity_TeslaCoil(int aID, String aName, String aNameRegional, int aTier, int aSlotCount) { super(aID, aName, aNameRegional, aTier, "Tesla Coil Transceiver", aSlotCount); -- cgit From 0dc8b541ed35b27736d8f62287b0b436f34dc255 Mon Sep 17 00:00:00 2001 From: Bass Date: Sat, 16 Feb 2019 11:19:07 +0000 Subject: Tesla WIP even more Some minor cleanups and fun feature additions :D --- .../tectech/thing/cover/GT_Cover_TM_TeslaCoil.java | 23 +++++++++++++++++++- .../cover/GT_Cover_TM_TeslaCoil_Ultimate.java | 25 ++++++++++++++++++++-- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 16 +++++--------- .../single/GT_MetaTileEntity_TeslaCoil.java | 10 ++++----- src/main/resources/assets/tectech/lang/en_US.lang | 2 +- src/main/resources/assets/tectech/lang/zh_CN.lang | 3 --- 6 files changed, 55 insertions(+), 24 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil.java b/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil.java index bfb4ae9208..6d7383fe49 100644 --- a/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil.java +++ b/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil.java @@ -1,8 +1,29 @@ package com.github.technus.tectech.thing.cover; - import gregtech.api.util.GT_CoverBehavior; +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.util.GT_CoverBehavior; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; + +import static ic2.api.info.Info.DMG_ELECTRIC; public class GT_Cover_TM_TeslaCoil extends GT_CoverBehavior { public GT_Cover_TM_TeslaCoil() { } + + public String getDescription(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return "Do not attempt to use screwdriver!"; + } + + public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if(aTileEntity.getStoredEU() > 0 && !GT_Utility.isWearingFullElectroHazmat(aPlayer)){ + aPlayer.attackEntityFrom(DMG_ELECTRIC, 20); + } + return aCoverVariable; + } } \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil_Ultimate.java b/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil_Ultimate.java index 7ad6bc6f5f..db7c751fc6 100644 --- a/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil_Ultimate.java +++ b/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil_Ultimate.java @@ -1,8 +1,29 @@ package com.github.technus.tectech.thing.cover; - import gregtech.api.util.GT_CoverBehavior; +import gregtech.api.interfaces.tileentity.ICoverable; +import net.minecraftforge.fluids.Fluid; -public class GT_Cover_TM_TeslaCoil_Ultimate extends GT_CoverBehavior { +public class GT_Cover_TM_TeslaCoil_Ultimate extends GT_Cover_TM_TeslaCoil { public GT_Cover_TM_TeslaCoil_Ultimate() { } + + public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return true; + } + + public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return true; + } } \ No newline at end of file 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 eca3dde6cb..7dc040b28a 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 @@ -31,10 +31,6 @@ import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texture import static gregtech.api.GregTech_API.*; import static gregtech.api.enums.GT_Values.E; -/** - * Created by danie_000 on 17.12.2016. - * edited by Bass on like 2018-02-05 - */ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable {//TODO Add capacitors private static Textures.BlockIcons.CustomIcon ScreenOFF; private static Textures.BlockIcons.CustomIcon ScreenON; @@ -55,7 +51,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private float histLowLimit = 0.05F; //How low can you configure it? private float histHighLimit = 0.95F; //How high can you configure it? - private int scanRadius = 64; //Tesla scan radius + private int scanRadius = 32; //Tesla scan radius private int transferRadiusTower = 32; //Radius for tower to tower transfers private int transferRadiusTransceiver = 16; //Radius for tower to transceiver transfers @@ -63,7 +59,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private long outputVoltage = 512; //Tesla Voltage Output private long outputCurrent = 1; //Tesla Current Output - private long outputEuT = outputVoltage * outputCurrent; //Tesla Power Output public boolean powerPassToggle = false; //Power Pass for public viewing @@ -384,8 +379,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock outputCurrent = outputCurrentParam; } - outputEuT = outputVoltage * outputCurrent; - transferRadiusTower = 32; //TODO generate based on power stored transferRadiusTransceiver = 16; //TODO generate based on power stored transferRadiusCoverUltimate = 16; //TODO generate based on power stored @@ -403,7 +396,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } //Clean the eTeslaMap - for (Map.Entry Rx : entriesSortedByValues(eTeslaMap)) { + for (Map.Entry Rx : eTeslaMap.entrySet()) { IGregTechTileEntity node = Rx.getKey(); if (node != null) { IMetaTileEntity nodeInside = node.getMetaTileEntity(); @@ -424,6 +417,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } catch (Exception e) { } } + System.out.println("Something just got purged!"); eTeslaMap.remove(Rx.getKey()); } @@ -448,8 +442,8 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock setEUVar(getEUVar() - euTran); } } - } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil_Ultimate) && Rx.getValue() <= transferRadiusCoverUltimate){ - if (node.injectEnergyUnits((byte)6, euTran, 1L) > 0L) { + } else if ((node.getCoverBehaviorAtSide((byte)1) instanceof GT_Cover_TM_TeslaCoil_Ultimate) && Rx.getValue() <= transferRadiusCoverUltimate){ + if (node.injectEnergyUnits((byte)1, euTran, 1L) > 0L) { setEUVar(getEUVar() - euTran); } } 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 c556ca2ef6..dd99c0fd75 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 @@ -44,7 +44,6 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB private long outputVoltage = 512; //Tesla Voltage Output private long outputCurrent = 1; //Tesla Current Output - private long outputEuT = outputVoltage * outputCurrent; //Tesla Power Output public GT_MetaTileEntity_TeslaCoil(int aID, String aName, String aNameRegional, int aTier, int aSlotCount) { @@ -145,13 +144,11 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB outputVoltage = 512;//TODO Set Depending On Tier outputCurrent = 1;//TODO Generate depending on count of batteries - outputEuT = outputVoltage * outputCurrent; - transferRadiusTower = 32; //TODO generate based on power stored transferRadiusCover = 16; //TODO generate based on power stored //Clean the eTeslaMap - for (Map.Entry Rx : entriesSortedByValues(eTeslaMap)) { + for (Map.Entry Rx : eTeslaMap.entrySet()) { IGregTechTileEntity node = Rx.getKey(); if (node != null) { IMetaTileEntity nodeInside = node.getMetaTileEntity(); @@ -167,6 +164,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB } catch (Exception e) { } } + System.out.println("Something just got purged!"); eTeslaMap.remove(Rx.getKey()); } @@ -183,8 +181,8 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB node.increaseStoredEnergyUnits(euTran, true); } } - } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil) && Rx.getValue() <= transferRadiusCover){ - if (node.injectEnergyUnits((byte)6, euTran, 1L) > 0L) { + } else if ((node.getCoverBehaviorAtSide((byte)1) instanceof GT_Cover_TM_TeslaCoil) && Rx.getValue() <= transferRadiusCover){ + if (node.injectEnergyUnits((byte)1, euTran, 1L) > 0L) { setEUVar(getEUVar() - euTran); } } diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index f01a74a0a2..ac36e32772 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -10,7 +10,7 @@ item.em.parametrizerMemoryCard.name=Parametrizer Memory Card item.em.EuMeterGT.name=GT EU meter item.tm.teslaCoilCover.name=Tesla Coil Cover -item.tm.teslaCoilCoverUltimate=Tesla Coil Cover Rich Edition +item.tm.teslaCoilCoverUltimate.name=Tesla Coil Cover Rich Edition death.attack.microwaving=%1$s was dehydrated by radiation. death.attack.microwaving.player=%1$s was dehydrated by radiation while fighting %2$s. diff --git a/src/main/resources/assets/tectech/lang/zh_CN.lang b/src/main/resources/assets/tectech/lang/zh_CN.lang index 52ae6c594d..5359f04e9b 100644 --- a/src/main/resources/assets/tectech/lang/zh_CN.lang +++ b/src/main/resources/assets/tectech/lang/zh_CN.lang @@ -6,9 +6,6 @@ item.em.definitionContainer.name=EM配方指引 item.em.debugBuilder.name=多方块机器蓝图 item.em.parametrizerMemoryCard.name=参量机记忆卡 -item.tm.teslaCoilCover.name=Tesla Coil Cover -item.tm.teslaCoilCoverUltimate=Tesla Coil Cover Rich Edition - death.attack.microwaving=%1$s 被辐射脱水 death.attack.microwaving.player=%1$s 在与 %2$s 战斗中被辐射脱水 -- cgit From 9703e623f99ca44ef552623e5057a557d4f57a12 Mon Sep 17 00:00:00 2001 From: Bass Date: Sat, 16 Feb 2019 15:45:33 +0000 Subject: Tesla nonsense (more of) Transceivers can now output multiple amps worth of current, they now also have different stages of efficiency and calculate some losses. --- .../tectech/thing/cover/GT_Cover_TM_TeslaCoil.java | 1 - .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 4 +- .../single/GT_MetaTileEntity_TeslaCoil.java | 110 +++++++++++++++------ 3 files changed, 80 insertions(+), 35 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil.java b/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil.java index 6d7383fe49..721f730960 100644 --- a/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil.java +++ b/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil.java @@ -3,7 +3,6 @@ package com.github.technus.tectech.thing.cover; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.util.GT_CoverBehavior; import gregtech.api.util.GT_Utility; -import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import static ic2.api.info.Info.DMG_ELECTRIC; 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 7dc040b28a..335cfc612a 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 @@ -57,8 +57,8 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private int transferRadiusTransceiver = 16; //Radius for tower to transceiver transfers private int transferRadiusCoverUltimate = 16; //Radius for tower to ultimate cover transfers - private long outputVoltage = 512; //Tesla Voltage Output - private long outputCurrent = 1; //Tesla Current Output + private long outputVoltage = 0; //Tesla Voltage Output + private long outputCurrent = 0; //Tesla Current Output public boolean powerPassToggle = false; //Power Pass for public viewing 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 dd99c0fd75..3bf1642d82 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 @@ -15,36 +15,40 @@ import net.minecraft.item.ItemStack; import java.util.*; +import static com.github.technus.tectech.CommonValues.V; import static com.github.technus.tectech.Util.entriesSortedByValues; import static java.lang.Math.round; public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryBuffer { - public boolean powerPassToggle = false; //Power Pass for public viewing - + private Map eTeslaMap = new HashMap();//Tesla Map to map them tesla bois! private int scanTime = 0; //Sets scan time to Z E R O :epic: private int scanTimeMin = 100; //Min scan time in ticks private int scanTimeTill = scanTimeMin; //Set default scan time + private int scanRadius = 32; //Tesla scan radius + private int transferRadiusTower = 32; //Radius for transceiver to tower transfers + private int transferRadiusCover = 16; //Radius for transceiver to cover transfers - private Map eTeslaMap = new HashMap();//Tesla Map to map them tesla bois! - + public boolean powerPassToggle = false; //Power Pass for public viewing private int histSteps = 20; //Hysteresis Resolution private int histSettingLow = 3; private int histSettingHigh = 15; private int histLowLimit = 1; //How low can you configure it? private int histHighLimit = histSteps - 1; //How high can you configure it? - private float histLow = (float) histSettingLow / histSteps; //Power pass is disabled if power is under this fraction private float histHigh = (float) histSettingHigh / histSteps; //Power pass is enabled if power is over this fraction - private int scanRadius = 32; //Tesla scan radius - - private int transferRadiusTower = 32; //Radius for transceiver to tower transfers - private int transferRadiusCover = 16; //Radius for transceiver to cover transfers - - private long outputVoltage = 512; //Tesla Voltage Output - private long outputCurrent = 1; //Tesla Current Output + private long lossPerBlock = 2; //EU lost per block traveled + private float energyEfficiencyMax = 1F; //Max efficiency + private float energyEfficiencyMin = 0.8F; //Min efficiency + private int maixTier = 4; //Max tier of transceiver + private int minTier = 1; //Min tier of transceiver + private float energyEfficiency = energyEfficiencyMin + ((energyEfficiencyMax - energyEfficiencyMin) / (maixTier - minTier + 1)); //Efficiency Formula + private long outputVoltage = V[mTier]; //Tesla Voltage Output + private long outputVoltagePostEfficency = (long) (outputVoltage * energyEfficiency); //Max power a machine can actually receive + private long outputVoltageInjectable = 0; + private long outputCurrent = 0; //Tesla Current Output public GT_MetaTileEntity_TeslaCoil(int aID, String aName, String aNameRegional, int aTier, int aSlotCount) { super(aID, aName, aNameRegional, aTier, "Tesla Coil Transceiver", aSlotCount); @@ -55,6 +59,10 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB super(aName, aTier, aDescription, aTextures, aSlotCount); } + public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { + energyEfficiency = energyEfficiencyMin + ((energyEfficiencyMax - energyEfficiencyMin) / (maixTier - minTier + 1)); + } + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (aPlayer.isSneaking()) { if (histSettingHigh < histHighLimit) { @@ -84,13 +92,15 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (aBaseMetaTileEntity.isServerSide()) { IGregTechTileEntity mte = getBaseMetaTileEntity(); + + //region BasicBatteryBuffer this.mCharge = aBaseMetaTileEntity.getStoredEU() / 2L > aBaseMetaTileEntity.getEUCapacity() / 3L; this.mDecharge = aBaseMetaTileEntity.getStoredEU() < aBaseMetaTileEntity.getEUCapacity() / 3L; this.mBatteryCount = 0; this.mChargeableCount = 0; ItemStack[] var4 = this.mInventory; - int var5 = var4.length; + int var5 = var4.length; for (int var6 = 0; var6 < var5; ++var6) { ItemStack tStack = var4[var6]; if (GT_ModHandler.isElectricItem(tStack, this.mTier)) { @@ -100,11 +110,11 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB ++this.mChargeableCount; } } + //endregion ////Hysteresis based ePowerPass Config long energyMax = getStoredEnergy()[1]; long energyStored = getStoredEnergy()[0]; - float energyFrac = (float) energyStored / energyMax; //ePowerPass hist toggle @@ -141,9 +151,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB //Stuff to do if ePowerPass if (powerPassToggle) { - outputVoltage = 512;//TODO Set Depending On Tier - outputCurrent = 1;//TODO Generate depending on count of batteries - + outputCurrent = mBatteryCount; transferRadiusTower = 32; //TODO generate based on power stored transferRadiusCover = 16; //TODO generate based on power stored @@ -164,30 +172,68 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB } catch (Exception e) { } } - System.out.println("Something just got purged!"); eTeslaMap.remove(Rx.getKey()); } //Power transfer - for (Map.Entry Rx : entriesSortedByValues(eTeslaMap)) { - IGregTechTileEntity node = Rx.getKey(); - IMetaTileEntity nodeInside = node.getMetaTileEntity(); - long euTran = outputVoltage; - if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && Rx.getValue() <= transferRadiusTower) { - GT_MetaTileEntity_TM_teslaCoil nodeTesla = (GT_MetaTileEntity_TM_teslaCoil) nodeInside; - if (!nodeTesla.powerPassToggle) { - if (nodeTesla.getEUVar() + euTran <= (nodeTesla.maxEUStore() / 2)) { - setEUVar(getEUVar() - euTran); - node.increaseStoredEnergyUnits(euTran, true); + while (outputCurrent > 0) { + boolean idle = true; + for (Map.Entry Rx : entriesSortedByValues(eTeslaMap)) { + if (getEUVar() >= outputVoltage) { + IGregTechTileEntity node = Rx.getKey(); + IMetaTileEntity nodeInside = node.getMetaTileEntity(); + outputVoltageInjectable = outputVoltagePostEfficency - (lossPerBlock * Rx.getValue()); + if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && Rx.getValue() <= transferRadiusTower) { + GT_MetaTileEntity_TM_teslaCoil nodeTesla = (GT_MetaTileEntity_TM_teslaCoil) nodeInside; + if (!nodeTesla.powerPassToggle) { + if (nodeTesla.getEUVar() + outputVoltage <= (nodeTesla.maxEUStore() / 2)) { + setEUVar(getEUVar() - outputVoltage); + node.increaseStoredEnergyUnits(outputVoltageInjectable, true); + outputCurrent--; + idle = false; + } + } + } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil) && Rx.getValue() <= transferRadiusCover) { + if (node.injectEnergyUnits((byte) 1, outputVoltageInjectable, 1L) > 0L) { + setEUVar(getEUVar() - outputVoltage); + outputCurrent--; + idle = false; + } + } + if (outputCurrent == 0) { + break; } } - } else if ((node.getCoverBehaviorAtSide((byte)1) instanceof GT_Cover_TM_TeslaCoil) && Rx.getValue() <= transferRadiusCover){ - if (node.injectEnergyUnits((byte)1, euTran, 1L) > 0L) { - setEUVar(getEUVar() - euTran); - } + } + if (idle) { + break; } } } } } + + // Cheeky skrub stuff to get machine to switch powerPass on soft mallet + public boolean hasAlternativeModeText() { + return true; + } + + public String getAlternativeModeText() { + ////Hysteresis based ePowerPass Config + long energyMax = getStoredEnergy()[1]; + long energyStored = getStoredEnergy()[0]; + float energyFrac = (float) energyStored / energyMax; + + //ePowerPass hist toggle + if (energyFrac > histHigh) { + powerPassToggle = true; + } else if (energyFrac < histLow) { + powerPassToggle = false; + } else { + powerPassToggle = !powerPassToggle; + } + + //And after this cheeky-ness, toss the string XD + return powerPassToggle ? "Sending Power!" : "Receiving Power!"; + } } -- cgit From 43185af730706fe81db275ae73f3dc54c1a0744a Mon Sep 17 00:00:00 2001 From: Bass Date: Sat, 16 Feb 2019 17:19:51 +0000 Subject: Tesla Transceiver Feature Additions Range now depends on battery % and tier with easy to change variable coefficients for balancing purposes. --- .../single/GT_MetaTileEntity_TeslaCoil.java | 105 +++++++++++++-------- 1 file changed, 64 insertions(+), 41 deletions(-) (limited to 'src/main/java') 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 3bf1642d82..a0e4af074f 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 @@ -21,33 +21,38 @@ import static java.lang.Math.round; public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryBuffer { + private int maixTier = 4; //Max tier of transceiver + private int minTier = 1; //Min tier of transceiver + private Map eTeslaMap = new HashMap();//Tesla Map to map them tesla bois! private int scanTime = 0; //Sets scan time to Z E R O :epic: private int scanTimeMin = 100; //Min scan time in ticks private int scanTimeTill = scanTimeMin; //Set default scan time - private int scanRadius = 32; //Tesla scan radius - private int transferRadiusTower = 32; //Radius for transceiver to tower transfers - private int transferRadiusCover = 16; //Radius for transceiver to cover transfers + private int scanRadiusMax = 20; //Tesla scan radius + private int scanRadiusMin = 4; //Tesla scan radius + private int scanRadiusLimitTop = scanRadiusMin + (scanRadiusMax - scanRadiusMin) / (maixTier - minTier + 1) * (mTier - 1); //Tesla scan radius Formula + private int scanRadiusLimitBottom = 1; + private int scanRadius = scanRadiusLimitTop; + private int transferRadiusTower = 0; //Radius for transceiver to tower transfers + private int transferRadiusCover = 0; //Radius for transceiver to cover transfers public boolean powerPassToggle = false; //Power Pass for public viewing private int histSteps = 20; //Hysteresis Resolution - private int histSettingLow = 3; - private int histSettingHigh = 15; + private int histSettingLow = 3; //Hysteresis Low Limit + private int histSettingHigh = 15; //Hysteresis High Limit private int histLowLimit = 1; //How low can you configure it? private int histHighLimit = histSteps - 1; //How high can you configure it? private float histLow = (float) histSettingLow / histSteps; //Power pass is disabled if power is under this fraction private float histHigh = (float) histSettingHigh / histSteps; //Power pass is enabled if power is over this fraction private long lossPerBlock = 2; //EU lost per block traveled - private float energyEfficiencyMax = 1F; //Max efficiency - private float energyEfficiencyMin = 0.8F; //Min efficiency - private int maixTier = 4; //Max tier of transceiver - private int minTier = 1; //Min tier of transceiver - private float energyEfficiency = energyEfficiencyMin + ((energyEfficiencyMax - energyEfficiencyMin) / (maixTier - minTier + 1)); //Efficiency Formula + private float energyEfficiencyMax = 0.95F; //Max efficiency + private float energyEfficiencyMin = 0.75F; //Min efficiency + private float energyEfficiency = energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maixTier - minTier + 1) * (mTier - 1); //Efficiency Formula private long outputVoltage = V[mTier]; //Tesla Voltage Output private long outputVoltagePostEfficency = (long) (outputVoltage * energyEfficiency); //Max power a machine can actually receive - private long outputVoltageInjectable = 0; + private long outputVoltageInjectable = 0; //How much EU will be received post distance losses private long outputCurrent = 0; //Tesla Current Output public GT_MetaTileEntity_TeslaCoil(int aID, String aName, String aNameRegional, int aTier, int aSlotCount) { @@ -59,10 +64,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB super(aName, aTier, aDescription, aTextures, aSlotCount); } - public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { - energyEfficiency = energyEfficiencyMin + ((energyEfficiencyMax - energyEfficiencyMin) / (maixTier - minTier + 1)); - } - + @Override public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (aPlayer.isSneaking()) { if (histSettingHigh < histHighLimit) { @@ -83,6 +85,51 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB } } + @Override + public boolean onWireCutterRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (aPlayer.isSneaking()) { + if (scanRadius > scanRadiusLimitBottom) { + scanRadius--; + } else { + scanRadius = scanRadiusLimitTop; + } + } else { + if (scanRadius < scanRadiusLimitTop) { + scanRadius++; + } else { + scanRadius = scanRadiusLimitBottom; + } + } + PlayerChatHelper.SendInfo(aPlayer, "Scan Radius Limit Changed to " + scanRadius + " Blocks"); + return false; + } + + // Cheeky skrub stuff to get machine to switch powerPass on soft mallet + @Override + public boolean hasAlternativeModeText() { + return true; + } + + @Override + public String getAlternativeModeText() { + ////Hysteresis based ePowerPass Config + long energyMax = getStoredEnergy()[1]; + long energyStored = getStoredEnergy()[0]; + float energyFrac = (float) energyStored / energyMax; + + //ePowerPass hist toggle + if (energyFrac > histHigh) { + powerPassToggle = true; + } else if (energyFrac < histLow) { + powerPassToggle = false; + } else { + powerPassToggle = !powerPassToggle; + } + + //And after this cheeky-ness, toss the string XD + return powerPassToggle ? "Sending Power!" : "Receiving Power!"; + } + @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_TeslaCoil(mName, mTier, mDescription, mTextures, mInventory.length); @@ -152,8 +199,8 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB //Stuff to do if ePowerPass if (powerPassToggle) { outputCurrent = mBatteryCount; - transferRadiusTower = 32; //TODO generate based on power stored - transferRadiusCover = 16; //TODO generate based on power stored + transferRadiusTower = (int) (scanRadius * energyFrac); + transferRadiusCover = (int) (transferRadiusTower/1.5); //Clean the eTeslaMap for (Map.Entry Rx : eTeslaMap.entrySet()) { @@ -212,28 +259,4 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB } } } - - // Cheeky skrub stuff to get machine to switch powerPass on soft mallet - public boolean hasAlternativeModeText() { - return true; - } - - public String getAlternativeModeText() { - ////Hysteresis based ePowerPass Config - long energyMax = getStoredEnergy()[1]; - long energyStored = getStoredEnergy()[0]; - float energyFrac = (float) energyStored / energyMax; - - //ePowerPass hist toggle - if (energyFrac > histHigh) { - powerPassToggle = true; - } else if (energyFrac < histLow) { - powerPassToggle = false; - } else { - powerPassToggle = !powerPassToggle; - } - - //And after this cheeky-ness, toss the string XD - return powerPassToggle ? "Sending Power!" : "Receiving Power!"; - } } -- cgit From fb5b567b26520037c27efee7bb3cb63bd0e50bd8 Mon Sep 17 00:00:00 2001 From: Tec Date: Sat, 16 Feb 2019 10:43:14 +0100 Subject: Revert "Refactor to LedStatus enum" This reverts commit 5965915bd0549cd289846ea20c9de6037e7faed1. --- .../multi/GT_MetaTileEntity_EM_collider.java | 1 - .../multi/GT_MetaTileEntity_EM_computer.java | 41 +++++++++--------- .../multi/GT_MetaTileEntity_EM_dataBank.java | 1 - .../multi/GT_MetaTileEntity_EM_junction.java | 25 ++++++----- .../multi/GT_MetaTileEntity_EM_switch.java | 21 +++++----- .../multi/GT_MetaTileEntity_TM_microwave.java | 21 +++++----- .../multi/base/GT_Container_MultiMachineEM.java | 12 +++--- .../multi/base/GT_GUIContainer_MultiMachineEM.java | 3 +- .../base/GT_MetaTileEntity_MultiblockBase_EM.java | 20 +++++---- .../thing/metaTileEntity/multi/base/LedStatus.java | 33 --------------- .../multi/em_machine/Behaviour_Centrifuge.java | 29 +++++++------ .../Behaviour_ElectromagneticSeparator.java | 49 +++++++++++----------- .../em_machine/GT_MetaTileEntity_EM_machine.java | 43 ++++++++++--------- 13 files changed, 130 insertions(+), 169 deletions(-) delete mode 100644 src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/LedStatus.java (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java index 69bebb4a78..471870b13b 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java @@ -37,7 +37,6 @@ import static com.github.technus.tectech.Util.StructureBuilderExtreme; 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.base.LedStatus.*; /** * Created by danie_000 on 17.12.2016. diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java index 77db52f4b1..c021f93260 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java @@ -34,7 +34,6 @@ import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; 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.base.LedStatus.*; /** * Created by danie_000 on 17.12.2016. @@ -209,55 +208,55 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB public void parametersOutAndStatusesWrite_EM(boolean machineBusy) { double ocRatio = getParameterIn(0, 0); if (ocRatio < 0) { - setStatusOfParameterIn(0, 0, STATUS_TOO_LOW); + setStatusOfParameterIn(0, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_LOW); } else if (ocRatio < 1) { - setStatusOfParameterIn(0, 0, STATUS_LOW); + setStatusOfParameterIn(0, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_LOW); } else if (ocRatio == 1) { - setStatusOfParameterIn(0, 0, STATUS_OK); + setStatusOfParameterIn(0, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_OK); } else if (ocRatio <= 3) { - setStatusOfParameterIn(0, 0, STATUS_HIGH); + setStatusOfParameterIn(0, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_HIGH); } else if (Double.isNaN(ocRatio)) { - setStatusOfParameterIn(0, 0, STATUS_WRONG); + setStatusOfParameterIn(0, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_WRONG); } else { - setStatusOfParameterIn(0, 0, STATUS_TOO_HIGH); + setStatusOfParameterIn(0, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_HIGH); } double ovRatio = getParameterIn(0, 1); if (ovRatio < 0.7f) { - setStatusOfParameterIn(0, 1, STATUS_TOO_LOW); + setStatusOfParameterIn(0, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_LOW); } else if (ovRatio < 0.8f) { - setStatusOfParameterIn(0, 1, STATUS_LOW); + setStatusOfParameterIn(0, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_LOW); } else if (ovRatio <= 1.2f) { - setStatusOfParameterIn(0, 1, STATUS_OK); + setStatusOfParameterIn(0, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_OK); } else if (ovRatio <= 2) { - setStatusOfParameterIn(0, 1, STATUS_HIGH); + setStatusOfParameterIn(0, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_HIGH); } else if (Double.isNaN(ovRatio)) { - setStatusOfParameterIn(0, 1, STATUS_WRONG); + setStatusOfParameterIn(0, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_WRONG); } else { - setStatusOfParameterIn(0, 1, STATUS_TOO_HIGH); + setStatusOfParameterIn(0, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_HIGH); } setParameterOut(0, 0, maxCurrentTemp); setParameterOut(0, 1, eAvailableData); if (maxCurrentTemp < -10000) { - setStatusOfParameterOut(0, 0, STATUS_TOO_LOW); + setStatusOfParameterOut(0, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_LOW); } else if (maxCurrentTemp < 0) { - setStatusOfParameterOut(0, 0, STATUS_LOW); + setStatusOfParameterOut(0, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_LOW); } else if (maxCurrentTemp == 0) { - setStatusOfParameterOut(0, 0, STATUS_OK); + setStatusOfParameterOut(0, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_OK); } else if (maxCurrentTemp <= 5000) { - setStatusOfParameterOut(0, 0, STATUS_HIGH); + setStatusOfParameterOut(0, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_HIGH); } else { - setStatusOfParameterOut(0, 0, STATUS_TOO_HIGH); + setStatusOfParameterOut(0, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_HIGH); } if (!machineBusy) { - setStatusOfParameterOut(0, 1, STATUS_NEUTRAL); + setStatusOfParameterOut(0, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_NEUTRAL); } else if (eAvailableData <= 0) { - setStatusOfParameterOut(0, 1, STATUS_TOO_LOW); + setStatusOfParameterOut(0, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_LOW); } else { - setStatusOfParameterOut(0, 1, STATUS_OK); + setStatusOfParameterOut(0, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_OK); } } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java index e79675f016..da2e06c873 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java @@ -32,7 +32,6 @@ import static com.github.technus.tectech.Util.StructureBuilderExtreme; 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.base.LedStatus.STATUS_UNUSED; public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { private final ArrayList eStacksDataOutputs = new ArrayList<>(); diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java index a295a5c7f1..bd8ed9c6bb 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java @@ -15,7 +15,6 @@ import static com.github.technus.tectech.CommonValues.V; import static com.github.technus.tectech.Util.StructureBuilderExtreme; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; -import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; /** * Created by danie_000 on 17.12.2016. @@ -85,27 +84,27 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB for (int i = 0; i < 10; i++) { src = getParameterIn(i, 0); if (src <= 0) { - setStatusOfParameterIn(i, 0, STATUS_TOO_LOW); - setStatusOfParameterIn(i, 1, STATUS_NEUTRAL); + setStatusOfParameterIn(i, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_LOW); + setStatusOfParameterIn(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_NEUTRAL); } else if (src > eInputHatches.size()) { - setStatusOfParameterIn(i, 0, STATUS_TOO_HIGH); - setStatusOfParameterIn(i, 1, STATUS_NEUTRAL); + setStatusOfParameterIn(i, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_HIGH); + setStatusOfParameterIn(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_NEUTRAL); } else if (Double.isNaN(src)) { - setStatusOfParameterIn(i, 0, STATUS_WRONG); - setStatusOfParameterIn(i, 1, STATUS_NEUTRAL); + setStatusOfParameterIn(i, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_WRONG); + setStatusOfParameterIn(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_NEUTRAL); } else { - setStatusOfParameterIn(i, 0, STATUS_OK); + setStatusOfParameterIn(i, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_OK); dest = getParameterIn(i, 1); if (dest < 0) { - setStatusOfParameterIn(i, 1, STATUS_TOO_LOW); + setStatusOfParameterIn(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_LOW); } else if (dest == 0) { - setStatusOfParameterIn(i, 1, STATUS_LOW); + setStatusOfParameterIn(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_LOW); } else if (dest > eOutputHatches.size()) { - setStatusOfParameterIn(i, 1, STATUS_TOO_HIGH); + setStatusOfParameterIn(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_HIGH); } else if (Double.isNaN(dest)) { - setStatusOfParameterIn(i, 1, STATUS_WRONG); + setStatusOfParameterIn(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_WRONG); } else { - setStatusOfParameterIn(i, 1, STATUS_OK); + setStatusOfParameterIn(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_OK); } } } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java index 767bd676d6..1ddb655105 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java @@ -25,7 +25,6 @@ import static com.github.technus.tectech.Util.StructureBuilderExtreme; 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.base.LedStatus.*; /** * Created by danie_000 on 17.12.2016. @@ -183,24 +182,24 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas for (int i = 0; i < 10; i++) { weight = getParameterIn(i, 0); if (weight < 0) { - setStatusOfParameterIn(i, 0, STATUS_TOO_LOW); - setStatusOfParameterIn(i, 1, STATUS_NEUTRAL); + setStatusOfParameterIn(i, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_LOW); + setStatusOfParameterIn(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_NEUTRAL); } else if (Double.isNaN(weight)) { - setStatusOfParameterIn(i, 0, STATUS_WRONG); - setStatusOfParameterIn(i, 1, STATUS_NEUTRAL); + setStatusOfParameterIn(i, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_WRONG); + setStatusOfParameterIn(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_NEUTRAL); } else { - setStatusOfParameterIn(i, 0, weight==0?STATUS_LOW:STATUS_OK); + setStatusOfParameterIn(i, 0, weight==0?STATUS_LOW:GT_MetaTileEntity_MultiblockBase_EM.STATUS_OK); dest = getParameterIn(i, 1); if (dest < 0) { - setStatusOfParameterIn(i, 1, STATUS_TOO_LOW); + setStatusOfParameterIn(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_LOW); } else if (dest == 0) { - setStatusOfParameterIn(i, 1, STATUS_LOW); + setStatusOfParameterIn(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_LOW); } else if (dest > eOutputData.size()) { - setStatusOfParameterIn(i, 1, STATUS_TOO_HIGH); + setStatusOfParameterIn(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_HIGH); } else if (Double.isNaN(dest)) { - setStatusOfParameterIn(i, 1, STATUS_WRONG); + setStatusOfParameterIn(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_WRONG); } else { - setStatusOfParameterIn(i, 1, STATUS_OK); + setStatusOfParameterIn(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_OK); } } } 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 b60036130f..7e3a51da4f 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 @@ -28,7 +28,6 @@ import java.util.HashSet; import static com.github.technus.tectech.Util.StructureBuilderExtreme; import static com.github.technus.tectech.loader.MainLoader.microwaving; -import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; import static gregtech.api.GregTech_API.sBlockCasings4; /** @@ -222,28 +221,28 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock public void parametersOutAndStatusesWrite_EM(boolean machineBusy) { double powerParameter = getParameterIn(0, 0); if (powerParameter < 300) { - setStatusOfParameterIn(0, 0, STATUS_TOO_LOW); + setStatusOfParameterIn(0, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_LOW); } else if (powerParameter < 1000) { - setStatusOfParameterIn(0, 0, STATUS_LOW); + setStatusOfParameterIn(0, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_LOW); } else if (powerParameter == 1000) { - setStatusOfParameterIn(0, 0, STATUS_OK); + setStatusOfParameterIn(0, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_OK); } else if (powerParameter == Double.POSITIVE_INFINITY) { - setStatusOfParameterIn(0, 0, STATUS_TOO_HIGH); + setStatusOfParameterIn(0, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_HIGH); } else if (Double.isNaN(powerParameter)) { - setStatusOfParameterIn(0, 0, STATUS_WRONG); + setStatusOfParameterIn(0, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_WRONG); } else { - setStatusOfParameterOut(0, 0, STATUS_HIGH); + setStatusOfParameterOut(0, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_HIGH); } double timerParameter = getParameterIn(0, 1); if (timerParameter <= 1) { - setStatusOfParameterIn(0, 1, STATUS_TOO_LOW); + setStatusOfParameterIn(0, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_LOW); } else if (timerParameter <= 3000) { - setStatusOfParameterIn(0, 1, STATUS_OK); + setStatusOfParameterIn(0, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_OK); } else if (Double.isNaN(timerParameter)) { - setStatusOfParameterIn(0, 1, STATUS_WRONG); + setStatusOfParameterIn(0, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_WRONG); } else { - setStatusOfParameterIn(0, 1, STATUS_TOO_HIGH); + setStatusOfParameterIn(0, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_HIGH); } setParameterOut(0, 0, timerValue); diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_Container_MultiMachineEM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_Container_MultiMachineEM.java index 4845117a99..91b2635001 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_Container_MultiMachineEM.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_Container_MultiMachineEM.java @@ -11,8 +11,8 @@ import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; public class GT_Container_MultiMachineEM extends GT_ContainerMetaTile_Machine { - public LedStatus[] eParamsInStatus = new LedStatus[20];//unused 0,G ok 1, B too low 2, R too high 3, Y blink dangerous 4,5 - public LedStatus[] eParamsOutStatus = new LedStatus[20]; + public byte[] eParamsInStatus = new byte[20];//unused 0,G ok 1, B too low 2, R too high 3, Y blink dangerous 4,5 + public byte[] eParamsOutStatus = new byte[20]; public byte eCertainMode = 5, eCertainStatus = 127; public boolean ePowerPass = false, eSafeVoid = false, allowedToWork = false; public final boolean ePowerPassButton, eSafeVoidButton, allowedToWorkButton; @@ -118,9 +118,9 @@ public class GT_Container_MultiMachineEM extends GT_ContainerMetaTile_Machine { ICrafting var1 = (ICrafting) crafter; int i = 100; for (int j = 0; j < eParamsInStatus.length; j++) { - var1.sendProgressBarUpdate(this, i++, (eParamsInStatus[j].getOrdinalByte() | (eParamsOutStatus[j].getOrdinalByte() << 8))); + var1.sendProgressBarUpdate(this, i++, eParamsInStatus[j] | eParamsOutStatus[j] << 8); } - var1.sendProgressBarUpdate(this, 120, eCertainMode | (eCertainStatus << 8)); + var1.sendProgressBarUpdate(this, 120, eCertainMode | eCertainStatus << 8); var1.sendProgressBarUpdate(this, 121, (ePowerPass ? 1 : 0) + (eSafeVoid ? 2 : 0) + (allowedToWork ? 4 : 0)); } } @@ -132,8 +132,8 @@ public class GT_Container_MultiMachineEM extends GT_ContainerMetaTile_Machine { return; } if (par1 >= 100 && par1 < 120) { - eParamsInStatus[par1 - 100] = LedStatus.getStatus ((byte) (par2 & 0xff)); - eParamsOutStatus[par1 - 100] = LedStatus.getStatus ((byte) (par2 >>> 8)); + eParamsInStatus[par1 - 100] = (byte) (par2 & 0xff); + eParamsOutStatus[par1 - 100] = (byte) (par2 >>> 8); } else if (par1 == 120) { eCertainMode = (byte) (par2 & 0xff); eCertainStatus = (byte) (par2 >>> 8); diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_GUIContainer_MultiMachineEM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_GUIContainer_MultiMachineEM.java index 90ad4e7388..40285cc5e7 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_GUIContainer_MultiMachineEM.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_GUIContainer_MultiMachineEM.java @@ -13,7 +13,6 @@ import org.lwjgl.opengl.GL12; import java.util.List; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM.*; -import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.STATUS_UNUSED; import static gregtech.api.enums.GT_Values.RES_PATH_GUI; /** @@ -201,7 +200,7 @@ public class GT_GUIContainer_MultiMachineEM extends GT_GUIContainerMetaTile_Mach } } - private void LEDdrawP(int x, int y, int i, int j, LedStatus status) { + private void LEDdrawP(int x, int y, int i, int j, byte status) { int v = 192, su = 8, sv = 6, u = 11; switch (status) { case STATUS_WRONG: //fallthrough 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 a6ec5b561a..ebcc0ef622 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 @@ -105,8 +105,12 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt private final int[] iParamsOut = new int[20];//number O to parametrizers private final boolean[] bParamsAreFloats = new boolean[10]; - final LedStatus[] eParamsInStatus = new LedStatus[20];//LED status for I - final LedStatus[] eParamsOutStatus = new LedStatus[20];//LED status for O + final byte[] eParamsInStatus = new byte[20];//LED status for I + final byte[] eParamsOutStatus = new byte[20];//LED status for O + public static final byte STATUS_UNUSED =7, STATUS_NEUTRAL = 0, + STATUS_TOO_LOW = 1, STATUS_LOW = 2, + STATUS_WRONG = 3, STATUS_OK = 4, + STATUS_TOO_HIGH = 5, STATUS_HIGH = 6; // 0,2,4,6 - ok // 1,3,5 - nok @@ -695,11 +699,11 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt // return false; //} - public final void setStatusOfParameterIn(int hatchNo, int paramID, LedStatus status){ + public final void setStatusOfParameterIn(int hatchNo, int paramID, byte status){ eParamsInStatus[hatchNo+10*paramID]=status; } - public final void setStatusOfParameterOut(int hatchNo, int paramID, LedStatus status){ + public final void setStatusOfParameterOut(int hatchNo, int paramID, byte status){ eParamsOutStatus[hatchNo+10*paramID]=status; } @@ -961,13 +965,13 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt NBTTagCompound paramIs = new NBTTagCompound(); for (int i = 0; i < eParamsInStatus.length; i++) { - paramIs.setByte(Integer.toString(i), eParamsInStatus[i].getOrdinalByte()); + paramIs.setByte(Integer.toString(i), eParamsInStatus[i]); } aNBT.setTag("eParamsInS", paramIs); NBTTagCompound paramOs = new NBTTagCompound(); for (int i = 0; i < eParamsOutStatus.length; i++) { - paramOs.setByte(Integer.toString(i), eParamsOutStatus[i].getOrdinalByte()); + paramOs.setByte(Integer.toString(i), eParamsOutStatus[i]); } aNBT.setTag("eParamsOutS", paramOs); } @@ -1051,12 +1055,12 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt NBTTagCompound paramIs = aNBT.getCompoundTag("eParamsInS"); for (int i = 0; i < eParamsInStatus.length; i++) { - eParamsInStatus[i] = LedStatus.getStatus(paramIs.getByte(Integer.toString(i))); + eParamsInStatus[i] = paramIs.getByte(Integer.toString(i)); } NBTTagCompound paramOs = aNBT.getCompoundTag("eParamsOutS"); for (int i = 0; i < eParamsOutStatus.length; i++) { - eParamsOutStatus[i] = LedStatus.getStatus(paramOs.getByte(Integer.toString(i))); + eParamsOutStatus[i] = paramOs.getByte(Integer.toString(i)); } } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/LedStatus.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/LedStatus.java deleted file mode 100644 index fba5910532..0000000000 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/LedStatus.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.github.technus.tectech.thing.metaTileEntity.multi.base; - -public enum LedStatus { - STATUS_UNUSED, - STATUS_TOO_LOW, - STATUS_LOW, - STATUS_WRONG, - STATUS_OK, - STATUS_TOO_HIGH, - STATUS_HIGH, - STATUS_UNDEFINED, - STATUS_NEUTRAL; - - public boolean isOk(){ - return (ordinal()&1)==0; - } - - public boolean isBad(){ - return (ordinal()&1)==1; - } - - public byte getOrdinalByte(){ - return (byte)ordinal(); - } - - public static LedStatus getStatus(byte value){ - try{ - return LedStatus.values()[value]; - }catch (IndexOutOfBoundsException e){ - return STATUS_UNDEFINED; - } - } -} diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/Behaviour_Centrifuge.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/Behaviour_Centrifuge.java index efbca82c8f..4b7d41494b 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/Behaviour_Centrifuge.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/Behaviour_Centrifuge.java @@ -13,7 +13,6 @@ import java.util.Comparator; import static com.github.technus.tectech.CommonValues.V; import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; -import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; /** * Created by danie_000 on 24.12.2017. @@ -70,33 +69,33 @@ public class Behaviour_Centrifuge extends GT_MetaTileEntity_EM_machine.Behaviour te.setParameterOut(2, 1, maxCapacity);// eV/c^2 for(int i=4;i<=9;i++) { - te.setStatusOfParameterOut(i, 0, STATUS_UNUSED); - te.setStatusOfParameterOut(i, 1, STATUS_UNUSED); + te.setStatusOfParameterOut(i, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_UNUSED); + te.setStatusOfParameterOut(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_UNUSED); } for(int i=1;i<=3;i++) { - te.setStatusOfParameterIn(i, 0, STATUS_UNUSED); - te.setStatusOfParameterIn(i, 1, STATUS_UNUSED); + te.setStatusOfParameterIn(i, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_UNUSED); + te.setStatusOfParameterIn(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_UNUSED); } double RPM = parametersToCheckAndFix[0]; if (RPM > maxRPM) { - te.setStatusOfParameterIn(0, 0, STATUS_TOO_HIGH); + te.setStatusOfParameterIn(0, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_HIGH); te.setParameterOut(0, 0, maxRPM);//rpm te.setParameterOut(0, 1, maxRCF);//rcf check=false; } else if (RPM > maxRPM / 3f * 2f) { - te.setStatusOfParameterIn(0, 0, STATUS_HIGH); + te.setStatusOfParameterIn(0, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_HIGH); } else if (RPM > maxRPM / 3f) { - te.setStatusOfParameterIn(0, 0, STATUS_OK); + te.setStatusOfParameterIn(0, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_OK); } else if (RPM > 0) { - te.setStatusOfParameterIn(0, 0, STATUS_LOW); + te.setStatusOfParameterIn(0, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_LOW); } else if (RPM <= 0) { - te.setStatusOfParameterIn(0, 0, STATUS_TOO_LOW); + te.setStatusOfParameterIn(0, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_LOW); te.setParameterOut(0, 0, 0);//rpm te.setParameterOut(0, 1, 0);//rcf check=false; } else { - te.setStatusOfParameterIn(0, 0, STATUS_WRONG); + te.setStatusOfParameterIn(0, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_WRONG); te.setParameterOut(0, 0, 0);//rpm te.setParameterOut(0, 1, 0);//rcf check=false; @@ -110,16 +109,16 @@ public class Behaviour_Centrifuge extends GT_MetaTileEntity_EM_machine.Behaviour double fractionCount = parametersToCheckAndFix[1]; if (fractionCount > 6) { parametersToCheckAndFix[1] = 6; - te.setStatusOfParameterIn(0, 1, STATUS_TOO_HIGH); + te.setStatusOfParameterIn(0, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_HIGH); check=false; } else if (fractionCount >= 2) { - te.setStatusOfParameterIn(0, 1, STATUS_OK); + te.setStatusOfParameterIn(0, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_OK); } else if (fractionCount < 2) { parametersToCheckAndFix[1] = 2; - te.setStatusOfParameterIn(0, 1, STATUS_TOO_LOW); + te.setStatusOfParameterIn(0, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_LOW); check=false; } else { - te.setStatusOfParameterIn(0, 1, STATUS_WRONG); + te.setStatusOfParameterIn(0, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_WRONG); check=false; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/Behaviour_ElectromagneticSeparator.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/Behaviour_ElectromagneticSeparator.java index 94f00ece1b..8c912dd38d 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/Behaviour_ElectromagneticSeparator.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/Behaviour_ElectromagneticSeparator.java @@ -10,7 +10,6 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.MultiblockCont import java.util.ArrayList; import static com.github.technus.tectech.CommonValues.V; -import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; /** * Created by danie_000 on 24.12.2017. @@ -96,79 +95,79 @@ public class Behaviour_ElectromagneticSeparator extends GT_MetaTileEntity_EM_mac te.setParameterOut(0,0,precisionFull); te.setParameterOut(0,1,precisionMinimal); te.setParameterOut(1,0,offsetMax); - te.setStatusOfParameterOut(1,1,STATUS_UNUSED); + te.setStatusOfParameterOut(1,1,GT_MetaTileEntity_MultiblockBase_EM.STATUS_UNUSED); te.setParameterOut(2,0,maxCharge); te.setParameterOut(2,1,maxCapacity); te.setParameterOut(3,0,V[tier]); te.setParameterOut(3,1,ticks); for(int i=4;i<=9;i++) { - te.setStatusOfParameterOut(i, 0, STATUS_UNUSED); - te.setStatusOfParameterOut(i, 1, STATUS_UNUSED); + te.setStatusOfParameterOut(i, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_UNUSED); + te.setStatusOfParameterOut(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_UNUSED); } - te.setStatusOfParameterIn(1, 1, STATUS_UNUSED); + te.setStatusOfParameterIn(1, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_UNUSED); for(int i=2;i<=3;i++) { - te.setStatusOfParameterIn(i, 0, STATUS_UNUSED); - te.setStatusOfParameterIn(i, 1, STATUS_UNUSED); + te.setStatusOfParameterIn(i, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_UNUSED); + te.setStatusOfParameterIn(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_UNUSED); } double full=parametersToCheckAndFix[0]; if(Double.isInfinite(full) && full>0) { - te.setStatusOfParameterIn(0,0,STATUS_TOO_HIGH); + te.setStatusOfParameterIn(0,0,GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_HIGH); check=false; }else if(full>precisionFull){ - te.setStatusOfParameterIn(0,0, STATUS_HIGH); + te.setStatusOfParameterIn(0,0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_HIGH); }else if(full==precisionFull){ - te.setStatusOfParameterIn(0,0,STATUS_OK); + te.setStatusOfParameterIn(0,0,GT_MetaTileEntity_MultiblockBase_EM.STATUS_OK); }else if(full0) { - te.setStatusOfParameterIn(0,1,STATUS_TOO_HIGH); + te.setStatusOfParameterIn(0,1,GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_HIGH); check=false; }else if(minimal>precisionMinimal){ if(minimal>full){ - te.setStatusOfParameterIn(0,1,STATUS_TOO_HIGH); + te.setStatusOfParameterIn(0,1,GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_HIGH); check=false; }else { - te.setStatusOfParameterIn(0,1, STATUS_HIGH); + te.setStatusOfParameterIn(0,1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_HIGH); } }else if(minimal==precisionMinimal){ if(minimal>full){ - te.setStatusOfParameterIn(0,1,STATUS_TOO_HIGH); + te.setStatusOfParameterIn(0,1,GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_HIGH); check=false; }else { - te.setStatusOfParameterIn(0,1, STATUS_OK); + te.setStatusOfParameterIn(0,1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_OK); } }else if(minimaloffsetMax){ - te.setStatusOfParameterIn(1,0,STATUS_TOO_HIGH); + te.setStatusOfParameterIn(1,0,GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_HIGH); check=false; }else if(offset>0){ - te.setStatusOfParameterIn(1,0,STATUS_HIGH); + te.setStatusOfParameterIn(1,0,GT_MetaTileEntity_MultiblockBase_EM.STATUS_HIGH); }else if(offset==0){ - te.setStatusOfParameterIn(1,0,STATUS_OK); + te.setStatusOfParameterIn(1,0,GT_MetaTileEntity_MultiblockBase_EM.STATUS_OK); }else if(offset>=-offsetMax){ - te.setStatusOfParameterIn(1,0,STATUS_LOW); + te.setStatusOfParameterIn(1,0,GT_MetaTileEntity_MultiblockBase_EM.STATUS_LOW); }else if(offset<-offsetMax){ - te.setStatusOfParameterIn(1,0,STATUS_TOO_LOW); + te.setStatusOfParameterIn(1,0,GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_LOW); check=false; }else { - te.setStatusOfParameterIn(1,0,STATUS_WRONG); + te.setStatusOfParameterIn(1,0,GT_MetaTileEntity_MultiblockBase_EM.STATUS_WRONG); check=false; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java index ad10d70cbf..46e4ede660 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java @@ -25,7 +25,6 @@ import java.util.HashMap; import static com.github.technus.tectech.Util.StructureBuilderExtreme; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; -import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; /** * Created by danie_000 on 17.12.2016. @@ -287,37 +286,37 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa for (int i = 4; i <= 6; i++) { pointer = getParameterInInt(i, 0); if (Double.isNaN(pointer)) { - setStatusOfParameterIn(i, 0, STATUS_WRONG); + setStatusOfParameterIn(i, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_WRONG); } else if (pointer <= 0) { - setStatusOfParameterIn(i, 0, STATUS_TOO_LOW); + setStatusOfParameterIn(i, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_LOW); }//else if(pointer==0) // setStatusOfParameterIn(i,0,STATUS_LOW); else if (pointer <= eInputHatches.size()) { if (checkArray.get(pointer)) { - setStatusOfParameterIn(i, 0, STATUS_WRONG); + setStatusOfParameterIn(i, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_WRONG); } else { - setStatusOfParameterIn(i, 0, STATUS_OK); + setStatusOfParameterIn(i, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_OK); checkArray.set(pointer); } } else { - setStatusOfParameterIn(i, 0, STATUS_TOO_HIGH); + setStatusOfParameterIn(i, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_HIGH); } pointer = getParameterInInt(i, 1); if (Double.isNaN(pointer)) { - setStatusOfParameterIn(i, 1, STATUS_WRONG); + setStatusOfParameterIn(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_WRONG); } else if (pointer < 0) { - setStatusOfParameterIn(i, 1, STATUS_TOO_LOW); + setStatusOfParameterIn(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_LOW); } else if (pointer == 0) { - setStatusOfParameterIn(i, 1, STATUS_LOW); + setStatusOfParameterIn(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_LOW); } else if (pointer <= eInputHatches.size()) { if (checkArray.get(pointer)) { - setStatusOfParameterIn(i, 1, STATUS_WRONG); + setStatusOfParameterIn(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_WRONG); } else { - setStatusOfParameterIn(i, 1, STATUS_OK); + setStatusOfParameterIn(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_OK); checkArray.set(pointer); } } else { - setStatusOfParameterIn(i, 1, STATUS_TOO_HIGH); + setStatusOfParameterIn(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_HIGH); } } } @@ -325,27 +324,27 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa for (int i = 7; i <= 9; i++) { pointer = getParameterInInt(i, 0); if (Double.isNaN(pointer)) { - setStatusOfParameterIn(i, 0, STATUS_WRONG); + setStatusOfParameterIn(i, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_WRONG); } else if (pointer < 0) { - setStatusOfParameterIn(i, 0, STATUS_TOO_LOW); + setStatusOfParameterIn(i, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_LOW); } else if (pointer == 0) { - setStatusOfParameterIn(i, 0, STATUS_LOW); + setStatusOfParameterIn(i, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_LOW); } else if (pointer <= eOutputHatches.size()) { - setStatusOfParameterIn(i, 0, STATUS_OK); + setStatusOfParameterIn(i, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_OK); } else { - setStatusOfParameterIn(i, 0, STATUS_TOO_HIGH); + setStatusOfParameterIn(i, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_HIGH); } pointer = getParameterInInt(i, 1); if (Double.isNaN(pointer)) { - setStatusOfParameterIn(i, 1, STATUS_WRONG); + setStatusOfParameterIn(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_WRONG); } else if (pointer < 0) { - setStatusOfParameterIn(i, 1, STATUS_TOO_LOW); + setStatusOfParameterIn(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_LOW); } else if (pointer == 0) { - setStatusOfParameterIn(i, 1, STATUS_LOW); + setStatusOfParameterIn(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_LOW); } else if (pointer <= eOutputHatches.size()) { - setStatusOfParameterIn(i, 1, STATUS_OK); + setStatusOfParameterIn(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_OK); } else { - setStatusOfParameterIn(i, 1, STATUS_TOO_HIGH); + setStatusOfParameterIn(i, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_HIGH); } } } -- cgit From bc4c41ebadcc8ccfafc2242d718642177eb731b8 Mon Sep 17 00:00:00 2001 From: Bass Date: Mon, 18 Feb 2019 07:00:07 +0000 Subject: Tesla Tesla Tesla You guessed it, more tesla work xd --- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 12 +-- .../single/GT_MetaTileEntity_TeslaCoil.java | 96 ++++++++++++---------- 2 files changed, 58 insertions(+), 50 deletions(-) (limited to 'src/main/java') 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 335cfc612a..4c10b6505c 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 @@ -3,9 +3,7 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.CommonValues; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil_Ultimate; import com.github.technus.tectech.thing.metaTileEntity.IConstructable; -import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Capacitor; -import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoMulti; -import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti; +import com.github.technus.tectech.thing.metaTileEntity.hatch.*; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.thing.metaTileEntity.single.GT_MetaTileEntity_TeslaCoil; import cpw.mods.fml.relauncher.Side; @@ -35,7 +33,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private static Textures.BlockIcons.CustomIcon ScreenOFF; private static Textures.BlockIcons.CustomIcon ScreenON; - private final ArrayList eCaps = new ArrayList<>(); private int tier = 0; private int orientation = 0; @@ -43,7 +40,8 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private int scanTimeMin = 100; //Min scan time in ticks private int scanTimeTill = scanTimeMin; //Set default scan time - private Map eTeslaMap = new HashMap();//Tesla Map to map them tesla bois! + private Map eTeslaMap = new HashMap(); //Tesla Map to map them tesla bois! + private final ArrayList eCaps = new ArrayList<>(); //Capacitor List private float histLow = 0.25F; //Power pass is disabled if power is under this fraction private float histHigh = 0.75F; //Power pass is enabled if power is over this fraction @@ -488,6 +486,10 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); return eDynamoMulti.add((GT_MetaTileEntity_Hatch_DynamoMulti) aMetaTileEntity); } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Param) { + ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); + return eParamHatches.add((GT_MetaTileEntity_Hatch_Param) aMetaTileEntity); + } return false; } 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 a0e4af074f..efb0941f41 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 @@ -9,9 +9,8 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicBatteryBuffer; -import gregtech.api.util.GT_ModHandler; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; + import java.util.*; @@ -21,7 +20,7 @@ import static java.lang.Math.round; public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryBuffer { - private int maixTier = 4; //Max tier of transceiver + private int maxTier = 4; //Max tier of transceiver private int minTier = 1; //Min tier of transceiver private Map eTeslaMap = new HashMap();//Tesla Map to map them tesla bois! @@ -30,9 +29,9 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB private int scanTimeTill = scanTimeMin; //Set default scan time private int scanRadiusMax = 20; //Tesla scan radius private int scanRadiusMin = 4; //Tesla scan radius - private int scanRadiusLimitTop = scanRadiusMin + (scanRadiusMax - scanRadiusMin) / (maixTier - minTier + 1) * (mTier - 1); //Tesla scan radius Formula - private int scanRadiusLimitBottom = 1; - private int scanRadius = scanRadiusLimitTop; + private int scanRadiusLimitTop = scanRadiusMin + (scanRadiusMax - scanRadiusMin) / (maxTier - minTier + 1) * (mTier - 1); //Tesla scan radius Formula + private int scanRadiusLimitBottom = 1; //Minimum user configurable scanRadius + private int scanRadius = scanRadiusLimitTop; //Default scanRadius setting private int transferRadiusTower = 0; //Radius for transceiver to tower transfers private int transferRadiusCover = 0; //Radius for transceiver to cover transfers @@ -48,11 +47,16 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB private long lossPerBlock = 2; //EU lost per block traveled private float energyEfficiencyMax = 0.95F; //Max efficiency private float energyEfficiencyMin = 0.75F; //Min efficiency - private float energyEfficiency = energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maixTier - minTier + 1) * (mTier - 1); //Efficiency Formula + private float overdriveEfficiency = 0.95F; //Overdrive efficiency + private float energyEfficiency = energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maxTier - minTier + 1) * (mTier - 1); //Efficiency Formula + private float sumOverdriveEfficiency = (2-energyEfficiency)*(2- overdriveEfficiency); //Sum overdrive efficiency formula + public boolean overDriveToggle = false; //Overdrive toggle private long outputVoltage = V[mTier]; //Tesla Voltage Output - private long outputVoltagePostEfficency = (long) (outputVoltage * energyEfficiency); //Max power a machine can actually receive + private long outputVoltagePostEfficiency = (long) (outputVoltage * energyEfficiency); //Max power a machine can actually receive + private long outputVoltagePostOverdrive = (long) (outputVoltage * sumOverdriveEfficiency); //Max power the sender can consume private long outputVoltageInjectable = 0; //How much EU will be received post distance losses + private long outputVoltageConsumption = 0; //How much EU will be drained private long outputCurrent = 0; //Tesla Current Output public GT_MetaTileEntity_TeslaCoil(int aID, String aName, String aNameRegional, int aTier, int aSlotCount) { @@ -64,6 +68,18 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB super(aName, aTier, aDescription, aTextures, aSlotCount); } + @Override + public boolean onSolderingToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (overDriveToggle) { + overDriveToggle = false; + PlayerChatHelper.SendInfo(aPlayer, "Overdrive Disengaged"); + } else { + overDriveToggle = true; + PlayerChatHelper.SendInfo(aPlayer, "Overdrive Engaged"); + } + return true; + } + @Override public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (aPlayer.isSneaking()) { @@ -100,7 +116,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB scanRadius = scanRadiusLimitBottom; } } - PlayerChatHelper.SendInfo(aPlayer, "Scan Radius Limit Changed to " + scanRadius + " Blocks"); + PlayerChatHelper.SendInfo(aPlayer, "Tesla Radius Changed to " + scanRadius + " Blocks"); return false; } @@ -137,37 +153,18 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); if (aBaseMetaTileEntity.isServerSide()) { - IGregTechTileEntity mte = getBaseMetaTileEntity(); - - //region BasicBatteryBuffer - this.mCharge = aBaseMetaTileEntity.getStoredEU() / 2L > aBaseMetaTileEntity.getEUCapacity() / 3L; - this.mDecharge = aBaseMetaTileEntity.getStoredEU() < aBaseMetaTileEntity.getEUCapacity() / 3L; - this.mBatteryCount = 0; - this.mChargeableCount = 0; - ItemStack[] var4 = this.mInventory; - - int var5 = var4.length; - for (int var6 = 0; var6 < var5; ++var6) { - ItemStack tStack = var4[var6]; - if (GT_ModHandler.isElectricItem(tStack, this.mTier)) { - if (GT_ModHandler.isChargerItem(tStack)) { - ++this.mBatteryCount; - } - ++this.mChargeableCount; - } - } - //endregion ////Hysteresis based ePowerPass Config long energyMax = getStoredEnergy()[1]; long energyStored = getStoredEnergy()[0]; - float energyFrac = (float) energyStored / energyMax; + float energyFraction = (float) energyStored / energyMax; //ePowerPass hist toggle - if (!powerPassToggle && energyFrac > histHigh) { + if (!powerPassToggle && energyFraction > histHigh) { powerPassToggle = true; - } else if (powerPassToggle && energyFrac < histLow) { + } else if (powerPassToggle && energyFraction < histLow) { powerPassToggle = false; } @@ -183,7 +180,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB if (xPosOffset == 0 && yPosOffset == 0 && zPosOffset == 0) { continue; } - IGregTechTileEntity node = mte.getIGregTechTileEntityOffset(xPosOffset, yPosOffset, zPosOffset); + IGregTechTileEntity node = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xPosOffset, yPosOffset, zPosOffset); if (node == null) { continue; } @@ -199,8 +196,8 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB //Stuff to do if ePowerPass if (powerPassToggle) { outputCurrent = mBatteryCount; - transferRadiusTower = (int) (scanRadius * energyFrac); - transferRadiusCover = (int) (transferRadiusTower/1.5); + transferRadiusTower = (int) (scanRadius * energyFraction); + transferRadiusCover = (int) (transferRadiusTower / 1.5); //Clean the eTeslaMap for (Map.Entry Rx : eTeslaMap.entrySet()) { @@ -226,23 +223,29 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB while (outputCurrent > 0) { boolean idle = true; for (Map.Entry Rx : entriesSortedByValues(eTeslaMap)) { - if (getEUVar() >= outputVoltage) { + if (getEUVar() >= (overDriveToggle ? outputVoltage*2 : outputVoltage)) { IGregTechTileEntity node = Rx.getKey(); IMetaTileEntity nodeInside = node.getMetaTileEntity(); - outputVoltageInjectable = outputVoltagePostEfficency - (lossPerBlock * Rx.getValue()); + if (overDriveToggle){ + outputVoltageInjectable = outputVoltage; + outputVoltageConsumption = outputVoltagePostOverdrive + (lossPerBlock * Rx.getValue()); + } else { + outputVoltageInjectable = outputVoltagePostEfficiency - (lossPerBlock * Rx.getValue()); + outputVoltageConsumption = outputVoltage; + } if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && Rx.getValue() <= transferRadiusTower) { GT_MetaTileEntity_TM_teslaCoil nodeTesla = (GT_MetaTileEntity_TM_teslaCoil) nodeInside; if (!nodeTesla.powerPassToggle) { - if (nodeTesla.getEUVar() + outputVoltage <= (nodeTesla.maxEUStore() / 2)) { - setEUVar(getEUVar() - outputVoltage); - node.increaseStoredEnergyUnits(outputVoltageInjectable, true); - outputCurrent--; - idle = false; - } + if (nodeTesla.getEUVar() + outputVoltageInjectable <= (nodeTesla.maxEUStore() / 2)) { + setEUVar(getEUVar() - outputVoltageConsumption); + node.increaseStoredEnergyUnits(outputVoltageInjectable, true); + outputCurrent--; + idle = false; + } } } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil) && Rx.getValue() <= transferRadiusCover) { if (node.injectEnergyUnits((byte) 1, outputVoltageInjectable, 1L) > 0L) { - setEUVar(getEUVar() - outputVoltage); + setEUVar(getEUVar() - outputVoltageConsumption); outputCurrent--; idle = false; } @@ -250,6 +253,9 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB if (outputCurrent == 0) { break; } + } else { + idle = true; + break; } } if (idle) { @@ -259,4 +265,4 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB } } } -} +} \ No newline at end of file -- cgit From 791b2674c713cd3263d7917da9f51c1b377441d3 Mon Sep 17 00:00:00 2001 From: Bass Date: Mon, 18 Feb 2019 11:52:40 +0000 Subject: Tesla Casings Today in Bass learns Java: Tec watches in horror as Bass decides to allocate himself casing ids 200-299 without asking permission while still procrastinating doing any sort of custom texture work! --- .../com/github/technus/tectech/CommonValues.java | 4 ++ .../technus/tectech/thing/CustomItemList.java | 3 ++ .../tectech/thing/casing/GT_Block_CasingsTT.java | 55 ++++++++++++++++++++++ .../tectech/thing/casing/GT_Item_CasingsTT.java | 49 +++++++++++++++++-- 4 files changed, 106 insertions(+), 5 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/CommonValues.java b/src/main/java/com/github/technus/tectech/CommonValues.java index 8ac6188b63..9564643fbe 100644 --- a/src/main/java/com/github/technus/tectech/CommonValues.java +++ b/src/main/java/com/github/technus/tectech/CommonValues.java @@ -18,6 +18,10 @@ public final class CommonValues { EnumChatFormatting.BLUE + "Tec" + EnumChatFormatting.DARK_BLUE + "Tech" + EnumChatFormatting.BLUE + ": Theta Movement"; + public static final String COSMIC_MARK = + EnumChatFormatting.BLUE + "Tec" + + EnumChatFormatting.DARK_BLUE + "Tech" + + EnumChatFormatting.BLUE + ": Cosmic";//TODO get a better name than cosmic for *UNDEFINED* thing public static final byte DECAY_AT = 0;// hatches compute decays public static final byte MULTI_PURGE_1_AT = 2;// multiblocks clean their hatches 1 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 5e45ead4f8..0010378b29 100644 --- a/src/main/java/com/github/technus/tectech/thing/CustomItemList.java +++ b/src/main/java/com/github/technus/tectech/thing/CustomItemList.java @@ -57,6 +57,9 @@ public enum CustomItemList implements IItemContainer { Parametrizer_Hatch, ParametrizerX_Hatch, Uncertainty_Hatch, UncertaintyX_Hatch, dataIn_Hatch, dataOut_Hatch, dataInAss_Hatch, dataOutAss_Hatch, eM_Containment, eM_Containment_Field, eM_Containment_Advanced, eM_Coil, eM_Teleportation, eM_Dimensional, eM_Ultimate_Containment, eM_Ultimate_Containment_Advanced, eM_Ultimate_Containment_Field, eM_Spacetime, eM_Computer_Casing, eM_Computer_Bus, eM_Computer_Vent, eM_Hollow, eM_Power, debugBlock, + + tM_TeslaBase, tM_TeslaToroid, tM_TeslaFrame, tM_TeslaPrimary_0, tM_TeslaPrimary_1, tM_TeslaPrimary_2, tM_TeslaSecondary_0, tM_TeslaSecondary_1, tM_TeslaSecondary_2, + Machine_Multi_Microwave, Machine_Multi_teslaCoil, Machine_Multi_Transformer, Machine_Multi_Computer, Machine_Multi_Switch, Machine_Multi_Research, Machine_Multi_DataBank, diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java index 2ea22b625d..150e83b144 100644 --- a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java @@ -26,6 +26,7 @@ public class GT_Block_CasingsTT extends GT_Block_Casings_Abstract { public static final byte texturePage=tectechTexturePage1; public static final short textureOffset = texturePage << 7;//Start of PAGE 8 (which is the 9th page) (8*128) private static IIcon eM0, eM1, eM1s, eM2, eM2s, eM3, eM3s, eM4, eM5, eM6, eM7, eM7s, eM8, eM9, eM10, eM11, eM12, eM13, eM14; + private static IIcon tM0, tM1, tM2, tM3, tM4, tM5, tM6, tM7, tM8; private static IIcon[] debug = new IIcon[6]; public GT_Block_CasingsTT() { @@ -57,6 +58,18 @@ public class GT_Block_CasingsTT extends GT_Block_Casings_Abstract { GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Debug Sides");//NOT REGISTER AS TEXTURE FOR HATCHES! + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".200.name", "Tesla Base Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".201.name", "Tesla Toroid Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".202.name", "Tesla Structural Frame"); + + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".203.name", "T0 Primary Tesla Windings");//TODO Decide tesla coil winding materials to rename + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".204.name", "T1 Primary Tesla Windings"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".205.name", "T2 Primary Tesla Windings"); + + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".206.name", "T3 Primary Tesla Windings"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".207.name", "T4 Primary Tesla Windings"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".208.name", "T5 Primary Tesla Windings"); + CustomItemList.eM_Power.set(new ItemStack(this, 1, 0)); @@ -80,6 +93,18 @@ public class GT_Block_CasingsTT extends GT_Block_Casings_Abstract { CustomItemList.eM_Ultimate_Containment_Field.set(new ItemStack(this, 1, 14)); CustomItemList.debugBlock.set(new ItemStack(this, 1, 15)); + + CustomItemList.tM_TeslaBase.set(new ItemStack(this, 1, 200)); + CustomItemList.tM_TeslaToroid.set(new ItemStack(this, 1, 201)); + CustomItemList.tM_TeslaFrame.set(new ItemStack(this, 1, 202)); + + CustomItemList.tM_TeslaPrimary_0.set(new ItemStack(this, 1, 203)); + CustomItemList.tM_TeslaPrimary_1.set(new ItemStack(this, 1, 204)); + CustomItemList.tM_TeslaPrimary_2.set(new ItemStack(this, 1, 205)); + + CustomItemList.tM_TeslaSecondary_0.set(new ItemStack(this, 1, 206)); + CustomItemList.tM_TeslaSecondary_1.set(new ItemStack(this, 1, 207)); + CustomItemList.tM_TeslaSecondary_2.set(new ItemStack(this, 1, 208)); } @Override @@ -116,6 +141,18 @@ public class GT_Block_CasingsTT extends GT_Block_Casings_Abstract { debug[3] = aIconRegister.registerIcon("gregtech:iconsets/DEBUG_3"); debug[4] = aIconRegister.registerIcon("gregtech:iconsets/DEBUG_4"); debug[5] = aIconRegister.registerIcon("gregtech:iconsets/DEBUG_5"); + + tM0 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER");//TODO Configure custom tesla texture sets + tM1 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); + tM2 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); + + tM3 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); + tM4 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); + tM5 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); + + tM6 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); + tM7 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); + tM8 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); } @Override @@ -165,6 +202,24 @@ public class GT_Block_CasingsTT extends GT_Block_Casings_Abstract { return eM14; case 15: return debug[aSide]; + case 200: + return tM0; + case 201: + return tM1; + case 202: + return tM2; + case 203: + return tM3; + case 204: + return tM4; + case 205: + return tM5; + case 206: + return tM6; + case 207: + return tM7; + case 208: + return tM8; default: return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); } diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsTT.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsTT.java index 6751e4b24b..8137a1d655 100644 --- a/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsTT.java +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsTT.java @@ -8,8 +8,7 @@ import net.minecraft.util.EnumChatFormatting; import java.util.List; -import static com.github.technus.tectech.CommonValues.TEC_MARK_EM; -import static com.github.technus.tectech.CommonValues.TEC_MARK_GENERAL; +import static com.github.technus.tectech.CommonValues.*; /** * Created by danie_000 on 03.10.2016. @@ -19,12 +18,16 @@ public class GT_Item_CasingsTT extends GT_Item_Casings_Abstract { super(par1); } - @Override + @Override //TODO Negotiate Casing space with Tec public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { - if(aStack.getItemDamage()>0 && aStack.getItemDamage()<15) { + if(aStack.getItemDamage() < 15) { aList.add(TEC_MARK_EM); - } else { + } else if ((aStack.getItemDamage() < 200)) { aList.add(TEC_MARK_GENERAL); + } else if (aStack.getItemDamage() < 300){ + aList.add(BASS_MARK); + } else { + aList.add(COSMIC_MARK); } switch (aStack.getItemDamage()) { case 0://"High Power Casing" @@ -91,6 +94,42 @@ public class GT_Item_CasingsTT extends GT_Item_Casings_Abstract { aList.add("Lazy man way of determining sides."); aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); break; + case 200://"Tesla Base Casing" + aList.add("Lazy man way of determining sides."); + aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); + break; + case 201://"Tesla Toroid Casing" + aList.add("Lazy man way of determining sides."); + aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); + break; + case 202://"Tesla Structural Frame" + aList.add("Lazy man way of determining sides."); + aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); + break; + case 203://"T0 Primary Tesla Windings" + aList.add("Lazy man way of determining sides."); + aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); + break; + case 204://"T1 Primary Tesla Windings" + aList.add("Lazy man way of determining sides."); + aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); + break; + case 205://"T2 Primary Tesla Windings" + aList.add("Lazy man way of determining sides."); + aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); + break; + case 206://"T0 Secondary Tesla Windings" + aList.add("Lazy man way of determining sides."); + aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); + break; + case 207://"T1 Secondary Tesla Windings" + aList.add("Lazy man way of determining sides."); + aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); + break; + case 208://"T2 Secondary Tesla Windings" + aList.add("Lazy man way of determining sides."); + aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); + break; default://WTF? aList.add("Damn son where did you get that!?"); aList.add(EnumChatFormatting.BLUE.toString() + "From outer space... I guess..."); -- cgit From e76f7b4d68fbc1c4fe003f2eb12404009fb57ca5 Mon Sep 17 00:00:00 2001 From: Bass Date: Mon, 18 Feb 2019 12:44:01 +0000 Subject: Tesla Casings (They now exist?) (But I have no idea how texture setting even WORKS XD) --- .../com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java index 150e83b144..3f513741d2 100644 --- a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java @@ -234,8 +234,13 @@ public class GT_Block_CasingsTT extends GT_Block_Casings_Abstract { @Override public void getSubBlocks(Item aItem, CreativeTabs par2CreativeTabs, List aList) { + //Add Tec's Casings for (int i = 0; i <= 15; i++) { aList.add(new ItemStack(aItem, 1, i)); } + //Add Bass' Casings + for (int i = 200; i <= 208; i++) { + aList.add(new ItemStack(aItem, 1, i)); + } } } -- cgit From ca22cbad23ec40b5ad477260c201a1c842d17916 Mon Sep 17 00:00:00 2001 From: Bass Date: Mon, 18 Feb 2019 15:49:36 +0000 Subject: Tesla Capacitors Adding me some Tesla capacitors, additionally cleaned the Tesla covers to not require a bunch of trash. --- .../technus/tectech/loader/thing/ThingsLoader.java | 5 +++ .../tectech/thing/item/TeslaCoilCapacitor.java | 37 ++++++++++++++++++++++ .../technus/tectech/thing/item/TeslaCoilCover.java | 16 ---------- .../tectech/thing/item/TeslaCoilCoverUltimate.java | 1 - src/main/resources/assets/tectech/lang/en_US.lang | 11 +++++++ 5 files changed, 53 insertions(+), 17 deletions(-) create mode 100644 src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCapacitor.java (limited to 'src/main/java') 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 6951ef6533..8381670a47 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 @@ -62,6 +62,11 @@ public class ThingsLoader implements Runnable { ParametrizerMemoryCard.run(); ElementalDefinitionScanStorage_EM.run(); EuMeterGT.run(); + + for(int i=1;i <= 8; i++){ + TeslaCoilCapacitor.run(i);//TODO Verify the category of capacitors! + } + TecTech.LOGGER.info("Useful Items registered"); ElementalDefinitionContainer_EM.run(); 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 new file mode 100644 index 0000000000..1dbeab093f --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCapacitor.java @@ -0,0 +1,37 @@ +package com.github.technus.tectech.thing.item; + +import com.github.technus.tectech.CommonValues; +import cpw.mods.fml.common.registry.GameRegistry; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +import java.util.List; + +import static com.github.technus.tectech.CommonValues.VN; +import static com.github.technus.tectech.Reference.MODID; + + +public final class TeslaCoilCapacitor extends Item { + public static TeslaCoilCapacitor INSTANCE; + + public TeslaCoilCapacitor(int capTier) { + setUnlocalizedName("tm.teslaCoilCapacitor_" + capTier); + setTextureName(MODID + ":itemParametrizerMemoryCardUnlocked"); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) { + aList.add(CommonValues.BASS_MARK); + aList.add("I IDENTIFY AS A: " + VN[Integer.parseInt(getUnlocalizedName(aStack).replaceAll("[^0-9]", ""))]); + aList.add("Stores energy for tesla towers!"); + aList.add(EnumChatFormatting.BLUE + "Insert into a Capacitor hatch of a Tesla Tower"); + aList.add(EnumChatFormatting.BLUE + "Capacitors are the same thing as batteries, right?"); + } + + public static void run(int capTier) { + INSTANCE = new TeslaCoilCapacitor(capTier); + GameRegistry.registerItem(INSTANCE, INSTANCE.getUnlocalizedName()); + } +} 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 abf1bd90a0..8f2dfc0951 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 @@ -1,30 +1,15 @@ package com.github.technus.tectech.thing.item; import com.github.technus.tectech.CommonValues; -import com.github.technus.tectech.Util; -import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Param; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; import java.util.List; import static com.github.technus.tectech.Reference.MODID; -import static com.github.technus.tectech.thing.CustomItemList.parametrizerMemory; public final class TeslaCoilCover extends Item { @@ -45,7 +30,6 @@ public final class TeslaCoilCover extends Item { public static void run() { INSTANCE = new TeslaCoilCover(); - System.out.print(INSTANCE.getUnlocalizedName()); GameRegistry.registerItem(INSTANCE, INSTANCE.getUnlocalizedName()); } } diff --git a/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCoverUltimate.java b/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCoverUltimate.java index 115f3a34c6..ca6734f8d6 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCoverUltimate.java +++ b/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCoverUltimate.java @@ -30,7 +30,6 @@ public final class TeslaCoilCoverUltimate extends Item { public static void run() { INSTANCE = new TeslaCoilCoverUltimate(); - System.out.print(INSTANCE.getUnlocalizedName()); GameRegistry.registerItem(INSTANCE, INSTANCE.getUnlocalizedName()); } } diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index ac36e32772..cf0db4b7bf 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -12,6 +12,17 @@ item.em.EuMeterGT.name=GT EU meter item.tm.teslaCoilCover.name=Tesla Coil Cover item.tm.teslaCoilCoverUltimate.name=Tesla Coil Cover Rich Edition +//TODO Improve names of everything involved with tesla + +item.tm.teslaCoilCapacitor_1.name=LV Tesla Capacitor +item.tm.teslaCoilCapacitor_2.name=MV Tesla Capacitor +item.tm.teslaCoilCapacitor_3.name=HV Tesla Capacitor +item.tm.teslaCoilCapacitor_4.name=EV Tesla Capacitor +item.tm.teslaCoilCapacitor_5.name=IV Tesla Capacitor +item.tm.teslaCoilCapacitor_6.name=LuV Tesla Capacitor +item.tm.teslaCoilCapacitor_7.name=ZPM Tesla Capacitor +item.tm.teslaCoilCapacitor_8.name=UV Tesla Capacitor + death.attack.microwaving=%1$s was dehydrated by radiation. death.attack.microwaving.player=%1$s was dehydrated by radiation while fighting %2$s. -- cgit From 1e002770e5333e1b90a05bf65c84f84bfdae118e Mon Sep 17 00:00:00 2001 From: basdxz Date: Fri, 8 Mar 2019 12:35:24 +0000 Subject: Tesla Capacitor Item Redone Tesla capacitors now use meta ids with different unlocalized names unlike before --- .../technus/tectech/loader/thing/ThingsLoader.java | 5 +- .../tectech/thing/item/TeslaCoilCapacitor.java | 98 ++++++++++++++++++++-- .../hatch/GT_MetaTileEntity_Hatch_Capacitor.java | 10 +-- src/main/resources/assets/tectech/lang/en_US.lang | 11 --- 4 files changed, 97 insertions(+), 27 deletions(-) (limited to 'src/main/java') 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 8381670a47..a0ce184c4e 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 @@ -63,9 +63,8 @@ public class ThingsLoader implements Runnable { ElementalDefinitionScanStorage_EM.run(); EuMeterGT.run(); - for(int i=1;i <= 8; i++){ - TeslaCoilCapacitor.run(i);//TODO Verify the category of capacitors! - } + + TeslaCoilCapacitor.run(); TecTech.LOGGER.info("Useful Items registered"); 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 1dbeab093f..1755ad05fb 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 @@ -2,10 +2,16 @@ package com.github.technus.tectech.thing.item; import com.github.technus.tectech.CommonValues; import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.util.GT_LanguageManager; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; import java.util.List; @@ -15,23 +21,103 @@ import static com.github.technus.tectech.Reference.MODID; public final class TeslaCoilCapacitor extends Item { public static TeslaCoilCapacitor INSTANCE; + public static IIcon LVicon, MVicon, HVicon, EVicon, IVicon, LuVicon, ZPMicon, UVicon; - public TeslaCoilCapacitor(int capTier) { - setUnlocalizedName("tm.teslaCoilCapacitor_" + capTier); + public TeslaCoilCapacitor() { + setUnlocalizedName("tm.teslaCoilCapacitor"); setTextureName(MODID + ":itemParametrizerMemoryCardUnlocked"); + + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "LV Tesla Capacitor"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "MV Tesla Capacitor"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "HV Tesla Capacitor"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "EV Tesla Capacitor"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "IV Tesla Capacitor"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "LuV Tesla Capacitor"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "ZPM Tesla Capacitor"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "UV Tesla Capacitor"); } @Override public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) { aList.add(CommonValues.BASS_MARK); - aList.add("I IDENTIFY AS A: " + VN[Integer.parseInt(getUnlocalizedName(aStack).replaceAll("[^0-9]", ""))]); - aList.add("Stores energy for tesla towers!"); + switch (aStack.getItemDamage()) { + case 1://"MV" + aList.add("Stores energy for tesla towers! (MV)"); + break; + case 2://"HV" + aList.add("Stores energy for tesla towers! (HV)"); + break; + case 3://"EV" + aList.add("Stores energy for tesla towers! (EV)"); + break; + case 4://"IV" + aList.add("Stores energy for tesla towers! (IV)"); + break; + case 5://"LuV" + aList.add("Stores energy for tesla towers! (LuV)"); + break; + case 6://"ZPM" + aList.add("Stores energy for tesla towers! (ZPM)"); + break; + case 7://"UV" + aList.add("Stores energy for tesla towers! (UV)"); + break; + default://"LV" + aList.add("Stores energy for tesla towers! (LV)"); + break; + } aList.add(EnumChatFormatting.BLUE + "Insert into a Capacitor hatch of a Tesla Tower"); aList.add(EnumChatFormatting.BLUE + "Capacitors are the same thing as batteries, right?"); } - public static void run(int capTier) { - INSTANCE = new TeslaCoilCapacitor(capTier); + @Override + public String getUnlocalizedName(ItemStack aStack) { + return getUnlocalizedName() + "." + getDamage(aStack); + } + + public static void run() { + INSTANCE = new TeslaCoilCapacitor(); GameRegistry.registerItem(INSTANCE, INSTANCE.getUnlocalizedName()); } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) { + LVicon = itemIcon = iconRegister.registerIcon(getIconString()); + MVicon = iconRegister.registerIcon(MODID + ":itemParametrizerMemoryCardLocked"); + HVicon = iconRegister.registerIcon(MODID + ":itemParametrizerMemoryCardLocked"); + EVicon = iconRegister.registerIcon(MODID + ":itemParametrizerMemoryCardLocked"); + IVicon = iconRegister.registerIcon(MODID + ":itemParametrizerMemoryCardLocked"); + LuVicon = iconRegister.registerIcon(MODID + ":itemParametrizerMemoryCardLocked"); + ZPMicon = iconRegister.registerIcon(MODID + ":itemParametrizerMemoryCardLocked"); + UVicon = iconRegister.registerIcon(MODID + ":itemParametrizerMemoryCardLocked"); + } + + @Override + public IIcon getIconFromDamage(int damage) { + switch (damage) { + case 1: + return MVicon; + case 2: + return HVicon; + case 3: + return EVicon; + case 4: + return IVicon; + case 5: + return LuVicon; + case 6: + return ZPMicon; + case 7: + return UVicon; + default: + return LVicon; + } + } + + public void getSubItems(Item aItem, CreativeTabs par2CreativeTabs, List aList) { + for (int i = 0; i <= 7; i++) { + aList.add(new ItemStack(aItem, 1, i)); + } + } } 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 2aae2b8c2b..61062f22ca 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 @@ -102,20 +102,16 @@ public class GT_MetaTileEntity_Hatch_Capacitor extends GT_MetaTileEntity_Hatch { if (aBaseMetaTileEntity.isClientSide()) { return true; } - //if(aBaseMetaTileEntity.isActive()) - // aPlayer.addChatComponentMessage(new ChatComponentText("It is still active...")); - //else if(heat>0) - // aPlayer.addChatComponentMessage(new ChatComponentText("It is still warm...")); - //else aBaseMetaTileEntity.openGUI(aPlayer); return true; } @Override - public int getInventoryStackLimit() { - return 1; + public int getSizeInventory() {//HACK TO NOT DROP CONTENTS!!! + return energyStoredFrac >= 0.25 || getBaseMetaTileEntity().isActive() ? 0 : mInventory.length; } + @Override public String[] getDescription() { return new String[]{ diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index cf0db4b7bf..ac36e32772 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -12,17 +12,6 @@ item.em.EuMeterGT.name=GT EU meter item.tm.teslaCoilCover.name=Tesla Coil Cover item.tm.teslaCoilCoverUltimate.name=Tesla Coil Cover Rich Edition -//TODO Improve names of everything involved with tesla - -item.tm.teslaCoilCapacitor_1.name=LV Tesla Capacitor -item.tm.teslaCoilCapacitor_2.name=MV Tesla Capacitor -item.tm.teslaCoilCapacitor_3.name=HV Tesla Capacitor -item.tm.teslaCoilCapacitor_4.name=EV Tesla Capacitor -item.tm.teslaCoilCapacitor_5.name=IV Tesla Capacitor -item.tm.teslaCoilCapacitor_6.name=LuV Tesla Capacitor -item.tm.teslaCoilCapacitor_7.name=ZPM Tesla Capacitor -item.tm.teslaCoilCapacitor_8.name=UV Tesla Capacitor - death.attack.microwaving=%1$s was dehydrated by radiation. death.attack.microwaving.player=%1$s was dehydrated by radiation while fighting %2$s. -- cgit From 4cd1a33c1eabda81996aa21f706212eb442eb503 Mon Sep 17 00:00:00 2001 From: basdxz Date: Sat, 9 Mar 2019 13:06:55 +0000 Subject: Capacitor Hatch Work Capacitor hatches should now know about what capacitors exist --- .../tectech/loader/thing/MachineLoader.java | 1 + .../hatch/GT_MetaTileEntity_Hatch_Capacitor.java | 62 +++++++++++++++++++++- 2 files changed, 61 insertions(+), 2 deletions(-) (limited to 'src/main/java') 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 61ce45c031..292d446bc4 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 @@ -351,6 +351,7 @@ public class MachineLoader implements Runnable { GT_MetaTileEntity_MultiblockBase_EM.run(); GT_MetaTileEntity_Hatch_Rack.run(); + GT_MetaTileEntity_Hatch_Capacitor.run(); GT_MetaTileEntity_EM_computer.run(); GT_MetaTileEntity_EM_research.run(); GT_MetaTileEntity_EM_dataBank.run(); 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 61062f22ca..7648bfbe4a 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 @@ -1,11 +1,15 @@ package com.github.technus.tectech.thing.metaTileEntity.hatch; import com.github.technus.tectech.CommonValues; +import com.github.technus.tectech.Reference; +import com.github.technus.tectech.TecTech; import com.github.technus.tectech.Util; import com.github.technus.tectech.thing.metaTileEntity.hatch.gui.GT_Container_Capacitor; import com.github.technus.tectech.thing.metaTileEntity.hatch.gui.GT_GUIContainer_Capacitor; +import cpw.mods.fml.common.Loader; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -18,12 +22,21 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; +import java.util.HashMap; +import java.util.Map; + +import static com.github.technus.tectech.CommonValues.V; +import static com.github.technus.tectech.Util.getUniqueIdentifier; +import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; + /** * Created by Tec on 03.04.2017. */ public class GT_MetaTileEntity_Hatch_Capacitor extends GT_MetaTileEntity_Hatch { private static Textures.BlockIcons.CustomIcon EM_H; private static Textures.BlockIcons.CustomIcon EM_H_ACTIVE; + private static Map componentBinds = new HashMap<>(); + private float energyStoredFrac = 0; public GT_MetaTileEntity_Hatch_Capacitor(int aID, String aName, String aNameRegional, int aTier, String descr) { super(aID, aName, aNameRegional, aTier, 1, descr); @@ -107,11 +120,10 @@ public class GT_MetaTileEntity_Hatch_Capacitor extends GT_MetaTileEntity_Hatch { } @Override - public int getSizeInventory() {//HACK TO NOT DROP CONTENTS!!! + public int getSizeInventory() { return energyStoredFrac >= 0.25 || getBaseMetaTileEntity().isActive() ? 0 : mInventory.length; } - @Override public String[] getDescription() { return new String[]{ @@ -120,6 +132,52 @@ public class GT_MetaTileEntity_Hatch_Capacitor extends GT_MetaTileEntity_Hatch { EnumChatFormatting.AQUA + "Stores 'nergy! (for a while)" }; } + + public static void run() { + new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":tm.teslaCoilCapacitor.0", 0, 1, 1024, 1);//LV Capacitor + new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":tm.teslaCoilCapacitor.1", 1, 1, 1024, 1);//MV Capacitor + new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":tm.teslaCoilCapacitor.2", 2, 1, 1024, 1);//HV Capacitor + new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":tm.teslaCoilCapacitor.3", 3, 1, 1024, 1);//EV Capacitor + new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":tm.teslaCoilCapacitor.4", 4, 1, 1024, 1);//IV Capacitor + new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":tm.teslaCoilCapacitor.5", 5, 1, 1024, 1);//LuV Capacitor + new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":tm.teslaCoilCapacitor.6", 6, 1, 1024, 1);//ZPM Capacitor + new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":tm.teslaCoilCapacitor.7", 7, 1, 1024, 1);//UV Capacitor + } + + public static class CapacitorComponent implements Comparable { + private final String unlocalizedName; + private final long tier, current, energyMax; + private final float efficiency; + + CapacitorComponent(ItemStack is, long tier, long current, long energyMax, float efficiency) { + this(getUniqueIdentifier(is), tier, current, energyMax, efficiency); + } + + CapacitorComponent(String is, long tier, long current, long energyMax, float efficiency) { + unlocalizedName = is; + this.tier = tier; + this.current = current; + this.energyMax = energyMax; + this.efficiency = efficiency; + componentBinds.put(unlocalizedName, this); + if (DEBUG_MODE) { + TecTech.LOGGER.info("Tesla Capacitor registered: " + unlocalizedName); + } + } + + @Override + public int compareTo(GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent o) { + return unlocalizedName.compareTo(o.unlocalizedName); + } + + @Override + public boolean equals(Object obj) { + if(obj instanceof GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent) { + return compareTo((GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent) obj) == 0; + } + return false; + } + } } -- cgit From e01db77fc9868f5be2d2996122d184e3930065cb Mon Sep 17 00:00:00 2001 From: basdxz Date: Sun, 10 Mar 2019 08:14:32 +0000 Subject: Fix typo --- .../metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Capacitor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java') 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 7648bfbe4a..7277819b9b 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 @@ -166,14 +166,14 @@ public class GT_MetaTileEntity_Hatch_Capacitor extends GT_MetaTileEntity_Hatch { } @Override - public int compareTo(GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent o) { + public int compareTo(CapacitorComponent o) { return unlocalizedName.compareTo(o.unlocalizedName); } @Override public boolean equals(Object obj) { - if(obj instanceof GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent) { - return compareTo((GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent) obj) == 0; + if(obj instanceof CapacitorComponent) { + return compareTo((CapacitorComponent) obj) == 0; } return false; } -- cgit From 9a97b84b32c7be83b90fab7d5c08c20279991fec Mon Sep 17 00:00:00 2001 From: Bass Date: Sun, 10 Mar 2019 20:11:38 +0000 Subject: Nevermind merging bROKE SHIT --- .../hatch/GT_MetaTileEntity_Hatch_Capacitor.java | 86 ++++++++++++++++----- .../hatch/gui/GT_Container_Capacitor.java | 53 +++++++++---- .../hatch/gui/GT_GUIContainer_Capacitor.java | 21 +++--- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 88 ++++++++++++++++++---- 4 files changed, 190 insertions(+), 58 deletions(-) (limited to 'src/main/java') 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 7277819b9b..29b284d8a6 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 @@ -20,6 +20,7 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; import java.util.HashMap; @@ -36,15 +37,32 @@ public class GT_MetaTileEntity_Hatch_Capacitor extends GT_MetaTileEntity_Hatch { private static Textures.BlockIcons.CustomIcon EM_H; private static Textures.BlockIcons.CustomIcon EM_H_ACTIVE; private static Map componentBinds = new HashMap<>(); - private float energyStoredFrac = 0; + public float energyStoredFrac = 0; public GT_MetaTileEntity_Hatch_Capacitor(int aID, String aName, String aNameRegional, int aTier, String descr) { - super(aID, aName, aNameRegional, aTier, 1, descr); + super(aID, aName, aNameRegional, aTier, 16, descr); Util.setTier(aTier,this); } public GT_MetaTileEntity_Hatch_Capacitor(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { - super(aName, aTier, 1, aDescription, aTextures); + super(aName, aTier, 16, aDescription, aTextures); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setFloat("energyStoredFrac", energyStoredFrac); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + energyStoredFrac = aNBT.getFloat("energyStoredFrac"); + } + + @Override + public int getInventoryStackLimit() { + return 1; } @Override @@ -121,7 +139,7 @@ public class GT_MetaTileEntity_Hatch_Capacitor extends GT_MetaTileEntity_Hatch { @Override public int getSizeInventory() { - return energyStoredFrac >= 0.25 || getBaseMetaTileEntity().isActive() ? 0 : mInventory.length; + return energyStoredFrac > 0.2 || getBaseMetaTileEntity().isActive() ? 0 : mInventory.length; } @Override @@ -133,32 +151,66 @@ public class GT_MetaTileEntity_Hatch_Capacitor extends GT_MetaTileEntity_Hatch { }; } + public long[] getCapacitors() { + long tier = -1; + long tCurrent = 0; + long tEnergyMax = 0; + for (int i = 0; i < mInventory.length; i++) { + if (mInventory[i] == null || mInventory[i].stackSize != 1) { + continue; + } + CapacitorComponent cap = componentBinds.get(getUniqueIdentifier(mInventory[i])); + if (cap != null && cap.tier > tier) { + tier = cap.tier; + } + } + if (tier >= 0) { + for (int i = 0; i < mInventory.length; i++) { + if (mInventory[i] == null || mInventory[i].stackSize != 1) { + continue; + } + CapacitorComponent cap = componentBinds.get(getUniqueIdentifier(mInventory[i])); + if (cap == null) { + continue; + } + if (cap.tier < tier) { + if (getBaseMetaTileEntity().isActive()) { + mInventory[i] = null; + getBaseMetaTileEntity().setOnFire(); + } + } else { + tCurrent = +cap.current; + tEnergyMax = +cap.energyMax; + } + } + } + return new long[]{tier, tCurrent, tEnergyMax}; + } + public static void run() { - new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":tm.teslaCoilCapacitor.0", 0, 1, 1024, 1);//LV Capacitor - new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":tm.teslaCoilCapacitor.1", 1, 1, 1024, 1);//MV Capacitor - new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":tm.teslaCoilCapacitor.2", 2, 1, 1024, 1);//HV Capacitor - new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":tm.teslaCoilCapacitor.3", 3, 1, 1024, 1);//EV Capacitor - new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":tm.teslaCoilCapacitor.4", 4, 1, 1024, 1);//IV Capacitor - new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":tm.teslaCoilCapacitor.5", 5, 1, 1024, 1);//LuV Capacitor - new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":tm.teslaCoilCapacitor.6", 6, 1, 1024, 1);//ZPM Capacitor - new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":tm.teslaCoilCapacitor.7", 7, 1, 1024, 1);//UV Capacitor + new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.0", 0, 1, V[0]*512);//LV Capacitor + new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.1", 1, 1, V[1]*512);//MV Capacitor + new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.2", 2, 1, V[2]*512);//HV Capacitor + new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.3", 3, 1, V[3]*512);//EV Capacitor + new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.4", 4, 1, V[4]*512);//IV Capacitor + new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.5", 5, 1, V[5]*512);//LuV Capacitor + new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.6", 6, 1, V[6]*512);//ZPM Capacitor + new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.7", 7, 1, V[7]*512);//UV Capacitor } public static class CapacitorComponent implements Comparable { private final String unlocalizedName; private final long tier, current, energyMax; - private final float efficiency; - CapacitorComponent(ItemStack is, long tier, long current, long energyMax, float efficiency) { - this(getUniqueIdentifier(is), tier, current, energyMax, efficiency); + CapacitorComponent(ItemStack is, long tier, long current, long energyMax) { + this(getUniqueIdentifier(is), tier, current, energyMax); } - CapacitorComponent(String is, long tier, long current, long energyMax, float efficiency) { + CapacitorComponent(String is, long tier, long current, long energyMax) { unlocalizedName = is; this.tier = tier; this.current = current; this.energyMax = energyMax; - this.efficiency = efficiency; componentBinds.put(unlocalizedName, this); if (DEBUG_MODE) { TecTech.LOGGER.info("Tesla Capacitor registered: " + unlocalizedName); diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Capacitor.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Capacitor.java index f368867736..0b27dc4f04 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Capacitor.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Capacitor.java @@ -1,38 +1,61 @@ package com.github.technus.tectech.thing.metaTileEntity.hatch.gui; +import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Capacitor; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.gui.GT_ContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -/** - * Created by Tec on 09.04.2017. - */ public class GT_Container_Capacitor extends GT_ContainerMetaTile_Machine { + public boolean charged = false; + public GT_Container_Capacitor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(aInventoryPlayer, aTileEntity); } @Override public void addSlots(InventoryPlayer aInventoryPlayer) { - addSlotToContainer(new Slot(mTileEntity, 0, 80, 39)); + this.addSlotToContainer(new Slot(this.mTileEntity, 0, 53, 8)); + this.addSlotToContainer(new Slot(this.mTileEntity, 1, 71, 8)); + this.addSlotToContainer(new Slot(this.mTileEntity, 2, 89, 8)); + this.addSlotToContainer(new Slot(this.mTileEntity, 3, 107, 8)); + this.addSlotToContainer(new Slot(this.mTileEntity, 4, 53, 26)); + this.addSlotToContainer(new Slot(this.mTileEntity, 5, 71, 26)); + this.addSlotToContainer(new Slot(this.mTileEntity, 6, 89, 26)); + this.addSlotToContainer(new Slot(this.mTileEntity, 7, 107, 26)); + this.addSlotToContainer(new Slot(this.mTileEntity, 8, 53, 44)); + this.addSlotToContainer(new Slot(this.mTileEntity, 9, 71, 44)); + this.addSlotToContainer(new Slot(this.mTileEntity, 10, 89, 44)); + this.addSlotToContainer(new Slot(this.mTileEntity, 11, 107, 44)); + this.addSlotToContainer(new Slot(this.mTileEntity, 12, 53, 62)); + this.addSlotToContainer(new Slot(this.mTileEntity, 13, 71, 62)); + this.addSlotToContainer(new Slot(this.mTileEntity, 14, 89, 62)); + this.addSlotToContainer(new Slot(this.mTileEntity, 15, 107, 62)); } @Override - public int getSlotCount() { - return 1; - } + public int getSlotCount() { return 16; } + + @Override + public int getShiftClickSlotCount() { return getSlotCount(); } @Override - public int getShiftClickSlotCount() { - return 1; + public void detectAndSendChanges() { + super.detectAndSendChanges(); + if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) { + return; + } + charged = ((GT_MetaTileEntity_Hatch_Capacitor) mTileEntity.getMetaTileEntity()).energyStoredFrac > 0; } @Override public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { - if (mActive != 0) { + if (charged || mActive != 0) { return null; } return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); @@ -40,7 +63,7 @@ public class GT_Container_Capacitor extends GT_ContainerMetaTile_Machine { @Override public ItemStack transferStackInSlot(EntityPlayer aPlayer, int aSlotIndex) { - if (mActive != 0) { + if (charged || mActive != 0) { return null; } return super.transferStackInSlot(aPlayer, aSlotIndex); @@ -48,7 +71,7 @@ public class GT_Container_Capacitor extends GT_ContainerMetaTile_Machine { @Override public boolean canDragIntoSlot(Slot par1Slot) { - if (mActive != 0) { + if (charged || mActive != 0) { return false; } return super.canDragIntoSlot(par1Slot); @@ -56,7 +79,7 @@ public class GT_Container_Capacitor extends GT_ContainerMetaTile_Machine { @Override public void putStacksInSlots(ItemStack[] par1ArrayOfItemStack) { - if (mActive != 0) { + if (charged || mActive != 0) { return; } super.putStacksInSlots(par1ArrayOfItemStack); @@ -64,7 +87,7 @@ public class GT_Container_Capacitor extends GT_ContainerMetaTile_Machine { @Override protected boolean mergeItemStack(ItemStack aStack, int aStartIndex, int aSlotCount, boolean par4) { - if (mActive != 0) { + if (charged || mActive != 0) { return false; } return super.mergeItemStack(aStack, aStartIndex, aSlotCount, par4); @@ -72,7 +95,7 @@ public class GT_Container_Capacitor extends GT_ContainerMetaTile_Machine { @Override public void putStackInSlot(int par1, ItemStack par2ItemStack) { - if (mActive != 0) { + if (charged || mActive != 0) { return; } super.putStackInSlot(par1, par2ItemStack); diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Capacitor.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Capacitor.java index fbc34f1e29..3850e7dc30 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Capacitor.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Capacitor.java @@ -4,17 +4,19 @@ import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.InventoryPlayer; -/** - * Created by Tec on 09.04.2017. - */ public class GT_GUIContainer_Capacitor extends GT_GUIContainerMetaTile_Machine { private final String mName; public GT_GUIContainer_Capacitor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) { - super(new GT_Container_Capacitor(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/holder.png"); + super(new GT_Container_Capacitor(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/4by4.png"); mName = aName; } + public GT_GUIContainer_Capacitor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) { + super(new GT_Container_Capacitor(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/" + aBackground + "4by4.png"); + this.mName = aName; + } + @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { fontRendererObj.drawString(mName, 8, 4, 4210752); @@ -23,13 +25,8 @@ public class GT_GUIContainer_Capacitor extends GT_GUIContainerMetaTile_Machine { @Override protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { super.drawGuiContainerBackgroundLayer(par1, par2, par3); - int x = (width - xSize) / 2; - int y = (height - ySize) / 2; - drawTexturedModalRect(x, y, 0, 0, xSize, ySize); - if (mContainer != null) { - if (((GT_Container_Capacitor) mContainer).mActive == 1) { - drawTexturedModalRect(x + 151, y + 23, 183, 23, 18, 18); - } - } + int x = (this.width - this.xSize) / 2; + int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); } } 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 4c10b6505c..deecb27feb 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 @@ -57,6 +57,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private long outputVoltage = 0; //Tesla Voltage Output private long outputCurrent = 0; //Tesla Current Output + private long energyCapacity = 0; //Total energy the tower can store public boolean powerPassToggle = false; //Power Pass for public viewing @@ -72,6 +73,10 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private long outputCurrentParam = 0; private int scanTimeMinParam = 0; + public int vTier = -1; + public int pTier = 0; + public int sTier = 0; + //region structure private static final String[][] shape0 = new String[][]{//3 16 0 {"\u000F", "A . ",}, @@ -140,9 +145,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock return new GT_MetaTileEntity_TM_teslaCoil(mName); } - @Override - public void onRemoval(){}//Literally stops this machine from exploding if you break it with some power left, it doesn't deal with any EM ffs - @Override @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister aBlockIconRegister) { @@ -153,7 +155,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock @Override public long maxEUStore() { - return V[9] * 2; + return energyCapacity * 2; } @Override @@ -164,9 +166,31 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][4]}; } + @Override + public void onRemoval() { + super.onRemoval(); + for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { + cap.getBaseMetaTileEntity().setActive(false); + } + } + + @Override + public void stopMachine() { + super.stopMachine(); + for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { + cap.getBaseMetaTileEntity().setActive(false); + } + } + @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { + for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { + if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { + cap.getBaseMetaTileEntity().setActive(false); + } + } eCaps.clear(); + int coilX0 = 0; int coilX1 = 0; int coilX2 = 0; @@ -249,7 +273,15 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock return false; } - return structureCheck_EM(shapes[orientation], blockType, blockMetas[tier], addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, xOffset, yOffset, zOffset); + if (structureCheck_EM(shapes[orientation], blockType, blockMetas[tier], addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, xOffset, yOffset, zOffset) && eCaps.size() > 0) { + for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { + if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { + cap.getBaseMetaTileEntity().setActive(iGregTechTileEntity.isActive()); + } + } + return true; + } + return false; } @Override @@ -276,17 +308,42 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock public boolean checkRecipe_EM(ItemStack itemStack) { mEfficiencyIncrease = 10000; mMaxProgresstime = 20; + vTier = -1; + long[] capacitorData; + for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { + if (!GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { + continue; + } + if (cap.getCapacitors()[0] > vTier) { + vTier = (int) cap.getCapacitors()[0]; + } + } + if(vTier < 0){ return false; } + outputVoltage = V[vTier]; + for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { + if (!GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { + continue; + } + capacitorData = cap.getCapacitors(); + if (capacitorData[0] < vTier) { + if(getEUVar() > 0){ + cap.getBaseMetaTileEntity().setToFire(); + } + eCaps.remove(cap); + } else { + cap.getBaseMetaTileEntity().setActive(true); + outputCurrent =+ capacitorData[1]; + energyCapacity =+ capacitorData[2]; + } + } return true; } @Override public boolean onRunningTick(ItemStack aStack) { - IGregTechTileEntity mte = getBaseMetaTileEntity(); - - if (mte.isClientSide()) { + if (getBaseMetaTileEntity().isClientSide()) { return true; } - //Parametrizer hatch loader TODO Add parametrizer detection if (false) { parametrized = true; @@ -309,6 +366,13 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock float energyFrac = (float)energyStored/energyMax; + for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { + if (!GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { + continue; + } + cap.energyStoredFrac = energyFrac; + } + //Hysteresis Parameters sanity check if (parametrized && histScaleParam > 0 && histLowParam > 0 && histScaleParam <= histHighParam && histLowParam < histHighParam) { float histLowt = (float)histLowParam/histScaleParam; @@ -351,7 +415,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock if (xPosOffset == 0 && yPosOffset == 0 && zPosOffset == 0) { continue; } - IGregTechTileEntity node = mte.getIGregTechTileEntityOffset(xPosOffset, yPosOffset, zPosOffset); + IGregTechTileEntity node = getBaseMetaTileEntity().getIGregTechTileEntityOffset(xPosOffset, yPosOffset, zPosOffset); if (node == null) { continue; } @@ -366,9 +430,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock //Stuff to do if ePowerPass if (powerPassToggle) { - outputVoltage = 512;//TODO Generate depending on kind of capacitors - outputCurrent = 1;//TODO Generate depending on count of capacitors - if (parametrized && outputVoltageParam > 0 && outputVoltage > outputVoltageParam){ outputVoltage = outputVoltageParam; } @@ -415,7 +476,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } catch (Exception e) { } } - System.out.println("Something just got purged!"); eTeslaMap.remove(Rx.getKey()); } -- cgit From 295a93ffc4f9972eda8a7c6b60473553e10b1711 Mon Sep 17 00:00:00 2001 From: Bass Date: Mon, 11 Mar 2019 06:03:40 +0000 Subject: Fix Computer Rack Crash Bug --- .../multi/GT_MetaTileEntity_EM_computer.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java index c021f93260..5cc249e700 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java @@ -261,11 +261,13 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB } - @Override + @Override//Had a crash bug with breaking a rack and then the multi public void onRemoval() { super.onRemoval(); - for (GT_MetaTileEntity_Hatch_Rack r : eRacks) { - r.getBaseMetaTileEntity().setActive(false); + for (GT_MetaTileEntity_Hatch_Rack rack : eRacks) { + if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(rack)) { + rack.getBaseMetaTileEntity().setActive(false); + } } } @@ -273,8 +275,10 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB public void stopMachine() { super.stopMachine(); eAvailableData=0; - for (GT_MetaTileEntity_Hatch_Rack r : eRacks) { - r.getBaseMetaTileEntity().setActive(false); + for (GT_MetaTileEntity_Hatch_Rack rack : eRacks) { + if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(rack)) { + rack.getBaseMetaTileEntity().setActive(false); + } } } -- cgit From 9fcaa9ecac5b76ad51ef2541efcf21cbc77d2f3d Mon Sep 17 00:00:00 2001 From: basdxz Date: Mon, 11 Mar 2019 11:56:33 +0000 Subject: Yay for multi amp tesla towers! fuck I broke hysteresis again --- .../hatch/GT_MetaTileEntity_Hatch_Capacitor.java | 4 +- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 98 +++++++++++++++------- .../single/GT_MetaTileEntity_TeslaCoil.java | 3 +- 3 files changed, 70 insertions(+), 35 deletions(-) (limited to 'src/main/java') 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 29b284d8a6..b27efb59e2 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 @@ -179,8 +179,8 @@ public class GT_MetaTileEntity_Hatch_Capacitor extends GT_MetaTileEntity_Hatch { getBaseMetaTileEntity().setOnFire(); } } else { - tCurrent = +cap.current; - tEnergyMax = +cap.energyMax; + tCurrent += cap.current; + tEnergyMax += cap.energyMax; } } } 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 deecb27feb..db3e2e8065 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 @@ -309,6 +309,8 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock mEfficiencyIncrease = 10000; mMaxProgresstime = 20; vTier = -1; + energyCapacity = 0; + outputCurrent = 0; long[] capacitorData; for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { if (!GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { @@ -324,16 +326,17 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock if (!GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { continue; } + cap.getBaseMetaTileEntity().setActive(true); capacitorData = cap.getCapacitors(); if (capacitorData[0] < vTier) { - if(getEUVar() > 0){ + if(getEUVar() > 0 && capacitorData[0] != 0){ cap.getBaseMetaTileEntity().setToFire(); + System.out.println("Oman oman a hatch burst into flame!"); } eCaps.remove(cap); } else { - cap.getBaseMetaTileEntity().setActive(true); - outputCurrent =+ capacitorData[1]; - energyCapacity =+ capacitorData[2]; + outputCurrent += capacitorData[1]; + energyCapacity += capacitorData[2]; } } return true; @@ -390,6 +393,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } } + //TODO Fix this because something broke it :L //ePowerPass hist toggle if (!ePowerPass && energyFrac > histHigh) { ePowerPass = true; @@ -430,27 +434,27 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock //Stuff to do if ePowerPass if (powerPassToggle) { - if (parametrized && outputVoltageParam > 0 && outputVoltage > outputVoltageParam){ - outputVoltage = outputVoltageParam; + if (parametrized && outputVoltageParam > 0 && outputVoltage > outputVoltageParam) { + outputVoltage = outputVoltageParam; } - if (parametrized && outputCurrentParam > 0 && outputCurrent > outputCurrentParam){ - outputCurrent = outputCurrentParam; + if (parametrized && outputCurrentParam > 0 && outputCurrent > outputCurrentParam) { + outputCurrent = outputCurrentParam; } transferRadiusTower = 32; //TODO generate based on power stored transferRadiusTransceiver = 16; //TODO generate based on power stored transferRadiusCoverUltimate = 16; //TODO generate based on power stored - if(parametrized && transferRadiusTowerParam > 0 && transferRadiusTowerParam < transferRadiusTower){ + if (parametrized && transferRadiusTowerParam > 0 && transferRadiusTowerParam < transferRadiusTower) { transferRadiusTower = transferRadiusTowerParam; } - if(parametrized && transferRadiusTransceiverParam > 0 && transferRadiusTransceiverParam < transferRadiusTransceiver){ + if (parametrized && transferRadiusTransceiverParam > 0 && transferRadiusTransceiverParam < transferRadiusTransceiver) { transferRadiusTransceiver = transferRadiusTransceiverParam; } - if(parametrized && transferRadiusCoverUltimateParam > 0 && transferRadiusCoverUltimateParam < transferRadiusCoverUltimate){ + if (parametrized && transferRadiusCoverUltimateParam > 0 && transferRadiusCoverUltimateParam < transferRadiusCoverUltimate) { transferRadiusCoverUltimate = transferRadiusCoverUltimateParam; } @@ -480,32 +484,62 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } //Power transfer - for (Map.Entry Rx : entriesSortedByValues(eTeslaMap)) { - IGregTechTileEntity node = Rx.getKey(); - IMetaTileEntity nodeInside = node.getMetaTileEntity(); - long euTran = outputVoltage; - - if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && Rx.getValue() <= transferRadiusTower) { - GT_MetaTileEntity_TM_teslaCoil nodeTesla = (GT_MetaTileEntity_TM_teslaCoil) nodeInside; - if (!nodeTesla.powerPassToggle) { - if (nodeTesla.getEUVar() + euTran <= (nodeTesla.maxEUStore() / 2)) { - setEUVar(getEUVar() - euTran); - node.increaseStoredEnergyUnits(euTran, true); + long sparks = outputCurrent; + System.out.println("Output Current at: " + outputCurrent + "A" ); + long sparkz = 0; + while (sparks > 0) { + boolean idle = true; + for (Map.Entry Rx : entriesSortedByValues(eTeslaMap)) { + if(energyStored > outputVoltage) { + IGregTechTileEntity node = Rx.getKey(); + IMetaTileEntity nodeInside = node.getMetaTileEntity(); + long euTran = outputVoltage;//TODO Efficency? + + if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && Rx.getValue() <= transferRadiusTower) { + GT_MetaTileEntity_TM_teslaCoil nodeTesla = (GT_MetaTileEntity_TM_teslaCoil) nodeInside; + if (!nodeTesla.powerPassToggle) { + if (nodeTesla.getEUVar() + euTran <= (nodeTesla.maxEUStore() / 2)) { + setEUVar(getEUVar() - euTran); + node.increaseStoredEnergyUnits(euTran, true); + sparks--; + sparkz++; + idle = false; + } + } + } else if (nodeInside instanceof GT_MetaTileEntity_TeslaCoil && Rx.getValue() <= transferRadiusTransceiver) { + GT_MetaTileEntity_TeslaCoil nodeTesla = (GT_MetaTileEntity_TeslaCoil) nodeInside; + if (!nodeTesla.powerPassToggle) { + if (node.injectEnergyUnits((byte) 6, euTran, 1L) > 0L) { + setEUVar(getEUVar() - euTran); + sparks--; + sparkz++; + idle = false; + } + } + } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil_Ultimate) && Rx.getValue() <= transferRadiusCoverUltimate) { + if (node.injectEnergyUnits((byte) 1, euTran, 1L) > 0L) { + setEUVar(getEUVar() - euTran); + sparks--; + sparkz++; + idle = false; + } } - } - } else if (nodeInside instanceof GT_MetaTileEntity_TeslaCoil && Rx.getValue() <= transferRadiusTransceiver) { - GT_MetaTileEntity_TeslaCoil nodeTesla = (GT_MetaTileEntity_TeslaCoil) nodeInside; - if (!nodeTesla.powerPassToggle) { - if (node.injectEnergyUnits((byte)6, euTran, 1L) > 0L) { - setEUVar(getEUVar() - euTran); + if (sparks == 0) { + System.out.println("Fresh out of sparks!"); + break; } + } else { + idle = true; + System.out.println("ENERGY LOW!"); + break; } - } else if ((node.getCoverBehaviorAtSide((byte)1) instanceof GT_Cover_TM_TeslaCoil_Ultimate) && Rx.getValue() <= transferRadiusCoverUltimate){ - if (node.injectEnergyUnits((byte)1, euTran, 1L) > 0L) { - setEUVar(getEUVar() - euTran); - } + } + if (idle) { + System.out.println("IDLE DROP!"); + break; } } + System.out.println("I sent a total of :" + sparkz + " This tick!"); } return true; } 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 efb0941f41..c1a66eb83b 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 @@ -2,6 +2,7 @@ package com.github.technus.tectech.thing.metaTileEntity.single; import com.github.technus.tectech.Util; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil; +import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil_Ultimate; import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_TM_teslaCoil; import eu.usrv.yamcore.auxiliary.PlayerChatHelper; import gregtech.api.interfaces.ITexture; @@ -243,7 +244,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB idle = false; } } - } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil) && Rx.getValue() <= transferRadiusCover) { + } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil) && !(node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil_Ultimate) && Rx.getValue() <= transferRadiusCover) { if (node.injectEnergyUnits((byte) 1, outputVoltageInjectable, 1L) > 0L) { setEUVar(getEUVar() - outputVoltageConsumption); outputCurrent--; -- cgit From 182160ff037043f1cad80820bdf4fcd23a8ebf9c Mon Sep 17 00:00:00 2001 From: Tec Date: Mon, 11 Mar 2019 18:55:20 +0100 Subject: fix small overlook --- .../multi/em_machine/GT_MetaTileEntity_EM_machine.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java index c29da7208a..fc8a6c914e 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java @@ -7,13 +7,7 @@ import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInsta import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.block.QuantumStuffBlock; import com.github.technus.tectech.thing.metaTileEntity.IConstructable; -import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_junction; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.HatchAdder; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.MultiblockControl; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.NameFunction; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.StatusFunction; +import com.github.technus.tectech.thing.metaTileEntity.multi.base.*; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.block.Block; @@ -88,7 +82,7 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa } return STATUS_NEUTRAL; }; - private static final NameFunction ROUTE_NAME= + private static final NameFunction ROUTE_NAME= (base,p)->(p.parameterId()==0?"Source ":"Destination ")+p.hatchId(); //endregion -- cgit From fbebda6f5269dbcf0da3f5fa809b7595a31a2dcb Mon Sep 17 00:00:00 2001 From: Tec Date: Mon, 11 Mar 2019 18:57:27 +0100 Subject: just check if valid --- .../thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java index 66b67236de..e61fc977c1 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java @@ -236,8 +236,10 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB @Override protected void afterRecipeCheckFailed() { super.afterRecipeCheckFailed(); - for (GT_MetaTileEntity_Hatch_Rack r : eRacks) { - r.getBaseMetaTileEntity().setActive(false); + for (GT_MetaTileEntity_Hatch_Rack rack : eRacks) { + if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(rack)) { + rack.getBaseMetaTileEntity().setActive(false); + } } } -- cgit From 591c1720f5d48c50be1477b7f344d736a5b52d74 Mon Sep 17 00:00:00 2001 From: Tec Date: Mon, 11 Mar 2019 18:59:27 +0100 Subject: remove use of old api --- .../tectech/loader/thing/MachineLoader.java | 1 - .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 26 +++++++++------------- 2 files changed, 10 insertions(+), 17 deletions(-) (limited to 'src/main/java') 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 30751bc961..032cc4b685 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 @@ -349,7 +349,6 @@ public class MachineLoader implements Runnable { // =================================================================================================== GT_MetaTileEntity_Hatch_Rack.run(); - GT_MetaTileEntity_TM_teslaCoil.run(); GT_MetaTileEntity_DataReader.run(); 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 db3e2e8065..58c212eeb6 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 @@ -3,8 +3,12 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.CommonValues; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil_Ultimate; import com.github.technus.tectech.thing.metaTileEntity.IConstructable; -import com.github.technus.tectech.thing.metaTileEntity.hatch.*; +import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Capacitor; +import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoMulti; +import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti; +import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Param; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; +import com.github.technus.tectech.thing.metaTileEntity.multi.base.HatchAdder; import com.github.technus.tectech.thing.metaTileEntity.single.GT_MetaTileEntity_TeslaCoil; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -19,12 +23,13 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; import static com.github.technus.tectech.CommonValues.V; import static com.github.technus.tectech.Util.StructureBuilder; import static com.github.technus.tectech.Util.entriesSortedByValues; -import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static gregtech.api.GregTech_API.*; import static gregtech.api.enums.GT_Values.E; @@ -40,7 +45,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private int scanTimeMin = 100; //Min scan time in ticks private int scanTimeTill = scanTimeMin; //Set default scan time - private Map eTeslaMap = new HashMap(); //Tesla Map to map them tesla bois! + private Map eTeslaMap = new HashMap<>(); //Tesla Map to map them tesla bois! private final ArrayList eCaps = new ArrayList<>(); //Capacitor List private float histLow = 0.25F; //Power pass is disabled if power is under this fraction @@ -121,7 +126,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private static final byte[] blockMetaT1 = new byte[]{15, 1, 13, 0}; private static final byte[] blockMetaT2 = new byte[]{15, 2, 13, 0}; private static final byte[][] blockMetas = new byte[][]{blockMetaT0,blockMetaT1,blockMetaT2}; - private static final String[] addingMethods = new String[]{"addCapacitorToMachineList", "addFrameToMachineList"}; + private final HatchAdder[] addingMethods = new HatchAdder[]{this::addCapacitorToMachineList, this::addFrameToMachineList}; private static final short[] casingTextures = new short[]{29, 0}; private static final Block[] blockTypeFallback = new Block[]{sBlockCasings2, null}; private static final byte[] blockMetaFallback = new byte[]{13, 0}; @@ -586,15 +591,4 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } return false; } - - public static void run() { - try { - adderMethodMap.put("addFrameToMachineList", GT_MetaTileEntity_TM_teslaCoil.class.getMethod("addFrameToMachineList", IGregTechTileEntity.class, int.class)); - adderMethodMap.put("addCapacitorToMachineList", GT_MetaTileEntity_TM_teslaCoil.class.getMethod("addCapacitorToMachineList", IGregTechTileEntity.class, int.class)); - } catch (NoSuchMethodException e) { - if (DEBUG_MODE) { - e.printStackTrace(); - } - } - } } -- cgit From 8b9f4ba961b84094daa499e6df2704ab05f87191 Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 9 Jul 2019 18:21:47 +0100 Subject: Tesla Casings Addition wo lo lo~ --- .../technus/tectech/loader/thing/ThingsLoader.java | 7 +- .../technus/tectech/thing/CustomItemList.java | 2 +- .../tectech/thing/casing/GT_Block_CasingsBA0.java | 114 +++++++++++++++++++++ .../tectech/thing/casing/GT_Block_CasingsTT.java | 61 ----------- .../tectech/thing/casing/GT_Item_CasingsBA0.java | 70 +++++++++++++ .../tectech/thing/casing/GT_Item_CasingsTT.java | 42 +------- .../tectech/thing/casing/TT_Container_Casings.java | 2 + .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 25 +++-- 8 files changed, 206 insertions(+), 117 deletions(-) create mode 100644 src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java create mode 100644 src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsBA0.java (limited to 'src/main/java') 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 a0ce184c4e..13d8861d31 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 @@ -7,10 +7,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_CasingsNH; -import com.github.technus.tectech.thing.casing.GT_Block_CasingsTT; -import com.github.technus.tectech.thing.casing.GT_Block_HintTT; -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; @@ -34,6 +31,8 @@ public class ThingsLoader implements Runnable { TecTech.LOGGER.info("Added texture page if was null"); TT_Container_Casings.sBlockCasingsTT = new GT_Block_CasingsTT(); TecTech.LOGGER.info("Elemental Casing registered"); + TT_Container_Casings.sBlockCasingsBA0 = new GT_Block_CasingsBA0(); + TecTech.LOGGER.info("Nikolai's Casing registered"); TT_Container_Casings.sHintCasingsTT = new GT_Block_HintTT(); TecTech.LOGGER.info("Hint Blocks registered"); 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 8d77610ffc..b52298d1a2 100644 --- a/src/main/java/com/github/technus/tectech/thing/CustomItemList.java +++ b/src/main/java/com/github/technus/tectech/thing/CustomItemList.java @@ -78,7 +78,7 @@ public enum CustomItemList implements IItemContainer { eM_Containment, eM_Containment_Field, eM_Containment_Advanced, eM_Coil, eM_Teleportation, eM_Dimensional, eM_Ultimate_Containment, eM_Ultimate_Containment_Advanced, eM_Ultimate_Containment_Field, eM_Spacetime, eM_Computer_Casing, eM_Computer_Bus, eM_Computer_Vent, eM_Hollow, eM_Power, debugBlock, - tM_TeslaBase, tM_TeslaToroid, tM_TeslaFrame, tM_TeslaPrimary_0, tM_TeslaPrimary_1, tM_TeslaPrimary_2, tM_TeslaSecondary_0, tM_TeslaSecondary_1, tM_TeslaSecondary_2, + tM_TeslaBase, tM_TeslaToroid, tM_TeslaFrame, tM_TeslaPrimary_0, tM_TeslaPrimary_1, tM_TeslaPrimary_2, tM_TeslaPrimary_3, tM_TeslaPrimary_4, tM_TeslaPrimary_5, Machine_Multi_Microwave, Machine_Multi_teslaCoil, Machine_Multi_Transformer, diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java new file mode 100644 index 0000000000..50559c0582 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java @@ -0,0 +1,114 @@ +package com.github.technus.tectech.thing.casing; + +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 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; + +import java.util.List; + +import static com.github.technus.tectech.TecTech.tectechTexturePage1; + +/** + * Created by danie_000 on 03.10.2016. + */ +public class GT_Block_CasingsBA0 extends GT_Block_Casings_Abstract { + public static final byte texturePage=tectechTexturePage1; + public static final short textureOffset = texturePage << 7;//Start of PAGE 8 (which is the 9th page) (8*128) + private static IIcon tM0, tM1, tM2, tM3, tM4, tM5, tM6, tM7, tM8; + private static IIcon[] debug = new IIcon[6]; + + public GT_Block_CasingsBA0() { + super(GT_Item_CasingsBA0.class, "gt.blockcasingsBA0", GT_Material_Casings.INSTANCE); + for (byte b = 0; b < 16; b = (byte) (b + 1)) { + Textures.BlockIcons.casingTexturePages[texturePage][b] = new GT_CopiedBlockTexture(this, 6, b); + /*IMPORTANT for block recoloring**/ + } + + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "T0 Primary Tesla Windings");//TODO Decide tesla coil winding materials to rename + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "T1 Primary Tesla Windings"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "T2 Primary Tesla Windings"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "T3 Primary Tesla Windings"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "T4 Primary Tesla Windings"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "T5 Primary Tesla Windings"); + + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Tesla Base Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Tesla Toroid Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Tesla Structural Frame"); + + CustomItemList.tM_TeslaPrimary_0.set(new ItemStack(this, 1, 0)); + CustomItemList.tM_TeslaPrimary_1.set(new ItemStack(this, 1, 1)); + CustomItemList.tM_TeslaPrimary_2.set(new ItemStack(this, 1, 2)); + CustomItemList.tM_TeslaPrimary_3.set(new ItemStack(this, 1, 3)); + CustomItemList.tM_TeslaPrimary_4.set(new ItemStack(this, 1, 4)); + CustomItemList.tM_TeslaPrimary_5.set(new ItemStack(this, 1, 5)); + + CustomItemList.tM_TeslaBase.set(new ItemStack(this, 1, 6)); + CustomItemList.tM_TeslaToroid.set(new ItemStack(this, 1, 7)); + CustomItemList.tM_TeslaFrame.set(new ItemStack(this, 1, 8)); + } + + @Override + public void registerBlockIcons(IIconRegister aIconRegister) { + tM0 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); + tM1 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); + tM2 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); + tM3 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); + tM4 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); + tM5 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); + + tM6 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); + tM7 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); + tM8 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); + } + + @Override + public IIcon getIcon(int aSide, int aMeta) { + switch (aMeta) { + case 0: + return tM0; + case 1: + return tM1; + case 2: + return tM2; + case 3: + return tM3; + case 4: + return tM4; + case 5: + return tM5; + case 6: + return tM6; + case 7: + return tM7; + case 8: + return tM8; + 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); + } + + @Override + public void getSubBlocks(Item aItem, CreativeTabs par2CreativeTabs, List aList) { + for (int i = 0; i <= 8; i++) { + aList.add(new ItemStack(aItem, 1, i)); + } + } +} diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java index 3f513741d2..639e68fef6 100644 --- a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java @@ -26,7 +26,6 @@ public class GT_Block_CasingsTT extends GT_Block_Casings_Abstract { public static final byte texturePage=tectechTexturePage1; public static final short textureOffset = texturePage << 7;//Start of PAGE 8 (which is the 9th page) (8*128) private static IIcon eM0, eM1, eM1s, eM2, eM2s, eM3, eM3s, eM4, eM5, eM6, eM7, eM7s, eM8, eM9, eM10, eM11, eM12, eM13, eM14; - private static IIcon tM0, tM1, tM2, tM3, tM4, tM5, tM6, tM7, tM8; private static IIcon[] debug = new IIcon[6]; public GT_Block_CasingsTT() { @@ -58,19 +57,6 @@ public class GT_Block_CasingsTT extends GT_Block_Casings_Abstract { GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Debug Sides");//NOT REGISTER AS TEXTURE FOR HATCHES! - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".200.name", "Tesla Base Casing"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".201.name", "Tesla Toroid Casing"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".202.name", "Tesla Structural Frame"); - - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".203.name", "T0 Primary Tesla Windings");//TODO Decide tesla coil winding materials to rename - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".204.name", "T1 Primary Tesla Windings"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".205.name", "T2 Primary Tesla Windings"); - - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".206.name", "T3 Primary Tesla Windings"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".207.name", "T4 Primary Tesla Windings"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".208.name", "T5 Primary Tesla Windings"); - - CustomItemList.eM_Power.set(new ItemStack(this, 1, 0)); CustomItemList.eM_Computer_Casing.set(new ItemStack(this, 1, 1)); @@ -93,18 +79,6 @@ public class GT_Block_CasingsTT extends GT_Block_Casings_Abstract { CustomItemList.eM_Ultimate_Containment_Field.set(new ItemStack(this, 1, 14)); CustomItemList.debugBlock.set(new ItemStack(this, 1, 15)); - - CustomItemList.tM_TeslaBase.set(new ItemStack(this, 1, 200)); - CustomItemList.tM_TeslaToroid.set(new ItemStack(this, 1, 201)); - CustomItemList.tM_TeslaFrame.set(new ItemStack(this, 1, 202)); - - CustomItemList.tM_TeslaPrimary_0.set(new ItemStack(this, 1, 203)); - CustomItemList.tM_TeslaPrimary_1.set(new ItemStack(this, 1, 204)); - CustomItemList.tM_TeslaPrimary_2.set(new ItemStack(this, 1, 205)); - - CustomItemList.tM_TeslaSecondary_0.set(new ItemStack(this, 1, 206)); - CustomItemList.tM_TeslaSecondary_1.set(new ItemStack(this, 1, 207)); - CustomItemList.tM_TeslaSecondary_2.set(new ItemStack(this, 1, 208)); } @Override @@ -141,18 +115,6 @@ public class GT_Block_CasingsTT extends GT_Block_Casings_Abstract { debug[3] = aIconRegister.registerIcon("gregtech:iconsets/DEBUG_3"); debug[4] = aIconRegister.registerIcon("gregtech:iconsets/DEBUG_4"); debug[5] = aIconRegister.registerIcon("gregtech:iconsets/DEBUG_5"); - - tM0 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER");//TODO Configure custom tesla texture sets - tM1 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); - tM2 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); - - tM3 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); - tM4 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); - tM5 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); - - tM6 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); - tM7 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); - tM8 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); } @Override @@ -202,24 +164,6 @@ public class GT_Block_CasingsTT extends GT_Block_Casings_Abstract { return eM14; case 15: return debug[aSide]; - case 200: - return tM0; - case 201: - return tM1; - case 202: - return tM2; - case 203: - return tM3; - case 204: - return tM4; - case 205: - return tM5; - case 206: - return tM6; - case 207: - return tM7; - case 208: - return tM8; default: return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); } @@ -234,13 +178,8 @@ public class GT_Block_CasingsTT extends GT_Block_Casings_Abstract { @Override public void getSubBlocks(Item aItem, CreativeTabs par2CreativeTabs, List aList) { - //Add Tec's Casings for (int i = 0; i <= 15; i++) { aList.add(new ItemStack(aItem, 1, i)); } - //Add Bass' Casings - for (int i = 200; i <= 208; i++) { - aList.add(new ItemStack(aItem, 1, i)); - } } } 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 new file mode 100644 index 0000000000..0c84692dba --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsBA0.java @@ -0,0 +1,70 @@ +package com.github.technus.tectech.thing.casing; + +import gregtech.common.blocks.GT_Item_Casings_Abstract; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +import java.util.List; + +import static com.github.technus.tectech.CommonValues.*; + +/** + * Created by danie_000 on 03.10.2016. + */ +public class GT_Item_CasingsBA0 extends GT_Item_Casings_Abstract { + public GT_Item_CasingsBA0(Block par1) { + super(par1); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + if(aStack.getItemDamage() < 15) { + aList.add(BASS_MARK); + } else { + aList.add(COSMIC_MARK); + } + switch (aStack.getItemDamage()) { + case 0://"T0 Primary Tesla Windings" + aList.add("Well suited for high power applications."); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "The power levels are rising!"); + break; + case 1://"T1 Primary Tesla Windings" + aList.add("Nice and clean casing."); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Dust can break it!?"); + break; + case 2://"T2 Primary Tesla Windings" + aList.add("Air vent with a filter."); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Perfectly muffled sound!"); + break; + case 3://"T3 Primary Tesla Windings" + aList.add("Contains high bandwidth bus"); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "couple thousand qubits wide."); + break; + case 4://"T4 Primary Tesla Windings" + aList.add("Stops elemental things."); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Radiation and emotions too..."); + break; + case 5://"T5 Primary Tesla Windings" + aList.add("Cooling and stabilization."); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "A comfortable machine bed."); + break; + case 6://"Tesla Base Casing" + aList.add("Creates a field that..."); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "can stop even force carriers."); + break; + case 7://"Tesla Toroid Casing" + aList.add("Well it does things too..."); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "[Use this coil!]"); + break; + case 8://"Tesla Structural Frame" + aList.add("Reinforced accelerator tunnel."); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Most advanced pipe ever."); + break; + default://WTF? + aList.add("Damn son where did you get that!?"); + aList.add(EnumChatFormatting.BLUE.toString() + "From outer space... I guess..."); + } + } +} diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsTT.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsTT.java index 8137a1d655..2fd58c408f 100644 --- a/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsTT.java +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsTT.java @@ -18,14 +18,10 @@ public class GT_Item_CasingsTT extends GT_Item_Casings_Abstract { super(par1); } - @Override //TODO Negotiate Casing space with Tec + @Override public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { if(aStack.getItemDamage() < 15) { aList.add(TEC_MARK_EM); - } else if ((aStack.getItemDamage() < 200)) { - aList.add(TEC_MARK_GENERAL); - } else if (aStack.getItemDamage() < 300){ - aList.add(BASS_MARK); } else { aList.add(COSMIC_MARK); } @@ -94,42 +90,6 @@ public class GT_Item_CasingsTT extends GT_Item_Casings_Abstract { aList.add("Lazy man way of determining sides."); aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); break; - case 200://"Tesla Base Casing" - aList.add("Lazy man way of determining sides."); - aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); - break; - case 201://"Tesla Toroid Casing" - aList.add("Lazy man way of determining sides."); - aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); - break; - case 202://"Tesla Structural Frame" - aList.add("Lazy man way of determining sides."); - aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); - break; - case 203://"T0 Primary Tesla Windings" - aList.add("Lazy man way of determining sides."); - aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); - break; - case 204://"T1 Primary Tesla Windings" - aList.add("Lazy man way of determining sides."); - aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); - break; - case 205://"T2 Primary Tesla Windings" - aList.add("Lazy man way of determining sides."); - aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); - break; - case 206://"T0 Secondary Tesla Windings" - aList.add("Lazy man way of determining sides."); - aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); - break; - case 207://"T1 Secondary Tesla Windings" - aList.add("Lazy man way of determining sides."); - aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); - break; - case 208://"T2 Secondary Tesla Windings" - aList.add("Lazy man way of determining sides."); - aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); - break; default://WTF? aList.add("Damn son where did you get that!?"); aList.add(EnumChatFormatting.BLUE.toString() + "From outer space... I guess..."); diff --git a/src/main/java/com/github/technus/tectech/thing/casing/TT_Container_Casings.java b/src/main/java/com/github/technus/tectech/thing/casing/TT_Container_Casings.java index 851046f34b..071a4ae28f 100644 --- a/src/main/java/com/github/technus/tectech/thing/casing/TT_Container_Casings.java +++ b/src/main/java/com/github/technus/tectech/thing/casing/TT_Container_Casings.java @@ -8,6 +8,8 @@ import net.minecraft.block.Block; public final class TT_Container_Casings { public static Block sBlockCasingsTT; public static Block sHintCasingsTT; + public static Block sBlockCasingsBA0; + public static Block sBlockCasingsNH; private TT_Container_Casings() {} 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 58c212eeb6..75f849d9ac 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 @@ -31,6 +31,8 @@ import static com.github.technus.tectech.CommonValues.V; import static com.github.technus.tectech.Util.StructureBuilder; import static com.github.technus.tectech.Util.entriesSortedByValues; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; +import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsBA0; +import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static gregtech.api.GregTech_API.*; import static gregtech.api.enums.GT_Values.E; @@ -121,11 +123,14 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock }; private static final String[][][] shapes = new String[][][]{shape0,shape1,shape2,shape3}; - private static final Block[] blockType = new Block[]{sBlockCasings1, sBlockCasings5, sBlockCasings2, sBlockCasings5};//TODO Give it it's own casing type, add a primary coil type, add a secondary coil type and add toroid casing type - private static final byte[] blockMetaT0 = new byte[]{15, 0, 13, 0}; - private static final byte[] blockMetaT1 = new byte[]{15, 1, 13, 0}; - private static final byte[] blockMetaT2 = new byte[]{15, 2, 13, 0}; - private static final byte[][] blockMetas = new byte[][]{blockMetaT0,blockMetaT1,blockMetaT2}; + private static final Block[] blockType = new Block[]{sBlockCasingsBA0,sBlockCasingsBA0,sBlockCasingsBA0,sBlockCasingsBA0}; + private static final byte[] blockMetaT0 = new byte[]{7, 0, 6, 8}; + private static final byte[] blockMetaT1 = new byte[]{7, 1, 6, 8}; + private static final byte[] blockMetaT2 = new byte[]{7, 2, 6, 8}; + private static final byte[] blockMetaT3 = new byte[]{7, 3, 6, 8}; + private static final byte[] blockMetaT4 = new byte[]{7, 4, 6, 8}; + private static final byte[] blockMetaT5 = new byte[]{7, 5, 6, 8}; + private static final byte[][] blockMetas = new byte[][]{blockMetaT0,blockMetaT1,blockMetaT2,blockMetaT3,blockMetaT4,blockMetaT5}; private final HatchAdder[] addingMethods = new HatchAdder[]{this::addCapacitorToMachineList, this::addFrameToMachineList}; private static final short[] casingTextures = new short[]{29, 0}; private static final Block[] blockTypeFallback = new Block[]{sBlockCasings2, null}; @@ -250,25 +255,25 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock int yOffset; int zOffset; - if (coil0 == sBlockCasings5) { + if (coil0 == sBlockCasingsTT) { xOffset = 3; yOffset = 16; zOffset = 0; orientation = 0; tier = iGregTechTileEntity.getMetaIDOffset(coilX0, coilY0, coilZ0); - } else if (coil1 == sBlockCasings5) { + } else if (coil1 == sBlockCasingsTT) { xOffset = 3; yOffset = 0; zOffset = 0; orientation = 1; tier = iGregTechTileEntity.getMetaIDOffset(coilX0, -coilY0, coilZ0); - } else if (coil2 == sBlockCasings5) { + } else if (coil2 == sBlockCasingsTT) { xOffset = 16; yOffset = 3; zOffset = 0; orientation = 2; tier = iGregTechTileEntity.getMetaIDOffset(coilX1, coilY1, coilZ1); - } else if (coil3 == sBlockCasings5) { + } else if (coil3 == sBlockCasingsTT) { xOffset = 0; yOffset = 3; zOffset = 0; @@ -291,7 +296,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock @Override public void construct(int stackSize, boolean hintsOnly) { - StructureBuilder(shapes[0], blockType, blockMetas[(stackSize-1)%3], 3, 16, 0, getBaseMetaTileEntity(), hintsOnly); + StructureBuilder(shapes[0], blockType, blockMetas[(stackSize-1)%6], 3, 16, 0, getBaseMetaTileEntity(), hintsOnly); } @Override -- cgit From 9270a25f773e0f8ecf39418c020f64209708704b Mon Sep 17 00:00:00 2001 From: Tec Date: Tue, 9 Jul 2019 19:30:09 +0200 Subject: shift the texture page occupation to remove overlap --- .../com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java index 50559c0582..a9baeeacd0 100644 --- a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java @@ -24,14 +24,13 @@ import static com.github.technus.tectech.TecTech.tectechTexturePage1; */ public class GT_Block_CasingsBA0 extends GT_Block_Casings_Abstract { public static final byte texturePage=tectechTexturePage1; - public static final short textureOffset = texturePage << 7;//Start of PAGE 8 (which is the 9th page) (8*128) + public static final short textureOffset = (texturePage << 7)+16;//Start of PAGE 8 (which is the 9th page) (8*128)+16 private static IIcon tM0, tM1, tM2, tM3, tM4, tM5, tM6, tM7, tM8; - private static IIcon[] debug = new IIcon[6]; public GT_Block_CasingsBA0() { super(GT_Item_CasingsBA0.class, "gt.blockcasingsBA0", GT_Material_Casings.INSTANCE); for (byte b = 0; b < 16; b = (byte) (b + 1)) { - Textures.BlockIcons.casingTexturePages[texturePage][b] = new GT_CopiedBlockTexture(this, 6, b); + Textures.BlockIcons.casingTexturePages[texturePage][b+16] = new GT_CopiedBlockTexture(this, 6, b); /*IMPORTANT for block recoloring**/ } -- cgit From a875f2899b632c1f0b1277cd67c52d7addb44480 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 13 Jul 2019 10:03:30 +0200 Subject: Tesla work more??? BLINKEN LIGHTS!! --- .../tectech/loader/thing/MachineLoader.java | 2 + .../tectech/thing/casing/GT_Block_CasingsBA0.java | 103 +++++++-- .../tectech/thing/casing/GT_Item_CasingsBA0.java | 2 +- .../tectech/thing/item/TeslaCoilCapacitor.java | 8 +- .../hatch/GT_MetaTileEntity_Hatch_Capacitor.java | 16 +- .../multi/GT_MetaTileEntity_TM_microwave.java | 4 +- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 254 +++++++++++++-------- .../single/GT_MetaTileEntity_TeslaCoil.java | 2 +- .../textures/blocks/iconsets/CoilPrimary.png | Bin 631 -> 0 bytes .../textures/blocks/iconsets/CoilSecondary.png | Bin 745 -> 0 bytes .../textures/blocks/iconsets/OVERLAY_CAPS.png | Bin 527 -> 0 bytes .../blocks/iconsets/TM_TESLA_BASE_SIDES.png | Bin 0 -> 592 bytes .../blocks/iconsets/TM_TESLA_BASE_TOP_BOTTOM.png | Bin 0 -> 606 bytes .../textures/blocks/iconsets/TM_TESLA_CAPS.png | Bin 0 -> 527 bytes .../blocks/iconsets/TM_TESLA_CAPS_ACTIVE.png | Bin 0 -> 527 bytes .../textures/blocks/iconsets/TM_TESLA_TOROID.png | Bin 0 -> 619 bytes .../iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_0.png | Bin 0 -> 631 bytes .../iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_1.png | Bin 0 -> 631 bytes .../iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_2.png | Bin 0 -> 631 bytes .../iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_3.png | Bin 0 -> 631 bytes .../iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_4.png | Bin 0 -> 631 bytes .../iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_5.png | Bin 0 -> 631 bytes .../TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_0.png | Bin 0 -> 606 bytes .../TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_1.png | Bin 0 -> 606 bytes .../TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_2.png | Bin 0 -> 606 bytes .../TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_3.png | Bin 0 -> 606 bytes .../TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_4.png | Bin 0 -> 606 bytes .../TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_5.png | Bin 0 -> 606 bytes .../blocks/iconsets/TM_TESLA_WINDING_SECONDARY.png | Bin 0 -> 745 bytes .../textures/blocks/iconsets/TeslaBase.png | Bin 592 -> 0 bytes .../textures/blocks/iconsets/TeslaTopBottom.png | Bin 606 -> 0 bytes .../textures/blocks/iconsets/ToroidBase.png | Bin 619 -> 0 bytes 32 files changed, 260 insertions(+), 131 deletions(-) delete mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/CoilPrimary.png delete mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/CoilSecondary.png delete mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_CAPS.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_BASE_SIDES.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_BASE_TOP_BOTTOM.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_CAPS.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_CAPS_ACTIVE.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_TOROID.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_0.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_1.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_2.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_3.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_4.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_5.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_0.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_1.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_2.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_3.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_4.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_5.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_SECONDARY.png delete mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TeslaBase.png delete mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TeslaTopBottom.png delete mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/ToroidBase.png (limited to 'src/main/java') 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 cc864ab03d..dcd7f526d7 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 @@ -642,6 +642,8 @@ public class MachineLoader implements Runnable { GT_MetaTileEntity_DataReader.run(); + GT_MetaTileEntity_Hatch_Capacitor.run(); + if (!Loader.isModLoaded(Reference.DREAMCRAFT)) { new NoDreamCraftMachineLoader().run(); } diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java index a9baeeacd0..4042187361 100644 --- a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java @@ -25,7 +25,16 @@ import static com.github.technus.tectech.TecTech.tectechTexturePage1; public class GT_Block_CasingsBA0 extends GT_Block_Casings_Abstract { public static final byte texturePage=tectechTexturePage1; public static final short textureOffset = (texturePage << 7)+16;//Start of PAGE 8 (which is the 9th page) (8*128)+16 - private static IIcon tM0, tM1, tM2, tM3, tM4, tM5, tM6, tM7, tM8; + + private static IIcon[] tM0 = new IIcon[2]; + private static IIcon[] tM1 = new IIcon[2]; + private static IIcon[] tM2 = new IIcon[2]; + private static IIcon[] tM3 = new IIcon[2]; + private static IIcon[] tM4 = new IIcon[2]; + private static IIcon[] tM5 = new IIcon[2]; + private static IIcon[] tM6 = new IIcon[2]; + private static IIcon tM7; + private static IIcon[] tM8 = new IIcon[2]; public GT_Block_CasingsBA0() { super(GT_Item_CasingsBA0.class, "gt.blockcasingsBA0", GT_Material_Casings.INSTANCE); @@ -43,7 +52,7 @@ public class GT_Block_CasingsBA0 extends GT_Block_Casings_Abstract { GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Tesla Base Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Tesla Toroid Casing"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Tesla Structural Frame"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Tesla Secondary Windings"); CustomItemList.tM_TeslaPrimary_0.set(new ItemStack(this, 1, 0)); CustomItemList.tM_TeslaPrimary_1.set(new ItemStack(this, 1, 1)); @@ -59,39 +68,95 @@ public class GT_Block_CasingsBA0 extends GT_Block_Casings_Abstract { @Override public void registerBlockIcons(IIconRegister aIconRegister) { - tM0 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); - tM1 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); - tM2 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); - tM3 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); - tM4 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); - tM5 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); + tM0[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_0"); + tM0[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_0"); + tM1[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_1"); + tM1[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_1"); + tM2[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_2"); + tM2[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_2"); + tM3[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_3"); + tM3[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_3"); + tM4[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_4"); + tM4[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_4"); + tM5[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_5"); + tM5[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_5"); - tM6 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); - tM7 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); - tM8 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); + tM6[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_BASE_TOP_BOTTOM"); + tM6[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_BASE_SIDES"); + tM7 = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_TOROID"); + tM8[0] = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); + tM8[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_SECONDARY"); } @Override public IIcon getIcon(int aSide, int aMeta) { switch (aMeta) { case 0: - return tM0; + switch (aSide){ + case 0: + case 1: + return tM0[0]; + default: + return tM0[1]; + } case 1: - return tM1; + switch (aSide){ + case 0: + case 1: + return tM1[0]; + default: + return tM1[1]; + } case 2: - return tM2; + switch (aSide){ + case 0: + case 1: + return tM2[0]; + default: + return tM2[1]; + } case 3: - return tM3; + switch (aSide){ + case 0: + case 1: + return tM3[0]; + default: + return tM3[1]; + } case 4: - return tM4; + switch (aSide){ + case 0: + case 1: + return tM4[0]; + default: + return tM4[1]; + } case 5: - return tM5; + switch (aSide){ + case 0: + case 1: + return tM5[0]; + default: + return tM5[1]; + } case 6: - return tM6; + switch (aSide){ + case 0: + case 1: + return tM6[0]; + default: + return tM6[1]; + } case 7: return tM7; case 8: - return tM8; + switch (aSide){ + case 0: + case 1: + return tM8[0]; + default: + return tM8[1]; + } default: return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); } 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 0c84692dba..8a494baea1 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 @@ -58,7 +58,7 @@ public class GT_Item_CasingsBA0 extends GT_Item_Casings_Abstract { aList.add("Well it does things too..."); aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "[Use this coil!]"); break; - case 8://"Tesla Structural Frame" + case 8://"Tesla Secondary Windings" aList.add("Reinforced accelerator tunnel."); aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Most advanced pipe ever."); break; 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 1755ad05fb..7322ec55ee 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 @@ -15,7 +15,6 @@ import net.minecraft.util.IIcon; import java.util.List; -import static com.github.technus.tectech.CommonValues.VN; import static com.github.technus.tectech.Reference.MODID; @@ -41,6 +40,9 @@ public final class TeslaCoilCapacitor extends Item { public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) { aList.add(CommonValues.BASS_MARK); switch (aStack.getItemDamage()) { + case 0://"LV" + aList.add("Stores energy for tesla towers! (LV)"); + break; case 1://"MV" aList.add("Stores energy for tesla towers! (MV)"); break; @@ -62,8 +64,8 @@ public final class TeslaCoilCapacitor extends Item { case 7://"UV" aList.add("Stores energy for tesla towers! (UV)"); break; - default://"LV" - aList.add("Stores energy for tesla towers! (LV)"); + default:// + aList.add("Yeet this broken item into some spicy water!"); break; } aList.add(EnumChatFormatting.BLUE + "Insert into a Capacitor hatch of a Tesla Tower"); 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 b27efb59e2..937a433250 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 @@ -6,10 +6,8 @@ import com.github.technus.tectech.TecTech; import com.github.technus.tectech.Util; import com.github.technus.tectech.thing.metaTileEntity.hatch.gui.GT_Container_Capacitor; import com.github.technus.tectech.thing.metaTileEntity.hatch.gui.GT_GUIContainer_Capacitor; -import cpw.mods.fml.common.Loader; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -34,8 +32,8 @@ import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; * Created by Tec on 03.04.2017. */ public class GT_MetaTileEntity_Hatch_Capacitor extends GT_MetaTileEntity_Hatch { - private static Textures.BlockIcons.CustomIcon EM_H; - private static Textures.BlockIcons.CustomIcon EM_H_ACTIVE; + private static Textures.BlockIcons.CustomIcon TM_H; + private static Textures.BlockIcons.CustomIcon TM_H_ACTIVE; private static Map componentBinds = new HashMap<>(); public float energyStoredFrac = 0; @@ -69,18 +67,18 @@ public class GT_MetaTileEntity_Hatch_Capacitor extends GT_MetaTileEntity_Hatch { @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister aBlockIconRegister) { super.registerIcons(aBlockIconRegister); - EM_H_ACTIVE = new Textures.BlockIcons.CustomIcon("iconsets/EM_HOLDER_ACTIVE"); - EM_H = new Textures.BlockIcons.CustomIcon("iconsets/EM_HOLDER"); + TM_H_ACTIVE = new Textures.BlockIcons.CustomIcon("iconsets/TM_TESLA_CAPS_ACTIVE"); + TM_H = new Textures.BlockIcons.CustomIcon("iconsets/TM_TESLA_CAPS"); } @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(EM_H_ACTIVE)}; + return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TM_H_ACTIVE)}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(EM_H)}; + return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TM_H)}; } @Override @@ -157,9 +155,11 @@ public class GT_MetaTileEntity_Hatch_Capacitor extends GT_MetaTileEntity_Hatch { long tEnergyMax = 0; for (int i = 0; i < mInventory.length; i++) { if (mInventory[i] == null || mInventory[i].stackSize != 1) { + System.out.println("FUK"); continue; } CapacitorComponent cap = componentBinds.get(getUniqueIdentifier(mInventory[i])); + System.out.println(getUniqueIdentifier(mInventory[i])); if (cap != null && cap.tier > tier) { tier = cap.tier; } 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 7894a7fa37..05d496e844 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 @@ -62,7 +62,7 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock //region parameters protected Parameters.Group.ParameterIn powerSetting,timerSetting; protected Parameters.Group.ParameterOut timerValue,remainingTime; - private static final NameFunction POWER_NAME = (base, p)-> "Power setting"; + private static final NameFunction POWER_SETTING_NAME = (base, p)-> "Power setting"; private static final NameFunction TIMER_SETTING_NAME = (base, p)-> "Timer setting"; private static final NameFunction TIMER_REMAINING_NAME = (base, p)-> "Timer remaining"; private static final NameFunction TIMER_VALUE_NAME = (base,p)-> "Timer value"; @@ -89,7 +89,7 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock @Override protected void parametersInstantiation_EM() { Parameters.Group hatch_0=parametrization.getGroup(0, true); - powerSetting=hatch_0.makeInParameter(0,1000, POWER_NAME,POWER_STATUS); + powerSetting=hatch_0.makeInParameter(0,1000, POWER_SETTING_NAME,POWER_STATUS); timerSetting=hatch_0.makeInParameter(1,360, TIMER_SETTING_NAME,TIMER_STATUS); timerValue=hatch_0.makeOutParameter(0,0,TIMER_VALUE_NAME,TIMER_STATUS); remainingTime=hatch_0.makeOutParameter(1,360,TIMER_REMAINING_NAME,TIMER_STATUS); 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 75f849d9ac..2a5348ac6d 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 @@ -7,8 +7,7 @@ import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_H import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoMulti; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Param; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.HatchAdder; +import com.github.technus.tectech.thing.metaTileEntity.multi.base.*; import com.github.technus.tectech.thing.metaTileEntity.single.GT_MetaTileEntity_TeslaCoil; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -32,8 +31,7 @@ import static com.github.technus.tectech.Util.StructureBuilder; import static com.github.technus.tectech.Util.entriesSortedByValues; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsBA0; -import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; -import static gregtech.api.GregTech_API.*; +import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; import static gregtech.api.enums.GT_Values.E; public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable {//TODO Add capacitors @@ -41,7 +39,10 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private static Textures.BlockIcons.CustomIcon ScreenON; private int tier = 0; + private int mTier = 1;//Tier offset by +1 private int orientation = 0; + private int maxTier = 6; + private int minTier = 1; private int scanTime = 0; //Sets scan time to Z E R O :epic: private int scanTimeMin = 100; //Min scan time in ticks @@ -66,21 +67,31 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private long outputCurrent = 0; //Tesla Current Output private long energyCapacity = 0; //Total energy the tower can store - public boolean powerPassToggle = false; //Power Pass for public viewing + //public boolean powerPassToggle = false; //Power Pass for public viewing - private boolean parametrized = false; //Assumes no parametrizer on initialisation - //Default parametrized variables - private long histLowParam = 0; - private long histHighParam = 0; - private long histScaleParam = 0; - private int transferRadiusTowerParam = 0; - private int transferRadiusTransceiverParam = 0; - private int transferRadiusCoverUltimateParam = 0; - private long outputVoltageParam = 0; - private long outputCurrentParam = 0; - private int scanTimeMinParam = 0; + public boolean tPowerPass(){ + return ePowerPass; + } public int vTier = -1; + + private long lossPerBlock = 1; //EU lost per block traveled + private float energyEfficiencyMax = 0.95F; //Max efficiency + private float energyEfficiencyMin = 0.75F; //Min efficiency + private int overDrive = 0; + private boolean overDriveToggle(){return (overDrive > 0);} + private float overdriveEfficiency = 0.95F; //Overdrive efficiency + private long outputVoltageInjectable = 0; //How much EU will be received post distance losses + private long outputVoltageConsumption = 0; //How much EU will be drained + + private long getEnergyEfficiency(long voltage, int mTier){ + if (overDriveToggle()){ + return (long)(voltage * energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maxTier - minTier + 1) * (mTier - 1)); //Efficiency Formula + } else { + return (long)(voltage * (2-energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maxTier - minTier + 1) * (mTier - 1))*(2- overdriveEfficiency)); //Sum overdrive efficiency formula + } + } + public int pTier = 0; public int sTier = 0; @@ -132,9 +143,9 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private static final byte[] blockMetaT5 = new byte[]{7, 5, 6, 8}; private static final byte[][] blockMetas = new byte[][]{blockMetaT0,blockMetaT1,blockMetaT2,blockMetaT3,blockMetaT4,blockMetaT5}; private final HatchAdder[] addingMethods = new HatchAdder[]{this::addCapacitorToMachineList, this::addFrameToMachineList}; - private static final short[] casingTextures = new short[]{29, 0}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasings2, null}; - private static final byte[] blockMetaFallback = new byte[]{13, 0}; + private static final short[] casingTextures = new short[]{(texturePage << 7)+16+6, 0}; + private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsBA0, null}; + private static final byte[] blockMetaFallback = new byte[]{6, 0}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + "Hint Details:", "1 - Classic Hatches or Steel Pipe Casing", @@ -142,6 +153,87 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock }; //endregion + //region parameters + protected Parameters.Group.ParameterIn histLowSetting,histHighSetting,transferRadiusTowerSetting,transferRadiusTransceiverSetting,transferRadiusCoverUltimateSetting,outputVoltageSetting,outputCurrentSetting,scanTimeMinSetting,overDriveSetting; + //protected Parameters.Group.ParameterOut timerValue,remainingTime; + private static final NameFunction HYSTERESIS_LOW_SETTING_NAME = (base, p)-> "Hysteresis low setting"; + private static final NameFunction HYSTERESIS_HIGH_SETTING_NAME = (base, p)-> "Hysteresis high setting"; + private static final NameFunction TRANSFER_RADIUS_TOWER_SETTING_NAME = (base, p)-> "Tesla Towers transfer radius"; + private static final NameFunction TRANSFER_RADIUS_TRANSCEIVER_SETTING_NAME = (base, p)-> "Tesla Transceiver transfer radius"; + private static final NameFunction TRANSFER_RADIUS_COVER_ULTIMATE_SETTING_NAME = (base, p)-> "Tesla Ultimate Cover transfer radius"; + private static final NameFunction OUTPUT_VOLTAGE_SETTING_NAME = (base, p)-> "Output voltage setting"; + private static final NameFunction OUTPUT_CURRENT_SETTING_NAME = (base, p)-> "Output current setting"; + private static final NameFunction SCAN_TIME_MIN_SETTING_NAME = (base, p)-> "Scan time Min setting"; + private static final NameFunction OVERDRIVE_SETTING_NAME = (base, p)-> "Overdrive setting"; + + private final StatusFunction HYSTERESIS_LOW_STATUS=(base, p)->{ + double value=p.get(); + if(Double.isNaN(value)){ + System.out.println("HIS LO"); + return STATUS_WRONG;} + System.out.println("HIS LO"); + System.out.println(value); + if(value<0.05) return STATUS_TOO_LOW; + if(value>histHighSetting.get()) return STATUS_TOO_HIGH; + return STATUS_OK; + }; + private final StatusFunction HYSTERESIS_HIGH_STATUS=(base, p)->{ + double value=p.get(); + if(Double.isNaN(value)) return STATUS_WRONG; + System.out.println("HIS HI"); + System.out.println(value); + if(value0.95) return STATUS_TOO_HIGH; + return STATUS_OK; + }; + private static final StatusFunction TRANSFER_RADIUS_TOWER_STATUS=(base, p)->{ + double value=p.get(); + if(Double.isNaN(value)) return STATUS_WRONG; + value=(int)value; + if(value<0) return STATUS_TOO_LOW; + if(value>32) return STATUS_TOO_HIGH; + return STATUS_OK; + }; + private static final StatusFunction TRANSFER_RADIUS_TRANSCEIVER_STATUS=(base, p)->{ + double value=p.get(); + if(Double.isNaN(value)) return STATUS_WRONG; + value=(int)value; + if(value<0) return STATUS_TOO_LOW; + if(value>16) return STATUS_TOO_HIGH; + return STATUS_OK; + }; + private static final StatusFunction TRANSFER_RADIUS_COVER_ULTIMATE_STATUS=(base, p)->{ + double value=p.get(); + if(Double.isNaN(value)) return STATUS_WRONG; + value=(int)value; + if(value<0) return STATUS_TOO_LOW; + if(value>16) return STATUS_TOO_HIGH; + return STATUS_OK; + }; + private static final StatusFunction OUTPUT_VOLTAGE_STATUS=(base, p)->{ + double value=p.get(); + if(Double.isNaN(value)) return STATUS_WRONG; + value=(long)value; + if(value<=0) return STATUS_TOO_LOW; + return STATUS_OK; + }; + private static final StatusFunction OUTPUT_CURRENT_STATUS=(base, p)->{ + double value=p.get(); + if(Double.isNaN(value)) return STATUS_WRONG; + value=(long)value; + if(value<=0) return STATUS_TOO_LOW; + return STATUS_OK; + }; + private static final StatusFunction SCAN_TIME_MIN_STATUS=(base, p)->{ + double value=p.get(); + if(Double.isNaN(value)) return STATUS_WRONG; + value=(int)value; + if(value<100) return STATUS_TOO_LOW; + return STATUS_OK; + }; + private static final StatusFunction OVERDRIVE_STATUS=(base, p)-> STATUS_OK; + //endregion + public GT_MetaTileEntity_TM_teslaCoil(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } @@ -150,6 +242,24 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock super(aName); } + protected void parametersInstantiation_EM() { + Parameters.Group hatch_0=parametrization.getGroup(0, true); + Parameters.Group hatch_1=parametrization.getGroup(1, true); + Parameters.Group hatch_2=parametrization.getGroup(2, true); + Parameters.Group hatch_3=parametrization.getGroup(3, true); + Parameters.Group hatch_4=parametrization.getGroup(4, true); + + histLowSetting=hatch_0.makeInParameter(0,0.25, HYSTERESIS_LOW_SETTING_NAME,HYSTERESIS_LOW_STATUS); + histHighSetting=hatch_0.makeInParameter(1,0.75, HYSTERESIS_HIGH_SETTING_NAME,HYSTERESIS_HIGH_STATUS); + transferRadiusTowerSetting=hatch_1.makeInParameter(0,32, TRANSFER_RADIUS_TOWER_SETTING_NAME,TRANSFER_RADIUS_TOWER_STATUS); + transferRadiusTransceiverSetting=hatch_1.makeInParameter(1,16, TRANSFER_RADIUS_TRANSCEIVER_SETTING_NAME,TRANSFER_RADIUS_TRANSCEIVER_STATUS); + transferRadiusCoverUltimateSetting=hatch_2.makeInParameter(0,16, TRANSFER_RADIUS_COVER_ULTIMATE_SETTING_NAME,TRANSFER_RADIUS_COVER_ULTIMATE_STATUS); + outputVoltageSetting=hatch_2.makeInParameter(1,-1, OUTPUT_VOLTAGE_SETTING_NAME,OUTPUT_VOLTAGE_STATUS); + outputCurrentSetting=hatch_3.makeInParameter(0,-1, OUTPUT_CURRENT_SETTING_NAME,OUTPUT_CURRENT_STATUS); + scanTimeMinSetting=hatch_3.makeInParameter(1,100, SCAN_TIME_MIN_SETTING_NAME,SCAN_TIME_MIN_STATUS); + overDriveSetting=hatch_4.makeInParameter(0,0, OVERDRIVE_SETTING_NAME,OVERDRIVE_STATUS); + } + @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_TM_teslaCoil(mName); @@ -171,9 +281,9 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock @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][4], new GT_RenderedTexture(aActive ? ScreenON : ScreenOFF)}; + return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][16+6], new GT_RenderedTexture(aActive ? ScreenON : ScreenOFF)}; } - return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][4]}; + return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][16+6]}; } @Override @@ -255,25 +365,25 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock int yOffset; int zOffset; - if (coil0 == sBlockCasingsTT) { + if (coil0 == sBlockCasingsBA0) { xOffset = 3; yOffset = 16; zOffset = 0; orientation = 0; tier = iGregTechTileEntity.getMetaIDOffset(coilX0, coilY0, coilZ0); - } else if (coil1 == sBlockCasingsTT) { + } else if (coil1 == sBlockCasingsBA0) { xOffset = 3; yOffset = 0; zOffset = 0; orientation = 1; tier = iGregTechTileEntity.getMetaIDOffset(coilX0, -coilY0, coilZ0); - } else if (coil2 == sBlockCasingsTT) { + } else if (coil2 == sBlockCasingsBA0) { xOffset = 16; yOffset = 3; zOffset = 0; orientation = 2; tier = iGregTechTileEntity.getMetaIDOffset(coilX1, coilY1, coilZ1); - } else if (coil3 == sBlockCasingsTT) { + } else if (coil3 == sBlockCasingsBA0) { xOffset = 0; yOffset = 3; zOffset = 0; @@ -283,6 +393,8 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock return false; } + mTier = tier + 1; + if (structureCheck_EM(shapes[orientation], blockType, blockMetas[tier], addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, xOffset, yOffset, zOffset) && eCaps.size() > 0) { for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { @@ -319,6 +431,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock mEfficiencyIncrease = 10000; mMaxProgresstime = 20; vTier = -1; + energyCapacity = 0; outputCurrent = 0; long[] capacitorData; @@ -330,7 +443,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock vTier = (int) cap.getCapacitors()[0]; } } - if(vTier < 0){ return false; } + if(vTier < 0){return false;} outputVoltage = V[vTier]; for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { if (!GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { @@ -341,7 +454,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock if (capacitorData[0] < vTier) { if(getEUVar() > 0 && capacitorData[0] != 0){ cap.getBaseMetaTileEntity().setToFire(); - System.out.println("Oman oman a hatch burst into flame!"); } eCaps.remove(cap); } else { @@ -357,22 +469,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock if (getBaseMetaTileEntity().isClientSide()) { return true; } - //Parametrizer hatch loader TODO Add parametrizer detection - if (false) { - parametrized = true; - histLowParam = 0; - histHighParam = 0; - histScaleParam = 0; - transferRadiusTowerParam = 0; - transferRadiusTransceiverParam = 0; - transferRadiusCoverUltimateParam = 0; - outputVoltageParam = 0; - outputCurrentParam = 0; - scanTimeMin = 0; - } else { - parametrized = false; - } - ////Hysteresis based ePowerPass Config long energyMax = maxEUStore() / 2; long energyStored = getEUVar(); @@ -386,38 +482,14 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock cap.energyStoredFrac = energyFrac; } - //Hysteresis Parameters sanity check - if (parametrized && histScaleParam > 0 && histLowParam > 0 && histScaleParam <= histHighParam && histLowParam < histHighParam) { - float histLowt = (float)histLowParam/histScaleParam; - if (histLowt >= histLowLimit){ - histLow = histLowt; - } else { - histLow = histLowLimit; - } - - float histHight = (float)histHighParam/histScaleParam; - if (histHight <= histHighLimit){ - histHigh = histHight; - } else { - histHigh = histHighLimit; - } - } - - //TODO Fix this because something broke it :L //ePowerPass hist toggle if (!ePowerPass && energyFrac > histHigh) { ePowerPass = true; } else if (ePowerPass && energyFrac < histLow) { ePowerPass = false; } - powerPassToggle = ePowerPass; - ////Scanning for active teslas - if (parametrized && scanTimeMinParam > scanTimeMin) { - scanTimeTill = scanTimeMinParam; - } - scanTime++; if (scanTime >= scanTimeTill) { scanTime = 0; @@ -443,31 +515,12 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } //Stuff to do if ePowerPass - if (powerPassToggle) { - if (parametrized && outputVoltageParam > 0 && outputVoltage > outputVoltageParam) { - outputVoltage = outputVoltageParam; - } - - if (parametrized && outputCurrentParam > 0 && outputCurrent > outputCurrentParam) { - outputCurrent = outputCurrentParam; - } + if (ePowerPass) { transferRadiusTower = 32; //TODO generate based on power stored transferRadiusTransceiver = 16; //TODO generate based on power stored transferRadiusCoverUltimate = 16; //TODO generate based on power stored - if (parametrized && transferRadiusTowerParam > 0 && transferRadiusTowerParam < transferRadiusTower) { - transferRadiusTower = transferRadiusTowerParam; - } - - if (parametrized && transferRadiusTransceiverParam > 0 && transferRadiusTransceiverParam < transferRadiusTransceiver) { - transferRadiusTransceiver = transferRadiusTransceiverParam; - } - - if (parametrized && transferRadiusCoverUltimateParam > 0 && transferRadiusCoverUltimateParam < transferRadiusCoverUltimate) { - transferRadiusCoverUltimate = transferRadiusCoverUltimateParam; - } - //Clean the eTeslaMap for (Map.Entry Rx : eTeslaMap.entrySet()) { IGregTechTileEntity node = Rx.getKey(); @@ -500,17 +553,24 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock while (sparks > 0) { boolean idle = true; for (Map.Entry Rx : entriesSortedByValues(eTeslaMap)) { - if(energyStored > outputVoltage) { + if(energyStored >= (overDriveToggle() ? outputVoltage*2 : outputVoltage)) { IGregTechTileEntity node = Rx.getKey(); IMetaTileEntity nodeInside = node.getMetaTileEntity(); - long euTran = outputVoltage;//TODO Efficency? + + if (overDriveToggle()){ + outputVoltageInjectable = outputVoltage; + outputVoltageConsumption = getEnergyEfficiency(outputVoltage, mTier) + (lossPerBlock * Rx.getValue()); + } else { + outputVoltageInjectable = getEnergyEfficiency(outputVoltage, mTier) - (lossPerBlock * Rx.getValue()); + outputVoltageConsumption = outputVoltage; + } if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && Rx.getValue() <= transferRadiusTower) { GT_MetaTileEntity_TM_teslaCoil nodeTesla = (GT_MetaTileEntity_TM_teslaCoil) nodeInside; - if (!nodeTesla.powerPassToggle) { - if (nodeTesla.getEUVar() + euTran <= (nodeTesla.maxEUStore() / 2)) { - setEUVar(getEUVar() - euTran); - node.increaseStoredEnergyUnits(euTran, true); + if (!nodeTesla.tPowerPass()) { + if (nodeTesla.getEUVar() + outputVoltageInjectable <= (nodeTesla.maxEUStore() / 2)) { + setEUVar(getEUVar() - outputVoltageConsumption); + node.increaseStoredEnergyUnits(outputVoltageConsumption, true); sparks--; sparkz++; idle = false; @@ -519,16 +579,16 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } else if (nodeInside instanceof GT_MetaTileEntity_TeslaCoil && Rx.getValue() <= transferRadiusTransceiver) { GT_MetaTileEntity_TeslaCoil nodeTesla = (GT_MetaTileEntity_TeslaCoil) nodeInside; if (!nodeTesla.powerPassToggle) { - if (node.injectEnergyUnits((byte) 6, euTran, 1L) > 0L) { - setEUVar(getEUVar() - euTran); + if (node.injectEnergyUnits((byte) 6, outputVoltageInjectable, 1L) > 0L) { + setEUVar(getEUVar() - outputVoltageConsumption); sparks--; sparkz++; idle = false; } } } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil_Ultimate) && Rx.getValue() <= transferRadiusCoverUltimate) { - if (node.injectEnergyUnits((byte) 1, euTran, 1L) > 0L) { - setEUVar(getEUVar() - euTran); + if (node.injectEnergyUnits((byte) 1, outputVoltageInjectable, 1L) > 0L) { + setEUVar(getEUVar() - outputVoltageConsumption); sparks--; sparkz++; idle = false; 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 c1a66eb83b..f4430adf66 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 @@ -236,7 +236,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB } if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && Rx.getValue() <= transferRadiusTower) { GT_MetaTileEntity_TM_teslaCoil nodeTesla = (GT_MetaTileEntity_TM_teslaCoil) nodeInside; - if (!nodeTesla.powerPassToggle) { + if (!nodeTesla.tPowerPass()) { if (nodeTesla.getEUVar() + outputVoltageInjectable <= (nodeTesla.maxEUStore() / 2)) { setEUVar(getEUVar() - outputVoltageConsumption); node.increaseStoredEnergyUnits(outputVoltageInjectable, true); diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/CoilPrimary.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/CoilPrimary.png deleted file mode 100644 index 4598fc32b3..0000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/CoilPrimary.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/CoilSecondary.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/CoilSecondary.png deleted file mode 100644 index 76388e39c7..0000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/CoilSecondary.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_CAPS.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_CAPS.png deleted file mode 100644 index 4401341ad7..0000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_CAPS.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_BASE_SIDES.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_BASE_SIDES.png new file mode 100644 index 0000000000..52087f837e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_BASE_SIDES.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_BASE_TOP_BOTTOM.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_BASE_TOP_BOTTOM.png new file mode 100644 index 0000000000..5ba1e61487 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_BASE_TOP_BOTTOM.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_CAPS.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_CAPS.png new file mode 100644 index 0000000000..4401341ad7 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_CAPS.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_CAPS_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_CAPS_ACTIVE.png new file mode 100644 index 0000000000..4401341ad7 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_CAPS_ACTIVE.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_TOROID.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_TOROID.png new file mode 100644 index 0000000000..e6b07eb650 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_TOROID.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_0.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_0.png new file mode 100644 index 0000000000..4598fc32b3 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_0.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_1.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_1.png new file mode 100644 index 0000000000..4598fc32b3 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_1.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_2.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_2.png new file mode 100644 index 0000000000..4598fc32b3 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_2.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_3.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_3.png new file mode 100644 index 0000000000..4598fc32b3 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_3.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_4.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_4.png new file mode 100644 index 0000000000..4598fc32b3 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_4.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_5.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_5.png new file mode 100644 index 0000000000..4598fc32b3 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_5.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_0.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_0.png new file mode 100644 index 0000000000..5ba1e61487 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_0.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_1.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_1.png new file mode 100644 index 0000000000..5ba1e61487 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_1.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_2.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_2.png new file mode 100644 index 0000000000..5ba1e61487 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_2.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_3.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_3.png new file mode 100644 index 0000000000..5ba1e61487 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_3.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_4.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_4.png new file mode 100644 index 0000000000..5ba1e61487 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_4.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_5.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_5.png new file mode 100644 index 0000000000..5ba1e61487 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_5.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_SECONDARY.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_SECONDARY.png new file mode 100644 index 0000000000..76388e39c7 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_SECONDARY.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TeslaBase.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TeslaBase.png deleted file mode 100644 index 52087f837e..0000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TeslaBase.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TeslaTopBottom.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TeslaTopBottom.png deleted file mode 100644 index 5ba1e61487..0000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TeslaTopBottom.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/ToroidBase.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/ToroidBase.png deleted file mode 100644 index e6b07eb650..0000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/ToroidBase.png and /dev/null differ -- cgit From 509ce35c6620dc8939d1ef79022be0490e77d3e9 Mon Sep 17 00:00:00 2001 From: Tec Date: Sat, 13 Jul 2019 10:58:15 +0200 Subject: Static bish --- .../metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main/java') 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 2a5348ac6d..bf39ff9a6e 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 @@ -166,7 +166,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private static final NameFunction SCAN_TIME_MIN_SETTING_NAME = (base, p)-> "Scan time Min setting"; private static final NameFunction OVERDRIVE_SETTING_NAME = (base, p)-> "Overdrive setting"; - private final StatusFunction HYSTERESIS_LOW_STATUS=(base, p)->{ + private static final StatusFunction HYSTERESIS_LOW_STATUS=(base, p)->{ double value=p.get(); if(Double.isNaN(value)){ System.out.println("HIS LO"); @@ -174,15 +174,15 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock System.out.println("HIS LO"); System.out.println(value); if(value<0.05) return STATUS_TOO_LOW; - if(value>histHighSetting.get()) return STATUS_TOO_HIGH; + if(value>base.histHighSetting.get()) return STATUS_TOO_HIGH; return STATUS_OK; }; - private final StatusFunction HYSTERESIS_HIGH_STATUS=(base, p)->{ + private static final StatusFunction HYSTERESIS_HIGH_STATUS=(base, p)->{ double value=p.get(); if(Double.isNaN(value)) return STATUS_WRONG; System.out.println("HIS HI"); System.out.println(value); - if(value0.95) return STATUS_TOO_HIGH; return STATUS_OK; }; @@ -242,6 +242,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock super(aName); } + @Override protected void parametersInstantiation_EM() { Parameters.Group hatch_0=parametrization.getGroup(0, true); Parameters.Group hatch_1=parametrization.getGroup(1, true); -- cgit From afc36a40ade45df9e1c37db4ff6dfa2f9fcef820 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 13 Jul 2019 13:55:43 +0200 Subject: Parametrization+-? yeah it sorta werks --- .../hatch/GT_MetaTileEntity_Hatch_Capacitor.java | 1 - .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 63 ++++++++++++++-------- 2 files changed, 42 insertions(+), 22 deletions(-) (limited to 'src/main/java') 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 937a433250..b8828f6dbf 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 @@ -155,7 +155,6 @@ public class GT_MetaTileEntity_Hatch_Capacitor extends GT_MetaTileEntity_Hatch { long tEnergyMax = 0; for (int i = 0; i < mInventory.length; i++) { if (mInventory[i] == null || mInventory[i].stackSize != 1) { - System.out.println("FUK"); continue; } CapacitorComponent cap = componentBinds.get(getUniqueIdentifier(mInventory[i])); 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 bf39ff9a6e..a217217085 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 @@ -34,7 +34,7 @@ import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBloc import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; import static gregtech.api.enums.GT_Values.E; -public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable {//TODO Add capacitors +public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { private static Textures.BlockIcons.CustomIcon ScreenOFF; private static Textures.BlockIcons.CustomIcon ScreenON; @@ -168,21 +168,15 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private static final StatusFunction HYSTERESIS_LOW_STATUS=(base, p)->{ double value=p.get(); - if(Double.isNaN(value)){ - System.out.println("HIS LO"); - return STATUS_WRONG;} - System.out.println("HIS LO"); - System.out.println(value); - if(value<0.05) return STATUS_TOO_LOW; + if(Double.isNaN(value)){return STATUS_WRONG;} + if(value<=0.05) return STATUS_TOO_LOW; if(value>base.histHighSetting.get()) return STATUS_TOO_HIGH; return STATUS_OK; }; private static final StatusFunction HYSTERESIS_HIGH_STATUS=(base, p)->{ double value=p.get(); if(Double.isNaN(value)) return STATUS_WRONG; - System.out.println("HIS HI"); - System.out.println(value); - if(value0.95) return STATUS_TOO_HIGH; return STATUS_OK; }; @@ -192,6 +186,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock value=(int)value; if(value<0) return STATUS_TOO_LOW; if(value>32) return STATUS_TOO_HIGH; + if(value<32) return STATUS_LOW; return STATUS_OK; }; private static final StatusFunction TRANSFER_RADIUS_TRANSCEIVER_STATUS=(base, p)->{ @@ -200,6 +195,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock value=(int)value; if(value<0) return STATUS_TOO_LOW; if(value>16) return STATUS_TOO_HIGH; + if(value<16) return STATUS_LOW; return STATUS_OK; }; private static final StatusFunction TRANSFER_RADIUS_COVER_ULTIMATE_STATUS=(base, p)->{ @@ -208,12 +204,14 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock value=(int)value; if(value<0) return STATUS_TOO_LOW; if(value>16) return STATUS_TOO_HIGH; + if(value<16) return STATUS_LOW; return STATUS_OK; }; private static final StatusFunction OUTPUT_VOLTAGE_STATUS=(base, p)->{ double value=p.get(); if(Double.isNaN(value)) return STATUS_WRONG; value=(long)value; + if(value==-1) return STATUS_OK; if(value<=0) return STATUS_TOO_LOW; return STATUS_OK; }; @@ -221,17 +219,26 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock double value=p.get(); if(Double.isNaN(value)) return STATUS_WRONG; value=(long)value; + if(value==-1) return STATUS_OK; if(value<=0) return STATUS_TOO_LOW; - return STATUS_OK; + return STATUS_LOW; }; private static final StatusFunction SCAN_TIME_MIN_STATUS=(base, p)->{ double value=p.get(); if(Double.isNaN(value)) return STATUS_WRONG; value=(int)value; if(value<100) return STATUS_TOO_LOW; - return STATUS_OK; + if(value==100) return STATUS_OK; + return STATUS_HIGH; + }; + private static final StatusFunction OVERDRIVE_STATUS=(base, p)->{ + double value=p.get(); + if(Double.isNaN(value)) return STATUS_WRONG; + value=(int)value; + if(value<0) return STATUS_TOO_LOW; + if(value==0) return STATUS_LOW; + return STATUS_HIGH; }; - private static final StatusFunction OVERDRIVE_STATUS=(base, p)-> STATUS_OK; //endregion public GT_MetaTileEntity_TM_teslaCoil(int aID, String aName, String aNameRegional) { @@ -249,16 +256,19 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock Parameters.Group hatch_2=parametrization.getGroup(2, true); Parameters.Group hatch_3=parametrization.getGroup(3, true); Parameters.Group hatch_4=parametrization.getGroup(4, true); + Parameters.Group hatch_5=parametrization.getGroup(5, true); + Parameters.Group hatch_6=parametrization.getGroup(6, true); + Parameters.Group hatch_7=parametrization.getGroup(7, true); histLowSetting=hatch_0.makeInParameter(0,0.25, HYSTERESIS_LOW_SETTING_NAME,HYSTERESIS_LOW_STATUS); - histHighSetting=hatch_0.makeInParameter(1,0.75, HYSTERESIS_HIGH_SETTING_NAME,HYSTERESIS_HIGH_STATUS); - transferRadiusTowerSetting=hatch_1.makeInParameter(0,32, TRANSFER_RADIUS_TOWER_SETTING_NAME,TRANSFER_RADIUS_TOWER_STATUS); - transferRadiusTransceiverSetting=hatch_1.makeInParameter(1,16, TRANSFER_RADIUS_TRANSCEIVER_SETTING_NAME,TRANSFER_RADIUS_TRANSCEIVER_STATUS); - transferRadiusCoverUltimateSetting=hatch_2.makeInParameter(0,16, TRANSFER_RADIUS_COVER_ULTIMATE_SETTING_NAME,TRANSFER_RADIUS_COVER_ULTIMATE_STATUS); - outputVoltageSetting=hatch_2.makeInParameter(1,-1, OUTPUT_VOLTAGE_SETTING_NAME,OUTPUT_VOLTAGE_STATUS); - outputCurrentSetting=hatch_3.makeInParameter(0,-1, OUTPUT_CURRENT_SETTING_NAME,OUTPUT_CURRENT_STATUS); - scanTimeMinSetting=hatch_3.makeInParameter(1,100, SCAN_TIME_MIN_SETTING_NAME,SCAN_TIME_MIN_STATUS); - overDriveSetting=hatch_4.makeInParameter(0,0, OVERDRIVE_SETTING_NAME,OVERDRIVE_STATUS); + histHighSetting=hatch_1.makeInParameter(0,0.75, HYSTERESIS_HIGH_SETTING_NAME,HYSTERESIS_HIGH_STATUS); + transferRadiusTowerSetting=hatch_2.makeInParameter(0,32, TRANSFER_RADIUS_TOWER_SETTING_NAME,TRANSFER_RADIUS_TOWER_STATUS); + transferRadiusTransceiverSetting=hatch_3.makeInParameter(0,16, TRANSFER_RADIUS_TRANSCEIVER_SETTING_NAME,TRANSFER_RADIUS_TRANSCEIVER_STATUS); + transferRadiusCoverUltimateSetting=hatch_3.makeInParameter(0,16, TRANSFER_RADIUS_COVER_ULTIMATE_SETTING_NAME,TRANSFER_RADIUS_COVER_ULTIMATE_STATUS); + outputVoltageSetting=hatch_4.makeInParameter(0,-1, OUTPUT_VOLTAGE_SETTING_NAME,OUTPUT_VOLTAGE_STATUS); + outputCurrentSetting=hatch_5.makeInParameter(0,-1, OUTPUT_CURRENT_SETTING_NAME,OUTPUT_CURRENT_STATUS); + scanTimeMinSetting=hatch_6.makeInParameter(0,100, SCAN_TIME_MIN_SETTING_NAME,SCAN_TIME_MIN_STATUS); + overDriveSetting=hatch_7.makeInParameter(0,0, OVERDRIVE_SETTING_NAME,OVERDRIVE_STATUS); } @Override @@ -429,6 +439,17 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock @Override public boolean checkRecipe_EM(ItemStack itemStack) { + if (!histHighSetting.getStatus(false).isOk|| + !histLowSetting.getStatus(false).isOk|| + !transferRadiusTowerSetting.getStatus(false).isOk|| + !transferRadiusTransceiverSetting.getStatus(false).isOk|| + !transferRadiusCoverUltimateSetting.getStatus(false).isOk|| + !outputVoltageSetting.getStatus(false).isOk|| + !outputCurrentSetting.getStatus(false).isOk|| + !scanTimeMinSetting.getStatus(false).isOk|| + !overDriveSetting.getStatus(false).isOk + ) return false; + mEfficiencyIncrease = 10000; mMaxProgresstime = 20; vTier = -1; -- cgit From 8f159adc12a15e8e7e2ebfc44acc69058128d064 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 13 Jul 2019 20:12:20 +0200 Subject: Params werky? yees --- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 37 +++++++++++----------- 1 file changed, 18 insertions(+), 19 deletions(-) (limited to 'src/main/java') 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 a217217085..adb193257f 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 @@ -45,23 +45,23 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private int minTier = 1; private int scanTime = 0; //Sets scan time to Z E R O :epic: - private int scanTimeMin = 100; //Min scan time in ticks - private int scanTimeTill = scanTimeMin; //Set default scan time + //private int scanTimeMin = 100; //Min scan time in ticks + //private int scanTimeTill = scanTimeMin; //Set default scan time private Map eTeslaMap = new HashMap<>(); //Tesla Map to map them tesla bois! private final ArrayList eCaps = new ArrayList<>(); //Capacitor List - private float histLow = 0.25F; //Power pass is disabled if power is under this fraction - private float histHigh = 0.75F; //Power pass is enabled if power is over this fraction + //private float histLow = 0.25F; //Power pass is disabled if power is under this fraction + //private float histHigh = 0.75F; //Power pass is enabled if power is over this fraction - private float histLowLimit = 0.05F; //How low can you configure it? - private float histHighLimit = 0.95F; //How high can you configure it? + //private float histLowLimit = 0.05F; //How low can you configure it? + //private float histHighLimit = 0.95F; //How high can you configure it? private int scanRadius = 32; //Tesla scan radius - private int transferRadiusTower = 32; //Radius for tower to tower transfers - private int transferRadiusTransceiver = 16; //Radius for tower to transceiver transfers - private int transferRadiusCoverUltimate = 16; //Radius for tower to ultimate cover transfers + private int transferRadiusTower; //Radius for tower to tower transfers + private int transferRadiusTransceiver; //Radius for tower to transceiver transfers + private int transferRadiusCoverUltimate; //Radius for tower to ultimate cover transfers private long outputVoltage = 0; //Tesla Voltage Output private long outputCurrent = 0; //Tesla Current Output @@ -78,8 +78,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private long lossPerBlock = 1; //EU lost per block traveled private float energyEfficiencyMax = 0.95F; //Max efficiency private float energyEfficiencyMin = 0.75F; //Min efficiency - private int overDrive = 0; - private boolean overDriveToggle(){return (overDrive > 0);} + private boolean overDriveToggle(){return (overDriveSetting.get() > 0);} private float overdriveEfficiency = 0.95F; //Overdrive efficiency private long outputVoltageInjectable = 0; //How much EU will be received post distance losses private long outputVoltageConsumption = 0; //How much EU will be drained @@ -260,11 +259,11 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock Parameters.Group hatch_6=parametrization.getGroup(6, true); Parameters.Group hatch_7=parametrization.getGroup(7, true); - histLowSetting=hatch_0.makeInParameter(0,0.25, HYSTERESIS_LOW_SETTING_NAME,HYSTERESIS_LOW_STATUS); + histLowSetting=hatch_0.makeInParameter(0,0.25, HYSTERESIS_LOW_SETTING_NAME,HYSTERESIS_LOW_STATUS);//TODO Fix Grouping histHighSetting=hatch_1.makeInParameter(0,0.75, HYSTERESIS_HIGH_SETTING_NAME,HYSTERESIS_HIGH_STATUS); transferRadiusTowerSetting=hatch_2.makeInParameter(0,32, TRANSFER_RADIUS_TOWER_SETTING_NAME,TRANSFER_RADIUS_TOWER_STATUS); transferRadiusTransceiverSetting=hatch_3.makeInParameter(0,16, TRANSFER_RADIUS_TRANSCEIVER_SETTING_NAME,TRANSFER_RADIUS_TRANSCEIVER_STATUS); - transferRadiusCoverUltimateSetting=hatch_3.makeInParameter(0,16, TRANSFER_RADIUS_COVER_ULTIMATE_SETTING_NAME,TRANSFER_RADIUS_COVER_ULTIMATE_STATUS); + transferRadiusCoverUltimateSetting=hatch_3.makeInParameter(1,16, TRANSFER_RADIUS_COVER_ULTIMATE_SETTING_NAME,TRANSFER_RADIUS_COVER_ULTIMATE_STATUS); outputVoltageSetting=hatch_4.makeInParameter(0,-1, OUTPUT_VOLTAGE_SETTING_NAME,OUTPUT_VOLTAGE_STATUS); outputCurrentSetting=hatch_5.makeInParameter(0,-1, OUTPUT_CURRENT_SETTING_NAME,OUTPUT_CURRENT_STATUS); scanTimeMinSetting=hatch_6.makeInParameter(0,100, SCAN_TIME_MIN_SETTING_NAME,SCAN_TIME_MIN_STATUS); @@ -505,15 +504,15 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } //ePowerPass hist toggle - if (!ePowerPass && energyFrac > histHigh) { + if (!ePowerPass && energyFrac > histHighSetting.get()) { ePowerPass = true; - } else if (ePowerPass && energyFrac < histLow) { + } else if (ePowerPass && energyFrac < histLowSetting.get()) { ePowerPass = false; } ////Scanning for active teslas scanTime++; - if (scanTime >= scanTimeTill) { + if (scanTime >= 100) { scanTime = 0; eTeslaMap.clear(); @@ -539,9 +538,9 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock //Stuff to do if ePowerPass if (ePowerPass) { - transferRadiusTower = 32; //TODO generate based on power stored - transferRadiusTransceiver = 16; //TODO generate based on power stored - transferRadiusCoverUltimate = 16; //TODO generate based on power stored + transferRadiusTower = (int) transferRadiusTowerSetting.get(); //TODO generate based on power stored + transferRadiusTransceiver = (int) transferRadiusTransceiverSetting.get(); //TODO generate based on power stored + transferRadiusCoverUltimate = (int) transferRadiusCoverUltimateSetting.get(); //TODO generate based on power stored //Clean the eTeslaMap for (Map.Entry Rx : eTeslaMap.entrySet()) { -- cgit From 128690a8e3415a2727c671876a5881df3f4188a1 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 13 Jul 2019 21:33:25 +0200 Subject: POPOGA THE GREATEST SHIT YOU NEVER KNEW YOU NEEDED --- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/main/java') 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 adb193257f..da12f6dd96 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 @@ -164,6 +164,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private static final NameFunction OUTPUT_CURRENT_SETTING_NAME = (base, p)-> "Output current setting"; private static final NameFunction SCAN_TIME_MIN_SETTING_NAME = (base, p)-> "Scan time Min setting"; private static final NameFunction OVERDRIVE_SETTING_NAME = (base, p)-> "Overdrive setting"; + private static final NameFunction POPOGA_NAME = (base, p)-> "POPOGA"; private static final StatusFunction HYSTERESIS_LOW_STATUS=(base, p)->{ double value=p.get(); @@ -238,6 +239,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock if(value==0) return STATUS_LOW; return STATUS_HIGH; }; + private static final StatusFunction POPOGA_STATUS=(base, p)-> STATUS_WTF; //endregion public GT_MetaTileEntity_TM_teslaCoil(int aID, String aName, String aNameRegional) { @@ -258,16 +260,29 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock Parameters.Group hatch_5=parametrization.getGroup(5, true); Parameters.Group hatch_6=parametrization.getGroup(6, true); Parameters.Group hatch_7=parametrization.getGroup(7, true); + Parameters.Group hatch_8=parametrization.getGroup(8, true); + Parameters.Group hatch_9=parametrization.getGroup(9, true); histLowSetting=hatch_0.makeInParameter(0,0.25, HYSTERESIS_LOW_SETTING_NAME,HYSTERESIS_LOW_STATUS);//TODO Fix Grouping + histLowSetting=hatch_0.makeInParameter(1,1337, POPOGA_NAME,POPOGA_STATUS); histHighSetting=hatch_1.makeInParameter(0,0.75, HYSTERESIS_HIGH_SETTING_NAME,HYSTERESIS_HIGH_STATUS); + histLowSetting=hatch_1.makeInParameter(1,1337, POPOGA_NAME,POPOGA_STATUS); transferRadiusTowerSetting=hatch_2.makeInParameter(0,32, TRANSFER_RADIUS_TOWER_SETTING_NAME,TRANSFER_RADIUS_TOWER_STATUS); + histLowSetting=hatch_2.makeInParameter(1,1337, POPOGA_NAME,POPOGA_STATUS); transferRadiusTransceiverSetting=hatch_3.makeInParameter(0,16, TRANSFER_RADIUS_TRANSCEIVER_SETTING_NAME,TRANSFER_RADIUS_TRANSCEIVER_STATUS); transferRadiusCoverUltimateSetting=hatch_3.makeInParameter(1,16, TRANSFER_RADIUS_COVER_ULTIMATE_SETTING_NAME,TRANSFER_RADIUS_COVER_ULTIMATE_STATUS); outputVoltageSetting=hatch_4.makeInParameter(0,-1, OUTPUT_VOLTAGE_SETTING_NAME,OUTPUT_VOLTAGE_STATUS); + histLowSetting=hatch_4.makeInParameter(1,1337, POPOGA_NAME,POPOGA_STATUS); outputCurrentSetting=hatch_5.makeInParameter(0,-1, OUTPUT_CURRENT_SETTING_NAME,OUTPUT_CURRENT_STATUS); + histLowSetting=hatch_5.makeInParameter(1,1337, POPOGA_NAME,POPOGA_STATUS); scanTimeMinSetting=hatch_6.makeInParameter(0,100, SCAN_TIME_MIN_SETTING_NAME,SCAN_TIME_MIN_STATUS); + histLowSetting=hatch_6.makeInParameter(1,1337, POPOGA_NAME,POPOGA_STATUS); overDriveSetting=hatch_7.makeInParameter(0,0, OVERDRIVE_SETTING_NAME,OVERDRIVE_STATUS); + histLowSetting=hatch_7.makeInParameter(1,1337, POPOGA_NAME,POPOGA_STATUS); + histLowSetting=hatch_8.makeInParameter(0,1337, POPOGA_NAME,POPOGA_STATUS); + histLowSetting=hatch_8.makeInParameter(1,1337, POPOGA_NAME,POPOGA_STATUS); + histLowSetting=hatch_9.makeInParameter(0,1337, POPOGA_NAME,POPOGA_STATUS); + histLowSetting=hatch_9.makeInParameter(1,1337, POPOGA_NAME,POPOGA_STATUS); } @Override -- cgit From 7790c9eef139e6b54971cc239b55ae18dfa89119 Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 15 Jul 2019 08:41:49 +0200 Subject: lights work more cool stuff my dude --- .../tectech/thing/casing/GT_Block_CasingsBA0.java | 2 +- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 147 ++++++++++++++------- 2 files changed, 101 insertions(+), 48 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java index 4042187361..ad552f64e3 100644 --- a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java @@ -84,7 +84,7 @@ public class GT_Block_CasingsBA0 extends GT_Block_Casings_Abstract { tM6[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_BASE_TOP_BOTTOM"); tM6[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_BASE_SIDES"); tM7 = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_TOROID"); - tM8[0] = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); + tM8[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_BASE_TOP_BOTTOM"); tM8[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_SECONDARY"); } 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 2e5d944773..e91d07a560 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 @@ -157,18 +157,30 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock //endregion //region parameters - protected Parameters.Group.ParameterIn histLowSetting,histHighSetting,transferRadiusTowerSetting,transferRadiusTransceiverSetting,transferRadiusCoverUltimateSetting,outputVoltageSetting,outputCurrentSetting,scanTimeMinSetting,overDriveSetting; - //protected Parameters.Group.ParameterOut timerValue,remainingTime; + protected Parameters.Group.ParameterIn popogaSetting,histLowSetting,histHighSetting,transferRadiusTowerSetting,transferRadiusTransceiverSetting,transferRadiusCoverUltimateSetting,outputVoltageSetting,outputCurrentSetting,scanTimeMinSetting,overDriveSetting; + protected Parameters.Group.ParameterOut popogaDisplay,transferRadiusTowerDisplay,transferRadiusTransceiverDisplay,transferRadiusCoverUltimateDisplay,outputVoltageDisplay,outputCurrentDisplay,energyCapacityDisplay,energyStoredDisplay,energyFractionDisplay,scanTimeDisplay; + private static final INameFunction HYSTERESIS_LOW_SETTING_NAME = (base, p)-> "Hysteresis low setting"; private static final INameFunction HYSTERESIS_HIGH_SETTING_NAME = (base, p)-> "Hysteresis high setting"; - private static final INameFunction TRANSFER_RADIUS_TOWER_SETTING_NAME = (base, p)-> "Tesla Towers transfer radius"; - private static final INameFunction TRANSFER_RADIUS_TRANSCEIVER_SETTING_NAME = (base, p)-> "Tesla Transceiver transfer radius"; - private static final INameFunction TRANSFER_RADIUS_COVER_ULTIMATE_SETTING_NAME = (base, p)-> "Tesla Ultimate Cover transfer radius"; + private static final INameFunction TRANSFER_RADIUS_TOWER_SETTING_NAME = (base, p)-> "Tesla Towers transfer radius setting"; + private static final INameFunction TRANSFER_RADIUS_TRANSCEIVER_SETTING_NAME = (base, p)-> "Tesla Transceiver transfer radius setting"; + private static final INameFunction TRANSFER_RADIUS_COVER_ULTIMATE_SETTING_NAME = (base, p)-> "Tesla Ultimate Cover transfer radius setting"; private static final INameFunction OUTPUT_VOLTAGE_SETTING_NAME = (base, p)-> "Output voltage setting"; private static final INameFunction OUTPUT_CURRENT_SETTING_NAME = (base, p)-> "Output current setting"; private static final INameFunction SCAN_TIME_MIN_SETTING_NAME = (base, p)-> "Scan time Min setting"; private static final INameFunction OVERDRIVE_SETTING_NAME = (base, p)-> "Overdrive setting"; - private static final INameFunction POPOGA_NAME = (base, p)-> "POPOGA"; + private static final INameFunction POPOGA_NAME = (base, p)-> "Unused"; + + private static final INameFunction TRANSFER_RADIUS_TOWER_DISPLAY_NAME = (base, p)-> "Tesla Towers transfer radius display"; + private static final INameFunction TRANSFER_RADIUS_TRANSCEIVER_DISPLAY_NAME = (base, p)-> "Tesla Transceiver transfer radius display"; + private static final INameFunction TRANSFER_RADIUS_COVER_ULTIMATE_DISPLAY_NAME = (base, p)-> "Tesla Ultimate Cover transfer radius display"; + private static final INameFunction OUTPUT_VOLTAGE_DISPLAY_NAME = (base, p)-> "Output voltage display"; + private static final INameFunction OUTPUT_CURRENT_DISPLAY_NAME = (base, p)-> "Output current display"; + private static final INameFunction ENERGY_CAPACITY_DISPLAY_NAME = (base, p)-> "Energy Capacity display"; + private static final INameFunction ENERGY_STORED_DISPLAY_NAME = (base, p)-> "Energy Stored display"; + private static final INameFunction ENERGY_FRACTION_DISPLAY_NAME = (base, p)-> "Energy Fraction display"; + private static final INameFunction SCAN_TIME_DISPLAY_NAME = (base, p)-> "Scan time display"; + private static final IStatusFunction HYSTERESIS_LOW_STATUS=(base, p)->{ double value=p.get(); @@ -193,16 +205,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock if(value<32) return STATUS_LOW; return STATUS_OK; }; - private static final IStatusFunction TRANSFER_RADIUS_TRANSCEIVER_STATUS=(base, p)->{ - double value=p.get(); - if(Double.isNaN(value)) return STATUS_WRONG; - value=(int)value; - if(value<0) return STATUS_TOO_LOW; - if(value>16) return STATUS_TOO_HIGH; - if(value<16) return STATUS_LOW; - return STATUS_OK; - }; - private static final IStatusFunction TRANSFER_RADIUS_COVER_ULTIMATE_STATUS=(base, p)->{ + private static final IStatusFunction TRANSFER_RADIUS_TRANSCEIVER_OR_COVER_ULTIMATE_STATUS=(base, p)->{ double value=p.get(); if(Double.isNaN(value)) return STATUS_WRONG; value=(int)value; @@ -211,7 +214,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock if(value<16) return STATUS_LOW; return STATUS_OK; }; - private static final IStatusFunction OUTPUT_VOLTAGE_STATUS=(base, p)->{ + private static final IStatusFunction OUTPUT_VOLTAGE_OR_CURRENT_STATUS=(base, p)->{ double value=p.get(); if(Double.isNaN(value)) return STATUS_WRONG; value=(long)value; @@ -219,14 +222,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock if(value<=0) return STATUS_TOO_LOW; return STATUS_OK; }; - private static final IStatusFunction OUTPUT_CURRENT_STATUS=(base, p)->{ - double value=p.get(); - if(Double.isNaN(value)) return STATUS_WRONG; - value=(long)value; - if(value==-1) return STATUS_OK; - if(value<=0) return STATUS_TOO_LOW; - return STATUS_LOW; - }; private static final IStatusFunction SCAN_TIME_MIN_STATUS=(base, p)->{ double value=p.get(); if(Double.isNaN(value)) return STATUS_WRONG; @@ -243,7 +238,40 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock if(value==0) return STATUS_LOW; return STATUS_HIGH; }; - private static final IStatusFunction POPOGA_STATUS=(base, p)-> STATUS_WTF; + private static final IStatusFunction POPOGA_STATUS=(base, p)->{ + if(base.getBaseMetaTileEntity().getWorld().isThundering()){ + return STATUS_WTF; + } + return STATUS_NEUTRAL; + }; + private static final IStatusFunction SCAN_TIME_STATUS=(base, p)->{ + double value=p.get(); + if(Double.isNaN(value)) return STATUS_WRONG; + value=(int)value; + if(value==0) return STATUS_HIGH; + return STATUS_LOW; + }; + private static final IStatusFunction POWER_STATUS=(base, p)-> { + double value = p.get(); + if (Double.isNaN(value)) return STATUS_WRONG; + value=(long)value; + if (value > 0) { + return STATUS_OK; + } else { + return STATUS_LOW; + } + }; + private static final IStatusFunction ENERGY_STATUS=(base, p)->{ + double value=p.get(); + if(Double.isNaN(value)) return STATUS_WRONG; + if (base.energyFractionDisplay.get() > base.histHighSetting.get()) { + return STATUS_HIGH; + } else if (base.energyFractionDisplay.get() < base.histLowSetting.get()) { + return STATUS_LOW; + } else { + return STATUS_OK; + } + }; //endregion public GT_MetaTileEntity_TM_teslaCoil(int aID, String aName, String aNameRegional) { @@ -268,25 +296,46 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock Parameters.Group hatch_9=parametrization.getGroup(9, true); histLowSetting=hatch_0.makeInParameter(0,0.25, HYSTERESIS_LOW_SETTING_NAME,HYSTERESIS_LOW_STATUS);//TODO Fix Grouping - histLowSetting=hatch_0.makeInParameter(1,1337, POPOGA_NAME,POPOGA_STATUS); + popogaSetting=hatch_0.makeInParameter(1,0, POPOGA_NAME,POPOGA_STATUS); histHighSetting=hatch_1.makeInParameter(0,0.75, HYSTERESIS_HIGH_SETTING_NAME,HYSTERESIS_HIGH_STATUS); - histLowSetting=hatch_1.makeInParameter(1,1337, POPOGA_NAME,POPOGA_STATUS); + popogaSetting=hatch_1.makeInParameter(1,0, POPOGA_NAME,POPOGA_STATUS); transferRadiusTowerSetting=hatch_2.makeInParameter(0,32, TRANSFER_RADIUS_TOWER_SETTING_NAME,TRANSFER_RADIUS_TOWER_STATUS); - histLowSetting=hatch_2.makeInParameter(1,1337, POPOGA_NAME,POPOGA_STATUS); - transferRadiusTransceiverSetting=hatch_3.makeInParameter(0,16, TRANSFER_RADIUS_TRANSCEIVER_SETTING_NAME,TRANSFER_RADIUS_TRANSCEIVER_STATUS); - transferRadiusCoverUltimateSetting=hatch_3.makeInParameter(1,16, TRANSFER_RADIUS_COVER_ULTIMATE_SETTING_NAME,TRANSFER_RADIUS_COVER_ULTIMATE_STATUS); - outputVoltageSetting=hatch_4.makeInParameter(0,-1, OUTPUT_VOLTAGE_SETTING_NAME,OUTPUT_VOLTAGE_STATUS); - histLowSetting=hatch_4.makeInParameter(1,1337, POPOGA_NAME,POPOGA_STATUS); - outputCurrentSetting=hatch_5.makeInParameter(0,-1, OUTPUT_CURRENT_SETTING_NAME,OUTPUT_CURRENT_STATUS); - histLowSetting=hatch_5.makeInParameter(1,1337, POPOGA_NAME,POPOGA_STATUS); - scanTimeMinSetting=hatch_6.makeInParameter(0,100, SCAN_TIME_MIN_SETTING_NAME,SCAN_TIME_MIN_STATUS); - histLowSetting=hatch_6.makeInParameter(1,1337, POPOGA_NAME,POPOGA_STATUS); - overDriveSetting=hatch_7.makeInParameter(0,0, OVERDRIVE_SETTING_NAME,OVERDRIVE_STATUS); - histLowSetting=hatch_7.makeInParameter(1,1337, POPOGA_NAME,POPOGA_STATUS); - histLowSetting=hatch_8.makeInParameter(0,1337, POPOGA_NAME,POPOGA_STATUS); - histLowSetting=hatch_8.makeInParameter(1,1337, POPOGA_NAME,POPOGA_STATUS); - histLowSetting=hatch_9.makeInParameter(0,1337, POPOGA_NAME,POPOGA_STATUS); - histLowSetting=hatch_9.makeInParameter(1,1337, POPOGA_NAME,POPOGA_STATUS); + popogaSetting=hatch_2.makeInParameter(1,0, POPOGA_NAME,POPOGA_STATUS); + transferRadiusTransceiverSetting=hatch_3.makeInParameter(0,16, TRANSFER_RADIUS_TRANSCEIVER_SETTING_NAME,TRANSFER_RADIUS_TRANSCEIVER_OR_COVER_ULTIMATE_STATUS); + transferRadiusCoverUltimateSetting=hatch_3.makeInParameter(1,16, TRANSFER_RADIUS_COVER_ULTIMATE_SETTING_NAME,TRANSFER_RADIUS_TRANSCEIVER_OR_COVER_ULTIMATE_STATUS); + outputVoltageSetting=hatch_4.makeInParameter(0,-1, OUTPUT_VOLTAGE_SETTING_NAME,OUTPUT_VOLTAGE_OR_CURRENT_STATUS); + popogaSetting=hatch_4.makeInParameter(1,0, POPOGA_NAME,POPOGA_STATUS); + outputCurrentSetting=hatch_5.makeInParameter(0,-1, OUTPUT_CURRENT_SETTING_NAME,OUTPUT_VOLTAGE_OR_CURRENT_STATUS); + popogaSetting=hatch_5.makeInParameter(1,0, POPOGA_NAME,POPOGA_STATUS); + popogaSetting=hatch_6.makeInParameter(0,0, POPOGA_NAME,POPOGA_STATUS); + popogaSetting=hatch_6.makeInParameter(1,0, POPOGA_NAME,POPOGA_STATUS); + scanTimeMinSetting=hatch_7.makeInParameter(0,100, SCAN_TIME_MIN_SETTING_NAME,SCAN_TIME_MIN_STATUS); + popogaSetting=hatch_7.makeInParameter(1,0, POPOGA_NAME,POPOGA_STATUS); + overDriveSetting=hatch_8.makeInParameter(0,0, OVERDRIVE_SETTING_NAME,OVERDRIVE_STATUS); + popogaSetting=hatch_8.makeInParameter(1,0, POPOGA_NAME,POPOGA_STATUS); + popogaSetting=hatch_9.makeInParameter(0,0, POPOGA_NAME,POPOGA_STATUS); + popogaSetting=hatch_9.makeInParameter(1,0, POPOGA_NAME,POPOGA_STATUS); + + popogaDisplay=hatch_0.makeOutParameter(0,0, POPOGA_NAME,POPOGA_STATUS); + popogaDisplay=hatch_0.makeOutParameter(1,0, POPOGA_NAME,POPOGA_STATUS); + popogaDisplay=hatch_1.makeOutParameter(0,0, POPOGA_NAME,POPOGA_STATUS); + popogaDisplay=hatch_1.makeOutParameter(1,0, POPOGA_NAME,POPOGA_STATUS); + transferRadiusTowerDisplay=hatch_2.makeOutParameter(0,0, TRANSFER_RADIUS_TOWER_DISPLAY_NAME,TRANSFER_RADIUS_TOWER_STATUS); + popogaDisplay=hatch_2.makeOutParameter(1,0, POPOGA_NAME,POPOGA_STATUS); + transferRadiusTransceiverDisplay=hatch_3.makeOutParameter(0,0, TRANSFER_RADIUS_TRANSCEIVER_DISPLAY_NAME,TRANSFER_RADIUS_TRANSCEIVER_OR_COVER_ULTIMATE_STATUS); + transferRadiusCoverUltimateDisplay=hatch_3.makeOutParameter(1,0, TRANSFER_RADIUS_COVER_ULTIMATE_DISPLAY_NAME,TRANSFER_RADIUS_TRANSCEIVER_OR_COVER_ULTIMATE_STATUS); + outputVoltageDisplay=hatch_4.makeOutParameter(0,0, OUTPUT_VOLTAGE_DISPLAY_NAME,POWER_STATUS); + popogaDisplay=hatch_4.makeOutParameter(1,0, POPOGA_NAME,POPOGA_STATUS); + outputCurrentDisplay=hatch_5.makeOutParameter(0,0, OUTPUT_CURRENT_DISPLAY_NAME,POWER_STATUS); + energyCapacityDisplay=hatch_5.makeOutParameter(1,0, ENERGY_CAPACITY_DISPLAY_NAME,ENERGY_STATUS); + energyCapacityDisplay=hatch_6.makeOutParameter(0,0, ENERGY_STORED_DISPLAY_NAME,ENERGY_STATUS); + energyFractionDisplay=hatch_6.makeOutParameter(1,0, ENERGY_FRACTION_DISPLAY_NAME,ENERGY_STATUS); + scanTimeDisplay=hatch_7.makeOutParameter(0,0, SCAN_TIME_DISPLAY_NAME,SCAN_TIME_STATUS); + popogaDisplay=hatch_7.makeOutParameter(1,0, POPOGA_NAME,POPOGA_STATUS); + popogaDisplay=hatch_8.makeOutParameter(0,0, POPOGA_NAME,POPOGA_STATUS); + popogaDisplay=hatch_8.makeOutParameter(1,0, POPOGA_NAME,POPOGA_STATUS); + popogaDisplay=hatch_9.makeOutParameter(0,0, POPOGA_NAME,POPOGA_STATUS); + popogaDisplay=hatch_9.makeOutParameter(1,0, POPOGA_NAME,POPOGA_STATUS); } @Override @@ -514,6 +563,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock long energyStored = getEUVar(); float energyFrac = (float)energyStored/energyMax; + float rangeFrac = (float)((-0.5*Math.pow(energyFrac,2))+(1.5*energyFrac)); for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { if (!GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { @@ -556,10 +606,13 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock //Stuff to do if ePowerPass if (ePowerPass) { - - transferRadiusTower = (int) transferRadiusTowerSetting.get(); //TODO generate based on power stored - transferRadiusTransceiver = (int) transferRadiusTransceiverSetting.get(); //TODO generate based on power stored - transferRadiusCoverUltimate = (int) transferRadiusCoverUltimateSetting.get(); //TODO generate based on power stored + //Range calculation and display + transferRadiusTower = (int)(transferRadiusTowerSetting.get()*rangeFrac); + transferRadiusTowerDisplay.set(transferRadiusTower); + transferRadiusTransceiver = (int)(transferRadiusTransceiverSetting.get()*rangeFrac); + transferRadiusTransceiverDisplay.set(transferRadiusTransceiver); + transferRadiusCoverUltimate = (int)(transferRadiusCoverUltimateSetting.get()*rangeFrac); + transferRadiusCoverUltimateDisplay.set(transferRadiusCoverUltimate); //Clean the eTeslaMap for (Map.Entry Rx : eTeslaMap.entrySet()) { -- cgit From 852e3c9806675446f3b835ede3bae96262a08935 Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 15 Jul 2019 12:08:30 +0200 Subject: Power Limits and Current Display --- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 33 ++++++++++++++-------- 1 file changed, 22 insertions(+), 11 deletions(-) (limited to 'src/main/java') 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 e91d07a560..f1b0270446 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 @@ -67,6 +67,9 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private int transferRadiusTransceiver; //Radius for tower to transceiver transfers private int transferRadiusCoverUltimate; //Radius for tower to ultimate cover transfers + + private long outputVoltageMax = 0; //Tesla Voltage Output + private long outputCurrentMax = 0; //Tesla Current Output private long outputVoltage = 0; //Tesla Voltage Output private long outputCurrent = 0; //Tesla Current Output private long energyCapacity = 0; //Total energy the tower can store @@ -522,7 +525,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock vTier = -1; energyCapacity = 0; - outputCurrent = 0; + outputCurrentMax = 0; long[] capacitorData; for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { if (!GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { @@ -533,7 +536,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } } if(vTier < 0){return false;} - outputVoltage = V[vTier]; + outputVoltageMax = V[vTier]; for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { if (!GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { continue; @@ -546,7 +549,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } eCaps.remove(cap); } else { - outputCurrent += capacitorData[1]; + outputCurrentMax += capacitorData[1]; energyCapacity += capacitorData[2]; } } @@ -604,6 +607,21 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } } + //Power Limits + if (outputVoltageSetting.get() > 0){ + outputVoltage = Math.max(outputVoltageMax,(long)outputVoltageSetting.get()); + } else { + outputVoltage = outputVoltageMax; + } + outputVoltageDisplay.set(outputVoltage); + + if (outputCurrentSetting.get() > 0){ + outputCurrent = Math.max(outputCurrentMax,(long)outputCurrentSetting.get()); + } else { + outputCurrent = outputCurrentMax; + } + outputCurrentDisplay.set(0); + //Stuff to do if ePowerPass if (ePowerPass) { //Range calculation and display @@ -642,7 +660,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock //Power transfer long sparks = outputCurrent; System.out.println("Output Current at: " + outputCurrent + "A" ); - long sparkz = 0; while (sparks > 0) { boolean idle = true; for (Map.Entry Rx : entriesSortedByValues(eTeslaMap)) { @@ -665,7 +682,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock setEUVar(getEUVar() - outputVoltageConsumption); node.increaseStoredEnergyUnits(outputVoltageConsumption, true); sparks--; - sparkz++; idle = false; } } @@ -675,7 +691,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock if (node.injectEnergyUnits((byte) 6, outputVoltageInjectable, 1L) > 0L) { setEUVar(getEUVar() - outputVoltageConsumption); sparks--; - sparkz++; idle = false; } } @@ -683,26 +698,22 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock if (node.injectEnergyUnits((byte) 1, outputVoltageInjectable, 1L) > 0L) { setEUVar(getEUVar() - outputVoltageConsumption); sparks--; - sparkz++; idle = false; } } if (sparks == 0) { - System.out.println("Fresh out of sparks!"); break; } } else { idle = true; - System.out.println("ENERGY LOW!"); break; } } if (idle) { - System.out.println("IDLE DROP!"); break; } } - System.out.println("I sent a total of :" + sparkz + " This tick!"); + outputCurrentDisplay.set(outputCurrent - sparks); } return true; } -- cgit From 6322a716508519eeff59d264dec9c83ab20bfde5 Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 15 Jul 2019 15:09:38 +0200 Subject: Display works? --- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/main/java') 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 f1b0270446..7c83ede867 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 @@ -536,7 +536,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } } if(vTier < 0){return false;} - outputVoltageMax = V[vTier]; + outputVoltageMax = V[vTier+1]; for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { if (!GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { continue; @@ -609,28 +609,28 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock //Power Limits if (outputVoltageSetting.get() > 0){ - outputVoltage = Math.max(outputVoltageMax,(long)outputVoltageSetting.get()); + outputVoltage = Math.min(outputVoltageMax,(long)outputVoltageSetting.get()); } else { outputVoltage = outputVoltageMax; } - outputVoltageDisplay.set(outputVoltage); + outputVoltageDisplay.set((double)outputVoltage); if (outputCurrentSetting.get() > 0){ - outputCurrent = Math.max(outputCurrentMax,(long)outputCurrentSetting.get()); + outputCurrent = Math.min(outputCurrentMax,(long)outputCurrentSetting.get()); } else { outputCurrent = outputCurrentMax; } - outputCurrentDisplay.set(0); + outputCurrentDisplay.set((double) 0); //Stuff to do if ePowerPass if (ePowerPass) { //Range calculation and display transferRadiusTower = (int)(transferRadiusTowerSetting.get()*rangeFrac); - transferRadiusTowerDisplay.set(transferRadiusTower); + transferRadiusTowerDisplay.set((double)transferRadiusTower); transferRadiusTransceiver = (int)(transferRadiusTransceiverSetting.get()*rangeFrac); - transferRadiusTransceiverDisplay.set(transferRadiusTransceiver); - transferRadiusCoverUltimate = (int)(transferRadiusCoverUltimateSetting.get()*rangeFrac); - transferRadiusCoverUltimateDisplay.set(transferRadiusCoverUltimate); + transferRadiusTransceiverDisplay.set((double)transferRadiusTransceiver); + transferRadiusCoverUltimate=(int)(transferRadiusCoverUltimateSetting.get()*rangeFrac); + transferRadiusCoverUltimateDisplay.set((double)transferRadiusCoverUltimate); //Clean the eTeslaMap for (Map.Entry Rx : eTeslaMap.entrySet()) { -- cgit From cf6da93f1a2431b4670276a401c6a177306797d6 Mon Sep 17 00:00:00 2001 From: Tec Date: Mon, 15 Jul 2019 16:27:58 +0200 Subject: Fix gui --- .../thing/metaTileEntity/multi/base/GT_Container_MultiMachineEM.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_Container_MultiMachineEM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_Container_MultiMachineEM.java index 0ad5aa48ca..dd2eb0a7be 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_Container_MultiMachineEM.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_Container_MultiMachineEM.java @@ -151,7 +151,7 @@ public class GT_Container_MultiMachineEM extends GT_ContainerMetaTile_Machine { allowedToWork = (par2 & 4) == 4; } else if(par1>=128 && par1<208){ int pos=(par1-128)>>2; - eParamsIn[pos]=Util.receiveDouble(eParamsIn[pos],par1&0xFFFFFFFC,par1,par2); + eParamsOut[pos]=Util.receiveDouble(eParamsOut[pos],par1&0xFFFFFFFC,par1,par2); }else if(par1>=208 && par1<288){ int pos=(par1-208)>>2; eParamsIn[pos]=Util.receiveDouble(eParamsIn[pos],par1&0xFFFFFFFC,par1,par2); -- cgit From 38fdb9bd04456014c07027e870865eb94c52d89d Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 15 Jul 2019 20:20:03 +0200 Subject: Auto stash before merge of "BassAddons" and "origin/BassAddons" --- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/main/java') 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 7c83ede867..78030e5ce4 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 @@ -568,6 +568,11 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock float energyFrac = (float)energyStored/energyMax; float rangeFrac = (float)((-0.5*Math.pow(energyFrac,2))+(1.5*energyFrac)); + energyCapacityDisplay.set(energyMax); + energyStoredDisplay.set(energyStored); + energyFractionDisplay.set(energyFrac); + + for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { if (!GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { continue; @@ -613,24 +618,24 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } else { outputVoltage = outputVoltageMax; } - outputVoltageDisplay.set((double)outputVoltage); + outputVoltageDisplay.set(outputVoltage); if (outputCurrentSetting.get() > 0){ outputCurrent = Math.min(outputCurrentMax,(long)outputCurrentSetting.get()); } else { outputCurrent = outputCurrentMax; } - outputCurrentDisplay.set((double) 0); + outputCurrentDisplay.set(0); //Stuff to do if ePowerPass if (ePowerPass) { //Range calculation and display transferRadiusTower = (int)(transferRadiusTowerSetting.get()*rangeFrac); - transferRadiusTowerDisplay.set((double)transferRadiusTower); + transferRadiusTowerDisplay.set(transferRadiusTower); transferRadiusTransceiver = (int)(transferRadiusTransceiverSetting.get()*rangeFrac); - transferRadiusTransceiverDisplay.set((double)transferRadiusTransceiver); + transferRadiusTransceiverDisplay.set(transferRadiusTransceiver); transferRadiusCoverUltimate=(int)(transferRadiusCoverUltimateSetting.get()*rangeFrac); - transferRadiusCoverUltimateDisplay.set((double)transferRadiusCoverUltimate); + transferRadiusCoverUltimateDisplay.set(transferRadiusCoverUltimate); //Clean the eTeslaMap for (Map.Entry Rx : eTeslaMap.entrySet()) { -- cgit From 3bad675ed7d23ca1963ddff41871297408cad965 Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 16 Jul 2019 09:37:04 +0200 Subject: Just Display Things ~ --- .../metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main/java') 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 78030e5ce4..43cf237963 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 @@ -331,7 +331,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock popogaDisplay=hatch_4.makeOutParameter(1,0, POPOGA_NAME,POPOGA_STATUS); outputCurrentDisplay=hatch_5.makeOutParameter(0,0, OUTPUT_CURRENT_DISPLAY_NAME,POWER_STATUS); energyCapacityDisplay=hatch_5.makeOutParameter(1,0, ENERGY_CAPACITY_DISPLAY_NAME,ENERGY_STATUS); - energyCapacityDisplay=hatch_6.makeOutParameter(0,0, ENERGY_STORED_DISPLAY_NAME,ENERGY_STATUS); + energyStoredDisplay=hatch_6.makeOutParameter(0,0, ENERGY_STORED_DISPLAY_NAME,ENERGY_STATUS); energyFractionDisplay=hatch_6.makeOutParameter(1,0, ENERGY_FRACTION_DISPLAY_NAME,ENERGY_STATUS); scanTimeDisplay=hatch_7.makeOutParameter(0,0, SCAN_TIME_DISPLAY_NAME,SCAN_TIME_STATUS); popogaDisplay=hatch_7.makeOutParameter(1,0, POPOGA_NAME,POPOGA_STATUS); @@ -568,9 +568,9 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock float energyFrac = (float)energyStored/energyMax; float rangeFrac = (float)((-0.5*Math.pow(energyFrac,2))+(1.5*energyFrac)); - energyCapacityDisplay.set(energyMax); - energyStoredDisplay.set(energyStored); - energyFractionDisplay.set(energyFrac); + energyCapacityDisplay.set((double)energyMax); + energyStoredDisplay.set((double)energyStored); + energyFractionDisplay.set((double)energyFrac); for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { @@ -589,6 +589,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock ////Scanning for active teslas scanTime++; + scanTimeDisplay.set(scanTime); if (scanTime >= 100) { scanTime = 0; eTeslaMap.clear(); -- cgit From d7a1b485741091668b88328e3ae9df0a7d6419e8 Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 16 Jul 2019 13:01:38 +0200 Subject: Texture Attempt 3.6 Not great, not terrible --- .../tectech/thing/casing/GT_Block_CasingsBA0.java | 4 +-- .../hatch/GT_MetaTileEntity_Hatch_Capacitor.java | 1 - .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 33 +++++++-------------- .../blocks/iconsets/TM_TESLA_CAPS_ACTIVE.png | Bin 527 -> 2387 bytes .../iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_0.png | Bin 631 -> 2736 bytes .../iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_1.png | Bin 631 -> 2376 bytes .../iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_2.png | Bin 631 -> 2590 bytes .../iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_3.png | Bin 631 -> 2705 bytes .../iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_4.png | Bin 631 -> 2614 bytes .../iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_5.png | Bin 631 -> 2788 bytes .../TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_0.png | Bin 606 -> 2824 bytes .../TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_1.png | Bin 606 -> 2460 bytes .../TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_2.png | Bin 606 -> 2694 bytes .../TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_3.png | Bin 606 -> 2832 bytes .../TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_4.png | Bin 606 -> 2690 bytes .../TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_5.png | Bin 606 -> 2896 bytes .../blocks/iconsets/TM_TESLA_WINDING_SECONDARY.png | Bin 745 -> 0 bytes .../iconsets/TM_TESLA_WINDING_SECONDARY_SIDES.png | Bin 0 -> 2976 bytes .../TM_TESLA_WINDING_SECONDARY_TOP_BOTTOM.png | Bin 0 -> 2860 bytes 19 files changed, 12 insertions(+), 26 deletions(-) delete mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_SECONDARY.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_SECONDARY_SIDES.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_SECONDARY_TOP_BOTTOM.png (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java index ad552f64e3..bea25a2901 100644 --- a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java @@ -84,8 +84,8 @@ public class GT_Block_CasingsBA0 extends GT_Block_Casings_Abstract { tM6[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_BASE_TOP_BOTTOM"); tM6[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_BASE_SIDES"); tM7 = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_TOROID"); - tM8[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_BASE_TOP_BOTTOM"); - tM8[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_SECONDARY"); + tM8[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_TOP_BOTTOM"); + tM8[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_SECONDARY_SIDES"); } @Override 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 b8828f6dbf..4c5ef0fd8a 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 @@ -158,7 +158,6 @@ public class GT_MetaTileEntity_Hatch_Capacitor extends GT_MetaTileEntity_Hatch { continue; } CapacitorComponent cap = componentBinds.get(getUniqueIdentifier(mInventory[i])); - System.out.println(getUniqueIdentifier(mInventory[i])); if (cap != null && cap.tier > tier) { tier = cap.tier; } 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 43cf237963..df91fb458d 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 @@ -49,33 +49,22 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private int minTier = 1; private int scanTime = 0; //Sets scan time to Z E R O :epic: - //private int scanTimeMin = 100; //Min scan time in ticks - //private int scanTimeTill = scanTimeMin; //Set default scan time private Map eTeslaMap = new HashMap<>(); //Tesla Map to map them tesla bois! private final ArrayList eCaps = new ArrayList<>(); //Capacitor List - //private float histLow = 0.25F; //Power pass is disabled if power is under this fraction - //private float histHigh = 0.75F; //Power pass is enabled if power is over this fraction - - //private float histLowLimit = 0.05F; //How low can you configure it? - //private float histHighLimit = 0.95F; //How high can you configure it? - private int scanRadius = 32; //Tesla scan radius private int transferRadiusTower; //Radius for tower to tower transfers private int transferRadiusTransceiver; //Radius for tower to transceiver transfers private int transferRadiusCoverUltimate; //Radius for tower to ultimate cover transfers - private long outputVoltageMax = 0; //Tesla Voltage Output private long outputCurrentMax = 0; //Tesla Current Output private long outputVoltage = 0; //Tesla Voltage Output private long outputCurrent = 0; //Tesla Current Output private long energyCapacity = 0; //Total energy the tower can store - //public boolean powerPassToggle = false; //Power Pass for public viewing - public boolean tPowerPass(){ return ePowerPass; } @@ -92,15 +81,12 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private long getEnergyEfficiency(long voltage, int mTier){ if (overDriveToggle()){ - return (long)(voltage * energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maxTier - minTier + 1) * (mTier - 1)); //Efficiency Formula - } else { return (long)(voltage * (2-energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maxTier - minTier + 1) * (mTier - 1))*(2- overdriveEfficiency)); //Sum overdrive efficiency formula + } else { + return (long)(voltage * energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maxTier - minTier + 1) * (mTier - 1)); //Efficiency Formula } } - public int pTier = 0; - public int sTier = 0; - //region structure private static final String[][] shape0 = new String[][]{//3 16 0 {"\u000F", "A . ",}, @@ -568,10 +554,9 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock float energyFrac = (float)energyStored/energyMax; float rangeFrac = (float)((-0.5*Math.pow(energyFrac,2))+(1.5*energyFrac)); - energyCapacityDisplay.set((double)energyMax); - energyStoredDisplay.set((double)energyStored); - energyFractionDisplay.set((double)energyFrac); - + energyCapacityDisplay.set(energyMax); + energyStoredDisplay.set(energyStored); + energyFractionDisplay.set(energyFrac); for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { if (!GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { @@ -586,12 +571,13 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } else if (ePowerPass && energyFrac < histLowSetting.get()) { ePowerPass = false; } - ////Scanning for active teslas + //Scanning for active teslas scanTime++; - scanTimeDisplay.set(scanTime); if (scanTime >= 100) { scanTime = 0; + scanTimeDisplay.set(scanTime); + scanTimeDisplay.updateStatus(); eTeslaMap.clear(); for (int xPosOffset = -scanRadius; xPosOffset <= scanRadius; xPosOffset++) { @@ -611,6 +597,8 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } } } + } else { + scanTimeDisplay.set(scanTime); } //Power Limits @@ -665,7 +653,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock //Power transfer long sparks = outputCurrent; - System.out.println("Output Current at: " + outputCurrent + "A" ); while (sparks > 0) { boolean idle = true; for (Map.Entry Rx : entriesSortedByValues(eTeslaMap)) { diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_CAPS_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_CAPS_ACTIVE.png index 4401341ad7..9ce6223110 100644 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_CAPS_ACTIVE.png and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_CAPS_ACTIVE.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_0.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_0.png index 4598fc32b3..68a2f09d4c 100644 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_0.png and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_0.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_1.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_1.png index 4598fc32b3..aab8186957 100644 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_1.png and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_1.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_2.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_2.png index 4598fc32b3..59b852c17d 100644 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_2.png and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_2.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_3.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_3.png index 4598fc32b3..04eb9d4999 100644 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_3.png and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_3.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_4.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_4.png index 4598fc32b3..3d2fe49855 100644 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_4.png and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_4.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_5.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_5.png index 4598fc32b3..def8363e93 100644 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_5.png and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_5.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_0.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_0.png index 5ba1e61487..b1daada334 100644 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_0.png and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_0.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_1.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_1.png index 5ba1e61487..7cb5279698 100644 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_1.png and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_1.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_2.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_2.png index 5ba1e61487..8144a12663 100644 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_2.png and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_2.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_3.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_3.png index 5ba1e61487..23f00ffe86 100644 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_3.png and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_3.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_4.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_4.png index 5ba1e61487..ca8b28264e 100644 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_4.png and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_4.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_5.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_5.png index 5ba1e61487..ef58deba47 100644 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_5.png and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_5.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_SECONDARY.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_SECONDARY.png deleted file mode 100644 index 76388e39c7..0000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_SECONDARY.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_SECONDARY_SIDES.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_SECONDARY_SIDES.png new file mode 100644 index 0000000000..64b0bffe16 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_SECONDARY_SIDES.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_SECONDARY_TOP_BOTTOM.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_SECONDARY_TOP_BOTTOM.png new file mode 100644 index 0000000000..554bdf0f23 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_WINDING_SECONDARY_TOP_BOTTOM.png differ -- cgit From b3b4378fdddf4ce4597c217597625be50c2420d7 Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 17 Jul 2019 09:51:45 +0200 Subject: Tesla fixes more I guess --- .../tectech/thing/casing/GT_Block_CasingsBA0.java | 2 +- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 40 +++++++++++++++------- 2 files changed, 29 insertions(+), 13 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java index bea25a2901..5fb1d31652 100644 --- a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java @@ -84,7 +84,7 @@ public class GT_Block_CasingsBA0 extends GT_Block_Casings_Abstract { tM6[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_BASE_TOP_BOTTOM"); tM6[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_BASE_SIDES"); tM7 = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_TOROID"); - tM8[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_TOP_BOTTOM"); + tM8[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_SECONDARY_TOP_BOTTOM"); tM8[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_SECONDARY_SIDES"); } 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 df91fb458d..468444b8af 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 @@ -20,6 +20,7 @@ import gregtech.api.objects.GT_RenderedTexture; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; import java.util.ArrayList; @@ -42,8 +43,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private static Textures.BlockIcons.CustomIcon ScreenOFF; private static Textures.BlockIcons.CustomIcon ScreenON; - private int tier = 0; - private int mTier = 1;//Tier offset by +1 + private int mTier = 0; private int orientation = 0; private int maxTier = 6; private int minTier = 1; @@ -81,9 +81,9 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private long getEnergyEfficiency(long voltage, int mTier){ if (overDriveToggle()){ - return (long)(voltage * (2-energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maxTier - minTier + 1) * (mTier - 1))*(2- overdriveEfficiency)); //Sum overdrive efficiency formula + return (long)(voltage * (2-energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maxTier - minTier + 1) * mTier)*(2- overdriveEfficiency)); //Sum overdrive efficiency formula } else { - return (long)(voltage * energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maxTier - minTier + 1) * (mTier - 1)); //Efficiency Formula + return (long)(voltage * energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maxTier - minTier + 1) * mTier); //Efficiency Formula } } @@ -271,6 +271,18 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock super(aName); } + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setLong("energyCapacity", energyCapacity); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + energyCapacity = aNBT.getLong("energyCapacity"); + } + @Override protected void parametersInstantiation_EM() { Parameters.Group hatch_0=parametrization.getGroup(0, true); @@ -437,32 +449,30 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock yOffset = 16; zOffset = 0; orientation = 0; - tier = iGregTechTileEntity.getMetaIDOffset(coilX0, coilY0, coilZ0); + mTier = iGregTechTileEntity.getMetaIDOffset(coilX0, coilY0, coilZ0); } else if (coil1 == sBlockCasingsBA0) { xOffset = 3; yOffset = 0; zOffset = 0; orientation = 1; - tier = iGregTechTileEntity.getMetaIDOffset(coilX0, -coilY0, coilZ0); + mTier = iGregTechTileEntity.getMetaIDOffset(coilX0, -coilY0, coilZ0); } else if (coil2 == sBlockCasingsBA0) { xOffset = 16; yOffset = 3; zOffset = 0; orientation = 2; - tier = iGregTechTileEntity.getMetaIDOffset(coilX1, coilY1, coilZ1); + mTier = iGregTechTileEntity.getMetaIDOffset(coilX1, coilY1, coilZ1); } else if (coil3 == sBlockCasingsBA0) { xOffset = 0; yOffset = 3; zOffset = 0; orientation = 3; - tier = iGregTechTileEntity.getMetaIDOffset(coilX2, coilY2, coilZ2); + mTier = iGregTechTileEntity.getMetaIDOffset(coilX2, coilY2, coilZ2); } else { return false; } - mTier = tier + 1; - - if (structureCheck_EM(shapes[orientation], blockType, blockMetas[tier], addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, xOffset, yOffset, zOffset) && eCaps.size() > 0) { + if (structureCheck_EM(shapes[orientation], blockType, blockMetas[mTier], addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, xOffset, yOffset, zOffset) && eCaps.size() > 0) { for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { cap.getBaseMetaTileEntity().setActive(iGregTechTileEntity.isActive()); @@ -521,7 +531,13 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock vTier = (int) cap.getCapacitors()[0]; } } - if(vTier < 0){return false;} + + if(vTier < 0){ + return false; + } else if (vTier > mTier && getEUVar() > 0){ + explodeMultiblock(); + } + outputVoltageMax = V[vTier+1]; for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { if (!GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { -- cgit From b7311455c832add1c82c976c8b25afe434d2461c Mon Sep 17 00:00:00 2001 From: Tec Date: Wed, 17 Jul 2019 10:08:02 +0200 Subject: Expose some internal state --- .../multi/base/GT_MetaTileEntity_MultiblockBase_EM.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/main/java') 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 19d64910e1..1fb18ccf50 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 @@ -122,6 +122,14 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt //functionality toggles - changed by buttons in gui also protected boolean ePowerPass = false, eSafeVoid = false; + public boolean isPowerPass() { + return ePowerPass; + } + + public boolean isSafeVoid() { + return eSafeVoid; + } + //max amperes machine can take in after computing it to the lowest tier (exchange packets to min tier count) protected long eMaxAmpereFlow = 0,eMaxAmpereGen=0; -- cgit From d3f2d5144f05fe5953e69d9787f52a5771a3ff14 Mon Sep 17 00:00:00 2001 From: Tec Date: Wed, 17 Jul 2019 10:10:07 +0200 Subject: Can be safely exposed --- .../multi/base/GT_MetaTileEntity_MultiblockBase_EM.java | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'src/main/java') 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 1fb18ccf50..635107ff28 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 @@ -115,20 +115,12 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt //if u need to force some things to be fixed - u might need to override doRandomMaintenanceDamage protected byte minRepairStatus = 3; - //endregion - - //region READ ONLY unless u really need to change it - //functionality toggles - changed by buttons in gui also - protected boolean ePowerPass = false, eSafeVoid = false; + public boolean ePowerPass = false, eSafeVoid = false; - public boolean isPowerPass() { - return ePowerPass; - } + //endregion - public boolean isSafeVoid() { - return eSafeVoid; - } + //region READ ONLY unless u really need to change it //max amperes machine can take in after computing it to the lowest tier (exchange packets to min tier count) protected long eMaxAmpereFlow = 0,eMaxAmpereGen=0; -- cgit From a4dfd05aed7297b886929f3e9b90ae712369dcae Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 17 Jul 2019 10:23:05 +0200 Subject: Proper Power pass use --- .../thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java | 6 +----- .../thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'src/main/java') 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 468444b8af..08f2d52b75 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 @@ -65,10 +65,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private long outputCurrent = 0; //Tesla Current Output private long energyCapacity = 0; //Total energy the tower can store - public boolean tPowerPass(){ - return ePowerPass; - } - public int vTier = -1; private long lossPerBlock = 1; //EU lost per block traveled @@ -686,7 +682,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && Rx.getValue() <= transferRadiusTower) { GT_MetaTileEntity_TM_teslaCoil nodeTesla = (GT_MetaTileEntity_TM_teslaCoil) nodeInside; - if (!nodeTesla.tPowerPass()) { + if (!nodeTesla.ePowerPass) { if (nodeTesla.getEUVar() + outputVoltageInjectable <= (nodeTesla.maxEUStore() / 2)) { setEUVar(getEUVar() - outputVoltageConsumption); node.increaseStoredEnergyUnits(outputVoltageConsumption, true); 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 f4430adf66..3bb8d8fe22 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 @@ -236,7 +236,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB } if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && Rx.getValue() <= transferRadiusTower) { GT_MetaTileEntity_TM_teslaCoil nodeTesla = (GT_MetaTileEntity_TM_teslaCoil) nodeInside; - if (!nodeTesla.tPowerPass()) { + if (!nodeTesla.ePowerPass) { if (nodeTesla.getEUVar() + outputVoltageInjectable <= (nodeTesla.maxEUStore() / 2)) { setEUVar(getEUVar() - outputVoltageConsumption); node.increaseStoredEnergyUnits(outputVoltageInjectable, true); -- cgit From c6c6b523244b1ac6d38a448aac19516b438c52f7 Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 17 Jul 2019 12:02:37 +0200 Subject: Minor code clean up --- .../hatch/GT_MetaTileEntity_Hatch_Capacitor.java | 16 +------ .../hatch/gui/GT_Container_Capacitor.java | 19 +++----- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 54 ++++++++++------------ 3 files changed, 32 insertions(+), 57 deletions(-) (limited to 'src/main/java') 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 4c5ef0fd8a..f83a1b4269 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 @@ -18,7 +18,6 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; import java.util.HashMap; @@ -35,7 +34,6 @@ public class GT_MetaTileEntity_Hatch_Capacitor extends GT_MetaTileEntity_Hatch { private static Textures.BlockIcons.CustomIcon TM_H; private static Textures.BlockIcons.CustomIcon TM_H_ACTIVE; private static Map componentBinds = new HashMap<>(); - public float energyStoredFrac = 0; public GT_MetaTileEntity_Hatch_Capacitor(int aID, String aName, String aNameRegional, int aTier, String descr) { super(aID, aName, aNameRegional, aTier, 16, descr); @@ -46,18 +44,6 @@ public class GT_MetaTileEntity_Hatch_Capacitor extends GT_MetaTileEntity_Hatch { super(aName, aTier, 16, aDescription, aTextures); } - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - aNBT.setFloat("energyStoredFrac", energyStoredFrac); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - energyStoredFrac = aNBT.getFloat("energyStoredFrac"); - } - @Override public int getInventoryStackLimit() { return 1; @@ -137,7 +123,7 @@ public class GT_MetaTileEntity_Hatch_Capacitor extends GT_MetaTileEntity_Hatch { @Override public int getSizeInventory() { - return energyStoredFrac > 0.2 || getBaseMetaTileEntity().isActive() ? 0 : mInventory.length; + return getBaseMetaTileEntity().isActive() ? 0 : mInventory.length; } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Capacitor.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Capacitor.java index 0b27dc4f04..cd29379afc 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Capacitor.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Capacitor.java @@ -1,19 +1,13 @@ package com.github.technus.tectech.thing.metaTileEntity.hatch.gui; -import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Capacitor; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.gui.GT_ContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; public class GT_Container_Capacitor extends GT_ContainerMetaTile_Machine { - public boolean charged = false; - public GT_Container_Capacitor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(aInventoryPlayer, aTileEntity); } @@ -50,12 +44,11 @@ public class GT_Container_Capacitor extends GT_ContainerMetaTile_Machine { if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) { return; } - charged = ((GT_MetaTileEntity_Hatch_Capacitor) mTileEntity.getMetaTileEntity()).energyStoredFrac > 0; } @Override public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { - if (charged || mActive != 0) { + if (mActive != 0) { return null; } return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); @@ -63,7 +56,7 @@ public class GT_Container_Capacitor extends GT_ContainerMetaTile_Machine { @Override public ItemStack transferStackInSlot(EntityPlayer aPlayer, int aSlotIndex) { - if (charged || mActive != 0) { + if (mActive != 0) { return null; } return super.transferStackInSlot(aPlayer, aSlotIndex); @@ -71,7 +64,7 @@ public class GT_Container_Capacitor extends GT_ContainerMetaTile_Machine { @Override public boolean canDragIntoSlot(Slot par1Slot) { - if (charged || mActive != 0) { + if (mActive != 0) { return false; } return super.canDragIntoSlot(par1Slot); @@ -79,7 +72,7 @@ public class GT_Container_Capacitor extends GT_ContainerMetaTile_Machine { @Override public void putStacksInSlots(ItemStack[] par1ArrayOfItemStack) { - if (charged || mActive != 0) { + if (mActive != 0) { return; } super.putStacksInSlots(par1ArrayOfItemStack); @@ -87,7 +80,7 @@ public class GT_Container_Capacitor extends GT_ContainerMetaTile_Machine { @Override protected boolean mergeItemStack(ItemStack aStack, int aStartIndex, int aSlotCount, boolean par4) { - if (charged || mActive != 0) { + if (mActive != 0) { return false; } return super.mergeItemStack(aStack, aStartIndex, aSlotCount, par4); @@ -95,7 +88,7 @@ public class GT_Container_Capacitor extends GT_ContainerMetaTile_Machine { @Override public void putStackInSlot(int par1, ItemStack par2ItemStack) { - if (charged || mActive != 0) { + if (mActive != 0) { return; } super.putStackInSlot(par1, par2ItemStack); 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 08f2d52b75..384d71fb1b 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 @@ -43,37 +43,36 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private static Textures.BlockIcons.CustomIcon ScreenOFF; private static Textures.BlockIcons.CustomIcon ScreenON; - private int mTier = 0; - private int orientation = 0; - private int maxTier = 6; - private int minTier = 1; - - private int scanTime = 0; //Sets scan time to Z E R O :epic: + private int mTier = 0; //Determines max voltage and efficiency (MV to LuV) + private int orientation = 0; //Direction of multi for structure check + private int maxTier = 6; //Max tier for efficiency calcuation + private int minTier = 1; //Min tier for efficiency calcuation private Map eTeslaMap = new HashMap<>(); //Tesla Map to map them tesla bois! private final ArrayList eCaps = new ArrayList<>(); //Capacitor List - private int scanRadius = 32; //Tesla scan radius + private int scanTime = 0; //Scan timer used for tesla search intervals + private int scanRadius = 32; //Tesla scan radius private int transferRadiusTower; //Radius for tower to tower transfers private int transferRadiusTransceiver; //Radius for tower to transceiver transfers private int transferRadiusCoverUltimate; //Radius for tower to ultimate cover transfers - private long outputVoltageMax = 0; //Tesla Voltage Output - private long outputCurrentMax = 0; //Tesla Current Output - private long outputVoltage = 0; //Tesla Voltage Output - private long outputCurrent = 0; //Tesla Current Output - private long energyCapacity = 0; //Total energy the tower can store - - public int vTier = -1; + private long energyCapacity = 0; //Total energy storage limited by capacitors + private long outputVoltageMax = 0; //Tesla voltage output limited by capacitors + public int vTier = -1; //Tesla voltage tier limited by capacitors + private long outputCurrentMax = 0; //Tesla current output limited by capacitors + private long outputVoltage = 0; //Tesla voltage output limited by settings + private long outputCurrent = 0; //Tesla current output limited by settings - private long lossPerBlock = 1; //EU lost per block traveled - private float energyEfficiencyMax = 0.95F; //Max efficiency - private float energyEfficiencyMin = 0.75F; //Min efficiency + private long lossPerBlock = 1; //Distance loss of each packet sent + private float energyEfficiencyMax = 0.95F; //Max efficiency of each packet sent at highest mTier + private float energyEfficiencyMin = 0.75F; //Min efficiency of each packet sent at lowest mTier private boolean overDriveToggle(){return (overDriveSetting.get() > 0);} - private float overdriveEfficiency = 0.95F; //Overdrive efficiency - private long outputVoltageInjectable = 0; //How much EU will be received post distance losses - private long outputVoltageConsumption = 0; //How much EU will be drained + private float overdriveEfficiency = 0.95F; //Overdrive efficiency added losses + private long outputVoltageConsumption = 0; //Packet size consumed including efficiency losses + private long outputVoltageInjectable = 0; //Packet size injected into target post losses + private long getEnergyEfficiency(long voltage, int mTier){ if (overDriveToggle()){ @@ -81,7 +80,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } else { return (long)(voltage * energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maxTier - minTier + 1) * mTier); //Efficiency Formula } - } + }//Efficiency function used on power transfers //region structure private static final String[][] shape0 = new String[][]{//3 16 0 @@ -138,7 +137,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock EnumChatFormatting.AQUA + "Hint Details:", "1 - Classic Hatches or Steel Pipe Casing", "2 - Titanium Frames", - }; + };//TODO Update casings + hatches //endregion //region parameters @@ -375,6 +374,10 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { cap.getBaseMetaTileEntity().setActive(false); } + + setEUVar(0); + energyStoredDisplay.set(0); + energyFractionDisplay.set(0); } @Override @@ -570,13 +573,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock energyStoredDisplay.set(energyStored); energyFractionDisplay.set(energyFrac); - for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { - if (!GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { - continue; - } - cap.energyStoredFrac = energyFrac; - } - //ePowerPass hist toggle if (!ePowerPass && energyFrac > histHighSetting.get()) { ePowerPass = true; -- cgit From 4ffebee4b90f56624e1bed150ae6e12b96bd4e14 Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 17 Jul 2019 16:18:53 +0200 Subject: More changes ++ --- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 63 +++++++++++----------- 1 file changed, 32 insertions(+), 31 deletions(-) (limited to 'src/main/java') 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 384d71fb1b..67bb7c4aa5 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 @@ -35,10 +35,6 @@ import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBloc import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; import static gregtech.api.enums.GT_Values.E; -/** - * Created by danie_000 on 17.12.2016. - * edited by Bass on like 2018-02-05 - */ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { private static Textures.BlockIcons.CustomIcon ScreenOFF; private static Textures.BlockIcons.CustomIcon ScreenON; @@ -48,18 +44,19 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private int maxTier = 6; //Max tier for efficiency calcuation private int minTier = 1; //Min tier for efficiency calcuation - private Map eTeslaMap = new HashMap<>(); //Tesla Map to map them tesla bois! - private final ArrayList eCaps = new ArrayList<>(); //Capacitor List + private Map eTeslaMap = new HashMap<>(); //Used to store targets for power transmission + private final ArrayList eCapacitorHatches = new ArrayList<>(); //Used to determine count and tier of capacitors present private int scanTime = 0; //Scan timer used for tesla search intervals - private int scanRadius = 32; //Tesla scan radius + private int scanRadius = 32; //Radius of transmission target scan each interval private int transferRadiusTower; //Radius for tower to tower transfers private int transferRadiusTransceiver; //Radius for tower to transceiver transfers private int transferRadiusCoverUltimate; //Radius for tower to ultimate cover transfers private long energyCapacity = 0; //Total energy storage limited by capacitors private long outputVoltageMax = 0; //Tesla voltage output limited by capacitors + private long energyRestore = 0;//EU Restored on NBT Load and Recipe check public int vTier = -1; //Tesla voltage tier limited by capacitors private long outputCurrentMax = 0; //Tesla current output limited by capacitors private long outputVoltage = 0; //Tesla voltage output limited by settings @@ -68,14 +65,13 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private long lossPerBlock = 1; //Distance loss of each packet sent private float energyEfficiencyMax = 0.95F; //Max efficiency of each packet sent at highest mTier private float energyEfficiencyMin = 0.75F; //Min efficiency of each packet sent at lowest mTier - private boolean overDriveToggle(){return (overDriveSetting.get() > 0);} private float overdriveEfficiency = 0.95F; //Overdrive efficiency added losses private long outputVoltageConsumption = 0; //Packet size consumed including efficiency losses private long outputVoltageInjectable = 0; //Packet size injected into target post losses - private long getEnergyEfficiency(long voltage, int mTier){ - if (overDriveToggle()){ + private long getEnergyEfficiency(long voltage, int mTier, boolean overDriveToggle){ + if (overDriveToggle){ return (long)(voltage * (2-energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maxTier - minTier + 1) * mTier)*(2- overdriveEfficiency)); //Sum overdrive efficiency formula } else { return (long)(voltage * energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maxTier - minTier + 1) * mTier); //Efficiency Formula @@ -165,7 +161,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private static final INameFunction ENERGY_FRACTION_DISPLAY_NAME = (base, p)-> "Energy Fraction display"; private static final INameFunction SCAN_TIME_DISPLAY_NAME = (base, p)-> "Scan time display"; - private static final IStatusFunction HYSTERESIS_LOW_STATUS=(base, p)->{ double value=p.get(); if(Double.isNaN(value)){return STATUS_WRONG;} @@ -269,13 +264,13 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock @Override public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); - aNBT.setLong("energyCapacity", energyCapacity); + aNBT.setLong("energyRestore", getEUVar()); } @Override public void loadNBTData(NBTTagCompound aNBT) { super.loadNBTData(aNBT); - energyCapacity = aNBT.getLong("energyCapacity"); + energyRestore = aNBT.getLong("energyRestore"); } @Override @@ -363,7 +358,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock @Override public void onRemoval() { super.onRemoval(); - for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { + for (GT_MetaTileEntity_Hatch_Capacitor cap : eCapacitorHatches) { cap.getBaseMetaTileEntity().setActive(false); } } @@ -371,7 +366,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock @Override public void stopMachine() { super.stopMachine(); - for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { + for (GT_MetaTileEntity_Hatch_Capacitor cap : eCapacitorHatches) { cap.getBaseMetaTileEntity().setActive(false); } @@ -382,12 +377,12 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { + for (GT_MetaTileEntity_Hatch_Capacitor cap : eCapacitorHatches) { if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { cap.getBaseMetaTileEntity().setActive(false); } } - eCaps.clear(); + eCapacitorHatches.clear(); int coilX0 = 0; int coilX1 = 0; @@ -471,8 +466,8 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock return false; } - if (structureCheck_EM(shapes[orientation], blockType, blockMetas[mTier], addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, xOffset, yOffset, zOffset) && eCaps.size() > 0) { - for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { + if (structureCheck_EM(shapes[orientation], blockType, blockMetas[mTier], addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, xOffset, yOffset, zOffset) && eCapacitorHatches.size() > 0) { + for (GT_MetaTileEntity_Hatch_Capacitor cap : eCapacitorHatches) { if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { cap.getBaseMetaTileEntity().setActive(iGregTechTileEntity.isActive()); } @@ -522,7 +517,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock energyCapacity = 0; outputCurrentMax = 0; long[] capacitorData; - for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { + for (GT_MetaTileEntity_Hatch_Capacitor cap : eCapacitorHatches) { if (!GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { continue; } @@ -538,7 +533,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } outputVoltageMax = V[vTier+1]; - for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { + for (GT_MetaTileEntity_Hatch_Capacitor cap : eCapacitorHatches) { if (!GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { continue; } @@ -548,12 +543,18 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock if(getEUVar() > 0 && capacitorData[0] != 0){ cap.getBaseMetaTileEntity().setToFire(); } - eCaps.remove(cap); + eCapacitorHatches.remove(cap); } else { outputCurrentMax += capacitorData[1]; energyCapacity += capacitorData[2]; } } + + //Restores power AFTER recipe check might change capacity value + if (energyRestore > 0) { + setEUVar(energyRestore); + energyRestore = 0; + } return true; } @@ -562,7 +563,8 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock if (getBaseMetaTileEntity().isClientSide()) { return true; } - ////Hysteresis based ePowerPass Config + + //Hysteresis based ePowerPass setting long energyMax = maxEUStore() / 2; long energyStored = getEUVar(); @@ -573,14 +575,13 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock energyStoredDisplay.set(energyStored); energyFractionDisplay.set(energyFrac); - //ePowerPass hist toggle if (!ePowerPass && energyFrac > histHighSetting.get()) { ePowerPass = true; } else if (ePowerPass && energyFrac < histLowSetting.get()) { ePowerPass = false; } - //Scanning for active teslas + //Scan for transmission targets scanTime++; if (scanTime >= 100) { scanTime = 0; @@ -609,7 +610,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock scanTimeDisplay.set(scanTime); } - //Power Limits + //Power Limit Settings if (outputVoltageSetting.get() > 0){ outputVoltage = Math.min(outputVoltageMax,(long)outputVoltageSetting.get()); } else { @@ -664,15 +665,15 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock while (sparks > 0) { boolean idle = true; for (Map.Entry Rx : entriesSortedByValues(eTeslaMap)) { - if(energyStored >= (overDriveToggle() ? outputVoltage*2 : outputVoltage)) { + if(energyStored >= (overDriveSetting.get() > 0 ? outputVoltage*2 : outputVoltage)) { IGregTechTileEntity node = Rx.getKey(); IMetaTileEntity nodeInside = node.getMetaTileEntity(); - if (overDriveToggle()){ + if (overDriveSetting.get() > 0){ outputVoltageInjectable = outputVoltage; - outputVoltageConsumption = getEnergyEfficiency(outputVoltage, mTier) + (lossPerBlock * Rx.getValue()); + outputVoltageConsumption = getEnergyEfficiency(outputVoltage, mTier, true) + (lossPerBlock * Rx.getValue()); } else { - outputVoltageInjectable = getEnergyEfficiency(outputVoltage, mTier) - (lossPerBlock * Rx.getValue()); + outputVoltageInjectable = getEnergyEfficiency(outputVoltage, mTier, false) - (lossPerBlock * Rx.getValue()); outputVoltageConsumption = outputVoltage; } @@ -733,7 +734,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Capacitor) { ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); - return eCaps.add((GT_MetaTileEntity_Hatch_Capacitor) aMetaTileEntity); + return eCapacitorHatches.add((GT_MetaTileEntity_Hatch_Capacitor) aMetaTileEntity); } if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) { ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); -- cgit From 396152d095c1cac5635dec3dd31b3d814d480ed2 Mon Sep 17 00:00:00 2001 From: Tec Date: Wed, 17 Jul 2019 22:58:15 +0200 Subject: Just store capacity --- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 53 ++++++++++------------ 1 file changed, 23 insertions(+), 30 deletions(-) (limited to 'src/main/java') 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 67bb7c4aa5..422d384617 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 @@ -69,15 +69,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private long outputVoltageConsumption = 0; //Packet size consumed including efficiency losses private long outputVoltageInjectable = 0; //Packet size injected into target post losses - - private long getEnergyEfficiency(long voltage, int mTier, boolean overDriveToggle){ - if (overDriveToggle){ - return (long)(voltage * (2-energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maxTier - minTier + 1) * mTier)*(2- overdriveEfficiency)); //Sum overdrive efficiency formula - } else { - return (long)(voltage * energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maxTier - minTier + 1) * mTier); //Efficiency Formula - } - }//Efficiency function used on power transfers - //region structure private static final String[][] shape0 = new String[][]{//3 16 0 {"\u000F", "A . ",}, @@ -261,18 +252,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock super(aName); } - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - aNBT.setLong("energyRestore", getEUVar()); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - energyRestore = aNBT.getLong("energyRestore"); - } - @Override protected void parametersInstantiation_EM() { Parameters.Group hatch_0=parametrization.getGroup(0, true); @@ -342,6 +321,26 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock super.registerIcons(aBlockIconRegister); } + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setLong("energyCapacity",energyCapacity); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + energyCapacity=aNBT.getLong("energyCapacity"); + } + + private long getEnergyEfficiency(long voltage, int mTier, boolean overDriveToggle){ + if (overDriveToggle){ + return (long)(voltage * (2-energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maxTier - minTier + 1) * mTier)*(2- overdriveEfficiency)); //Sum overdrive efficiency formula + } else { + return (long)(voltage * energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maxTier - minTier + 1) * mTier); //Efficiency Formula + } + }//Efficiency function used on power transfers + @Override public long maxEUStore() { return energyCapacity * 2; @@ -513,9 +512,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock mEfficiencyIncrease = 10000; mMaxProgresstime = 20; vTier = -1; - - energyCapacity = 0; - outputCurrentMax = 0; long[] capacitorData; for (GT_MetaTileEntity_Hatch_Capacitor cap : eCapacitorHatches) { if (!GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { @@ -532,6 +528,9 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock explodeMultiblock(); } + + energyCapacity = 0; + outputCurrentMax = 0; outputVoltageMax = V[vTier+1]; for (GT_MetaTileEntity_Hatch_Capacitor cap : eCapacitorHatches) { if (!GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { @@ -549,12 +548,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock energyCapacity += capacitorData[2]; } } - - //Restores power AFTER recipe check might change capacity value - if (energyRestore > 0) { - setEUVar(energyRestore); - energyRestore = 0; - } return true; } -- cgit From 1b4b27221ed97a3a4954d0136dc978ed5ee139d4 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 18 Jul 2019 10:21:02 +0200 Subject: Capacitor Tiering --- .../tectech/thing/item/TeslaCoilCapacitor.java | 25 ++-------------------- .../hatch/GT_MetaTileEntity_Hatch_Capacitor.java | 3 --- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 18 ++++++++++------ 3 files changed, 14 insertions(+), 32 deletions(-) (limited to 'src/main/java') 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 7322ec55ee..e09fe79d6c 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 @@ -20,7 +20,7 @@ import static com.github.technus.tectech.Reference.MODID; public final class TeslaCoilCapacitor extends Item { public static TeslaCoilCapacitor INSTANCE; - public static IIcon LVicon, MVicon, HVicon, EVicon, IVicon, LuVicon, ZPMicon, UVicon; + public static IIcon LVicon, MVicon, HVicon, EVicon, IVicon; public TeslaCoilCapacitor() { setUnlocalizedName("tm.teslaCoilCapacitor"); @@ -31,9 +31,6 @@ public final class TeslaCoilCapacitor extends Item { GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "HV Tesla Capacitor"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "EV Tesla Capacitor"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "IV Tesla Capacitor"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "LuV Tesla Capacitor"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "ZPM Tesla Capacitor"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "UV Tesla Capacitor"); } @Override @@ -55,15 +52,6 @@ public final class TeslaCoilCapacitor extends Item { case 4://"IV" aList.add("Stores energy for tesla towers! (IV)"); break; - case 5://"LuV" - aList.add("Stores energy for tesla towers! (LuV)"); - break; - case 6://"ZPM" - aList.add("Stores energy for tesla towers! (ZPM)"); - break; - case 7://"UV" - aList.add("Stores energy for tesla towers! (UV)"); - break; default:// aList.add("Yeet this broken item into some spicy water!"); break; @@ -90,9 +78,6 @@ public final class TeslaCoilCapacitor extends Item { HVicon = iconRegister.registerIcon(MODID + ":itemParametrizerMemoryCardLocked"); EVicon = iconRegister.registerIcon(MODID + ":itemParametrizerMemoryCardLocked"); IVicon = iconRegister.registerIcon(MODID + ":itemParametrizerMemoryCardLocked"); - LuVicon = iconRegister.registerIcon(MODID + ":itemParametrizerMemoryCardLocked"); - ZPMicon = iconRegister.registerIcon(MODID + ":itemParametrizerMemoryCardLocked"); - UVicon = iconRegister.registerIcon(MODID + ":itemParametrizerMemoryCardLocked"); } @Override @@ -106,19 +91,13 @@ public final class TeslaCoilCapacitor extends Item { return EVicon; case 4: return IVicon; - case 5: - return LuVicon; - case 6: - return ZPMicon; - case 7: - return UVicon; default: return LVicon; } } public void getSubItems(Item aItem, CreativeTabs par2CreativeTabs, List aList) { - for (int i = 0; i <= 7; i++) { + for (int i = 0; i <= 4; i++) { aList.add(new ItemStack(aItem, 1, i)); } } 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 f83a1b4269..3ea31b537e 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 @@ -177,9 +177,6 @@ public class GT_MetaTileEntity_Hatch_Capacitor extends GT_MetaTileEntity_Hatch { new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.2", 2, 1, V[2]*512);//HV Capacitor new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.3", 3, 1, V[3]*512);//EV Capacitor new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.4", 4, 1, V[4]*512);//IV Capacitor - new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.5", 5, 1, V[5]*512);//LuV Capacitor - new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.6", 6, 1, V[6]*512);//ZPM Capacitor - new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.7", 7, 1, V[7]*512);//UV Capacitor } public static class CapacitorComponent implements Comparable { 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 422d384617..1e1b2b4a34 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 @@ -56,7 +56,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private long energyCapacity = 0; //Total energy storage limited by capacitors private long outputVoltageMax = 0; //Tesla voltage output limited by capacitors - private long energyRestore = 0;//EU Restored on NBT Load and Recipe check public int vTier = -1; //Tesla voltage tier limited by capacitors private long outputCurrentMax = 0; //Tesla current output limited by capacitors private long outputVoltage = 0; //Tesla voltage output limited by settings @@ -171,7 +170,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock if(Double.isNaN(value)) return STATUS_WRONG; value=(int)value; if(value<0) return STATUS_TOO_LOW; - if(value>32) return STATUS_TOO_HIGH; + if(value>40) return STATUS_TOO_HIGH; if(value<32) return STATUS_LOW; return STATUS_OK; }; @@ -180,7 +179,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock if(Double.isNaN(value)) return STATUS_WRONG; value=(int)value; if(value<0) return STATUS_TOO_LOW; - if(value>16) return STATUS_TOO_HIGH; + if(value>20) return STATUS_TOO_HIGH; if(value<16) return STATUS_LOW; return STATUS_OK; }; @@ -341,6 +340,13 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } }//Efficiency function used on power transfers + private float getRangeMulti(int mTier, int vTier){ + if (vTier > mTier){ + return 1.25F; + } + return 1F; + } + @Override public long maxEUStore() { return energyCapacity * 2; @@ -621,11 +627,11 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock //Stuff to do if ePowerPass if (ePowerPass) { //Range calculation and display - transferRadiusTower = (int)(transferRadiusTowerSetting.get()*rangeFrac); + transferRadiusTower = (int)(transferRadiusTowerSetting.get()*getRangeMulti(mTier,vTier)*rangeFrac); transferRadiusTowerDisplay.set(transferRadiusTower); - transferRadiusTransceiver = (int)(transferRadiusTransceiverSetting.get()*rangeFrac); + transferRadiusTransceiver = (int)(transferRadiusTransceiverSetting.get()*getRangeMulti(mTier,vTier)*rangeFrac); transferRadiusTransceiverDisplay.set(transferRadiusTransceiver); - transferRadiusCoverUltimate=(int)(transferRadiusCoverUltimateSetting.get()*rangeFrac); + transferRadiusCoverUltimate=(int)(transferRadiusCoverUltimateSetting.get()*getRangeMulti(mTier,vTier)*rangeFrac); transferRadiusCoverUltimateDisplay.set(transferRadiusCoverUltimate); //Clean the eTeslaMap -- cgit From 66503fe78e8061cf6f471ab9bb8f002123afb736 Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 19 Jul 2019 08:44:35 +0200 Subject: Scan slices Tesla Scans now more sane, happens over 5 ticks and doesn't scan under itself or over itself. Scan is also now properly centred and works with rotation an screnching. --- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 110 +++++++++++++++------ 1 file changed, 81 insertions(+), 29 deletions(-) (limited to 'src/main/java') 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 7911d67106..9104cae72d 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 @@ -47,9 +47,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private Map eTeslaMap = new HashMap<>(); //Used to store targets for power transmission private final ArrayList eCapacitorHatches = new ArrayList<>(); //Used to determine count and tier of capacitors present - private int scanTime = 0; //Scan timer used for tesla search intervals - private int scanRadius = 40; //Radius of transmission target scan each interval TODO make dynamic! private int transferRadiusTower; //Radius for tower to tower transfers private int transferRadiusTransceiver; //Radius for tower to transceiver transfers private int transferRadiusCoverUltimate; //Radius for tower to ultimate cover transfers @@ -68,6 +66,18 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private long outputVoltageConsumption = 0; //Packet size consumed including efficiency losses private long outputVoltageInjectable = 0; //Packet size injected into target post losses + //Scan range fields + private double xPosScanMin; + private double xPosScanMax; + private double yPosScan0; + private double yPosScan1; + private double yPosScan2; + private double yPosScan3; + private double yPosScan4; + private double yPosScan5; + private double zPosScanMin; + private double zPosScanMax; + //region structure private static final String[][] shape0 = new String[][]{//3 16 0 {"\u000F", "A . ",}, @@ -217,7 +227,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock double value=p.get(); if(Double.isNaN(value)) return STATUS_WRONG; value=(int)value; - if(value==0) return STATUS_HIGH; + if(value==0||value==20||value==40||value==60||value==80) return STATUS_HIGH; return STATUS_LOW; }; private static final IStatusFunction POWER_STATUS=(base, p)-> { @@ -477,6 +487,25 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock cap.getBaseMetaTileEntity().setActive(iGregTechTileEntity.isActive()); } } + + //Calculate coordinates for scanning and apply offsets + int[] xyzOffsets=getTranslatedOffsets(40,0,43); + xPosScanMin=xyzOffsets[0]; + yPosScan0=xyzOffsets[1]; + zPosScanMin=xyzOffsets[2]; + xyzOffsets=getTranslatedOffsets(-40,-4,-37); + yPosScan1=xyzOffsets[1]; + xyzOffsets=getTranslatedOffsets(-40,-8,-37); + yPosScan2=xyzOffsets[1]; + xyzOffsets=getTranslatedOffsets(-40,-12,-37); + yPosScan3=xyzOffsets[1]; + xyzOffsets=getTranslatedOffsets(-40,-16,-37); + yPosScan4=xyzOffsets[1]; + xyzOffsets=getTranslatedOffsets(-40,-20,-37); + xPosScanMax=xyzOffsets[0]; + yPosScan5=xyzOffsets[1]; + zPosScanMax=xyzOffsets[2]; + return true; } return false; @@ -533,7 +562,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } else if (vTier > mTier && getEUVar() > 0){ explodeMultiblock(); } - + energyCapacity = 0; outputCurrentMax = 0; outputVoltageMax = V[vTier+1]; @@ -556,6 +585,27 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock return true; } + private void scanForTransmissionTargets(int xMin,int yMin, int zMin, int xMax, int yMax, int zMax){ + for (int xPosOffset = xMin; xPosOffset <= xMax; xPosOffset++) { + for (int yPosOffset = yMin; yPosOffset <= yMax; yPosOffset++) { + for (int zPosOffset = zMin; zPosOffset <= zMax; zPosOffset++) { + if (xPosOffset == 0 && yPosOffset == 0 && zPosOffset == 0) { + continue; + } + IGregTechTileEntity node = getBaseMetaTileEntity().getIGregTechTileEntityOffset(xPosOffset, yPosOffset, zPosOffset); + if (node == null) { + continue; + } + IMetaTileEntity nodeInside = node.getMetaTileEntity(); + if (nodeInside instanceof GT_MetaTileEntity_TeslaCoil || nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive() || (node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil_Ultimate)) { + eTeslaMap.put(node, (int) Math.ceil(Math.sqrt(xPosOffset * xPosOffset + yPosOffset * yPosOffset + zPosOffset * zPosOffset))); + } + } + } + } + + } + @Override public boolean onRunningTick(ItemStack aStack) { if (getBaseMetaTileEntity().isClientSide()) { @@ -580,33 +630,35 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } //Scan for transmission targets - scanTime++; - if (scanTime >= 100) { - scanTime = 0; - scanTimeDisplay.set(scanTime); - scanTimeDisplay.updateStatus(); - eTeslaMap.clear(); - - for (int xPosOffset = -scanRadius; xPosOffset <= scanRadius; xPosOffset++) { - for (int yPosOffset = -scanRadius; yPosOffset <= scanRadius; yPosOffset++) { - for (int zPosOffset = -scanRadius; zPosOffset <= scanRadius; zPosOffset++) { - if (xPosOffset == 0 && yPosOffset == 0 && zPosOffset == 0) { - continue; - } - IGregTechTileEntity node = getBaseMetaTileEntity().getIGregTechTileEntityOffset(xPosOffset, yPosOffset, zPosOffset); - if (node == null) { - continue; - } - IMetaTileEntity nodeInside = node.getMetaTileEntity(); - if (nodeInside instanceof GT_MetaTileEntity_TeslaCoil || nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive() || (node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil_Ultimate)) { - eTeslaMap.put(node, (int) Math.ceil(Math.sqrt(xPosOffset * xPosOffset + yPosOffset * yPosOffset + zPosOffset * zPosOffset))); - } - } + switch (scanTime) { + case 0: + scanTimeDisplay.updateStatus(); + scanForTransmissionTargets((int) xPosScanMin, (int) yPosScan0, (int) zPosScanMin, (int) xPosScanMax - 1, (int) yPosScan1 - 1, (int) zPosScanMax - 1); + break; + case 20: + scanTimeDisplay.updateStatus(); + scanForTransmissionTargets((int) xPosScanMin, (int) yPosScan1, (int) zPosScanMin, (int) xPosScanMax - 1, (int) yPosScan1 - 1, (int) zPosScanMax - 1); + break; + case 40: + scanTimeDisplay.updateStatus(); + scanForTransmissionTargets((int) xPosScanMin, (int) yPosScan2, (int) zPosScanMin, (int) xPosScanMax - 1, (int) yPosScan1 - 1, (int) zPosScanMax - 1); + break; + case 60: + scanTimeDisplay.updateStatus(); + scanForTransmissionTargets((int) xPosScanMin, (int) yPosScan3, (int) zPosScanMin, (int) xPosScanMax - 1, (int) yPosScan4 - 1, (int) zPosScanMax - 1); + break; + case 80: + scanTimeDisplay.updateStatus(); + scanForTransmissionTargets((int) xPosScanMin, (int) yPosScan4, (int) zPosScanMin, (int) xPosScanMax, (int) yPosScan5, (int) zPosScanMax); + break; + default: + if (scanTime == (int) scanTimeMinSetting.get()-1) { + scanTime = -1; } - } - } else { - scanTimeDisplay.set(scanTime); + break; } + scanTime++; + scanTimeDisplay.set(scanTime); //Power Limit Settings if (outputVoltageSetting.get() > 0){ -- cgit From 42aa67f1cede4ece60725c5a5c6d9e9c268cfb15 Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 19 Jul 2019 18:16:51 +0200 Subject: Sync'ed changes (TEC DON'T MERGE!!!) --- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 2 +- .../single/GT_MetaTileEntity_TeslaCoil.java | 94 +++++++++++----------- 2 files changed, 49 insertions(+), 47 deletions(-) (limited to 'src/main/java') 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 9104cae72d..42f4e6c8ab 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 @@ -617,7 +617,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock long energyStored = getEUVar(); float energyFrac = (float)energyStored/energyMax; - float rangeFrac = (float)((-0.5*Math.pow(energyFrac,2))+(1.5*energyFrac)); energyCapacityDisplay.set(energyMax); energyStoredDisplay.set(energyStored); @@ -678,6 +677,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock //Stuff to do if ePowerPass if (ePowerPass) { //Range calculation and display + float rangeFrac = (float)((-0.5*Math.pow(energyFrac,2))+(1.5*energyFrac)); transferRadiusTower = (int)(transferRadiusTowerSetting.get()*getRangeMulti(mTier,vTier)*rangeFrac); transferRadiusTowerDisplay.set(transferRadiusTower); transferRadiusTransceiver = (int)(transferRadiusTransceiverSetting.get()*getRangeMulti(mTier,vTier)*rangeFrac); 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 3bb8d8fe22..ca50cca4e5 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 @@ -24,15 +24,16 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB private int maxTier = 4; //Max tier of transceiver private int minTier = 1; //Min tier of transceiver - private Map eTeslaMap = new HashMap();//Tesla Map to map them tesla bois! - private int scanTime = 0; //Sets scan time to Z E R O :epic: - private int scanTimeMin = 100; //Min scan time in ticks - private int scanTimeTill = scanTimeMin; //Set default scan time - private int scanRadiusMax = 20; //Tesla scan radius - private int scanRadiusMin = 4; //Tesla scan radius - private int scanRadiusLimitTop = scanRadiusMin + (scanRadiusMax - scanRadiusMin) / (maxTier - minTier + 1) * (mTier - 1); //Tesla scan radius Formula - private int scanRadiusLimitBottom = 1; //Minimum user configurable scanRadius - private int scanRadius = scanRadiusLimitTop; //Default scanRadius setting + //private Map eTeslaMap = new HashMap();//Tesla Map to map them tesla bois! + public Map eTeslaMap = new HashMap();//Tesla Map to map them tesla bois! + //private int scanTime = 0; //Sets scan time to Z E R O :epic: + //private int scanTimeMin = 100; //Min scan time in ticks + //private int scanTimeTill = scanTimeMin; //Set default scan time + private int transferRadiusMax = 20; //Tesla scan radius + private int transferRadiusMin = 4; //Tesla scan radius + private int transferRadiusLimitTop = transferRadiusMin + (transferRadiusMax - transferRadiusMin) / (maxTier - minTier + 1) * (mTier - 1); //Tesla scan radius Formula + private int transferRadiusLimitBottom = 1; //Minimum user configurable + private int transferRadius = transferRadiusLimitTop; //Default transferRadius setting private int transferRadiusTower = 0; //Radius for transceiver to tower transfers private int transferRadiusCover = 0; //Radius for transceiver to cover transfers @@ -105,19 +106,19 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB @Override public boolean onWireCutterRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (aPlayer.isSneaking()) { - if (scanRadius > scanRadiusLimitBottom) { - scanRadius--; + if (transferRadius > transferRadiusLimitBottom) { + transferRadius--; } else { - scanRadius = scanRadiusLimitTop; + transferRadius = transferRadiusLimitTop; } } else { - if (scanRadius < scanRadiusLimitTop) { - scanRadius++; + if (transferRadius < transferRadiusLimitTop) { + transferRadius++; } else { - scanRadius = scanRadiusLimitBottom; + transferRadius = transferRadiusLimitBottom; } } - PlayerChatHelper.SendInfo(aPlayer, "Tesla Radius Changed to " + scanRadius + " Blocks"); + PlayerChatHelper.SendInfo(aPlayer, "Tesla Radius Changed to " + transferRadius + " Blocks"); return false; } @@ -155,50 +156,51 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { super.onPostTick(aBaseMetaTileEntity, aTick); - if (aBaseMetaTileEntity.isServerSide()) { + if (aBaseMetaTileEntity.isServerSide() && !eTeslaMap.isEmpty()) { ////Hysteresis based ePowerPass Config long energyMax = getStoredEnergy()[1]; long energyStored = getStoredEnergy()[0]; - float energyFraction = (float) energyStored / energyMax; + float energyFrac = (float) energyStored / energyMax; //ePowerPass hist toggle - if (!powerPassToggle && energyFraction > histHigh) { + if (!powerPassToggle && energyFrac > histHigh) { powerPassToggle = true; - } else if (powerPassToggle && energyFraction < histLow) { + } else if (powerPassToggle && energyFrac < histLow) { powerPassToggle = false; } - ////Scanning for active teslas - scanTime++; - if (scanTime >= scanTimeTill) { - scanTime = 0; - eTeslaMap.clear(); - - for (int xPosOffset = -scanRadius; xPosOffset <= scanRadius; xPosOffset++) { - for (int yPosOffset = -scanRadius; yPosOffset <= scanRadius; yPosOffset++) { - for (int zPosOffset = -scanRadius; zPosOffset <= scanRadius; zPosOffset++) { - if (xPosOffset == 0 && yPosOffset == 0 && zPosOffset == 0) { - continue; - } - IGregTechTileEntity node = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xPosOffset, yPosOffset, zPosOffset); - if (node == null) { - continue; - } - IMetaTileEntity nodeInside = node.getMetaTileEntity(); - if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive() || (node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil)) { - eTeslaMap.put(node, (int) Math.ceil(Math.sqrt(xPosOffset * xPosOffset + yPosOffset * yPosOffset + zPosOffset * zPosOffset))); - } - } - } - } - } + //Scanning for active teslas + //scanTime++; + //if (scanTime >= scanTimeTill) { + // scanTime = 0; + // eTeslaMap.clear(); + // + // for (int xPosOffset = -transferRadius; xPosOffset <= transferRadius; xPosOffset++) { + // for (int yPosOffset = -transferRadius; yPosOffset <= transferRadius; yPosOffset++) { + // for (int zPosOffset = -transferRadius; zPosOffset <= transferRadius; zPosOffset++) { + // if (xPosOffset == 0 && yPosOffset == 0 && zPosOffset == 0) { + // continue; + // } + // IGregTechTileEntity node = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xPosOffset, yPosOffset, zPosOffset); + // if (node == null) { + // continue; + // } + // IMetaTileEntity nodeInside = node.getMetaTileEntity(); + // if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive() || (node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil)) { + // eTeslaMap.put(node, (int) Math.ceil(Math.sqrt(xPosOffset * xPosOffset + yPosOffset * yPosOffset + zPosOffset * zPosOffset))); + // } + // } + // } + // } + //} //Stuff to do if ePowerPass if (powerPassToggle) { + float rangeFrac = (float)((-0.5*Math.pow(energyFrac,2))+(1.5*energyFrac)); outputCurrent = mBatteryCount; - transferRadiusTower = (int) (scanRadius * energyFraction); - transferRadiusCover = (int) (transferRadiusTower / 1.5); + transferRadiusTower = (int) (transferRadius * rangeFrac); + transferRadiusCover = (int) (transferRadiusTower / 1.25); //Clean the eTeslaMap for (Map.Entry Rx : eTeslaMap.entrySet()) { -- cgit From ef951d663fcd41b2e5064acdbb3596146fc6eabe Mon Sep 17 00:00:00 2001 From: Technus Date: Sun, 21 Jul 2019 21:18:05 +0200 Subject: Include avrcore --- .gitmodules | 3 +++ AVRcore | 1 + build.gradle | 9 ++++++++ gradle/wrapper/gradle-wrapper.properties | 4 ++-- .../tileEntity/MicroControllerTileEntity.java | 26 ++++++++++++++++++++++ 5 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 .gitmodules create mode 160000 AVRcore create mode 100644 src/main/java/com/github/technus/tectech/thing/tileEntity/MicroControllerTileEntity.java (limited to 'src/main/java') diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..58eebb4aa5 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "AVRcore"] + path = AVRcore + url = https://github.com/Technus/AVRcore diff --git a/AVRcore b/AVRcore new file mode 160000 index 0000000000..ec8467a08f --- /dev/null +++ b/AVRcore @@ -0,0 +1 @@ +Subproject commit ec8467a08fff8b340a5ef698bdf6dc1915b3382a diff --git a/build.gradle b/build.gradle index ed05a63381..a203a9a6fa 100644 --- a/build.gradle +++ b/build.gradle @@ -26,6 +26,15 @@ allprojects { targetCompatibility = 1.8 } +sourceSets { + main { + java { + srcDir 'src/main/java' + srcDir 'AVRcore/src' + } + } +} + file "build.properties" withReader { def prop = new Properties() prop.load(it) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e4af87c689..39c1bb6d1b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Dec 04 18:55:27 CET 2018 +#Sun Jul 21 17:13:31 CEST 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip diff --git a/src/main/java/com/github/technus/tectech/thing/tileEntity/MicroControllerTileEntity.java b/src/main/java/com/github/technus/tectech/thing/tileEntity/MicroControllerTileEntity.java new file mode 100644 index 0000000000..798a2daa47 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/tileEntity/MicroControllerTileEntity.java @@ -0,0 +1,26 @@ +package com.github.technus.tectech.thing.tileEntity; + +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; + +public class MicroControllerTileEntity extends TileEntity { + @Override + public void readFromNBT(NBTTagCompound p_145839_1_) { + super.readFromNBT(p_145839_1_); + } + + @Override + public void writeToNBT(NBTTagCompound p_145841_1_) { + super.writeToNBT(p_145841_1_); + } + + @Override + public void invalidate() { + super.invalidate(); + } + + @Override + public void updateEntity() { + super.updateEntity(); + } +} -- cgit From 628b0ec725da69e7b7c7a9add2b621f0eb91696d Mon Sep 17 00:00:00 2001 From: Bass Date: Mon, 22 Jul 2019 19:36:33 +0100 Subject: Tesla Scan Server Load Reduction --- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 55 ++++++- .../single/GT_MetaTileEntity_TeslaCoil.java | 175 +++++++++------------ 2 files changed, 126 insertions(+), 104 deletions(-) (limited to 'src/main/java') 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 42f4e6c8ab..7da138e74c 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 @@ -1,6 +1,7 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.CommonValues; +import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil_Ultimate; import com.github.technus.tectech.thing.metaTileEntity.IConstructable; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Capacitor; @@ -342,9 +343,10 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock energyCapacity=aNBT.getLong("energyCapacity"); } + //TODO Rewrite efficiency formulas private long getEnergyEfficiency(long voltage, int mTier, boolean overDriveToggle){ if (overDriveToggle){ - return (long)(voltage * (2-energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maxTier - minTier + 1) * mTier)*(2- overdriveEfficiency)); //Sum overdrive efficiency formula + return (long)(voltage * (2-energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maxTier - minTier + 1) * mTier)*(2 - overdriveEfficiency)); //Sum overdrive efficiency formula } else { return (long)(voltage * energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maxTier - minTier + 1) * mTier); //Efficiency Formula } @@ -597,8 +599,9 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock continue; } IMetaTileEntity nodeInside = node.getMetaTileEntity(); - if (nodeInside instanceof GT_MetaTileEntity_TeslaCoil || nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive() || (node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil_Ultimate)) { - eTeslaMap.put(node, (int) Math.ceil(Math.sqrt(xPosOffset * xPosOffset + yPosOffset * yPosOffset + zPosOffset * zPosOffset))); + if (nodeInside instanceof GT_MetaTileEntity_TeslaCoil || nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive() || (node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil)) { + // eTeslaMap.put(node, (int) Math.ceil(Math.sqrt(xPosOffset * xPosOffset + yPosOffset * yPosOffset + zPosOffset * zPosOffset)));//TODO Test if range valid + eTeslaMap.put(node, (int) Math.ceil(Math.sqrt(Math.pow(xPosOffset,2) + Math.pow(yPosOffset,2) + Math.pow(zPosOffset,2)))); } } } @@ -651,11 +654,53 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock scanForTransmissionTargets((int) xPosScanMin, (int) yPosScan4, (int) zPosScanMin, (int) xPosScanMax, (int) yPosScan5, (int) zPosScanMax); break; default: - if (scanTime == (int) scanTimeMinSetting.get()-1) { + if (scanTime == (int) scanTimeMinSetting.get() - 1) { scanTime = -1; + + IGregTechTileEntity mte = getBaseMetaTileEntity(); + for (Map.Entry Rx : eTeslaMap.entrySet()) { + IGregTechTileEntity node = Rx.getKey(); + if (node != null) { + IMetaTileEntity nodeInside = node.getMetaTileEntity(); + try { + if (nodeInside instanceof GT_MetaTileEntity_TeslaCoil) { + GT_MetaTileEntity_TeslaCoil teslaCoil = (GT_MetaTileEntity_TeslaCoil) nodeInside; + + float tX = node.getXCoord(); + float tY = node.getYCoord(); + float tZ = node.getZCoord(); + + float tXN = mte.getXCoord(); + float tYN = mte.getYCoord(); + float tZN = mte.getZCoord(); + + int tOffset = (int) Math.ceil(Math.sqrt(Math.pow(tX-tXN,2) + Math.pow(tY-tYN,2) + Math.pow(tZ-tZN,2))); + teslaCoil.eTeslaMap.put(mte,tOffset); + + for (Map.Entry RRx : eTeslaMap.entrySet()) { + IGregTechTileEntity nodeN = RRx.getKey(); + if (nodeN == node){ + continue; + } + tXN = nodeN.getXCoord(); + tYN = nodeN.getYCoord(); + tZN = nodeN.getZCoord(); + tOffset = (int) Math.ceil(Math.sqrt(Math.pow(tX-tXN,2) + Math.pow(tY-tYN,2) + Math.pow(tZ-tZN,2))); + if (tOffset > 20){ + continue; + } + teslaCoil.eTeslaMap.put(nodeN,tOffset); + } + } + } catch (Exception e) { + eTeslaMap.remove(Rx.getKey()); + } + } + } } break; } + scanTime++; scanTimeDisplay.set(scanTime); @@ -701,7 +746,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock if (teslaCoil.getStoredEnergy()[1] > 0) { continue; } - } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil_Ultimate) && node.getEUCapacity() > 0) { + } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil) && node.getEUCapacity() > 0) { continue; } } catch (Exception e) { 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 ca50cca4e5..fb751c8fab 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 @@ -21,22 +21,21 @@ import static java.lang.Math.round; public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryBuffer { - private int maxTier = 4; //Max tier of transceiver - private int minTier = 1; //Min tier of transceiver + private int maxTier = 3; //Max tier of transceiver + private int minTier = 0; //Min tier of transceiver - //private Map eTeslaMap = new HashMap();//Tesla Map to map them tesla bois! - public Map eTeslaMap = new HashMap();//Tesla Map to map them tesla bois! - //private int scanTime = 0; //Sets scan time to Z E R O :epic: - //private int scanTimeMin = 100; //Min scan time in ticks - //private int scanTimeTill = scanTimeMin; //Set default scan time + public Map eTeslaMap = new HashMap();//Tesla Map to map them tesla bois! + + //TODO Rewrite range limits, use new formula private int transferRadiusMax = 20; //Tesla scan radius private int transferRadiusMin = 4; //Tesla scan radius - private int transferRadiusLimitTop = transferRadiusMin + (transferRadiusMax - transferRadiusMin) / (maxTier - minTier + 1) * (mTier - 1); //Tesla scan radius Formula + private int transferRadiusLimitTop = transferRadiusMin + (transferRadiusMax - transferRadiusMin) / (maxTier - minTier + 1) * mTier; //Tesla scan radius Formula private int transferRadiusLimitBottom = 1; //Minimum user configurable private int transferRadius = transferRadiusLimitTop; //Default transferRadius setting private int transferRadiusTower = 0; //Radius for transceiver to tower transfers private int transferRadiusCover = 0; //Radius for transceiver to cover transfers + //TODO Rewrite histSetting to improve readability public boolean powerPassToggle = false; //Power Pass for public viewing private int histSteps = 20; //Hysteresis Resolution private int histSettingLow = 3; //Hysteresis Low Limit @@ -46,13 +45,15 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB private float histLow = (float) histSettingLow / histSteps; //Power pass is disabled if power is under this fraction private float histHigh = (float) histSettingHigh / histSteps; //Power pass is enabled if power is over this fraction + //TODO Rewrite efficiency formulas private long lossPerBlock = 2; //EU lost per block traveled private float energyEfficiencyMax = 0.95F; //Max efficiency private float energyEfficiencyMin = 0.75F; //Min efficiency private float overdriveEfficiency = 0.95F; //Overdrive efficiency - private float energyEfficiency = energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maxTier - minTier + 1) * (mTier - 1); //Efficiency Formula - private float sumOverdriveEfficiency = (2-energyEfficiency)*(2- overdriveEfficiency); //Sum overdrive efficiency formula + private float energyEfficiency = energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maxTier - minTier + 1) * mTier; //Efficiency Formula + private float sumOverdriveEfficiency = (2 - energyEfficiency) * (2 - overdriveEfficiency); //Sum overdrive efficiency formula + //TODO Rewrite over drive efficiency formulas public boolean overDriveToggle = false; //Overdrive toggle private long outputVoltage = V[mTier]; //Tesla Voltage Output private long outputVoltagePostEfficiency = (long) (outputVoltage * energyEfficiency); //Max power a machine can actually receive @@ -156,115 +157,91 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { super.onPostTick(aBaseMetaTileEntity, aTick); - if (aBaseMetaTileEntity.isServerSide() && !eTeslaMap.isEmpty()) { - - ////Hysteresis based ePowerPass Config - long energyMax = getStoredEnergy()[1]; - long energyStored = getStoredEnergy()[0]; - float energyFrac = (float) energyStored / energyMax; - - //ePowerPass hist toggle - if (!powerPassToggle && energyFrac > histHigh) { - powerPassToggle = true; - } else if (powerPassToggle && energyFrac < histLow) { - powerPassToggle = false; - } + if (aBaseMetaTileEntity.isClientSide() || eTeslaMap.isEmpty()) { + return; + } - //Scanning for active teslas - //scanTime++; - //if (scanTime >= scanTimeTill) { - // scanTime = 0; - // eTeslaMap.clear(); - // - // for (int xPosOffset = -transferRadius; xPosOffset <= transferRadius; xPosOffset++) { - // for (int yPosOffset = -transferRadius; yPosOffset <= transferRadius; yPosOffset++) { - // for (int zPosOffset = -transferRadius; zPosOffset <= transferRadius; zPosOffset++) { - // if (xPosOffset == 0 && yPosOffset == 0 && zPosOffset == 0) { - // continue; - // } - // IGregTechTileEntity node = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xPosOffset, yPosOffset, zPosOffset); - // if (node == null) { - // continue; - // } - // IMetaTileEntity nodeInside = node.getMetaTileEntity(); - // if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive() || (node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil)) { - // eTeslaMap.put(node, (int) Math.ceil(Math.sqrt(xPosOffset * xPosOffset + yPosOffset * yPosOffset + zPosOffset * zPosOffset))); - // } - // } - // } - // } - //} + //Hysteresis based ePowerPass Config + long energyMax = getStoredEnergy()[1]; + long energyStored = getStoredEnergy()[0]; + float energyFrac = (float) energyStored / energyMax; - //Stuff to do if ePowerPass - if (powerPassToggle) { - float rangeFrac = (float)((-0.5*Math.pow(energyFrac,2))+(1.5*energyFrac)); - outputCurrent = mBatteryCount; - transferRadiusTower = (int) (transferRadius * rangeFrac); - transferRadiusCover = (int) (transferRadiusTower / 1.25); + //ePowerPass hist toggle + if (!powerPassToggle && energyFrac > histHigh) { + powerPassToggle = true; + } else if (powerPassToggle && energyFrac < histLow) { + powerPassToggle = false; + } - //Clean the eTeslaMap - for (Map.Entry Rx : eTeslaMap.entrySet()) { - IGregTechTileEntity node = Rx.getKey(); - if (node != null) { - IMetaTileEntity nodeInside = node.getMetaTileEntity(); - try { - if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive()) { - GT_MetaTileEntity_TM_teslaCoil teslaTower = (GT_MetaTileEntity_TM_teslaCoil) nodeInside; - if (teslaTower.maxEUStore() > 0) { - continue; - } - } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil) && node.getEUCapacity() > 0) { + //Stuff to do if ePowerPass + if (powerPassToggle) { + float rangeFrac = (float) ((-0.5 * Math.pow(energyFrac, 2)) + (1.5 * energyFrac)); + outputCurrent = mBatteryCount; + transferRadiusTower = (int) (transferRadius * rangeFrac); + transferRadiusCover = (int) (transferRadiusTower / 1.25); + + //Clean the eTeslaMap + for (Map.Entry Rx : eTeslaMap.entrySet()) { + IGregTechTileEntity node = Rx.getKey(); + if (node != null) { + IMetaTileEntity nodeInside = node.getMetaTileEntity(); + try { + if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive()) { + GT_MetaTileEntity_TM_teslaCoil teslaTower = (GT_MetaTileEntity_TM_teslaCoil) nodeInside; + if (teslaTower.maxEUStore() > 0) { continue; } - } catch (Exception e) { + } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil) && node.getEUCapacity() > 0) { + continue; } + } catch (Exception e) { } - eTeslaMap.remove(Rx.getKey()); } + eTeslaMap.remove(Rx.getKey()); + } - //Power transfer - while (outputCurrent > 0) { - boolean idle = true; - for (Map.Entry Rx : entriesSortedByValues(eTeslaMap)) { - if (getEUVar() >= (overDriveToggle ? outputVoltage*2 : outputVoltage)) { - IGregTechTileEntity node = Rx.getKey(); - IMetaTileEntity nodeInside = node.getMetaTileEntity(); - if (overDriveToggle){ - outputVoltageInjectable = outputVoltage; - outputVoltageConsumption = outputVoltagePostOverdrive + (lossPerBlock * Rx.getValue()); - } else { - outputVoltageInjectable = outputVoltagePostEfficiency - (lossPerBlock * Rx.getValue()); - outputVoltageConsumption = outputVoltage; - } - if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && Rx.getValue() <= transferRadiusTower) { - GT_MetaTileEntity_TM_teslaCoil nodeTesla = (GT_MetaTileEntity_TM_teslaCoil) nodeInside; - if (!nodeTesla.ePowerPass) { - if (nodeTesla.getEUVar() + outputVoltageInjectable <= (nodeTesla.maxEUStore() / 2)) { - setEUVar(getEUVar() - outputVoltageConsumption); - node.increaseStoredEnergyUnits(outputVoltageInjectable, true); - outputCurrent--; - idle = false; - } - } - } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil) && !(node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil_Ultimate) && Rx.getValue() <= transferRadiusCover) { - if (node.injectEnergyUnits((byte) 1, outputVoltageInjectable, 1L) > 0L) { + //Power transfer + while (outputCurrent > 0) { + boolean idle = true; + for (Map.Entry Rx : entriesSortedByValues(eTeslaMap)) { + if (getEUVar() >= (overDriveToggle ? outputVoltage * 2 : outputVoltage)) { + IGregTechTileEntity node = Rx.getKey(); + IMetaTileEntity nodeInside = node.getMetaTileEntity(); + if (overDriveToggle) { + outputVoltageInjectable = outputVoltage; + outputVoltageConsumption = outputVoltagePostOverdrive + (lossPerBlock * Rx.getValue()); + } else { + outputVoltageInjectable = outputVoltagePostEfficiency - (lossPerBlock * Rx.getValue()); + outputVoltageConsumption = outputVoltage; + } + if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && Rx.getValue() <= transferRadiusTower) { + GT_MetaTileEntity_TM_teslaCoil nodeTesla = (GT_MetaTileEntity_TM_teslaCoil) nodeInside; + if (!nodeTesla.ePowerPass) { + if (nodeTesla.getEUVar() + outputVoltageInjectable <= (nodeTesla.maxEUStore() / 2)) { setEUVar(getEUVar() - outputVoltageConsumption); + node.increaseStoredEnergyUnits(outputVoltageInjectable, true); outputCurrent--; idle = false; } } - if (outputCurrent == 0) { - break; + } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil) && !(node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil_Ultimate) && Rx.getValue() <= transferRadiusCover) { + if (node.injectEnergyUnits((byte) 1, outputVoltageInjectable, 1L) > 0L) { + setEUVar(getEUVar() - outputVoltageConsumption); + outputCurrent--; + idle = false; } - } else { - idle = true; + } + if (outputCurrent == 0) { break; } - } - if (idle) { + } else { + idle = true; break; } } + if (idle) { + break; + } } } } -- cgit From 05d32982a24ab98dccffaa7c631ff573f6d3c32f Mon Sep 17 00:00:00 2001 From: Bass Date: Mon, 22 Jul 2019 23:30:09 +0100 Subject: Tesla Front Texture --- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 6 +++--- .../gregtech/textures/blocks/iconsets/TM_TESLA_TOWER.png | Bin 0 -> 645 bytes .../textures/blocks/iconsets/TM_TESLA_TOWER_ACTIVE.png | Bin 0 -> 634 bytes 3 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_TOWER.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_TOWER_ACTIVE.png (limited to 'src/main/java') 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 7da138e74c..673c43415b 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 @@ -326,9 +326,9 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock @Override @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister aBlockIconRegister) { - ScreenOFF = new Textures.BlockIcons.CustomIcon("iconsets/EM_WH"); - ScreenON = new Textures.BlockIcons.CustomIcon("iconsets/EM_WH_ACTIVE"); - super.registerIcons(aBlockIconRegister);//TODO front texture + ScreenOFF = new Textures.BlockIcons.CustomIcon("iconsets/TM_TESLA_TOWER"); + ScreenON = new Textures.BlockIcons.CustomIcon("iconsets/TM_TESLA_TOWER_ACTIVE"); + super.registerIcons(aBlockIconRegister); } @Override diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_TOWER.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_TOWER.png new file mode 100644 index 0000000000..5f996ca2ed Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_TOWER.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_TOWER_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_TOWER_ACTIVE.png new file mode 100644 index 0000000000..14423d1741 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TM_TESLA_TOWER_ACTIVE.png differ -- cgit From 49f612485d2f4a61f182f9a264a891436bd1c71d Mon Sep 17 00:00:00 2001 From: Bass Date: Tue, 23 Jul 2019 00:35:00 +0100 Subject: Capacitor Textures --- .../technus/tectech/thing/item/TeslaCoilCapacitor.java | 10 +++++----- .../assets/tectech/textures/items/itemCapacitorEV.png | Bin 0 -> 575 bytes .../assets/tectech/textures/items/itemCapacitorHV.png | Bin 0 -> 581 bytes .../assets/tectech/textures/items/itemCapacitorIV.png | Bin 0 -> 583 bytes .../assets/tectech/textures/items/itemCapacitorLV.png | Bin 0 -> 577 bytes .../assets/tectech/textures/items/itemCapacitorMV.png | Bin 0 -> 561 bytes 6 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 src/main/resources/assets/tectech/textures/items/itemCapacitorEV.png create mode 100644 src/main/resources/assets/tectech/textures/items/itemCapacitorHV.png create mode 100644 src/main/resources/assets/tectech/textures/items/itemCapacitorIV.png create mode 100644 src/main/resources/assets/tectech/textures/items/itemCapacitorLV.png create mode 100644 src/main/resources/assets/tectech/textures/items/itemCapacitorMV.png (limited to 'src/main/java') 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 e09fe79d6c..110c4f7aa7 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 @@ -24,7 +24,7 @@ public final class TeslaCoilCapacitor extends Item { public TeslaCoilCapacitor() { setUnlocalizedName("tm.teslaCoilCapacitor"); - setTextureName(MODID + ":itemParametrizerMemoryCardUnlocked"); + setTextureName(MODID + ":itemCapacitorLV"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "LV Tesla Capacitor"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "MV Tesla Capacitor"); @@ -74,10 +74,10 @@ public final class TeslaCoilCapacitor extends Item { @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister iconRegister) { LVicon = itemIcon = iconRegister.registerIcon(getIconString()); - MVicon = iconRegister.registerIcon(MODID + ":itemParametrizerMemoryCardLocked"); - HVicon = iconRegister.registerIcon(MODID + ":itemParametrizerMemoryCardLocked"); - EVicon = iconRegister.registerIcon(MODID + ":itemParametrizerMemoryCardLocked"); - IVicon = iconRegister.registerIcon(MODID + ":itemParametrizerMemoryCardLocked"); + MVicon = iconRegister.registerIcon(MODID + ":itemCapacitorMV"); + HVicon = iconRegister.registerIcon(MODID + ":itemCapacitorHV"); + EVicon = iconRegister.registerIcon(MODID + ":itemCapacitorEV"); + IVicon = iconRegister.registerIcon(MODID + ":itemCapacitorIV"); } @Override diff --git a/src/main/resources/assets/tectech/textures/items/itemCapacitorEV.png b/src/main/resources/assets/tectech/textures/items/itemCapacitorEV.png new file mode 100644 index 0000000000..124188d3bd Binary files /dev/null and b/src/main/resources/assets/tectech/textures/items/itemCapacitorEV.png differ diff --git a/src/main/resources/assets/tectech/textures/items/itemCapacitorHV.png b/src/main/resources/assets/tectech/textures/items/itemCapacitorHV.png new file mode 100644 index 0000000000..3500d8f6cb Binary files /dev/null and b/src/main/resources/assets/tectech/textures/items/itemCapacitorHV.png differ diff --git a/src/main/resources/assets/tectech/textures/items/itemCapacitorIV.png b/src/main/resources/assets/tectech/textures/items/itemCapacitorIV.png new file mode 100644 index 0000000000..028f8a467e Binary files /dev/null and b/src/main/resources/assets/tectech/textures/items/itemCapacitorIV.png differ diff --git a/src/main/resources/assets/tectech/textures/items/itemCapacitorLV.png b/src/main/resources/assets/tectech/textures/items/itemCapacitorLV.png new file mode 100644 index 0000000000..13d1d0667e Binary files /dev/null and b/src/main/resources/assets/tectech/textures/items/itemCapacitorLV.png differ diff --git a/src/main/resources/assets/tectech/textures/items/itemCapacitorMV.png b/src/main/resources/assets/tectech/textures/items/itemCapacitorMV.png new file mode 100644 index 0000000000..fc364e52c3 Binary files /dev/null and b/src/main/resources/assets/tectech/textures/items/itemCapacitorMV.png differ -- cgit From 371249f1920a64cae74722adac1e9275d30133d7 Mon Sep 17 00:00:00 2001 From: Technus Date: Tue, 23 Jul 2019 11:19:53 +0200 Subject: Add names and symbols for neutron, proton --- .gitignore | 2 + AVRcore | 2 +- build.gradle | 2 +- .../core/templates/cElementalPrimitive.java | 4 +- .../core/transformations/bTransformationInfo.java | 38 ++++++++--------- .../definitions/complex/dHadronDefinition.java | 49 ++++++++++++++++++---- .../item/DebugElementalInstanceContainer_EM.java | 4 +- .../tileEntity/MicroControllerTileEntity.java | 39 ++++++++++++++--- 8 files changed, 102 insertions(+), 38 deletions(-) (limited to 'src/main/java') diff --git a/.gitignore b/.gitignore index 406c4db8dc..5199bf1eeb 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,5 @@ GregTech.cfg options.txt GregTech.lang mods/ +classes/ +logs/ diff --git a/AVRcore b/AVRcore index ec8467a08f..abd28835fb 160000 --- a/AVRcore +++ b/AVRcore @@ -1 +1 @@ -Subproject commit ec8467a08fff8b340a5ef698bdf6dc1915b3382a +Subproject commit abd28835fb49e03e6d08d4f2056ff671693fe671 diff --git a/build.gradle b/build.gradle index 401720ebb4..be661517e1 100644 --- a/build.gradle +++ b/build.gradle @@ -110,7 +110,7 @@ task getGregTech(type: Download) { task submodulesUpdate(type: Exec) { description 'Updates (and inits) git submodules' - commandLine 'git', 'submodule', 'update', '--init', '--recursive' + commandLine 'git', 'submodule', 'update', '--init', '--recursive','--remote' group 'Build Setup' } diff --git a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/templates/cElementalPrimitive.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/templates/cElementalPrimitive.java index 63642d6dbd..24033ba945 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/templates/cElementalPrimitive.java +++ b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/templates/cElementalPrimitive.java @@ -18,7 +18,7 @@ import java.util.Map; import static com.github.technus.tectech.Util.areBitsSet; import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; import static com.github.technus.tectech.mechanics.elementalMatter.definitions.primitive.cPrimitiveDefinition.null__; -import static com.github.technus.tectech.thing.item.DebugElementalInstanceContainer_EM.stacksRegistered; +import static com.github.technus.tectech.thing.item.DebugElementalInstanceContainer_EM.STACKS_REGISTERED; import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_scanner.*; /** @@ -68,7 +68,7 @@ public abstract class cElementalPrimitive extends cElementalDefinition { if (bindsBO.put(ID, this) != null) { Minecraft.getMinecraft().crashed(new CrashReport("Primitive definition", new tElementalException("Duplicate ID"))); } - stacksRegistered.add(this); + STACKS_REGISTERED.add(this); } // diff --git a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/transformations/bTransformationInfo.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/transformations/bTransformationInfo.java index d0c0bf04aa..c23894d6b1 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/transformations/bTransformationInfo.java +++ b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/transformations/bTransformationInfo.java @@ -11,7 +11,7 @@ import net.minecraftforge.oredict.OreDictionary; import java.util.HashMap; -import static com.github.technus.tectech.thing.item.DebugElementalInstanceContainer_EM.stacksRegistered; +import static com.github.technus.tectech.thing.item.DebugElementalInstanceContainer_EM.STACKS_REGISTERED; /** * Created by Tec on 26.05.2017. @@ -41,22 +41,22 @@ public class bTransformationInfo { public void addFluid(iHasElementalDefinition em, FluidStack fluidStack){ fluidQuantization.put(fluidStack.getFluidID(),new aFluidQuantizationInfo(fluidStack,em)); fluidDequantization.put(em.getDefinition(),new aFluidDequantizationInfo(em,fluidStack)); - stacksRegistered.add(em.getDefinition()); - stacksRegistered.add(em.getDefinition().getAnti()); + STACKS_REGISTERED.add(em.getDefinition()); + STACKS_REGISTERED.add(em.getDefinition().getAnti()); } public void addFluid(iHasElementalDefinition em ,int fluidID,int fluidAmount) { fluidQuantization.put(fluidID,new aFluidQuantizationInfo(fluidID,fluidAmount,em)); fluidDequantization.put(em.getDefinition(),new aFluidDequantizationInfo(em,fluidID,fluidAmount)); - stacksRegistered.add(em.getDefinition()); - stacksRegistered.add(em.getDefinition().getAnti()); + STACKS_REGISTERED.add(em.getDefinition()); + STACKS_REGISTERED.add(em.getDefinition().getAnti()); } public void addFluid(iHasElementalDefinition em, Fluid fluid, int fluidAmount){ fluidQuantization.put(fluid.getID(),new aFluidQuantizationInfo(fluid,fluidAmount,em)); fluidDequantization.put(em.getDefinition(),new aFluidDequantizationInfo(em,fluid,fluidAmount)); - stacksRegistered.add(em.getDefinition()); - stacksRegistered.add(em.getDefinition().getAnti()); + STACKS_REGISTERED.add(em.getDefinition()); + STACKS_REGISTERED.add(em.getDefinition().getAnti()); } private void addItemQuantization(aItemQuantizationInfo aIQI){ @@ -66,42 +66,42 @@ public class bTransformationInfo { public void addItem(iHasElementalDefinition em, ItemStack itemStack, boolean skipNBT){ addItemQuantization(new aItemQuantizationInfo(itemStack,skipNBT,em)); itemDequantization.put(em.getDefinition(),new aItemDequantizationInfo(em,itemStack)); - stacksRegistered.add(em.getDefinition()); - stacksRegistered.add(em.getDefinition().getAnti()); + STACKS_REGISTERED.add(em.getDefinition()); + STACKS_REGISTERED.add(em.getDefinition().getAnti()); } public void addItem(iHasElementalDefinition em, OrePrefixes prefix, Materials material, int amount, boolean skipNBT){ addItemQuantization(new aItemQuantizationInfo(prefix,material,amount,skipNBT,em)); itemDequantization.put(em.getDefinition(),new aItemDequantizationInfo(em,prefix,material,amount)); - stacksRegistered.add(em.getDefinition()); - stacksRegistered.add(em.getDefinition().getAnti()); + STACKS_REGISTERED.add(em.getDefinition()); + STACKS_REGISTERED.add(em.getDefinition().getAnti()); } public void addOredict(iHasElementalDefinition em, int id, int qty){ oredictQuantization.put(id,new aOredictQuantizationInfo(id,qty,em)); oredictDequantization.put(em.getDefinition(),new aOredictDequantizationInfo(em,id,qty)); - stacksRegistered.add(em.getDefinition()); - stacksRegistered.add(em.getDefinition().getAnti()); + STACKS_REGISTERED.add(em.getDefinition()); + STACKS_REGISTERED.add(em.getDefinition().getAnti()); } public void addOredict(iHasElementalDefinition em, String name, int qty){ oredictQuantization.put(OreDictionary.getOreID(name),new aOredictQuantizationInfo(name,qty,em)); oredictDequantization.put(em.getDefinition(),new aOredictDequantizationInfo(em,name,qty)); - stacksRegistered.add(em.getDefinition()); - stacksRegistered.add(em.getDefinition().getAnti()); + STACKS_REGISTERED.add(em.getDefinition()); + STACKS_REGISTERED.add(em.getDefinition().getAnti()); } public void addOredict(iHasElementalDefinition em, OrePrefixes prefix, Materials material, int qty){ oredictQuantization.put(OreDictionary.getOreID(prefix.name() + material.mName),new aOredictQuantizationInfo(prefix,material,qty,em)); oredictDequantization.put(em.getDefinition(),new aOredictDequantizationInfo(em,prefix,material,qty)); - stacksRegistered.add(em.getDefinition()); - stacksRegistered.add(em.getDefinition().getAnti()); + STACKS_REGISTERED.add(em.getDefinition()); + STACKS_REGISTERED.add(em.getDefinition().getAnti()); } public void addOredict(iHasElementalDefinition em, OrePrefixes prefix, String materialName, int qty){ oredictQuantization.put(OreDictionary.getOreID(prefix.name() + materialName),new aOredictQuantizationInfo(prefix,materialName,qty,em)); oredictDequantization.put(em.getDefinition(),new aOredictDequantizationInfo(em,prefix,materialName,qty)); - stacksRegistered.add(em.getDefinition()); - stacksRegistered.add(em.getDefinition().getAnti()); + STACKS_REGISTERED.add(em.getDefinition()); + STACKS_REGISTERED.add(em.getDefinition().getAnti()); } } diff --git a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/dHadronDefinition.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/dHadronDefinition.java index a1380526eb..1e80c6f1e8 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/dHadronDefinition.java +++ b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/dHadronDefinition.java @@ -12,12 +12,16 @@ import com.github.technus.tectech.mechanics.elementalMatter.core.templates.iElem import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.*; import com.github.technus.tectech.mechanics.elementalMatter.definitions.primitive.eBosonDefinition; import com.github.technus.tectech.mechanics.elementalMatter.definitions.primitive.eQuarkDefinition; +import com.github.technus.tectech.thing.item.DebugElementalInstanceContainer_EM; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.oredict.OreDictionary; import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.TreeMap; import static com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.definitions.dComplexAspectDefinition.getNbtTagCompound; import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; @@ -34,6 +38,8 @@ public final class dHadronDefinition extends cElementalDefinition {//TODO Optimi private static final byte nbtType = (byte) 'h'; //Helpers + public static final Map SYMBOL_MAP =new HashMap<>(); + public static final Map NAME_MAP =new HashMap<>(); public static dHadronDefinition hadron_p, hadron_n, hadron_p_, hadron_n_; public static cElementalDefinitionStack hadron_p1, hadron_n1, hadron_p2, hadron_n2, hadron_p3, hadron_n3, hadron_p5; private static float protonMass = 0F; @@ -137,8 +143,13 @@ public final class dHadronDefinition extends cElementalDefinition {//TODO Optimi public String getName() { StringBuilder name= new StringBuilder(getSimpleName()); name.append(':'); - for (cElementalDefinitionStack quark : quarkStacks.values()) { - name.append(' ').append(quark.definition.getSymbol()).append(quark.amount); + String sym= NAME_MAP.get(this); + if(sym!=null){ + name.append(' ').append(sym); + }else { + for (cElementalDefinitionStack quark : quarkStacks.values()) { + name.append(' ').append(quark.definition.getSymbol()).append(quark.amount); + } } return name.toString(); } @@ -163,9 +174,14 @@ public final class dHadronDefinition extends cElementalDefinition {//TODO Optimi @Override public String getSymbol() { StringBuilder symbol = new StringBuilder(8); - for (cElementalDefinitionStack quark : quarkStacks.values()) { - for (int i = 0; i < quark.amount; i++) { - symbol.append(quark.definition.getSymbol()); + String sym=SYMBOL_MAP.get(this); + if(sym!=null){ + symbol.append(sym); + }else { + for (cElementalDefinitionStack quark : quarkStacks.values()) { + for (int i = 0; i < quark.amount; i++) { + symbol.append(quark.definition.getSymbol()); + } } } return symbol.toString(); @@ -174,9 +190,14 @@ public final class dHadronDefinition extends cElementalDefinition {//TODO Optimi @Override public String getShortSymbol() { StringBuilder symbol = new StringBuilder(8); - for (cElementalDefinitionStack quark : quarkStacks.values()) { - for (int i = 0; i < quark.amount; i++) { - symbol.append(quark.definition.getShortSymbol()); + String sym=SYMBOL_MAP.get(this); + if(sym!=null){ + symbol.append(sym); + }else { + for (cElementalDefinitionStack quark : quarkStacks.values()) { + for (int i = 0; i < quark.amount; i++) { + symbol.append(quark.definition.getShortSymbol()); + } } } return symbol.toString(); @@ -391,12 +412,24 @@ public final class dHadronDefinition extends cElementalDefinition {//TODO Optimi protonMass = hadron_p.mass; //redefine the proton with proper lifetime (the lifetime is based on mass comparison) hadron_p = new dHadronDefinition(new cElementalDefinitionStackMap(eQuarkDefinition.quark_u.getStackForm(2), eQuarkDefinition.quark_d.getStackForm(1))); + SYMBOL_MAP.put(hadron_p,"p"); + NAME_MAP.put(hadron_p,"Proton"); + DebugElementalInstanceContainer_EM.STACKS_REGISTERED.add(hadron_p); hadron_p_ = (dHadronDefinition) hadron_p.getAnti(); + SYMBOL_MAP.put(hadron_p_,"~p"); + NAME_MAP.put(hadron_p_,"Anti Proton"); + DebugElementalInstanceContainer_EM.STACKS_REGISTERED.add(hadron_p_); hadron_n = new dHadronDefinition(new cElementalDefinitionStackMap(eQuarkDefinition.quark_u.getStackForm(1), eQuarkDefinition.quark_d.getStackForm(2))); neutronMass = hadron_n.mass; //redefine the neutron with proper lifetime (the lifetime is based on mass comparison) hadron_n = new dHadronDefinition(new cElementalDefinitionStackMap(eQuarkDefinition.quark_u.getStackForm(1), eQuarkDefinition.quark_d.getStackForm(2))); + SYMBOL_MAP.put(hadron_n, "n"); + NAME_MAP.put(hadron_n, "Neutron"); + DebugElementalInstanceContainer_EM.STACKS_REGISTERED.add(hadron_p); hadron_n_ = (dHadronDefinition) hadron_n.getAnti(); + SYMBOL_MAP.put(hadron_n_,"~n"); + NAME_MAP.put(hadron_n_,"Anti Neutron"); + DebugElementalInstanceContainer_EM.STACKS_REGISTERED.add(hadron_p_); } catch (tElementalException e) { if (DEBUG_MODE) { e.printStackTrace(); diff --git a/src/main/java/com/github/technus/tectech/thing/item/DebugElementalInstanceContainer_EM.java b/src/main/java/com/github/technus/tectech/thing/item/DebugElementalInstanceContainer_EM.java index 3eb71abca1..286b21f4e2 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/DebugElementalInstanceContainer_EM.java +++ b/src/main/java/com/github/technus/tectech/thing/item/DebugElementalInstanceContainer_EM.java @@ -34,7 +34,7 @@ import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; * Created by Tec on 15.03.2017. */ public final class DebugElementalInstanceContainer_EM extends Item implements IElementalItem { - public static final TreeSet stacksRegistered=new TreeSet<>(); + public static final TreeSet STACKS_REGISTERED =new TreeSet<>(); public static DebugElementalInstanceContainer_EM INSTANCE; @@ -135,7 +135,7 @@ public final class DebugElementalInstanceContainer_EM extends Item implements IE ItemStack that = new ItemStack(this, 1); that.setTagCompound(new NBTTagCompound()); list.add(that); - for(iElementalDefinition defintion:stacksRegistered){ + for(iElementalDefinition defintion: STACKS_REGISTERED){ list.add(setContent(new ItemStack(this).setStackDisplayName(defintion.getName()+" x"+1),new cElementalInstanceStackMap(new cElementalInstanceStack(defintion,1)))); list.add(setContent(new ItemStack(this).setStackDisplayName(defintion.getName()+" x"+144),new cElementalInstanceStackMap(new cElementalInstanceStack(defintion,144)))); list.add(setContent(new ItemStack(this).setStackDisplayName(defintion.getName()+" x"+1000),new cElementalInstanceStackMap(new cElementalInstanceStack(defintion,1000)))); diff --git a/src/main/java/com/github/technus/tectech/thing/tileEntity/MicroControllerTileEntity.java b/src/main/java/com/github/technus/tectech/thing/tileEntity/MicroControllerTileEntity.java index 798a2daa47..d4cb8afb0f 100644 --- a/src/main/java/com/github/technus/tectech/thing/tileEntity/MicroControllerTileEntity.java +++ b/src/main/java/com/github/technus/tectech/thing/tileEntity/MicroControllerTileEntity.java @@ -1,17 +1,43 @@ package com.github.technus.tectech.thing.tileEntity; +import com.github.technus.avrClone.AvrCore; +import com.github.technus.avrClone.instructions.InstructionRegistry; +import com.github.technus.avrClone.memory.program.ProgramMemory; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; public class MicroControllerTileEntity extends TileEntity { + public final AvrCore core; + + public MicroControllerTileEntity(){ + core=new AvrCore(InstructionRegistry.INSTRUCTION_REGISTRY_OP,false); + } + @Override - public void readFromNBT(NBTTagCompound p_145839_1_) { - super.readFromNBT(p_145839_1_); + public void readFromNBT(NBTTagCompound tag) { + super.readFromNBT(tag); + core.programCounter=tag.getInteger("programCounter"); + if(core.getProgramMemory()!=null){ + ProgramMemory programMemory=core.getProgramMemory(); + NBTTagCompound program=new NBTTagCompound(); + program.setIntArray("instructions",programMemory.instructions); + program.setIntArray("param0",programMemory.param0); + program.setIntArray("param1",programMemory.param1); + tag.setTag("program",program); + } } @Override - public void writeToNBT(NBTTagCompound p_145841_1_) { - super.writeToNBT(p_145841_1_); + public void writeToNBT(NBTTagCompound tag) { + super.writeToNBT(tag); + tag.setInteger("programCounter",core.programCounter); + if(tag.hasKey("program")){ + NBTTagCompound program=tag.getCompoundTag("program"); + int[] instructions=program.getIntArray("instructions"); + int[] param0=program.getIntArray("param0"); + int[] param1=program.getIntArray("param1"); + //core.setProgramMemory(new ProgramMemory(instructions,param0,param1,core.getInstructionRegistry())); + } } @Override @@ -21,6 +47,9 @@ public class MicroControllerTileEntity extends TileEntity { @Override public void updateEntity() { - super.updateEntity(); + super.updateEntity(); + if(core.checkValid()){ + + } } } -- cgit From 2584daaeea58842b059b8fd5c5df71620709cda1 Mon Sep 17 00:00:00 2001 From: Bass Date: Tue, 23 Jul 2019 14:57:26 +0100 Subject: Minor code clean up --- .../tectech/thing/item/TeslaCoilCapacitor.java | 4 +-- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 30 ++++++++++------------ .../single/GT_MetaTileEntity_TeslaCoil.java | 30 ++++++++++------------ 3 files changed, 29 insertions(+), 35 deletions(-) (limited to 'src/main/java') 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 110c4f7aa7..f842fc8af2 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 @@ -20,9 +20,9 @@ import static com.github.technus.tectech.Reference.MODID; public final class TeslaCoilCapacitor extends Item { public static TeslaCoilCapacitor INSTANCE; - public static IIcon LVicon, MVicon, HVicon, EVicon, IVicon; + private static IIcon LVicon, MVicon, HVicon, EVicon, IVicon; - public TeslaCoilCapacitor() { + private TeslaCoilCapacitor() { setUnlocalizedName("tm.teslaCoilCapacitor"); setTextureName(MODID + ":itemCapacitorLV"); 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 673c43415b..62457ee0db 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 @@ -41,7 +41,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private static Textures.BlockIcons.CustomIcon ScreenON; private int mTier = 0; //Determines max voltage and efficiency (MV to LuV) - private int orientation = 0; //Direction of multi for structure check private int maxTier = 6; //Max tier for efficiency calcuation private int minTier = 1; //Min tier for efficiency calcuation @@ -49,23 +48,16 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private final ArrayList eCapacitorHatches = new ArrayList<>(); //Used to determine count and tier of capacitors present private int scanTime = 0; //Scan timer used for tesla search intervals - private int transferRadiusTower; //Radius for tower to tower transfers - private int transferRadiusTransceiver; //Radius for tower to transceiver transfers - private int transferRadiusCoverUltimate; //Radius for tower to ultimate cover transfers private long energyCapacity = 0; //Total energy storage limited by capacitors private long outputVoltageMax = 0; //Tesla voltage output limited by capacitors - public int vTier = -1; //Tesla voltage tier limited by capacitors + private int vTier = -1; //Tesla voltage tier limited by capacitors private long outputCurrentMax = 0; //Tesla current output limited by capacitors - private long outputVoltage = 0; //Tesla voltage output limited by settings - private long outputCurrent = 0; //Tesla current output limited by settings private long lossPerBlock = 1; //Distance loss of each packet sent private float energyEfficiencyMax = 0.95F; //Max efficiency of each packet sent at highest mTier private float energyEfficiencyMin = 0.75F; //Min efficiency of each packet sent at lowest mTier private float overdriveEfficiency = 0.95F; //Overdrive efficiency added losses - private long outputVoltageConsumption = 0; //Packet size consumed including efficiency losses - private long outputVoltageInjectable = 0; //Packet size injected into target post losses //Scan range fields private double xPosScanMin; @@ -275,7 +267,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock Parameters.Group hatch_8=parametrization.getGroup(8, true); Parameters.Group hatch_9=parametrization.getGroup(9, true); - histLowSetting=hatch_0.makeInParameter(0,0.25, HYSTERESIS_LOW_SETTING_NAME,HYSTERESIS_LOW_STATUS);//TODO Fix Grouping + histLowSetting=hatch_0.makeInParameter(0,0.25, HYSTERESIS_LOW_SETTING_NAME,HYSTERESIS_LOW_STATUS); popogaSetting=hatch_0.makeInParameter(1,0, POPOGA_NAME,POPOGA_STATUS); histHighSetting=hatch_1.makeInParameter(0,0.75, HYSTERESIS_HIGH_SETTING_NAME,HYSTERESIS_HIGH_STATUS); popogaSetting=hatch_1.makeInParameter(1,0, POPOGA_NAME,POPOGA_STATUS); @@ -348,7 +340,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock if (overDriveToggle){ return (long)(voltage * (2-energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maxTier - minTier + 1) * mTier)*(2 - overdriveEfficiency)); //Sum overdrive efficiency formula } else { - return (long)(voltage * energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maxTier - minTier + 1) * mTier); //Efficiency Formula + return (long)(voltage * energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maxTier - minTier + 1) * mTier); //TODO redo Efficiency Formula } }//Efficiency function used on power transfers @@ -454,6 +446,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock int xOffset; int yOffset; int zOffset; + int orientation; if (coil0 == sBlockCasingsBA0) { xOffset = 3; @@ -704,7 +697,9 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock scanTime++; scanTimeDisplay.set(scanTime); + //Power Limit Settings + long outputVoltage; if (outputVoltageSetting.get() > 0){ outputVoltage = Math.min(outputVoltageMax,(long)outputVoltageSetting.get()); } else { @@ -712,6 +707,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } outputVoltageDisplay.set(outputVoltage); + long outputCurrent; if (outputCurrentSetting.get() > 0){ outputCurrent = Math.min(outputCurrentMax,(long)outputCurrentSetting.get()); } else { @@ -723,11 +719,11 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock if (ePowerPass) { //Range calculation and display float rangeFrac = (float)((-0.5*Math.pow(energyFrac,2))+(1.5*energyFrac)); - transferRadiusTower = (int)(transferRadiusTowerSetting.get()*getRangeMulti(mTier,vTier)*rangeFrac); + int transferRadiusTower = (int)(transferRadiusTowerSetting.get()*getRangeMulti(mTier,vTier)*rangeFrac); transferRadiusTowerDisplay.set(transferRadiusTower); - transferRadiusTransceiver = (int)(transferRadiusTransceiverSetting.get()*getRangeMulti(mTier,vTier)*rangeFrac); + int transferRadiusTransceiver = (int)(transferRadiusTransceiverSetting.get()*getRangeMulti(mTier,vTier)*rangeFrac); transferRadiusTransceiverDisplay.set(transferRadiusTransceiver); - transferRadiusCoverUltimate=(int)(transferRadiusCoverUltimateSetting.get()*getRangeMulti(mTier,vTier)*rangeFrac); + int transferRadiusCoverUltimate=(int)(transferRadiusCoverUltimateSetting.get()*getRangeMulti(mTier,vTier)*rangeFrac); transferRadiusCoverUltimateDisplay.set(transferRadiusCoverUltimate); //Clean the eTeslaMap @@ -764,6 +760,8 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock IGregTechTileEntity node = Rx.getKey(); IMetaTileEntity nodeInside = node.getMetaTileEntity(); + long outputVoltageInjectable; + long outputVoltageConsumption; if (overDriveSetting.get() > 0){ outputVoltageInjectable = outputVoltage; outputVoltageConsumption = getEnergyEfficiency(outputVoltage, mTier, true) + (lossPerBlock * Rx.getValue()); @@ -815,11 +813,11 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock return true; } - public final boolean addFrameToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + private boolean addFrameToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { return aTileEntity != null && aTileEntity.getMetaTileEntity() instanceof GT_MetaPipeEntity_Frame; } - public final boolean addCapacitorToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + private boolean addCapacitorToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { if (aTileEntity == null) { return false; } 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 fb751c8fab..d0073acb48 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 @@ -54,13 +54,10 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB private float sumOverdriveEfficiency = (2 - energyEfficiency) * (2 - overdriveEfficiency); //Sum overdrive efficiency formula //TODO Rewrite over drive efficiency formulas - public boolean overDriveToggle = false; //Overdrive toggle + private boolean overDriveToggle = false; //Overdrive toggle private long outputVoltage = V[mTier]; //Tesla Voltage Output private long outputVoltagePostEfficiency = (long) (outputVoltage * energyEfficiency); //Max power a machine can actually receive private long outputVoltagePostOverdrive = (long) (outputVoltage * sumOverdriveEfficiency); //Max power the sender can consume - private long outputVoltageInjectable = 0; //How much EU will be received post distance losses - private long outputVoltageConsumption = 0; //How much EU will be drained - private long outputCurrent = 0; //Tesla Current Output public GT_MetaTileEntity_TeslaCoil(int aID, String aName, String aNameRegional, int aTier, int aSlotCount) { super(aID, aName, aNameRegional, aTier, "Tesla Coil Transceiver", aSlotCount); @@ -75,10 +72,10 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB public boolean onSolderingToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (overDriveToggle) { overDriveToggle = false; - PlayerChatHelper.SendInfo(aPlayer, "Overdrive Disengaged"); + PlayerChatHelper.SendInfo(aPlayer, "Overdrive disengaged"); } else { overDriveToggle = true; - PlayerChatHelper.SendInfo(aPlayer, "Overdrive Engaged"); + PlayerChatHelper.SendInfo(aPlayer, "Overdrive engaged"); } return true; } @@ -92,7 +89,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB histSettingHigh = histSettingLow + 1; } histHigh = (float) histSettingHigh / histSteps; - PlayerChatHelper.SendInfo(aPlayer, "Hysteresis High Changed to " + round(histHigh * 100F) + "%"); + PlayerChatHelper.SendInfo(aPlayer, "Hysteresis high set to " + round(histHigh * 100F) + "%"); } else { if (histSettingLow > histLowLimit) { histSettingLow--; @@ -100,7 +97,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB histSettingLow = histSettingHigh - 1; } histLow = (float) histSettingLow / histSteps; - PlayerChatHelper.SendInfo(aPlayer, "Hysteresis Low Changed to " + round(histLow * 100F) + "%"); + PlayerChatHelper.SendInfo(aPlayer, "Hysteresis low set to " + round(histLow * 100F) + "%"); } } @@ -109,17 +106,13 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB if (aPlayer.isSneaking()) { if (transferRadius > transferRadiusLimitBottom) { transferRadius--; - } else { - transferRadius = transferRadiusLimitTop; } } else { - if (transferRadius < transferRadiusLimitTop) { + if (transferRadius < 0) { transferRadius++; - } else { - transferRadius = transferRadiusLimitBottom; } } - PlayerChatHelper.SendInfo(aPlayer, "Tesla Radius Changed to " + transferRadius + " Blocks"); + PlayerChatHelper.SendInfo(aPlayer, "Tesla radius set to " + transferRadius + "m"); return false; } @@ -131,7 +124,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB @Override public String getAlternativeModeText() { - ////Hysteresis based ePowerPass Config + //Hysteresis based ePowerPass Config long energyMax = getStoredEnergy()[1]; long energyStored = getStoredEnergy()[0]; float energyFrac = (float) energyStored / energyMax; @@ -146,7 +139,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB } //And after this cheeky-ness, toss the string XD - return powerPassToggle ? "Sending Power!" : "Receiving Power!"; + return powerPassToggle ? "Sending power!" : "Receiving power!"; } @Override @@ -176,7 +169,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB //Stuff to do if ePowerPass if (powerPassToggle) { float rangeFrac = (float) ((-0.5 * Math.pow(energyFrac, 2)) + (1.5 * energyFrac)); - outputCurrent = mBatteryCount; + long outputCurrent = mBatteryCount; transferRadiusTower = (int) (transferRadius * rangeFrac); transferRadiusCover = (int) (transferRadiusTower / 1.25); @@ -207,6 +200,9 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB if (getEUVar() >= (overDriveToggle ? outputVoltage * 2 : outputVoltage)) { IGregTechTileEntity node = Rx.getKey(); IMetaTileEntity nodeInside = node.getMetaTileEntity(); + + long outputVoltageInjectable; + long outputVoltageConsumption; if (overDriveToggle) { outputVoltageInjectable = outputVoltage; outputVoltageConsumption = outputVoltagePostOverdrive + (lossPerBlock * Rx.getValue()); -- cgit From 03a58064455f8a2786ad8ce9ce3ef5bf9a96bcbd Mon Sep 17 00:00:00 2001 From: Bass Date: Tue, 23 Jul 2019 16:10:57 +0100 Subject: Tesla Cover Textures (untested) --- .../github/technus/tectech/loader/thing/CoverLoader.java | 12 +++++++----- .../technus/tectech/thing/metaTileEntity/Textures.java | 8 ++++++++ .../assets/gregtech/textures/blocks/TESLA_COVER.png | Bin 0 -> 749 bytes .../gregtech/textures/blocks/TESLA_COVER.png.mcmeta | 5 +++++ .../gregtech/textures/blocks/TESLA_COVER_ULT.png.mcmeta | 5 +++++ .../assets/gregtech/textures/blocks/TESLA_COVER_ULTI.png | Bin 0 -> 906 bytes 6 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER.png.mcmeta create mode 100644 src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER_ULT.png.mcmeta create mode 100644 src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER_ULTI.png (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java b/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java index e71489339e..067cb0f4a0 100644 --- a/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java @@ -1,19 +1,21 @@ package com.github.technus.tectech.loader.thing; import com.github.technus.tectech.TecTech; - import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil_Ultimate; import com.github.technus.tectech.thing.item.TeslaCoilCover; import com.github.technus.tectech.thing.item.TeslaCoilCoverUltimate; import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; -import gregtech.api.objects.GT_RenderedTexture; import net.minecraft.item.ItemStack; + +import static com.github.technus.tectech.thing.metaTileEntity.Textures.TESLA_COVER_TEXTURES; + public class CoverLoader implements Runnable { public void run(){ - GregTech_API.registerCover(new ItemStack(TeslaCoilCover.INSTANCE, 1), new GT_RenderedTexture(Textures.BlockIcons.VENT_NORMAL), new GT_Cover_TM_TeslaCoil()); - GregTech_API.registerCover(new ItemStack(TeslaCoilCoverUltimate.INSTANCE, 1), new GT_RenderedTexture(Textures.BlockIcons.VENT_ADVANCED), new GT_Cover_TM_TeslaCoil_Ultimate()); + //GregTech_API.registerCover(new ItemStack(TeslaCoilCover.INSTANCE, 1), new GT_RenderedTexture(Textures.BlockIcons.VENT_NORMAL), new GT_Cover_TM_TeslaCoil()); + //GregTech_API.registerCover(new ItemStack(TeslaCoilCoverUltimate.INSTANCE, 1), new GT_RenderedTexture(Textures.BlockIcons.VENT_ADVANCED), new GT_Cover_TM_TeslaCoil_Ultimate()); + GregTech_API.registerCover(new ItemStack(TeslaCoilCover.INSTANCE, 1), TESLA_COVER_TEXTURES[0], new GT_Cover_TM_TeslaCoil()); + GregTech_API.registerCover(new ItemStack(TeslaCoilCoverUltimate.INSTANCE, 1), TESLA_COVER_TEXTURES[1], new GT_Cover_TM_TeslaCoil_Ultimate()); TecTech.LOGGER.info("Cover functionality registered"); } } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/Textures.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/Textures.java index d77749d130..ea4a3dcb79 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/Textures.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/Textures.java @@ -33,6 +33,9 @@ public class Textures { private static final IIconContainer MACHINE_OPV_BOTTOM = new CustomIcon("iconsets/MACHINE_OPV_BOTTOM"); private static final IIconContainer MACHINE_MAXV_BOTTOM = new CustomIcon("iconsets/MACHINE_MAXV_BOTTOM"); + private static final IIconContainer TESLA_COVER_ICON = new CustomIcon("iconsets/TESLA_COVER"); + private static final IIconContainer TESLA_COVER_ULTIMATE_ICON = new CustomIcon("iconsets/TESLA_COVER_ULT"); + public static IIconContainer[] MACHINECASINGS_SIDE_TT = new IIconContainer[]{ MACHINE_8V_SIDE, MACHINE_LV_SIDE, MACHINE_MV_SIDE, MACHINE_HV_SIDE, MACHINE_EV_SIDE, MACHINE_IV_SIDE, MACHINE_LuV_SIDE, MACHINE_ZPM_SIDE, @@ -189,6 +192,11 @@ public class Textures { public static ITexture[][] MACHINE_CASINGS_TT = new ITexture[16][17]; + public static ITexture[] TESLA_COVER_TEXTURES = new ITexture[]{ + new GT_RenderedTexture(TESLA_COVER_ICON), + new GT_RenderedTexture(TESLA_COVER_ULTIMATE_ICON) + }; + public Textures(){ for (byte i = 0; i < MACHINE_CASINGS_TT.length; i++) { for (byte j = 0; j < MACHINE_CASINGS_TT[i].length; j++) { diff --git a/src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER.png b/src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER.png new file mode 100644 index 0000000000..50c05f7a93 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER.png.mcmeta b/src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER.png.mcmeta new file mode 100644 index 0000000000..97596ba817 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER_ULT.png.mcmeta b/src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER_ULT.png.mcmeta new file mode 100644 index 0000000000..dfae8cae16 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER_ULT.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":1 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER_ULTI.png b/src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER_ULTI.png new file mode 100644 index 0000000000..5ce89b94aa Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER_ULTI.png differ -- cgit From ac202599529ef2067e4db66faaf76dd71dbafd86 Mon Sep 17 00:00:00 2001 From: Technus Date: Tue, 23 Jul 2019 18:31:40 +0200 Subject: Properly add to registered definitions --- .../definitions/complex/dHadronDefinition.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/dHadronDefinition.java b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/dHadronDefinition.java index 1e80c6f1e8..404f116adf 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/dHadronDefinition.java +++ b/src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/dHadronDefinition.java @@ -173,34 +173,34 @@ public final class dHadronDefinition extends cElementalDefinition {//TODO Optimi @Override public String getSymbol() { - StringBuilder symbol = new StringBuilder(8); String sym=SYMBOL_MAP.get(this); if(sym!=null){ - symbol.append(sym); + return sym; }else { + StringBuilder symbol = new StringBuilder(8); for (cElementalDefinitionStack quark : quarkStacks.values()) { for (int i = 0; i < quark.amount; i++) { symbol.append(quark.definition.getSymbol()); } } + return symbol.toString(); } - return symbol.toString(); } @Override public String getShortSymbol() { - StringBuilder symbol = new StringBuilder(8); String sym=SYMBOL_MAP.get(this); if(sym!=null){ - symbol.append(sym); + return sym; }else { + StringBuilder symbol = new StringBuilder(8); for (cElementalDefinitionStack quark : quarkStacks.values()) { for (int i = 0; i < quark.amount; i++) { symbol.append(quark.definition.getShortSymbol()); } } + return symbol.toString(); } - return symbol.toString(); } @Override @@ -425,11 +425,11 @@ public final class dHadronDefinition extends cElementalDefinition {//TODO Optimi hadron_n = new dHadronDefinition(new cElementalDefinitionStackMap(eQuarkDefinition.quark_u.getStackForm(1), eQuarkDefinition.quark_d.getStackForm(2))); SYMBOL_MAP.put(hadron_n, "n"); NAME_MAP.put(hadron_n, "Neutron"); - DebugElementalInstanceContainer_EM.STACKS_REGISTERED.add(hadron_p); + DebugElementalInstanceContainer_EM.STACKS_REGISTERED.add(hadron_n); hadron_n_ = (dHadronDefinition) hadron_n.getAnti(); SYMBOL_MAP.put(hadron_n_,"~n"); NAME_MAP.put(hadron_n_,"Anti Neutron"); - DebugElementalInstanceContainer_EM.STACKS_REGISTERED.add(hadron_p_); + DebugElementalInstanceContainer_EM.STACKS_REGISTERED.add(hadron_n_); } catch (tElementalException e) { if (DEBUG_MODE) { e.printStackTrace(); -- cgit From 884f6bc59ee108b749c8f6eb5eaf38962fa1d037 Mon Sep 17 00:00:00 2001 From: Bass Date: Tue, 23 Jul 2019 21:34:28 +0100 Subject: Tesla Cover Textures --- .../technus/tectech/thing/metaTileEntity/Textures.java | 2 +- .../assets/gregtech/textures/blocks/TESLA_COVER.png | Bin 749 -> 0 bytes .../gregtech/textures/blocks/TESLA_COVER.png.mcmeta | 5 ----- .../gregtech/textures/blocks/TESLA_COVER_ULT.png.mcmeta | 5 ----- .../assets/gregtech/textures/blocks/TESLA_COVER_ULTI.png | Bin 906 -> 0 bytes .../gregtech/textures/blocks/iconsets/TESLA_COVER.png | Bin 0 -> 766 bytes .../textures/blocks/iconsets/TESLA_COVER_ULTIMATE.png | Bin 0 -> 768 bytes 7 files changed, 1 insertion(+), 11 deletions(-) delete mode 100644 src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER.png delete mode 100644 src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER.png.mcmeta delete mode 100644 src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER_ULT.png.mcmeta delete mode 100644 src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER_ULTI.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_COVER.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_COVER_ULTIMATE.png (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/Textures.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/Textures.java index ea4a3dcb79..be94940990 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/Textures.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/Textures.java @@ -34,7 +34,7 @@ public class Textures { private static final IIconContainer MACHINE_MAXV_BOTTOM = new CustomIcon("iconsets/MACHINE_MAXV_BOTTOM"); private static final IIconContainer TESLA_COVER_ICON = new CustomIcon("iconsets/TESLA_COVER"); - private static final IIconContainer TESLA_COVER_ULTIMATE_ICON = new CustomIcon("iconsets/TESLA_COVER_ULT"); + private static final IIconContainer TESLA_COVER_ULTIMATE_ICON = new CustomIcon("iconsets/TESLA_COVER_ULTIMATE"); public static IIconContainer[] MACHINECASINGS_SIDE_TT = new IIconContainer[]{ MACHINE_8V_SIDE, MACHINE_LV_SIDE, MACHINE_MV_SIDE, MACHINE_HV_SIDE, diff --git a/src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER.png b/src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER.png deleted file mode 100644 index 50c05f7a93..0000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER.png.mcmeta b/src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER.png.mcmeta deleted file mode 100644 index 97596ba817..0000000000 --- a/src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":2 - } -} \ No newline at end of file diff --git a/src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER_ULT.png.mcmeta b/src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER_ULT.png.mcmeta deleted file mode 100644 index dfae8cae16..0000000000 --- a/src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER_ULT.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation":{ - "frametime":1 - } -} \ No newline at end of file diff --git a/src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER_ULTI.png b/src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER_ULTI.png deleted file mode 100644 index 5ce89b94aa..0000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/TESLA_COVER_ULTI.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_COVER.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_COVER.png new file mode 100644 index 0000000000..48fd00be12 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_COVER.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_COVER_ULTIMATE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_COVER_ULTIMATE.png new file mode 100644 index 0000000000..60a40684de Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_COVER_ULTIMATE.png differ -- cgit From 52ad4cda52bdf86235d35efc02a523adbf6a2cb4 Mon Sep 17 00:00:00 2001 From: Bass Date: Tue, 23 Jul 2019 22:48:46 +0100 Subject: Tesla Cover Textures Better-ed --- .../technus/tectech/thing/item/TeslaCoilCover.java | 2 +- .../tectech/thing/item/TeslaCoilCoverUltimate.java | 2 +- .../gregtech/textures/blocks/iconsets/TESLA_COVER.png | Bin 766 -> 808 bytes .../textures/blocks/iconsets/TESLA_COVER_ULTIMATE.png | Bin 768 -> 799 bytes .../assets/tectech/textures/items/itemTeslaCover.png | Bin 0 -> 451 bytes .../tectech/textures/items/itemTeslaCoverUltimate.png | Bin 0 -> 472 bytes 6 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 src/main/resources/assets/tectech/textures/items/itemTeslaCover.png create mode 100644 src/main/resources/assets/tectech/textures/items/itemTeslaCoverUltimate.png (limited to 'src/main/java') 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 8f2dfc0951..d789f9d7f5 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 @@ -17,7 +17,7 @@ public final class TeslaCoilCover extends Item { public TeslaCoilCover() { setUnlocalizedName("tm.teslaCoilCover"); - setTextureName(MODID + ":itemParametrizerMemoryCardUnlocked"); + setTextureName(MODID + ":itemTeslaCover"); } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCoverUltimate.java b/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCoverUltimate.java index ca6734f8d6..a85a3b2f1a 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCoverUltimate.java +++ b/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCoverUltimate.java @@ -17,7 +17,7 @@ public final class TeslaCoilCoverUltimate extends Item { public TeslaCoilCoverUltimate() { setUnlocalizedName("tm.teslaCoilCoverUltimate"); - setTextureName(MODID + ":itemParametrizerMemoryCardUnlocked"); + setTextureName(MODID + ":itemTeslaCoverUltimate"); } @Override diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_COVER.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_COVER.png index 48fd00be12..fc16be01b0 100644 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_COVER.png and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_COVER.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_COVER_ULTIMATE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_COVER_ULTIMATE.png index 60a40684de..5acfa08654 100644 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_COVER_ULTIMATE.png and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_COVER_ULTIMATE.png differ diff --git a/src/main/resources/assets/tectech/textures/items/itemTeslaCover.png b/src/main/resources/assets/tectech/textures/items/itemTeslaCover.png new file mode 100644 index 0000000000..f3688b33b8 Binary files /dev/null and b/src/main/resources/assets/tectech/textures/items/itemTeslaCover.png differ diff --git a/src/main/resources/assets/tectech/textures/items/itemTeslaCoverUltimate.png b/src/main/resources/assets/tectech/textures/items/itemTeslaCoverUltimate.png new file mode 100644 index 0000000000..e346fc2236 Binary files /dev/null and b/src/main/resources/assets/tectech/textures/items/itemTeslaCoverUltimate.png differ -- cgit From 382d9a8d17961930497490b8e46c941d83305461 Mon Sep 17 00:00:00 2001 From: Technus Date: Wed, 24 Jul 2019 00:36:51 +0200 Subject: Fix enable alpha. --- src/main/java/com/github/technus/tectech/font/TecTechFontRender.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/font/TecTechFontRender.java b/src/main/java/com/github/technus/tectech/font/TecTechFontRender.java index a7130bab90..4aea8bce92 100644 --- a/src/main/java/com/github/technus/tectech/font/TecTechFontRender.java +++ b/src/main/java/com/github/technus/tectech/font/TecTechFontRender.java @@ -212,13 +212,13 @@ public class TecTechFontRender extends FontRenderer { } private int drawStringFront(String p_85187_1_, int p_85187_2_, int p_85187_3_, int p_85187_4_) { - enableAlpha(); + GL11.glEnable(3008); resetStyles2(); return renderString2(p_85187_1_, p_85187_2_, p_85187_3_, p_85187_4_, false); } private int drawStringBack(String p_85187_1_, int p_85187_2_, int p_85187_3_, int p_85187_4_) { - enableAlpha(); + GL11.glEnable(3008); resetStyles2(); return renderString2(p_85187_1_, p_85187_2_ + 1, p_85187_3_ + 1, p_85187_4_, true); } -- cgit From 42f082bc0bc3f27775ea3a3f45995487e93a6d5e Mon Sep 17 00:00:00 2001 From: Technus Date: Wed, 24 Jul 2019 01:09:42 +0200 Subject: Adjust parametrizer card --- .../tectech/thing/item/ParametrizerMemoryCard.java | 34 ++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) (limited to 'src/main/java') 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 dafc425163..b13ef6b574 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 @@ -3,6 +3,7 @@ package com.github.technus.tectech.thing.item; import com.github.technus.tectech.CommonValues; import com.github.technus.tectech.Util; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Param; +import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_ParamText; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; @@ -64,6 +65,8 @@ public final class ParametrizerMemoryCard extends Item { tNBT.setInteger("param", parametrizer.param); tNBT.setDouble("value0D", parametrizer.value0D); tNBT.setDouble("value1D", parametrizer.value1D); + tNBT.removeTag("value0s"); + tNBT.removeTag("value1s"); } return true; }else if(metaTE instanceof GT_MetaTileEntity_MultiblockBase_EM){ @@ -79,6 +82,28 @@ public final class ParametrizerMemoryCard extends Item { tNBT.getDouble("value1D")); return true; } + } else if (metaTE instanceof GT_MetaTileEntity_Hatch_ParamText) { + GT_MetaTileEntity_Hatch_ParamText parametrizer = (GT_MetaTileEntity_Hatch_ParamText) metaTE; + if (aStack.getTagCompound() == null) { + aStack.setTagCompound(new NBTTagCompound()); + } + NBTTagCompound tNBT = aStack.getTagCompound(); + if (aStack.getItemDamage() == 1) { + //write to parametrizer + parametrizer.param = tNBT.getInteger("param"); + parametrizer.value0D = tNBT.getDouble("value0D"); + parametrizer.value1D = tNBT.getDouble("value1D"); + parametrizer.value0s = tNBT.getString("value0s"); + parametrizer.value1s = tNBT.getString("value1s"); + } else { + //read from parametrizer + tNBT.setInteger("param", parametrizer.param); + tNBT.setDouble("value0D", parametrizer.value0D); + tNBT.setDouble("value1D", parametrizer.value1D); + tNBT.setString("value0s", parametrizer.value0s); + tNBT.setString("value1s", parametrizer.value1s); + } + return true; } } } @@ -113,16 +138,21 @@ public final class ParametrizerMemoryCard extends Item { } aList.add(EnumChatFormatting.BLUE + "Sneak right click to lock/unlock"); - long temp; + double temp; if(tNBT!=null && tNBT.hasKey("param")) { aList.add("Hatch ID: "+EnumChatFormatting.AQUA + tNBT.getInteger("param")); temp=tNBT.getInteger("value0D"); aList.add("Value 0D: "+EnumChatFormatting.AQUA + temp); aList.add("Value 0B: "+EnumChatFormatting.AQUA + Util.longBitsToShortString(Double.doubleToLongBits(temp))); + if(tNBT.hasKey("value0s")) { + aList.add("Value 0s: " + EnumChatFormatting.AQUA + tNBT.getString("value0s")); + } temp=tNBT.getInteger("value1D"); aList.add("Value 1D: "+EnumChatFormatting.AQUA + temp); aList.add("Value 1B: "+EnumChatFormatting.AQUA + Util.longBitsToShortString(Double.doubleToLongBits(temp))); - aList.add("Uses Floats: "+(tNBT.getBoolean("usesFloats")?EnumChatFormatting.GREEN+"TRUE":EnumChatFormatting.RED+"FALSE")); + if(tNBT.hasKey("value1s")) { + aList.add("Value 1s: " + EnumChatFormatting.AQUA + tNBT.getString("value1s")); + } } } -- cgit From 5f14653c028191c89a62a3c6a7f18f898752a8d2 Mon Sep 17 00:00:00 2001 From: Bass Date: Wed, 24 Jul 2019 02:54:34 +0100 Subject: Proper Texture implementation --- .../technus/tectech/loader/thing/CoverLoader.java | 14 ++++++---- .../tectech/thing/metaTileEntity/Textures.java | 8 ++---- .../single/GT_MetaTileEntity_TeslaCoil.java | 29 ++++++++++++++++++--- .../textures/blocks/iconsets/TESLA_COVER.png | Bin 808 -> 0 bytes .../blocks/iconsets/TESLA_COVER_ULTIMATE.png | Bin 799 -> 0 bytes .../textures/blocks/iconsets/TESLA_OVERLAY.png | Bin 0 -> 808 bytes .../blocks/iconsets/TESLA_OVERLAY_ULTIMATE.png | Bin 0 -> 799 bytes .../blocks/iconsets/TESLA_TRANSCEIVER_TOP.png | Bin 0 -> 655 bytes 8 files changed, 37 insertions(+), 14 deletions(-) delete mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_COVER.png delete mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_COVER_ULTIMATE.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_OVERLAY.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_OVERLAY_ULTIMATE.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_TRANSCEIVER_TOP.png (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java b/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java index 067cb0f4a0..e87ac69f2a 100644 --- a/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java @@ -6,16 +6,20 @@ import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil_Ultimate; import com.github.technus.tectech.thing.item.TeslaCoilCover; import com.github.technus.tectech.thing.item.TeslaCoilCoverUltimate; import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.objects.GT_RenderedTexture; import net.minecraft.item.ItemStack; -import static com.github.technus.tectech.thing.metaTileEntity.Textures.TESLA_COVER_TEXTURES; + public class CoverLoader implements Runnable { public void run(){ - //GregTech_API.registerCover(new ItemStack(TeslaCoilCover.INSTANCE, 1), new GT_RenderedTexture(Textures.BlockIcons.VENT_NORMAL), new GT_Cover_TM_TeslaCoil()); - //GregTech_API.registerCover(new ItemStack(TeslaCoilCoverUltimate.INSTANCE, 1), new GT_RenderedTexture(Textures.BlockIcons.VENT_ADVANCED), new GT_Cover_TM_TeslaCoil_Ultimate()); - GregTech_API.registerCover(new ItemStack(TeslaCoilCover.INSTANCE, 1), TESLA_COVER_TEXTURES[0], new GT_Cover_TM_TeslaCoil()); - GregTech_API.registerCover(new ItemStack(TeslaCoilCoverUltimate.INSTANCE, 1), TESLA_COVER_TEXTURES[1], new GT_Cover_TM_TeslaCoil_Ultimate()); + final IIconContainer TESLA_OVERLAY = new Textures.BlockIcons.CustomIcon("iconsets/TESLA_OVERLAY"); + final IIconContainer TESLA_OVERLAY_ULTIMATE = new Textures.BlockIcons.CustomIcon("iconsets/TESLA_OVERLAY_ULTIMATE"); + + GregTech_API.registerCover(new ItemStack(TeslaCoilCover.INSTANCE, 1), new GT_RenderedTexture(TESLA_OVERLAY), new GT_Cover_TM_TeslaCoil()); + GregTech_API.registerCover(new ItemStack(TeslaCoilCoverUltimate.INSTANCE, 1), new GT_RenderedTexture(TESLA_OVERLAY_ULTIMATE), new GT_Cover_TM_TeslaCoil_Ultimate()); TecTech.LOGGER.info("Cover functionality registered"); } } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/Textures.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/Textures.java index be94940990..69ff06e9e7 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/Textures.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/Textures.java @@ -33,8 +33,7 @@ public class Textures { private static final IIconContainer MACHINE_OPV_BOTTOM = new CustomIcon("iconsets/MACHINE_OPV_BOTTOM"); private static final IIconContainer MACHINE_MAXV_BOTTOM = new CustomIcon("iconsets/MACHINE_MAXV_BOTTOM"); - private static final IIconContainer TESLA_COVER_ICON = new CustomIcon("iconsets/TESLA_COVER"); - private static final IIconContainer TESLA_COVER_ULTIMATE_ICON = new CustomIcon("iconsets/TESLA_COVER_ULTIMATE"); + private static final IIconContainer TESLA_TRANSCEIVER_TOP = new CustomIcon("iconsets/TESLA_TRANSCEIVER_TOP"); public static IIconContainer[] MACHINECASINGS_SIDE_TT = new IIconContainer[]{ MACHINE_8V_SIDE, MACHINE_LV_SIDE, MACHINE_MV_SIDE, MACHINE_HV_SIDE, @@ -192,10 +191,7 @@ public class Textures { public static ITexture[][] MACHINE_CASINGS_TT = new ITexture[16][17]; - public static ITexture[] TESLA_COVER_TEXTURES = new ITexture[]{ - new GT_RenderedTexture(TESLA_COVER_ICON), - new GT_RenderedTexture(TESLA_COVER_ULTIMATE_ICON) - }; + public static ITexture TESLA_TRANSCEIVER_TOP_BA = new GT_RenderedTexture(TESLA_TRANSCEIVER_TOP); public Textures(){ for (byte i = 0; i < MACHINE_CASINGS_TT.length; i++) { 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 d0073acb48..81418f0c4f 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 @@ -5,6 +5,7 @@ import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil_Ultimate; import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_TM_teslaCoil; import eu.usrv.yamcore.auxiliary.PlayerChatHelper; +import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -12,16 +13,17 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicBatteryBuffer; import net.minecraft.entity.player.EntityPlayer; - -import java.util.*; +import java.util.HashMap; +import java.util.Map; import static com.github.technus.tectech.CommonValues.V; import static com.github.technus.tectech.Util.entriesSortedByValues; +import static com.github.technus.tectech.thing.metaTileEntity.Textures.TESLA_TRANSCEIVER_TOP_BA; import static java.lang.Math.round; public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryBuffer { - private int maxTier = 3; //Max tier of transceiver + private int maxTier = 4; //Max tier of transceiver private int minTier = 0; //Min tier of transceiver public Map eTeslaMap = new HashMap();//Tesla Map to map them tesla bois! @@ -142,6 +144,27 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB return powerPassToggle ? "Sending power!" : "Receiving power!"; } + @Override + public boolean isFacingValid(byte aSide) {return aSide != 1;}//Prevents output at the top side + + @Override + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + ITexture[][][] rTextures = new ITexture[3][17][]; + + for(byte i = -1; i < 16; ++i) { + rTextures[0][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1]}; + rTextures[1][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1], TESLA_TRANSCEIVER_TOP_BA}; + rTextures[2][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1], this.mInventory.length == 16 ? Textures.BlockIcons.OVERLAYS_ENERGY_OUT_POWER[this.mTier] : (this.mInventory.length > 4 ? Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier] : Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier])}; + } + + return rTextures; + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + return this.mTextures[aSide == aFacing ? 2 : aSide == 1 ? 1 : 0][aColorIndex + 1]; + } + @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_TeslaCoil(mName, mTier, mDescription, mTextures, mInventory.length); diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_COVER.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_COVER.png deleted file mode 100644 index fc16be01b0..0000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_COVER.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_COVER_ULTIMATE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_COVER_ULTIMATE.png deleted file mode 100644 index 5acfa08654..0000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_COVER_ULTIMATE.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_OVERLAY.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_OVERLAY.png new file mode 100644 index 0000000000..fc16be01b0 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_OVERLAY.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_OVERLAY_ULTIMATE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_OVERLAY_ULTIMATE.png new file mode 100644 index 0000000000..5acfa08654 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_OVERLAY_ULTIMATE.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_TRANSCEIVER_TOP.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_TRANSCEIVER_TOP.png new file mode 100644 index 0000000000..c0de56149e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/TESLA_TRANSCEIVER_TOP.png differ -- cgit From 7f9984f334588d5c042108ec28f06d6b5a390955 Mon Sep 17 00:00:00 2001 From: Bass Date: Wed, 24 Jul 2019 05:34:29 +0100 Subject: Experimental Thaum Lightning (Don't merge) --- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'src/main/java') 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 62457ee0db..78dd2f860c 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 @@ -23,6 +23,7 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; +import thaumcraft.client.fx.bolt.FXLightningBolt; import java.util.ArrayList; import java.util.HashMap; @@ -46,6 +47,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private Map eTeslaMap = new HashMap<>(); //Used to store targets for power transmission private final ArrayList eCapacitorHatches = new ArrayList<>(); //Used to determine count and tier of capacitors present + private float[][] eLightningTargets; private int scanTime = 0; //Scan timer used for tesla search intervals @@ -593,7 +595,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } IMetaTileEntity nodeInside = node.getMetaTileEntity(); if (nodeInside instanceof GT_MetaTileEntity_TeslaCoil || nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive() || (node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil)) { - // eTeslaMap.put(node, (int) Math.ceil(Math.sqrt(xPosOffset * xPosOffset + yPosOffset * yPosOffset + zPosOffset * zPosOffset)));//TODO Test if range valid eTeslaMap.put(node, (int) Math.ceil(Math.sqrt(Math.pow(xPosOffset,2) + Math.pow(yPosOffset,2) + Math.pow(zPosOffset,2)))); } } @@ -604,9 +605,11 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock @Override public boolean onRunningTick(ItemStack aStack) { - if (getBaseMetaTileEntity().isClientSide()) { - return true; - } + IGregTechTileEntity mte = getBaseMetaTileEntity(); + + float tXN = mte.getXCoord(); + float tYN = mte.getYCoord(); + float tZN = mte.getZCoord(); //Hysteresis based ePowerPass setting long energyMax = maxEUStore() / 2; @@ -650,7 +653,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock if (scanTime == (int) scanTimeMinSetting.get() - 1) { scanTime = -1; - IGregTechTileEntity mte = getBaseMetaTileEntity(); for (Map.Entry Rx : eTeslaMap.entrySet()) { IGregTechTileEntity node = Rx.getKey(); if (node != null) { @@ -663,10 +665,13 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock float tY = node.getYCoord(); float tZ = node.getZCoord(); - float tXN = mte.getXCoord(); - float tYN = mte.getYCoord(); - float tZN = mte.getZCoord(); + FXLightningBolt bolt = new FXLightningBolt(mte.getWorld(),tXN,tYN,tZN,tX,tY,tZ,mte.getWorld().rand.nextLong(), 6, 0.5F, 8); + bolt.defaultFractal(); + bolt.setType(2); + bolt.setWidth(0.125F); + bolt.finalizeBolt(); + new FXLightningBolt(getBaseMetaTileEntity().getWorld(),tX,tY,tZ,tXN,tYN,tZN,10000,1,1); int tOffset = (int) Math.ceil(Math.sqrt(Math.pow(tX-tXN,2) + Math.pow(tY-tYN,2) + Math.pow(tZ-tZN,2))); teslaCoil.eTeslaMap.put(mte,tOffset); -- cgit From 9c0ed5651b40d644a9ec9c961baf4cdd66402eb9 Mon Sep 17 00:00:00 2001 From: Technus Date: Wed, 24 Jul 2019 13:10:31 +0200 Subject: persistence? --- AVRcore | 2 +- .../tileEntity/MicroControllerTileEntity.java | 63 ++++++++++++++++------ 2 files changed, 47 insertions(+), 18 deletions(-) (limited to 'src/main/java') diff --git a/AVRcore b/AVRcore index abd28835fb..4c0bd1b374 160000 --- a/AVRcore +++ b/AVRcore @@ -1 +1 @@ -Subproject commit abd28835fb49e03e6d08d4f2056ff671693fe671 +Subproject commit 4c0bd1b3744bc0c328990266f1f910c438c7abd9 diff --git a/src/main/java/com/github/technus/tectech/thing/tileEntity/MicroControllerTileEntity.java b/src/main/java/com/github/technus/tectech/thing/tileEntity/MicroControllerTileEntity.java index d4cb8afb0f..394f1272dc 100644 --- a/src/main/java/com/github/technus/tectech/thing/tileEntity/MicroControllerTileEntity.java +++ b/src/main/java/com/github/technus/tectech/thing/tileEntity/MicroControllerTileEntity.java @@ -1,42 +1,63 @@ package com.github.technus.tectech.thing.tileEntity; import com.github.technus.avrClone.AvrCore; +import com.github.technus.avrClone.instructions.ExecutionEvent; import com.github.technus.avrClone.instructions.InstructionRegistry; +import com.github.technus.avrClone.memory.EepromMemory; +import com.github.technus.avrClone.memory.RemovableMemory; import com.github.technus.avrClone.memory.program.ProgramMemory; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; public class MicroControllerTileEntity extends TileEntity { - public final AvrCore core; + private final AvrCore core; + private int[] tempData; public MicroControllerTileEntity(){ - core=new AvrCore(InstructionRegistry.INSTRUCTION_REGISTRY_OP,false); + core=new AvrCore(); + core.setUsingImmersiveOperands(false); + core.setInstructionRegistry(InstructionRegistry.INSTRUCTION_REGISTRY_OP); + core.setDataMemory(1< eeprom=core.getEepromMemory(); + if(eeprom!=null){ + tag.setInteger("eepromSize",eeprom.getDefinition().getSize()); + } + if(core.dataMemory!=null){ + tag.setIntArray("dataMemory",core.dataMemory); } } @@ -48,8 +69,16 @@ public class MicroControllerTileEntity extends TileEntity { @Override public void updateEntity() { super.updateEntity(); - if(core.checkValid()){ - + if (tempData != null) { + //todo discovery of components + core.dataMemory = tempData; + tempData = null; + } + for (int i = 0, cycles = Math.min(1 << getBlockMetadata(), 512); i < cycles; i++) { + ExecutionEvent executionEvent = core.cpuCycle(); + if (executionEvent != null) { + break; + } } } } -- cgit From 4979e5460a6edeabfb089b1af9f00337952bf65f Mon Sep 17 00:00:00 2001 From: Technus Date: Wed, 24 Jul 2019 22:50:18 +0200 Subject: this should make the microcontroller chooch --- AVRcore | 2 +- .../tileEntity/MicroControllerTileEntity.java | 42 +++++++++++++++++++--- 2 files changed, 39 insertions(+), 5 deletions(-) (limited to 'src/main/java') diff --git a/AVRcore b/AVRcore index 4c0bd1b374..10a9ecd8c3 160000 --- a/AVRcore +++ b/AVRcore @@ -1 +1 @@ -Subproject commit 4c0bd1b3744bc0c328990266f1f910c438c7abd9 +Subproject commit 10a9ecd8c3ab6de7acf8c32f53f668373e0ea576 diff --git a/src/main/java/com/github/technus/tectech/thing/tileEntity/MicroControllerTileEntity.java b/src/main/java/com/github/technus/tectech/thing/tileEntity/MicroControllerTileEntity.java index 394f1272dc..3167bf820d 100644 --- a/src/main/java/com/github/technus/tectech/thing/tileEntity/MicroControllerTileEntity.java +++ b/src/main/java/com/github/technus/tectech/thing/tileEntity/MicroControllerTileEntity.java @@ -2,16 +2,25 @@ package com.github.technus.tectech.thing.tileEntity; import com.github.technus.avrClone.AvrCore; import com.github.technus.avrClone.instructions.ExecutionEvent; +import com.github.technus.avrClone.instructions.Instruction; import com.github.technus.avrClone.instructions.InstructionRegistry; +import com.github.technus.avrClone.instructions.exceptions.DebugEvent; +import com.github.technus.avrClone.instructions.exceptions.DelayEvent; import com.github.technus.avrClone.memory.EepromMemory; import com.github.technus.avrClone.memory.RemovableMemory; import com.github.technus.avrClone.memory.program.ProgramMemory; +import com.github.technus.tectech.TecTech; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; public class MicroControllerTileEntity extends TileEntity { + static { + Instruction.random= TecTech.RANDOM; + } private final AvrCore core; private int[] tempData; + private boolean debugRun; + private int delay; public MicroControllerTileEntity(){ core=new AvrCore(); @@ -24,6 +33,10 @@ public class MicroControllerTileEntity extends TileEntity { @Override public void readFromNBT(NBTTagCompound tag) { super.readFromNBT(tag); + debugRun=tag.getBoolean("debugRun"); + delay=tag.getInteger("delay"); + core.active =tag.getBoolean("active"); + core.awoken=(tag.getBoolean("awoken")); core.programCounter=tag.getInteger("programCounter"); if(tag.hasKey("instructions")){ int[] instructions=tag.getIntArray("instructions"); @@ -45,6 +58,10 @@ public class MicroControllerTileEntity extends TileEntity { @Override public void writeToNBT(NBTTagCompound tag) { super.writeToNBT(tag); + tag.setBoolean("debugRun",debugRun); + tag.setInteger("delay",delay); + tag.setBoolean("active",core.active); + tag.setBoolean("awoken",core.awoken); tag.setInteger("programCounter",core.programCounter); ProgramMemory programMemory=core.getProgramMemory(); if(programMemory!=null){ @@ -74,10 +91,27 @@ public class MicroControllerTileEntity extends TileEntity { core.dataMemory = tempData; tempData = null; } - for (int i = 0, cycles = Math.min(1 << getBlockMetadata(), 512); i < cycles; i++) { - ExecutionEvent executionEvent = core.cpuCycle(); - if (executionEvent != null) { - break; + if (core.active) { + core.interruptsHandle(); + if (core.awoken) { + delay=0; + for (int i = 0, cycles = Math.min(1 << getBlockMetadata(), 512); i < cycles; i++) { + ExecutionEvent executionEvent = core.cpuCycleForce(); + if (executionEvent != null) { + if (executionEvent.throwable instanceof DelayEvent) { + delay = executionEvent.data[0]; + break; + } else if (debugRun && executionEvent.throwable instanceof DebugEvent) { + core.active = false; + break; + } + } + } + }else if(delay>0){ + delay--; + if(delay==0){ + core.awoken=true; + } } } } -- cgit From 43a29dfc84e140ed6a4a93ded52aa2d44faf6612 Mon Sep 17 00:00:00 2001 From: Technus Date: Fri, 26 Jul 2019 11:27:47 +0200 Subject: Fix creative tab item registration --- .../com/github/technus/tectech/loader/MainLoader.java | 8 ++------ .../technus/tectech/loader/gui/CreativeTabTecTech.java | 16 ---------------- .../technus/tectech/thing/block/QuantumGlassBlock.java | 2 ++ .../technus/tectech/thing/casing/GT_Block_CasingsNH.java | 3 +++ .../technus/tectech/thing/casing/GT_Block_CasingsTT.java | 3 +++ .../technus/tectech/thing/casing/GT_Block_HintTT.java | 3 +++ .../tectech/thing/item/ConstructableTriggerItem.java | 2 ++ .../thing/item/DebugElementalInstanceContainer_EM.java | 2 ++ .../thing/item/ElementalDefinitionScanStorage_EM.java | 2 ++ .../tectech/thing/item/ParametrizerMemoryCard.java | 2 ++ 10 files changed, 21 insertions(+), 22 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/loader/MainLoader.java b/src/main/java/com/github/technus/tectech/loader/MainLoader.java index b45e8bd532..7a9ab2cdb6 100644 --- a/src/main/java/com/github/technus/tectech/loader/MainLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/MainLoader.java @@ -60,6 +60,7 @@ public final class MainLoader { } public static void preLoad(){ + creativeTabTecTech =new CreativeTabTecTech("TecTech"); //set expanded texture arrays for tiers try { @@ -115,7 +116,7 @@ public final class MainLoader { } public static void postLoad() { - ProgressManager.ProgressBar progressBarPostLoad = ProgressManager.push("TecTech Post Loader", 6); + ProgressManager.ProgressBar progressBarPostLoad = ProgressManager.push("TecTech Post Loader", 5); progressBarPostLoad.step("Dreamcraft Compatibility"); if(Loader.isModLoaded(Reference.DREAMCRAFT)){ @@ -141,13 +142,8 @@ public final class MainLoader { progressBarPostLoad.step("Recipes"); new RecipeLoader().run(); - TecTech.LOGGER.info("Recipe Init Done"); - progressBarPostLoad.step("Creative Tab"); - creativeTabTecTech =new CreativeTabTecTech("TecTech"); - TecTech.LOGGER.info("CreativeTab initiation complete"); - progressBarPostLoad.step("Register Extra Hazmat Suits"); registerExtraHazmats(); TecTech.LOGGER.info("Hazmat additions done"); diff --git a/src/main/java/com/github/technus/tectech/loader/gui/CreativeTabTecTech.java b/src/main/java/com/github/technus/tectech/loader/gui/CreativeTabTecTech.java index 295e1aeb7d..d360162fb6 100644 --- a/src/main/java/com/github/technus/tectech/loader/gui/CreativeTabTecTech.java +++ b/src/main/java/com/github/technus/tectech/loader/gui/CreativeTabTecTech.java @@ -1,12 +1,7 @@ package com.github.technus.tectech.loader.gui; import com.github.technus.tectech.thing.CustomItemList; -import com.github.technus.tectech.thing.block.QuantumGlassBlock; -import com.github.technus.tectech.thing.casing.TT_Container_Casings; -import com.github.technus.tectech.thing.item.ConstructableTriggerItem; import com.github.technus.tectech.thing.item.DebugElementalInstanceContainer_EM; -import com.github.technus.tectech.thing.item.ElementalDefinitionScanStorage_EM; -import com.github.technus.tectech.thing.item.ParametrizerMemoryCard; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.GregTech_API; @@ -20,7 +15,6 @@ public class CreativeTabTecTech extends CreativeTabs { public CreativeTabTecTech(String name) { super(name); - registerThingsInTabs(); } @SideOnly(Side.CLIENT) @@ -38,14 +32,4 @@ public class CreativeTabTecTech extends CreativeTabs { } super.displayAllReleventItems(stuffToShow); } - - private static void registerThingsInTabs() { - QuantumGlassBlock.INSTANCE.setCreativeTab(creativeTabTecTech); - TT_Container_Casings.sBlockCasingsTT.setCreativeTab(creativeTabTecTech); - TT_Container_Casings.sHintCasingsTT.setCreativeTab(creativeTabTecTech); - DebugElementalInstanceContainer_EM.INSTANCE.setCreativeTab(creativeTabTecTech); - ConstructableTriggerItem.INSTANCE.setCreativeTab(creativeTabTecTech); - ParametrizerMemoryCard.INSTANCE.setCreativeTab(creativeTabTecTech); - ElementalDefinitionScanStorage_EM.INSTANCE.setCreativeTab(creativeTabTecTech); - } } diff --git a/src/main/java/com/github/technus/tectech/thing/block/QuantumGlassBlock.java b/src/main/java/com/github/technus/tectech/thing/block/QuantumGlassBlock.java index 1a08bdbeec..d34d12c754 100644 --- a/src/main/java/com/github/technus/tectech/thing/block/QuantumGlassBlock.java +++ b/src/main/java/com/github/technus/tectech/thing/block/QuantumGlassBlock.java @@ -13,6 +13,7 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import static com.github.technus.tectech.Reference.MODID; +import static com.github.technus.tectech.loader.gui.CreativeTabTecTech.creativeTabTecTech; /** * Created by danie_000 on 17.12.2016. @@ -32,6 +33,7 @@ public final class QuantumGlassBlock extends BlockBase { setLightOpacity(0); setStepSound(Block.soundTypeMetal); setBlockTextureName(MODID + ":blockQuantumGlass"); + setCreativeTab(creativeTabTecTech); } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsNH.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsNH.java index 78b0a2a6a9..bac2dfb9ac 100644 --- a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsNH.java +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsNH.java @@ -10,6 +10,7 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import static com.github.technus.tectech.loader.gui.CreativeTabTecTech.creativeTabTecTech; import static com.github.technus.tectech.thing.metaTileEntity.Textures.*; /** @@ -21,6 +22,8 @@ public class GT_Block_CasingsNH public GT_Block_CasingsNH() { super(GT_Item_CasingsNH.class, "gt.blockcasingsNH", GT_Material_Casings.INSTANCE); + setCreativeTab(creativeTabTecTech); + for (byte b = 0; b < 16; b = (byte) (b + 1)) { Textures.BlockIcons.casingTexturePages[8][b+64] = new GT_CopiedBlockTexture(this, 6, b); /*IMPORTANT for block recoloring*/ diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java index 2ea22b625d..09dc49b5a5 100644 --- a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java @@ -18,6 +18,7 @@ import net.minecraft.world.IBlockAccess; import java.util.List; import static com.github.technus.tectech.TecTech.tectechTexturePage1; +import static com.github.technus.tectech.loader.gui.CreativeTabTecTech.creativeTabTecTech; /** * Created by danie_000 on 03.10.2016. @@ -30,6 +31,8 @@ public class GT_Block_CasingsTT extends GT_Block_Casings_Abstract { public GT_Block_CasingsTT() { super(GT_Item_CasingsTT.class, "gt.blockcasingsTT", GT_Material_Casings.INSTANCE); + setCreativeTab(creativeTabTecTech); + for (byte b = 0; b < 16; b = (byte) (b + 1)) { Textures.BlockIcons.casingTexturePages[texturePage][b] = new GT_CopiedBlockTexture(this, 6, b); /*IMPORTANT for block recoloring**/ diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_HintTT.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_HintTT.java index dc9e809b46..c65870eeb7 100644 --- a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_HintTT.java +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_HintTT.java @@ -16,6 +16,8 @@ import net.minecraft.world.IBlockAccess; import java.util.List; +import static com.github.technus.tectech.loader.gui.CreativeTabTecTech.creativeTabTecTech; + /** * Created by danie_000 on 03.10.2016. */ @@ -24,6 +26,7 @@ public class GT_Block_HintTT extends GT_Block_Casings_Abstract { public GT_Block_HintTT() { super(GT_Item_HintTT.class, "gt.blockhintTT", GT_Material_Casings.INSTANCE); + setCreativeTab(creativeTabTecTech); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Hint 1 dot");//id is -1 GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Hint 2 dots"); diff --git a/src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java b/src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java index 33f0d34ad5..57f3bbade1 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java +++ b/src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java @@ -24,6 +24,7 @@ import java.util.List; import static com.github.technus.tectech.Reference.MODID; import static com.github.technus.tectech.Util.StructureBuilder; +import static com.github.technus.tectech.loader.gui.CreativeTabTecTech.creativeTabTecTech; import static gregtech.api.GregTech_API.sBlockCasings1; /** @@ -37,6 +38,7 @@ public final class ConstructableTriggerItem extends Item { private ConstructableTriggerItem() { setUnlocalizedName("em.constructable"); setTextureName(MODID + ":itemConstructable"); + setCreativeTab(creativeTabTecTech); } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/item/DebugElementalInstanceContainer_EM.java b/src/main/java/com/github/technus/tectech/thing/item/DebugElementalInstanceContainer_EM.java index 286b21f4e2..3b09d37a33 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/DebugElementalInstanceContainer_EM.java +++ b/src/main/java/com/github/technus/tectech/thing/item/DebugElementalInstanceContainer_EM.java @@ -29,6 +29,7 @@ import java.util.TreeSet; import static com.github.technus.tectech.Reference.MODID; import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; +import static com.github.technus.tectech.loader.gui.CreativeTabTecTech.creativeTabTecTech; /** * Created by Tec on 15.03.2017. @@ -42,6 +43,7 @@ public final class DebugElementalInstanceContainer_EM extends Item implements IE setMaxStackSize(1); setUnlocalizedName("em.debugContainer"); setTextureName(MODID + ":itemDebugContainer"); + setCreativeTab(creativeTabTecTech); } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionScanStorage_EM.java b/src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionScanStorage_EM.java index 564209062a..87b76696bb 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionScanStorage_EM.java +++ b/src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionScanStorage_EM.java @@ -25,6 +25,7 @@ import net.minecraft.world.World; import java.util.List; import static com.github.technus.tectech.Reference.MODID; +import static com.github.technus.tectech.loader.gui.CreativeTabTecTech.creativeTabTecTech; /** * Created by Tec on 15.03.2017. @@ -37,6 +38,7 @@ public final class ElementalDefinitionScanStorage_EM extends Item implements IEl setMaxStackSize(1); setUnlocalizedName("em.definitionScanStorage"); setTextureName(MODID + ":itemDefinitionScanStorage"); + setCreativeTab(creativeTabTecTech); } //return previous thing 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 b13ef6b574..c12d2707c6 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 @@ -25,6 +25,7 @@ import net.minecraft.world.World; import java.util.List; import static com.github.technus.tectech.Reference.MODID; +import static com.github.technus.tectech.loader.gui.CreativeTabTecTech.creativeTabTecTech; import static com.github.technus.tectech.thing.CustomItemList.parametrizerMemory; /** @@ -39,6 +40,7 @@ public final class ParametrizerMemoryCard extends Item { setHasSubtypes(true); setUnlocalizedName("em.parametrizerMemoryCard"); setTextureName(MODID + ":itemParametrizerMemoryCardUnlocked"); + setCreativeTab(creativeTabTecTech); } @Override -- cgit From 2bfa7ba4d4782c5490302d737950846afd6fad22 Mon Sep 17 00:00:00 2001 From: Technus Date: Sat, 27 Jul 2019 16:22:04 +0200 Subject: probably working avr core --- AVRcore | 2 +- .../tectech/mechanics/avr/SidedRedstone.java | 248 +++++++++++++++++++++ .../single/GT_MetaTileEntity_DataReader.java | 2 +- ...T_MetaTileEntity_MicroControllerTileEntity.java | 169 ++++++++++++++ .../tileEntity/MicroControllerTileEntity.java | 118 ---------- 5 files changed, 419 insertions(+), 120 deletions(-) create mode 100644 src/main/java/com/github/technus/tectech/mechanics/avr/SidedRedstone.java create mode 100644 src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_MicroControllerTileEntity.java delete mode 100644 src/main/java/com/github/technus/tectech/thing/tileEntity/MicroControllerTileEntity.java (limited to 'src/main/java') diff --git a/AVRcore b/AVRcore index 10a9ecd8c3..8d3164d327 160000 --- a/AVRcore +++ b/AVRcore @@ -1 +1 @@ -Subproject commit 10a9ecd8c3ab6de7acf8c32f53f668373e0ea576 +Subproject commit 8d3164d327ab3d2e0d30c6bb07a974cb4ed4e21a diff --git a/src/main/java/com/github/technus/tectech/mechanics/avr/SidedRedstone.java b/src/main/java/com/github/technus/tectech/mechanics/avr/SidedRedstone.java new file mode 100644 index 0000000000..9488b9280f --- /dev/null +++ b/src/main/java/com/github/technus/tectech/mechanics/avr/SidedRedstone.java @@ -0,0 +1,248 @@ +package com.github.technus.tectech.mechanics.avr; + +import com.github.technus.avrClone.AvrCore; +import com.github.technus.avrClone.registerPackages.*; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +public class SidedRedstone extends RegisterPackageSync { + public static final RSINT RSINT =new RSINT(); + + public SidedRedstone(int offset) { + super(offset, 23); + addRegisters(Register.values()); + addBits(RegisterBitsPCMSK.values()); + addBits(RegisterBitsPCFR.values()); + addBits(RegisterBitsPCINT.values()); + addBits(RegisterBitsPNEW.values()); + addBits(RegisterBitsPOLD.values()); + addInterrupts(RSINT); + } + + @Override + public void preSync(AvrCore core,IGregTechTileEntity iGregTechTileEntity) { + int addr=this.getOffset(); + int sides=0; + for(byte i=0;i<6;i++){ + int val=iGregTechTileEntity.getInternalInputRedstoneSignal(i); + sides|=(val > 0?1:0)< 0) { + if (core.getDataBitsOr(Register.PCINT.getAddress(this), RegisterBitsPCINT.PCEN.mask)) { + core.setDataBits(Register.PCINT.getAddress(this), RegisterBitsPCINT.PCIF.mask); + } + } + } + } + + @Override + public void postSync(AvrCore core,IGregTechTileEntity iGregTechTileEntity) { + int addr=this.getOffset(); + for(byte i=0;i<6;i++){ + iGregTechTileEntity.setOutputRedstoneSignal(i,(byte)core.getDataValue(addr));//allows edge detection hack? + addr+=3; + } + } + + public enum Register implements IRegister{ + PIN0,PINT0,PORT0, + PIN1,PINT1,PORT1, + PIN2,PINT2,PORT2, + PIN3,PINT3,PORT3, + PIN4,PINT4,PORT4, + PIN5,PINT5,PORT5, + PCMSK,PCFR,PCINT,PNEW,POLD; + + public final int relativeOffset; + + Register(){ + this.relativeOffset =ordinal(); + } + + @Override + public int getAddress(SidedRedstone registerPackage) { + return registerPackage.getOffset()+relativeOffset; + } + } + + public enum RegisterBitsPCMSK implements IRegisterBit{ + PCINT0,PCINT1,PCINT2,PCINT3,PCINT4,PCINT5; + + private final int bit,mask; + + RegisterBitsPCMSK(){ + bit=ordinal(); + mask=1<{ + PCF0,PCF1,PCF2,PCF3,PCF4,PCF5; + + private final int bit,mask; + + RegisterBitsPCFR(){ + bit=ordinal(); + mask=1<{ + PCIF,PCEN,PCISC0,PCISC1; + + private final int bit,mask; + + RegisterBitsPCINT(){ + bit=ordinal(); + mask=1<{ + PNEW0,PNEW1,PNEW2,PNEW3,PNEW4,PNEW5; + + private final int bit,mask; + + RegisterBitsPNEW(){ + bit=ordinal(); + mask=1<{ + POLD0,POLD1,POLD2,POLD3,POLD4,POLD5; + + private final int bit,mask; + + RegisterBitsPOLD(){ + bit=ordinal(); + mask=1<{ + @Override + public int getVector() { + return 1; + } + + @Override + public boolean getTrigger(AvrCore core, SidedRedstone registerPackage) { + return (core.getDataValue(Register.PCINT.getAddress(registerPackage))&1)==1; + } + + @Override + public void setTrigger(AvrCore core, SidedRedstone registerPackage, boolean value) { + int val=core.getDataValue(Register.PCINT.getAddress(registerPackage)); + core.setDataValue(Register.PCINT.getAddress(registerPackage), + value?val|RegisterBitsPCINT.PCIF.mask:val&~RegisterBitsPCINT.PCIF.mask); + } + + @Override + public String name() { + return "RSINT"; + } + } +} diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DataReader.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DataReader.java index d8b230995f..6d594512bd 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DataReader.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DataReader.java @@ -39,7 +39,7 @@ import static com.github.technus.tectech.recipe.TT_recipeAdder.nullItem; */ public class GT_MetaTileEntity_DataReader extends GT_MetaTileEntity_BasicMachine { private static final HashMap> RENDER_REGISTRY =new HashMap<>(); - private static GT_RenderedTexture READER_ONLINE, READER_OFFLINE; + public static GT_RenderedTexture READER_ONLINE, READER_OFFLINE; public GT_MetaTileEntity_DataReader(int aID, String aName, String aNameRegional, int aTier) { super(aID,aName,aNameRegional,aTier,1,"Reads Data Sticks and Orbs",1,1,"dataReader.png",""); diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_MicroControllerTileEntity.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_MicroControllerTileEntity.java new file mode 100644 index 0000000000..6692c19cea --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_MicroControllerTileEntity.java @@ -0,0 +1,169 @@ +package com.github.technus.tectech.thing.metaTileEntity.single; + +import com.github.technus.avrClone.AvrCore; +import com.github.technus.avrClone.instructions.ExecutionEvent; +import com.github.technus.avrClone.instructions.Instruction; +import com.github.technus.avrClone.instructions.InstructionRegistry; +import com.github.technus.avrClone.instructions.exceptions.DebugEvent; +import com.github.technus.avrClone.instructions.exceptions.DelayEvent; +import com.github.technus.avrClone.memory.EepromMemory; +import com.github.technus.avrClone.memory.RemovableMemory; +import com.github.technus.avrClone.memory.program.ProgramMemory; +import com.github.technus.tectech.TecTech; +import com.github.technus.tectech.Util; +import com.github.technus.tectech.mechanics.avr.SidedRedstone; +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.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; +import gregtech.api.objects.GT_RenderedTexture; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +import static com.github.technus.tectech.thing.metaTileEntity.single.GT_MetaTileEntity_DataReader.READER_OFFLINE; +import static com.github.technus.tectech.thing.metaTileEntity.single.GT_MetaTileEntity_DataReader.READER_ONLINE; + +public class GT_MetaTileEntity_MicroControllerTileEntity extends GT_MetaTileEntity_TieredMachineBlock { + static { + Instruction.random= TecTech.RANDOM; + } + private AvrCore core; + private int[] tempData; + private boolean debugRun; + private int delay; + + public static final SidedRedstone sidedRedstone=new SidedRedstone(0x1b); + + public GT_MetaTileEntity_MicroControllerTileEntity(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, 0, "AVR Micro-controller"); + Util.setTier(aTier,this); + } + + public GT_MetaTileEntity_MicroControllerTileEntity(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 0, aDescription, aTextures); + Util.setTier(aTier,this); + core=new AvrCore(); + core.setUsingImmersiveOperands(false); + core.setInstructionRegistry(InstructionRegistry.INSTRUCTION_REGISTRY_OP); + core.setDataMemory(1< eeprom=core.getEepromMemory(); + if(eeprom!=null){ + tag.setInteger("eepromSize",eeprom.getDefinition().getSize()); + } + if(core.dataMemory!=null){ + tag.setIntArray("dataMemory",core.dataMemory); + } + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if (tempData != null) { + //todo discovery of components + core.dataMemory = tempData; + tempData = null; + } + if (core.active) { + sidedRedstone.preSync(core,aBaseMetaTileEntity); + core.interruptsHandle(); + if (core.awoken) { + delay=0; + for (int i = 0, cycles = Math.min(1 << mTier, 512); i < cycles; i++) { + ExecutionEvent executionEvent = core.cpuCycleForce(); + if (executionEvent != null) { + if (executionEvent.throwable instanceof DelayEvent) { + delay = executionEvent.data[0]; + break; + } else if (debugRun && executionEvent.throwable instanceof DebugEvent) { + core.active = false; + break; + } + } + } + }else if(delay>0){ + delay--; + if(delay==0){ + core.awoken=true; + } + } + sidedRedstone.postSync(core,aBaseMetaTileEntity); + } + } + + @Override + public boolean allowPullStack(IGregTechTileEntity iGregTechTileEntity, int i, byte b, ItemStack itemStack) { + return true; + } + + @Override + public boolean allowPutStack(IGregTechTileEntity iGregTechTileEntity, int i, byte b, ItemStack itemStack) { + return true; + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if(aBaseMetaTileEntity.getWorld()==null){ + if(aSide==aFacing){ + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], aActive ? READER_ONLINE : READER_OFFLINE}; + } + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1]}; + } + if(aSide==aBaseMetaTileEntity.getFrontFacing()){ + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], aActive ? READER_ONLINE : READER_OFFLINE}; + }else if(aSide==aFacing){ + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + } + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1]}; + } + + @Override + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + return null; + } +} diff --git a/src/main/java/com/github/technus/tectech/thing/tileEntity/MicroControllerTileEntity.java b/src/main/java/com/github/technus/tectech/thing/tileEntity/MicroControllerTileEntity.java deleted file mode 100644 index 3167bf820d..0000000000 --- a/src/main/java/com/github/technus/tectech/thing/tileEntity/MicroControllerTileEntity.java +++ /dev/null @@ -1,118 +0,0 @@ -package com.github.technus.tectech.thing.tileEntity; - -import com.github.technus.avrClone.AvrCore; -import com.github.technus.avrClone.instructions.ExecutionEvent; -import com.github.technus.avrClone.instructions.Instruction; -import com.github.technus.avrClone.instructions.InstructionRegistry; -import com.github.technus.avrClone.instructions.exceptions.DebugEvent; -import com.github.technus.avrClone.instructions.exceptions.DelayEvent; -import com.github.technus.avrClone.memory.EepromMemory; -import com.github.technus.avrClone.memory.RemovableMemory; -import com.github.technus.avrClone.memory.program.ProgramMemory; -import com.github.technus.tectech.TecTech; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; - -public class MicroControllerTileEntity extends TileEntity { - static { - Instruction.random= TecTech.RANDOM; - } - private final AvrCore core; - private int[] tempData; - private boolean debugRun; - private int delay; - - public MicroControllerTileEntity(){ - core=new AvrCore(); - core.setUsingImmersiveOperands(false); - core.setInstructionRegistry(InstructionRegistry.INSTRUCTION_REGISTRY_OP); - core.setDataMemory(1< eeprom=core.getEepromMemory(); - if(eeprom!=null){ - tag.setInteger("eepromSize",eeprom.getDefinition().getSize()); - } - if(core.dataMemory!=null){ - tag.setIntArray("dataMemory",core.dataMemory); - } - } - - @Override - public void invalidate() { - super.invalidate(); - } - - @Override - public void updateEntity() { - super.updateEntity(); - if (tempData != null) { - //todo discovery of components - core.dataMemory = tempData; - tempData = null; - } - if (core.active) { - core.interruptsHandle(); - if (core.awoken) { - delay=0; - for (int i = 0, cycles = Math.min(1 << getBlockMetadata(), 512); i < cycles; i++) { - ExecutionEvent executionEvent = core.cpuCycleForce(); - if (executionEvent != null) { - if (executionEvent.throwable instanceof DelayEvent) { - delay = executionEvent.data[0]; - break; - } else if (debugRun && executionEvent.throwable instanceof DebugEvent) { - core.active = false; - break; - } - } - } - }else if(delay>0){ - delay--; - if(delay==0){ - core.awoken=true; - } - } - } - } -} -- cgit From 80ea67fd7623535b30424b7618d69767b926c330 Mon Sep 17 00:00:00 2001 From: Technus Date: Tue, 30 Jul 2019 17:54:28 +0200 Subject: TEMP WORK --- AVRcore | 2 +- libs/OpenComputers-MC1.7.10-1.6.2.12-api.jar | Bin 268275 -> 0 bytes .../technus/tectech/loader/gui/ModGuiHandler.java | 4 + .../tectech/loader/thing/MachineLoader.java | 36 ++++ .../tectech/mechanics/avr/SidedRedstone.java | 2 +- .../technus/tectech/thing/CustomItemList.java | 2 + .../technus/tectech/thing/item/AvrProgrammer.java | 216 +++++++++++++++++++++ .../item/DebugElementalInstanceContainer_EM.java | 2 +- .../item/ElementalDefinitionContainer_EM.java | 4 +- .../item/ElementalDefinitionScanStorage_EM.java | 2 +- .../technus/tectech/thing/item/EuMeterGT.java | 4 +- .../thing/item/FrontRotationTriggerItem.java | 3 + .../tectech/thing/item/gui/ProgrammerScreen.java | 13 ++ .../single/GT_MetaTileEntity_MicroController.java | 187 ++++++++++++++++++ ...T_MetaTileEntity_MicroControllerTileEntity.java | 169 ---------------- 15 files changed, 471 insertions(+), 175 deletions(-) delete mode 100644 libs/OpenComputers-MC1.7.10-1.6.2.12-api.jar create mode 100644 src/main/java/com/github/technus/tectech/thing/item/AvrProgrammer.java create mode 100644 src/main/java/com/github/technus/tectech/thing/item/gui/ProgrammerScreen.java create mode 100644 src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_MicroController.java delete mode 100644 src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_MicroControllerTileEntity.java (limited to 'src/main/java') diff --git a/AVRcore b/AVRcore index 8d3164d327..3bdcf87f6e 160000 --- a/AVRcore +++ b/AVRcore @@ -1 +1 @@ -Subproject commit 8d3164d327ab3d2e0d30c6bb07a974cb4ed4e21a +Subproject commit 3bdcf87f6ed02b9e5f9a291b3e534c5d515e573b diff --git a/libs/OpenComputers-MC1.7.10-1.6.2.12-api.jar b/libs/OpenComputers-MC1.7.10-1.6.2.12-api.jar deleted file mode 100644 index 5777d1ffdb..0000000000 Binary files a/libs/OpenComputers-MC1.7.10-1.6.2.12-api.jar and /dev/null differ diff --git a/src/main/java/com/github/technus/tectech/loader/gui/ModGuiHandler.java b/src/main/java/com/github/technus/tectech/loader/gui/ModGuiHandler.java index 44585d1b91..e555437104 100644 --- a/src/main/java/com/github/technus/tectech/loader/gui/ModGuiHandler.java +++ b/src/main/java/com/github/technus/tectech/loader/gui/ModGuiHandler.java @@ -1,5 +1,6 @@ package com.github.technus.tectech.loader.gui; +import com.github.technus.tectech.thing.item.gui.ProgrammerScreen; import com.github.technus.tectech.thing.item.gui.ScanDisplayScreen; import cpw.mods.fml.common.network.IGuiHandler; import net.minecraft.entity.player.EntityPlayer; @@ -10,6 +11,7 @@ import net.minecraft.world.World; */ public class ModGuiHandler implements IGuiHandler { public static final int SCAN_DISPLAY_SCREEN_ID =0; + public static final int PROGRAMMER_DISPLAY_SCREEN_ID =1; @Override public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { @@ -20,6 +22,8 @@ public class ModGuiHandler implements IGuiHandler { public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { if (ID == SCAN_DISPLAY_SCREEN_ID) { return new ScanDisplayScreen(player); + }else if(ID==PROGRAMMER_DISPLAY_SCREEN_ID){ + return new ProgrammerScreen(player); } return null; } 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 988fd30031..f92f78e4c6 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 @@ -90,6 +90,42 @@ public class MachineLoader implements Runnable { eM_muffler_UXV.set(new GT_MetaTileEntity_Hatch_OverflowElemental( 15025, "hatch.emmuffler.tier.13", "UXV Overflow Output Hatch", 13, 125e12f).getStackForm(1L)); + + // =================================================================================================== + // Microcontrollers + // =================================================================================================== + + eM_avr_HV.set(new GT_MetaTileEntity_MicroController( + 15030, "machine.avr.tier.08", "HV AVR Micro-controller", 3).getStackForm(1L)); + + eM_avr_EV.set(new GT_MetaTileEntity_MicroController( + 15031, "machine.avr.tier.08", "EV AVR Micro-controller", 4).getStackForm(1L)); + + eM_avr_IV.set(new GT_MetaTileEntity_MicroController( + 15032, "machine.avr.tier.08", "IV AVR Micro-controller", 5).getStackForm(1L)); + + eM_avr_LuV.set(new GT_MetaTileEntity_MicroController( + 15033, "machine.avr.tier.08", "LuV AVR Micro-controller", 6).getStackForm(1L)); + + eM_avr_ZPM.set(new GT_MetaTileEntity_MicroController( + 15034, "machine.avr.tier.08", "ZPM AVR Micro-controller", 7).getStackForm(1L)); + + eM_avr_UV.set(new GT_MetaTileEntity_MicroController( + 15035, "machine.avr.tier.08", "UV AVR Micro-controller", 8).getStackForm(1L)); + + eM_avr_UHV.set(new GT_MetaTileEntity_MicroController( + 15036, "machine.avr.tier.09", "UHV AVR Micro-controller", 9).getStackForm(1L)); + + eM_avr_UEV.set(new GT_MetaTileEntity_MicroController( + 15037, "machine.avr.tier.10", "UEV AVR Micro-controller", 10).getStackForm(1L)); + + eM_avr_UIV.set(new GT_MetaTileEntity_MicroController( + 15038, "machine.avr.tier.11", "UIV AVR Micro-controller", 11).getStackForm(1L)); + + eM_avr_UMV.set(new GT_MetaTileEntity_MicroController( + 15039, "machine.avr.tier.12", "UMV AVR Micro-controller", 12).getStackForm(1L)); + + // =================================================================================================== // Multi AMP Power INPUTS // =================================================================================================== diff --git a/src/main/java/com/github/technus/tectech/mechanics/avr/SidedRedstone.java b/src/main/java/com/github/technus/tectech/mechanics/avr/SidedRedstone.java index 9488b9280f..fd351631f3 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/avr/SidedRedstone.java +++ b/src/main/java/com/github/technus/tectech/mechanics/avr/SidedRedstone.java @@ -8,7 +8,7 @@ public class SidedRedstone extends RegisterPackageSync { public static final RSINT RSINT =new RSINT(); public SidedRedstone(int offset) { - super(offset, 23); + super(offset, Register.values().length); addRegisters(Register.values()); addBits(RegisterBitsPCMSK.values()); addBits(RegisterBitsPCFR.values()); 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 969283fa15..788edecaab 100644 --- a/src/main/java/com/github/technus/tectech/thing/CustomItemList.java +++ b/src/main/java/com/github/technus/tectech/thing/CustomItemList.java @@ -89,6 +89,8 @@ public enum CustomItemList implements IItemContainer { Machine_Multi_BHG, hint_0,hint_1,hint_2,hint_3,hint_4,hint_5,hint_6,hint_7,hint_8,hint_9,hint_10,hint_11, hint_general,hint_air,hint_noAir,hint_error, + eM_avr_HV, eM_avr_EV, eM_avr_IV, eM_avr_LuV, eM_avr_ZPM, eM_avr_UV, eM_avr_UHV, eM_avr_UEV, eM_avr_UIV, eM_avr_UMV, + scanContainer,parametrizerMemory; diff --git a/src/main/java/com/github/technus/tectech/thing/item/AvrProgrammer.java b/src/main/java/com/github/technus/tectech/thing/item/AvrProgrammer.java new file mode 100644 index 0000000000..1d61d0744c --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/item/AvrProgrammer.java @@ -0,0 +1,216 @@ +package com.github.technus.tectech.thing.item; + +import com.github.technus.avrClone.AvrCore; +import com.github.technus.avrClone.instructions.InstructionRegistry; +import com.github.technus.avrClone.memory.program.ProgramMemory; +import com.github.technus.tectech.TecTech; +import com.github.technus.tectech.loader.gui.ModGuiHandler; +import com.github.technus.tectech.thing.metaTileEntity.single.GT_MetaTileEntity_MicroController; +import cpw.mods.fml.common.Optional; +import dan200.computercraft.api.filesystem.IMount; +import dan200.computercraft.api.filesystem.IWritableMount; +import dan200.computercraft.api.media.IMedia; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import li.cil.oc.api.fs.FileSystem; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.common.util.FakePlayer; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.List; + +import static com.github.technus.tectech.Reference.MODID; +import static com.github.technus.tectech.loader.gui.CreativeTabTecTech.creativeTabTecTech; + +@Optional.InterfaceList( + @Optional.Interface(iface="dan200.computercraft.api.media.IMedia",modid = "ComputerCraft"), + @Optional.Interface(iface="li.cil.oc.api.fs.FileSystem",modid="OpenComputers")) +public class AvrProgrammer extends Item implements IMedia,FileSystem { + public static AvrProgrammer INSTANCE=new AvrProgrammer(); + + private AvrProgrammer(){ + setMaxStackSize(1); + setHasSubtypes(true); + setUnlocalizedName("em.programmer"); + setTextureName(MODID + ":itemProgrammer"); + setCreativeTab(creativeTabTecTech); + } + + @Override + public boolean onItemUseFirst(ItemStack stack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int side, float hitX, float hitY, float hitZ) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if(tTileEntity==null || aPlayer instanceof FakePlayer) { + return aPlayer instanceof EntityPlayerMP; + } + if (aPlayer instanceof EntityPlayerMP) { + if (tTileEntity instanceof IGregTechTileEntity) { + IMetaTileEntity metaTE = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity(); + if (metaTE instanceof GT_MetaTileEntity_MicroController) { + if (aPlayer.isSneaking()) { + if(stack.stackTagCompound.hasKey("pgm")) { + NBTTagCompound pgm = stack.stackTagCompound.getCompoundTag("pgm"); + if (pgm.hasKey("instructions")) { + AvrCore core = ((GT_MetaTileEntity_MicroController) metaTE).core; + InstructionRegistry registry = InstructionRegistry.REGISTRIES. + get(pgm.getString("instructionRegistry")); + if (registry != null) { + core.setProgramMemory(new ProgramMemory( + registry, + pgm.getBoolean("immersive"), + pgm.getIntArray("instructions"), + pgm.getIntArray("param0"), + pgm.getIntArray("param1"))); + } + } + } + } else { + NBTTagCompound tag=new NBTTagCompound(); + metaTE.saveNBTData(tag); + stack.stackTagCompound.setTag("avr",tag.getCompoundTag("avr")); + } + return true; + } + } + } + return false; + } + + public void writeToProgrammer(ItemStack stack,InstructionRegistry registry, boolean immersive, List strings) throws Exception{ + writeToProgrammer(stack,new ProgramMemory(registry,immersive,strings)); + } + + public void writeToProgrammer(ItemStack stack,InstructionRegistry registry, boolean immersive, String... strings)throws Exception{ + writeToProgrammer(stack,new ProgramMemory(registry,immersive,strings)); + } + + public void writeToProgrammer(ItemStack stack, ProgramMemory programMemory) { + NBTTagCompound pgm=new NBTTagCompound(); + pgm.setIntArray("instructions",programMemory.instructions); + pgm.setIntArray("param0",programMemory.param0); + pgm.setIntArray("param1",programMemory.param1); + pgm.setBoolean("immersive",programMemory.immersiveOperands); + pgm.setString("instructionRegistry",programMemory.registry.toString()); + stack.stackTagCompound.setTag("pgm",pgm); + } + + @Override + public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) { + if(world.isRemote){ + player.openGui(TecTech.instance, ModGuiHandler.PROGRAMMER_DISPLAY_SCREEN_ID, world, 0, 0, 0); + } + return itemStack; + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) { + if(aStack.stackTagCompound.hasKey("avr")) { + NBTTagCompound avr=aStack.stackTagCompound.getCompoundTag("avr"); + aList.add("Current PC: " +avr.getInteger("programCounter")); + aList.add("Awoken: " +avr.getBoolean("awoken")); + aList.add("Active: " +avr.getBoolean("active")); + aList.add("Debug: " +avr.getBoolean("debugRun")); + aList.add("Delay: " +avr.getBoolean("delay")); + } + } + + @Override + @Optional.Method(modid = "ComputerCraft") + public String getLabel(ItemStack itemStack) { + return itemStack.getDisplayName(); + } + + @Override + @Optional.Method(modid = "ComputerCraft") + public boolean setLabel(ItemStack itemStack, String s) { + itemStack.setStackDisplayName(s); + return true; + } + + @Override + @Optional.Method(modid = "ComputerCraft") + public String getAudioTitle(ItemStack itemStack) { + return null; + } + + @Override + @Optional.Method(modid = "ComputerCraft") + public String getAudioRecordName(ItemStack itemStack) { + return null; + } + + @Override + @Optional.Method(modid = "ComputerCraft") + public IMount createDataMount(ItemStack itemStack, World world) { + return new IWritableMount() { + @Override + public void makeDirectory(String s) throws IOException { + throw new IOException("Cannot make dir!"); + } + + @Override + public void delete(String s) throws IOException { + if("avr".equals(s)) { + itemStack.stackTagCompound.removeTag("avr"); + }else { + throw new IOException("Cannot remove file!"); + } + } + + @Override + public OutputStream openForWrite(String s) throws IOException { + return null; + } + + @Override + public OutputStream openForAppend(String s) throws IOException { + return null; + } + + @Override + public long getRemainingSpace() throws IOException { + return 1024000-getSize("avr"); + } + + @Override + public boolean exists(String s) throws IOException { + return "avr".equals(s) && itemStack.getTagCompound().hasKey(s); + } + + @Override + public boolean isDirectory(String s) throws IOException { + return false; + } + + @Override + public void list(String s, List list) throws IOException { + + } + + @Override + public long getSize(String s) throws IOException { + return "avr".equals(s)?1:0; + } + + @Override + public InputStream openForRead(String s) throws IOException { + return null; + } + }; + } + + @Override + public void getSubItems(Item item, CreativeTabs tab, List list) { + ItemStack stack=new ItemStack(item, 1, 0); + stack.setTagCompound(new NBTTagCompound()); + list.add(stack); + } +} diff --git a/src/main/java/com/github/technus/tectech/thing/item/DebugElementalInstanceContainer_EM.java b/src/main/java/com/github/technus/tectech/thing/item/DebugElementalInstanceContainer_EM.java index 3b09d37a33..61c6e3114a 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/DebugElementalInstanceContainer_EM.java +++ b/src/main/java/com/github/technus/tectech/thing/item/DebugElementalInstanceContainer_EM.java @@ -161,6 +161,6 @@ public final class DebugElementalInstanceContainer_EM extends Item implements IE @Override public FontRenderer getFontRenderer(ItemStack stack) { - return (FontRenderer) (Object) TecTechFontRender.INSTANCE; + return TecTechFontRender.INSTANCE; } } diff --git a/src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionContainer_EM.java b/src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionContainer_EM.java index 8de3d1540c..b5a9eacf68 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionContainer_EM.java +++ b/src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionContainer_EM.java @@ -19,6 +19,7 @@ import java.util.List; import static com.github.technus.tectech.Reference.MODID; import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; +import static com.github.technus.tectech.loader.gui.CreativeTabTecTech.creativeTabTecTech; /** * Created by Tec on 15.03.2017. @@ -30,6 +31,7 @@ public final class ElementalDefinitionContainer_EM extends Item implements IElem setMaxStackSize(1); setUnlocalizedName("em.definitionContainer"); setTextureName(MODID + ":itemDefinitionContainer"); + setCreativeTab(creativeTabTecTech); } //return previous thing @@ -146,6 +148,6 @@ public final class ElementalDefinitionContainer_EM extends Item implements IElem @Override public FontRenderer getFontRenderer(ItemStack stack) { - return (FontRenderer) (Object) TecTechFontRender.INSTANCE; + return TecTechFontRender.INSTANCE; } } diff --git a/src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionScanStorage_EM.java b/src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionScanStorage_EM.java index 87b76696bb..eb8663e1c2 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionScanStorage_EM.java +++ b/src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionScanStorage_EM.java @@ -152,6 +152,6 @@ public final class ElementalDefinitionScanStorage_EM extends Item implements IEl @Override public FontRenderer getFontRenderer(ItemStack stack) { - return (FontRenderer) (Object) TecTechFontRender.INSTANCE; + return TecTechFontRender.INSTANCE; } } diff --git a/src/main/java/com/github/technus/tectech/thing/item/EuMeterGT.java b/src/main/java/com/github/technus/tectech/thing/item/EuMeterGT.java index 8edcd32bdb..d95b9845bd 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/EuMeterGT.java +++ b/src/main/java/com/github/technus/tectech/thing/item/EuMeterGT.java @@ -21,14 +21,16 @@ import java.util.ArrayList; import java.util.List; import static com.github.technus.tectech.Reference.MODID; +import static com.github.technus.tectech.loader.gui.CreativeTabTecTech.creativeTabTecTech; public class EuMeterGT extends Item { public static EuMeterGT INSTANCE; private EuMeterGT() { + setMaxStackSize(1); setUnlocalizedName("em.EuMeterGT"); setTextureName(MODID + ":itemEuMeterGT"); - setMaxStackSize(1); + setCreativeTab(creativeTabTecTech); } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/item/FrontRotationTriggerItem.java b/src/main/java/com/github/technus/tectech/thing/item/FrontRotationTriggerItem.java index 15567bc477..014c8b6721 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/FrontRotationTriggerItem.java +++ b/src/main/java/com/github/technus/tectech/thing/item/FrontRotationTriggerItem.java @@ -17,6 +17,7 @@ import net.minecraftforge.common.util.FakePlayer; import java.util.List; import static com.github.technus.tectech.Reference.MODID; +import static com.github.technus.tectech.loader.gui.CreativeTabTecTech.creativeTabTecTech; /** * Created by Tec on 15.03.2017. @@ -25,8 +26,10 @@ public final class FrontRotationTriggerItem extends Item { public static FrontRotationTriggerItem INSTANCE; private FrontRotationTriggerItem() { + setMaxStackSize(1); setUnlocalizedName("em.frontRotate"); setTextureName(MODID + ":itemFrontRotate"); + setCreativeTab(creativeTabTecTech); } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/item/gui/ProgrammerScreen.java b/src/main/java/com/github/technus/tectech/thing/item/gui/ProgrammerScreen.java new file mode 100644 index 0000000000..8584f28d45 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/item/gui/ProgrammerScreen.java @@ -0,0 +1,13 @@ +package com.github.technus.tectech.thing.item.gui; + +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.nbt.NBTTagCompound; + +public class ProgrammerScreen extends GuiScreen { + private NBTTagCompound tag; + + public ProgrammerScreen(EntityPlayer player){ + tag=player.getHeldItem().getTagCompound(); + } +} diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_MicroController.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_MicroController.java new file mode 100644 index 0000000000..ef5426a272 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_MicroController.java @@ -0,0 +1,187 @@ +package com.github.technus.tectech.thing.metaTileEntity.single; + +import com.github.technus.avrClone.AvrCore; +import com.github.technus.avrClone.instructions.ExecutionEvent; +import com.github.technus.avrClone.instructions.Instruction; +import com.github.technus.avrClone.instructions.InstructionRegistry; +import com.github.technus.avrClone.instructions.exceptions.DebugEvent; +import com.github.technus.avrClone.instructions.exceptions.DelayEvent; +import com.github.technus.avrClone.memory.EepromMemory; +import com.github.technus.avrClone.memory.RemovableMemory; +import com.github.technus.avrClone.memory.program.ProgramMemory; +import com.github.technus.tectech.TecTech; +import com.github.technus.tectech.Util; +import com.github.technus.tectech.mechanics.avr.SidedRedstone; +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.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; +import gregtech.api.objects.GT_RenderedTexture; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +import static com.github.technus.tectech.thing.metaTileEntity.single.GT_MetaTileEntity_DataReader.READER_OFFLINE; +import static com.github.technus.tectech.thing.metaTileEntity.single.GT_MetaTileEntity_DataReader.READER_ONLINE; + +public class GT_MetaTileEntity_MicroController extends GT_MetaTileEntity_TieredMachineBlock { + public static final int OPS_PER_TICK_MAX =512; + + static { + Instruction.random= TecTech.RANDOM; + } + public AvrCore core; + private int[] tempData; + public boolean debugRun; + private int delay; + private int maxLoad; + + public static final SidedRedstone sidedRedstone=new SidedRedstone(0x16); + + public GT_MetaTileEntity_MicroController(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, 0, "AVR Micro-controller"); + Util.setTier(aTier,this); + } + + public GT_MetaTileEntity_MicroController(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 0, aDescription, aTextures); + Util.setTier(aTier,this); + core=new AvrCore(); + core.setUsingImmersiveOperands(false); + core.setInstructionRegistry(InstructionRegistry.INSTRUCTION_REGISTRY_OP); + core.setDataMemory(Math.max(64,1< eeprom=core.getEepromMemory(); + if(eeprom!=null){ + avr.setInteger("eepromSize",eeprom.getDefinition().getSize()); + } + if(core.dataMemory!=null){ + avr.setIntArray("dataMemory",core.dataMemory); + } + tag.setTag("avr",avr); + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if (tempData != null) { + //todo discovery of components + core.dataMemory = tempData; + tempData = null; + } + if (aBaseMetaTileEntity.isActive()) { + sidedRedstone.preSync(core,aBaseMetaTileEntity); + core.interruptsHandle(); + if (core.awoken) { + delay=0; + for (int load=0; load < maxLoad;) { + load+=core.getInstruction().getCost(core); + ExecutionEvent executionEvent = core.cpuCycleForce(); + if (executionEvent != null) { + if (executionEvent.throwable instanceof DelayEvent) { + delay = executionEvent.data[0]; + break; + } else if (executionEvent.throwable instanceof DebugEvent) { + if(debugRun) { + aBaseMetaTileEntity.setActive(false); + break; + } + } + } + } + }else if(delay>0){ + delay--; + if(delay==0){ + core.awoken=true; + } + } + sidedRedstone.postSync(core,aBaseMetaTileEntity); + } + core.active=aBaseMetaTileEntity.isActive(); + } + + @Override + public boolean allowPullStack(IGregTechTileEntity iGregTechTileEntity, int i, byte b, ItemStack itemStack) { + return true; + } + + @Override + public boolean allowPutStack(IGregTechTileEntity iGregTechTileEntity, int i, byte b, ItemStack itemStack) { + return true; + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if(aBaseMetaTileEntity.getWorld()==null){ + if(aSide==aFacing){ + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], aActive ? READER_ONLINE : READER_OFFLINE}; + } + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1]}; + } + if(aSide==aBaseMetaTileEntity.getFrontFacing()){ + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], aActive ? READER_ONLINE : READER_OFFLINE}; + }else if(aSide==aFacing){ + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; + } + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1]}; + } + + @Override + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + return null; + } +} diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_MicroControllerTileEntity.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_MicroControllerTileEntity.java deleted file mode 100644 index 6692c19cea..0000000000 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_MicroControllerTileEntity.java +++ /dev/null @@ -1,169 +0,0 @@ -package com.github.technus.tectech.thing.metaTileEntity.single; - -import com.github.technus.avrClone.AvrCore; -import com.github.technus.avrClone.instructions.ExecutionEvent; -import com.github.technus.avrClone.instructions.Instruction; -import com.github.technus.avrClone.instructions.InstructionRegistry; -import com.github.technus.avrClone.instructions.exceptions.DebugEvent; -import com.github.technus.avrClone.instructions.exceptions.DelayEvent; -import com.github.technus.avrClone.memory.EepromMemory; -import com.github.technus.avrClone.memory.RemovableMemory; -import com.github.technus.avrClone.memory.program.ProgramMemory; -import com.github.technus.tectech.TecTech; -import com.github.technus.tectech.Util; -import com.github.technus.tectech.mechanics.avr.SidedRedstone; -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.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; -import gregtech.api.objects.GT_RenderedTexture; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -import static com.github.technus.tectech.thing.metaTileEntity.single.GT_MetaTileEntity_DataReader.READER_OFFLINE; -import static com.github.technus.tectech.thing.metaTileEntity.single.GT_MetaTileEntity_DataReader.READER_ONLINE; - -public class GT_MetaTileEntity_MicroControllerTileEntity extends GT_MetaTileEntity_TieredMachineBlock { - static { - Instruction.random= TecTech.RANDOM; - } - private AvrCore core; - private int[] tempData; - private boolean debugRun; - private int delay; - - public static final SidedRedstone sidedRedstone=new SidedRedstone(0x1b); - - public GT_MetaTileEntity_MicroControllerTileEntity(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 0, "AVR Micro-controller"); - Util.setTier(aTier,this); - } - - public GT_MetaTileEntity_MicroControllerTileEntity(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { - super(aName, aTier, 0, aDescription, aTextures); - Util.setTier(aTier,this); - core=new AvrCore(); - core.setUsingImmersiveOperands(false); - core.setInstructionRegistry(InstructionRegistry.INSTRUCTION_REGISTRY_OP); - core.setDataMemory(1< eeprom=core.getEepromMemory(); - if(eeprom!=null){ - tag.setInteger("eepromSize",eeprom.getDefinition().getSize()); - } - if(core.dataMemory!=null){ - tag.setIntArray("dataMemory",core.dataMemory); - } - } - - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if (tempData != null) { - //todo discovery of components - core.dataMemory = tempData; - tempData = null; - } - if (core.active) { - sidedRedstone.preSync(core,aBaseMetaTileEntity); - core.interruptsHandle(); - if (core.awoken) { - delay=0; - for (int i = 0, cycles = Math.min(1 << mTier, 512); i < cycles; i++) { - ExecutionEvent executionEvent = core.cpuCycleForce(); - if (executionEvent != null) { - if (executionEvent.throwable instanceof DelayEvent) { - delay = executionEvent.data[0]; - break; - } else if (debugRun && executionEvent.throwable instanceof DebugEvent) { - core.active = false; - break; - } - } - } - }else if(delay>0){ - delay--; - if(delay==0){ - core.awoken=true; - } - } - sidedRedstone.postSync(core,aBaseMetaTileEntity); - } - } - - @Override - public boolean allowPullStack(IGregTechTileEntity iGregTechTileEntity, int i, byte b, ItemStack itemStack) { - return true; - } - - @Override - public boolean allowPutStack(IGregTechTileEntity iGregTechTileEntity, int i, byte b, ItemStack itemStack) { - return true; - } - - @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - if(aBaseMetaTileEntity.getWorld()==null){ - if(aSide==aFacing){ - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], aActive ? READER_ONLINE : READER_OFFLINE}; - } - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1]}; - } - if(aSide==aBaseMetaTileEntity.getFrontFacing()){ - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], aActive ? READER_ONLINE : READER_OFFLINE}; - }else if(aSide==aFacing){ - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; - } - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1]}; - } - - @Override - public ITexture[][][] getTextureSet(ITexture[] aTextures) { - return null; - } -} -- cgit From 02dd0f15d37bd5183994bb97361c728e1171652e Mon Sep 17 00:00:00 2001 From: Bass Date: Fri, 16 Aug 2019 14:44:51 +0100 Subject: Tesla Effects --- .../java/com/github/technus/tectech/TecTech.java | 3 +- src/main/java/com/github/technus/tectech/Util.java | 50 ++++++++ .../technus/tectech/loader/NetworkDispatcher.java | 7 +- .../tectech/mechanics/data/RendererMessage.java | 95 +++++++++++++++ .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 134 +++++++++++++-------- .../single/GT_MetaTileEntity_TeslaCoil.java | 48 +++++++- 6 files changed, 282 insertions(+), 55 deletions(-) create mode 100644 src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/TecTech.java b/src/main/java/com/github/technus/tectech/TecTech.java index f998a9017b..79defc0a1a 100644 --- a/src/main/java/com/github/technus/tectech/TecTech.java +++ b/src/main/java/com/github/technus/tectech/TecTech.java @@ -87,7 +87,7 @@ public class TecTech { FMLCommonHandler.instance().bus().register(playerPersistence); MinecraftForge.EVENT_BUS.register(playerPersistence); - chunkDataHandler=new ChunkDataHandler(); + chunkDataHandler=new ChunkDataHandler(); FMLCommonHandler.instance().bus().register(chunkDataHandler); MinecraftForge.EVENT_BUS.register(chunkDataHandler); @@ -197,7 +197,6 @@ public class TecTech { MainLoader.postLoad(); chunkDataHandler.registerChunkMetaDataHandler(anomalyHandler=new AnomalyHandler()); - } @Mod.EventHandler diff --git a/src/main/java/com/github/technus/tectech/Util.java b/src/main/java/com/github/technus/tectech/Util.java index 3b1fdf0961..774e8a45c8 100644 --- a/src/main/java/com/github/technus/tectech/Util.java +++ b/src/main/java/com/github/technus/tectech/Util.java @@ -37,6 +37,7 @@ import org.apache.commons.lang3.StringUtils; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; +import java.io.Serializable; import java.lang.reflect.Field; import java.util.*; import java.util.regex.Matcher; @@ -146,6 +147,55 @@ public final class Util { return result.toString(); } + public static class thaumSpark implements Serializable { + private static final long serialVersionUID = 3235649915488422364L; + public int x, z, wID; + public byte y, xR, yR, zR; + + public thaumSpark(){ + this.x = 0; + this.z = 0; + this.y = 0; + + this.xR = 0; + this.yR = 0; + this.zR = 0; + + this.wID = 0; + } + + public thaumSpark(int x, byte y, int z, byte xR, byte yR, byte zR, int wID) { + this.x = x; + this.z = z; + this.y = y; + + this.xR = xR; + this.yR = yR; + this.zR = zR; + + this.wID = wID; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + thaumSpark that = (thaumSpark) o; + return x == that.x && + y == that.y && + z == that.z && + wID == that.wID && + xR == that.xR && + yR == that.yR && + zR == that.zR; + } + + @Override + public int hashCode() { + return Objects.hash(x, z, y, wID, xR, yR, zR); + } + } + //region junk /* //Check Machine Structure based on string[][] (effectively char[][][]), ond offset of the controller diff --git a/src/main/java/com/github/technus/tectech/loader/NetworkDispatcher.java b/src/main/java/com/github/technus/tectech/loader/NetworkDispatcher.java index 0f20d31f4d..72d1a23b05 100644 --- a/src/main/java/com/github/technus/tectech/loader/NetworkDispatcher.java +++ b/src/main/java/com/github/technus/tectech/loader/NetworkDispatcher.java @@ -1,9 +1,10 @@ package com.github.technus.tectech.loader; -import com.github.technus.tectech.thing.metaTileEntity.pipe.PipeActivityMessage; -import com.github.technus.tectech.thing.metaTileEntity.RotationMessage; import com.github.technus.tectech.mechanics.data.ChunkDataMessage; import com.github.technus.tectech.mechanics.data.PlayerDataMessage; +import com.github.technus.tectech.mechanics.data.RendererMessage; +import com.github.technus.tectech.thing.metaTileEntity.RotationMessage; +import com.github.technus.tectech.thing.metaTileEntity.pipe.PipeActivityMessage; import static com.github.technus.tectech.Reference.MODID; @@ -26,5 +27,7 @@ public class NetworkDispatcher extends eu.usrv.yamcore.network.PacketDispatcher registerMessage(ChunkDataMessage.ClientHandler.class, ChunkDataMessage.ChunkDataData.class); registerMessage(PlayerDataMessage.ServerHandler.class, PlayerDataMessage.PlayerDataQuery.class); registerMessage(PlayerDataMessage.ClientHandler.class, PlayerDataMessage.PlayerDataData.class); + registerMessage(RendererMessage.ServerHandler.class, RendererMessage.RendererQuery.class); + registerMessage(RendererMessage.ClientHandler.class, RendererMessage.RendererData.class); } } diff --git a/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java b/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java new file mode 100644 index 0000000000..4bb6d9028d --- /dev/null +++ b/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java @@ -0,0 +1,95 @@ +package com.github.technus.tectech.mechanics.data; + +import com.github.technus.tectech.Util; +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.network.simpleimpl.IMessage; +import cpw.mods.fml.common.network.simpleimpl.MessageContext; +import eu.usrv.yamcore.network.client.AbstractClientMessageHandler; +import eu.usrv.yamcore.network.server.AbstractServerMessageHandler; +import io.netty.buffer.ByteBuf; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.world.World; +import net.minecraftforge.common.DimensionManager; +import thaumcraft.client.fx.bolt.FXLightningBolt; + +import java.io.*; +import java.util.HashSet; + +public class RendererMessage implements IMessage { + HashSet sparkList = new HashSet(); + + public RendererMessage(){} + + @Override + public void fromBytes(ByteBuf pBuffer) { + try { + InputStream is = new ByteArrayInputStream(pBuffer.array()); + ObjectInputStream ois = new ObjectInputStream(is); + Object data = ois.readObject(); + sparkList = (HashSet)data; + } catch (IOException | ClassNotFoundException ex) { + } + } + + @Override + public void toBytes(ByteBuf pBuffer) { + try { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + ObjectOutputStream oos = new ObjectOutputStream(baos); + oos.writeObject(sparkList); + oos.flush(); + InputStream is = new ByteArrayInputStream(baos.toByteArray()); + pBuffer.writeBytes(is, baos.toByteArray().length); + } catch (IOException ex) { + } + } + + + public static class RendererQuery extends RendererMessage { + public RendererQuery() { + } + } + + public static class RendererData extends RendererMessage { + public RendererData() { + } + + public RendererData(RendererQuery query){ + sparkList=query.sparkList; + } + + public RendererData(HashSet eSparkList) { + sparkList=eSparkList; + } + } + + + public static class ClientHandler extends AbstractClientMessageHandler{ + @Override + public IMessage handleClientMessage(EntityPlayer pPlayer, RendererData pMessage, MessageContext pCtx) { + for(Util.thaumSpark sp : pMessage.sparkList){ + thaumLightning(sp.x, sp.y, sp.z, sp.xR, sp.yR, sp.zR, sp.wID); + } + pMessage.sparkList.clear(); + return null; + } + } + + public static class ServerHandler extends AbstractServerMessageHandler{ + @Override + public IMessage handleServerMessage(EntityPlayer pPlayer, RendererQuery pMessage, MessageContext pCtx) { + return new RendererData(pMessage); + } + } + + private static void thaumLightning(int tX, byte tY, int tZ, int tXN, byte tYN, int tZN, int wID){ + if(Loader.isModLoaded("Thaumcraft")){ + World world = DimensionManager.getWorld(wID); + FXLightningBolt bolt = new FXLightningBolt(world,tX+0.5F,tY+0.5F,tZ+0.5F,tX+tXN+0.5F,tY+tYN+0.5F,tZ+tZN+0.5F,world.rand.nextLong(), 6, 0.5F, 8); + bolt.defaultFractal(); + bolt.setType(2); + bolt.setWidth(0.125F); + bolt.finalizeBolt(); + } + } +} 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 78dd2f860c..f82a444fc6 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 @@ -1,6 +1,9 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.CommonValues; +import com.github.technus.tectech.Util; +import com.github.technus.tectech.loader.NetworkDispatcher; +import com.github.technus.tectech.mechanics.data.RendererMessage; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil_Ultimate; import com.github.technus.tectech.thing.metaTileEntity.IConstructable; @@ -20,14 +23,14 @@ import gregtech.api.metatileentity.implementations.*; import gregtech.api.objects.GT_RenderedTexture; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; -import thaumcraft.client.fx.bolt.FXLightningBolt; +import net.minecraft.world.World; +import net.minecraft.world.chunk.Chunk; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; +import java.util.*; import static com.github.technus.tectech.CommonValues.V; import static com.github.technus.tectech.Util.StructureBuilder; @@ -38,6 +41,8 @@ import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStat import static gregtech.api.enums.GT_Values.E; public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { + private final static HashSet sparkList = new HashSet(); + private static Textures.BlockIcons.CustomIcon ScreenOFF; private static Textures.BlockIcons.CustomIcon ScreenON; @@ -47,7 +52,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private Map eTeslaMap = new HashMap<>(); //Used to store targets for power transmission private final ArrayList eCapacitorHatches = new ArrayList<>(); //Used to determine count and tier of capacitors present - private float[][] eLightningTargets; private int scanTime = 0; //Scan timer used for tesla search intervals @@ -62,16 +66,16 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private float overdriveEfficiency = 0.95F; //Overdrive efficiency added losses //Scan range fields - private double xPosScanMin; - private double xPosScanMax; - private double yPosScan0; - private double yPosScan1; - private double yPosScan2; - private double yPosScan3; - private double yPosScan4; - private double yPosScan5; - private double zPosScanMin; - private double zPosScanMax; + private int xPosScanMin; + private int xPosScanMax; + private int yPosScan0; + private int yPosScan1; + private int yPosScan2; + private int yPosScan3; + private int yPosScan4; + private int yPosScan5; + private int zPosScanMin; + private int zPosScanMax; //region structure private static final String[][] shape0 = new String[][]{//3 16 0 @@ -603,19 +607,29 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } + private static void thaumLightning(IGregTechTileEntity mte, IGregTechTileEntity node) { + int x = mte.getXCoord(); + byte y = (byte) mte.getYCoord(); + int z = mte.getZCoord(); + + byte xR = (byte) (node.getXCoord() - x); + byte yR = (byte) (node.getYCoord() - y); + byte zR = (byte) (node.getZCoord() - z); + + int wID = mte.getWorld().provider.dimensionId; + + sparkList.add(new Util.thaumSpark(x,y,z,xR,yR,zR,wID)); + } + @Override public boolean onRunningTick(ItemStack aStack) { IGregTechTileEntity mte = getBaseMetaTileEntity(); - float tXN = mte.getXCoord(); - float tYN = mte.getYCoord(); - float tZN = mte.getZCoord(); - //Hysteresis based ePowerPass setting long energyMax = maxEUStore() / 2; long energyStored = getEUVar(); - float energyFrac = (float)energyStored/energyMax; + float energyFrac = (float) energyStored / energyMax; energyCapacityDisplay.set(energyMax); energyStoredDisplay.set(energyStored); @@ -631,23 +645,23 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock switch (scanTime) { case 0: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets((int) xPosScanMin, (int) yPosScan0, (int) zPosScanMin, (int) xPosScanMax - 1, (int) yPosScan1 - 1, (int) zPosScanMax - 1); + scanForTransmissionTargets(xPosScanMin, yPosScan0, zPosScanMin, xPosScanMax - 1, yPosScan1 - 1, zPosScanMax - 1); break; case 20: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets((int) xPosScanMin, (int) yPosScan1, (int) zPosScanMin, (int) xPosScanMax - 1, (int) yPosScan1 - 1, (int) zPosScanMax - 1); + scanForTransmissionTargets(xPosScanMin, yPosScan1, zPosScanMin, xPosScanMax - 1, yPosScan1 - 1, zPosScanMax - 1); break; case 40: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets((int) xPosScanMin, (int) yPosScan2, (int) zPosScanMin, (int) xPosScanMax - 1, (int) yPosScan1 - 1, (int) zPosScanMax - 1); + scanForTransmissionTargets(xPosScanMin, yPosScan2, zPosScanMin, xPosScanMax - 1, yPosScan1 - 1, zPosScanMax - 1); break; case 60: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets((int) xPosScanMin, (int) yPosScan3, (int) zPosScanMin, (int) xPosScanMax - 1, (int) yPosScan4 - 1, (int) zPosScanMax - 1); + scanForTransmissionTargets(xPosScanMin, yPosScan3, zPosScanMin, xPosScanMax - 1, yPosScan4 - 1, zPosScanMax - 1); break; case 80: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets((int) xPosScanMin, (int) yPosScan4, (int) zPosScanMin, (int) xPosScanMax, (int) yPosScan5, (int) zPosScanMax); + scanForTransmissionTargets(xPosScanMin, yPosScan4, zPosScanMin, xPosScanMax, yPosScan5, zPosScanMax); break; default: if (scanTime == (int) scanTimeMinSetting.get() - 1) { @@ -661,33 +675,30 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock if (nodeInside instanceof GT_MetaTileEntity_TeslaCoil) { GT_MetaTileEntity_TeslaCoil teslaCoil = (GT_MetaTileEntity_TeslaCoil) nodeInside; - float tX = node.getXCoord(); - float tY = node.getYCoord(); - float tZ = node.getZCoord(); + int tX = node.getXCoord(); + int tY = node.getYCoord(); + int tZ = node.getZCoord(); - FXLightningBolt bolt = new FXLightningBolt(mte.getWorld(),tXN,tYN,tZN,tX,tY,tZ,mte.getWorld().rand.nextLong(), 6, 0.5F, 8); - bolt.defaultFractal(); - bolt.setType(2); - bolt.setWidth(0.125F); - bolt.finalizeBolt(); + int tXN = mte.getXCoord(); + int tYN = mte.getYCoord(); + int tZN = mte.getZCoord(); - new FXLightningBolt(getBaseMetaTileEntity().getWorld(),tX,tY,tZ,tXN,tYN,tZN,10000,1,1); - int tOffset = (int) Math.ceil(Math.sqrt(Math.pow(tX-tXN,2) + Math.pow(tY-tYN,2) + Math.pow(tZ-tZN,2))); - teslaCoil.eTeslaMap.put(mte,tOffset); + int tOffset = (int) Math.ceil(Math.sqrt(Math.pow(tX - tXN, 2) + Math.pow(tY - tYN, 2) + Math.pow(tZ - tZN, 2))); + teslaCoil.eTeslaMap.put(mte, tOffset); for (Map.Entry RRx : eTeslaMap.entrySet()) { IGregTechTileEntity nodeN = RRx.getKey(); - if (nodeN == node){ + if (nodeN == node) { continue; } tXN = nodeN.getXCoord(); tYN = nodeN.getYCoord(); tZN = nodeN.getZCoord(); - tOffset = (int) Math.ceil(Math.sqrt(Math.pow(tX-tXN,2) + Math.pow(tY-tYN,2) + Math.pow(tZ-tZN,2))); - if (tOffset > 20){ + tOffset = (int) Math.ceil(Math.sqrt(Math.pow(tX - tXN, 2) + Math.pow(tY - tYN, 2) + Math.pow(tZ - tZN, 2))); + if (tOffset > 20) { continue; } - teslaCoil.eTeslaMap.put(nodeN,tOffset); + teslaCoil.eTeslaMap.put(nodeN, tOffset); } } } catch (Exception e) { @@ -705,16 +716,16 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock //Power Limit Settings long outputVoltage; - if (outputVoltageSetting.get() > 0){ - outputVoltage = Math.min(outputVoltageMax,(long)outputVoltageSetting.get()); + if (outputVoltageSetting.get() > 0) { + outputVoltage = Math.min(outputVoltageMax, (long) outputVoltageSetting.get()); } else { outputVoltage = outputVoltageMax; } outputVoltageDisplay.set(outputVoltage); long outputCurrent; - if (outputCurrentSetting.get() > 0){ - outputCurrent = Math.min(outputCurrentMax,(long)outputCurrentSetting.get()); + if (outputCurrentSetting.get() > 0) { + outputCurrent = Math.min(outputCurrentMax, (long) outputCurrentSetting.get()); } else { outputCurrent = outputCurrentMax; } @@ -723,12 +734,12 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock //Stuff to do if ePowerPass if (ePowerPass) { //Range calculation and display - float rangeFrac = (float)((-0.5*Math.pow(energyFrac,2))+(1.5*energyFrac)); - int transferRadiusTower = (int)(transferRadiusTowerSetting.get()*getRangeMulti(mTier,vTier)*rangeFrac); + float rangeFrac = (float) ((-0.5 * Math.pow(energyFrac, 2)) + (1.5 * energyFrac)); + int transferRadiusTower = (int) (transferRadiusTowerSetting.get() * getRangeMulti(mTier, vTier) * rangeFrac); transferRadiusTowerDisplay.set(transferRadiusTower); - int transferRadiusTransceiver = (int)(transferRadiusTransceiverSetting.get()*getRangeMulti(mTier,vTier)*rangeFrac); + int transferRadiusTransceiver = (int) (transferRadiusTransceiverSetting.get() * getRangeMulti(mTier, vTier) * rangeFrac); transferRadiusTransceiverDisplay.set(transferRadiusTransceiver); - int transferRadiusCoverUltimate=(int)(transferRadiusCoverUltimateSetting.get()*getRangeMulti(mTier,vTier)*rangeFrac); + int transferRadiusCoverUltimate = (int) (transferRadiusCoverUltimateSetting.get() * getRangeMulti(mTier, vTier) * rangeFrac); transferRadiusCoverUltimateDisplay.set(transferRadiusCoverUltimate); //Clean the eTeslaMap @@ -761,13 +772,13 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock while (sparks > 0) { boolean idle = true; for (Map.Entry Rx : entriesSortedByValues(eTeslaMap)) { - if(energyStored >= (overDriveSetting.get() > 0 ? outputVoltage*2 : outputVoltage)) { + if (energyStored >= (overDriveSetting.get() > 0 ? outputVoltage * 2 : outputVoltage)) { IGregTechTileEntity node = Rx.getKey(); IMetaTileEntity nodeInside = node.getMetaTileEntity(); long outputVoltageInjectable; long outputVoltageConsumption; - if (overDriveSetting.get() > 0){ + if (overDriveSetting.get() > 0) { outputVoltageInjectable = outputVoltage; outputVoltageConsumption = getEnergyEfficiency(outputVoltage, mTier, true) + (lossPerBlock * Rx.getValue()); } else { @@ -781,6 +792,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock if (nodeTesla.getEUVar() + outputVoltageInjectable <= (nodeTesla.maxEUStore() / 2)) { setEUVar(getEUVar() - outputVoltageConsumption); node.increaseStoredEnergyUnits(outputVoltageConsumption, true); + thaumLightning(mte, node); sparks--; idle = false; } @@ -790,6 +802,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock if (!nodeTesla.powerPassToggle) { if (node.injectEnergyUnits((byte) 6, outputVoltageInjectable, 1L) > 0L) { setEUVar(getEUVar() - outputVoltageConsumption); + thaumLightning(mte, node); sparks--; idle = false; } @@ -797,6 +810,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil_Ultimate) && Rx.getValue() <= transferRadiusCoverUltimate) { if (node.injectEnergyUnits((byte) 1, outputVoltageInjectable, 1L) > 0L) { setEUVar(getEUVar() - outputVoltageConsumption); + thaumLightning(mte, node); sparks--; idle = false; } @@ -814,6 +828,26 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } } outputCurrentDisplay.set(outputCurrent - sparks); + if (scanTime % 60 == 0 && !sparkList.isEmpty()) { + World aWorld = mte.getWorld(); + Iterator iterator = aWorld.playerEntities.iterator(); + while (iterator.hasNext()) { + Object tObject = iterator.next(); + + if (!(tObject instanceof EntityPlayerMP)) { + break; + } + + EntityPlayerMP tPlayer = (EntityPlayerMP) tObject; + Chunk tChunk = aWorld.getChunkFromBlockCoords(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getZCoord()); + if (tPlayer.getServerForPlayer().getPlayerManager().isPlayerWatchingChunk(tPlayer, tChunk.xPosition, tChunk.zPosition)) { + NetworkDispatcher.INSTANCE.sendTo(new RendererMessage.RendererData(sparkList), tPlayer); + } + } + sparkList.clear(); + } + } else { + outputCurrentDisplay.set(0); } return true; } 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 81418f0c4f..57089bea7a 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 @@ -1,6 +1,8 @@ package com.github.technus.tectech.thing.metaTileEntity.single; import com.github.technus.tectech.Util; +import com.github.technus.tectech.loader.NetworkDispatcher; +import com.github.technus.tectech.mechanics.data.RendererMessage; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil_Ultimate; import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_TM_teslaCoil; @@ -12,8 +14,13 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicBatteryBuffer; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.world.World; +import net.minecraft.world.chunk.Chunk; import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; import java.util.Map; import static com.github.technus.tectech.CommonValues.V; @@ -23,6 +30,9 @@ import static java.lang.Math.round; public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryBuffer { + private final static HashSet sparkList = new HashSet(); + private byte sparkCount = 0; + private int maxTier = 4; //Max tier of transceiver private int minTier = 0; //Min tier of transceiver @@ -170,10 +180,24 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB return new GT_MetaTileEntity_TeslaCoil(mName, mTier, mDescription, mTextures, mInventory.length); } + private static void thaumLightning(IGregTechTileEntity mte, IGregTechTileEntity node) { + int x = mte.getXCoord(); + byte y = (byte) mte.getYCoord(); + int z = mte.getZCoord(); + + byte xR = (byte) (node.getXCoord() - x); + byte yR = (byte) (node.getYCoord() - y); + byte zR = (byte) (node.getZCoord() - z); + + int wID = mte.getWorld().provider.dimensionId; + + sparkList.add(new Util.thaumSpark(x,y,z,xR,yR,zR,wID)); + } + @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { super.onPostTick(aBaseMetaTileEntity, aTick); - if (aBaseMetaTileEntity.isClientSide() || eTeslaMap.isEmpty()) { + if (aBaseMetaTileEntity.isClientSide()) { return; } @@ -239,6 +263,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB if (nodeTesla.getEUVar() + outputVoltageInjectable <= (nodeTesla.maxEUStore() / 2)) { setEUVar(getEUVar() - outputVoltageConsumption); node.increaseStoredEnergyUnits(outputVoltageInjectable, true); + thaumLightning(aBaseMetaTileEntity,node); outputCurrent--; idle = false; } @@ -246,6 +271,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil) && !(node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil_Ultimate) && Rx.getValue() <= transferRadiusCover) { if (node.injectEnergyUnits((byte) 1, outputVoltageInjectable, 1L) > 0L) { setEUVar(getEUVar() - outputVoltageConsumption); + thaumLightning(aBaseMetaTileEntity,node); outputCurrent--; idle = false; } @@ -263,5 +289,25 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB } } } + sparkCount++; + if (sparkCount == 60){ + sparkCount = 0; + World aWorld = aBaseMetaTileEntity.getWorld(); + Iterator iterator = aWorld.playerEntities.iterator(); + while (iterator.hasNext()) { + Object tObject = iterator.next(); + + if (!(tObject instanceof EntityPlayerMP)) { + break; + } + + EntityPlayerMP tPlayer = (EntityPlayerMP) tObject; + Chunk tChunk = aWorld.getChunkFromBlockCoords(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getZCoord()); + if (tPlayer.getServerForPlayer().getPlayerManager().isPlayerWatchingChunk(tPlayer, tChunk.xPosition, tChunk.zPosition)) { + NetworkDispatcher.INSTANCE.sendTo(new RendererMessage.RendererData(sparkList), tPlayer); + } + } + sparkList.clear(); + } } } \ No newline at end of file -- cgit From cddd0293ca328cfa63a327aa09797435fedcf98e Mon Sep 17 00:00:00 2001 From: Bass Date: Fri, 16 Aug 2019 23:29:20 +0100 Subject: Tesla effects (working edition?) --- .../com/github/technus/tectech/mechanics/data/RendererMessage.java | 6 +++++- .../thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java b/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java index 4bb6d9028d..70ea9cd158 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java +++ b/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java @@ -13,6 +13,7 @@ import net.minecraftforge.common.DimensionManager; import thaumcraft.client.fx.bolt.FXLightningBolt; import java.io.*; +import java.util.Arrays; import java.util.HashSet; public class RendererMessage implements IMessage { @@ -23,7 +24,10 @@ public class RendererMessage implements IMessage { @Override public void fromBytes(ByteBuf pBuffer) { try { - InputStream is = new ByteArrayInputStream(pBuffer.array()); + //I'd love to know why I need to offset by one byte for this to work + byte[] boop = pBuffer.array(); + boop = Arrays.copyOfRange(boop, 1, boop.length); + InputStream is = new ByteArrayInputStream(boop); ObjectInputStream ois = new ObjectInputStream(is); Object data = ois.readObject(); sparkList = (HashSet)data; 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 57089bea7a..690afd8ee6 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 @@ -290,7 +290,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB } } sparkCount++; - if (sparkCount == 60){ + if (sparkCount == 60 && !sparkList.isEmpty()){ sparkCount = 0; World aWorld = aBaseMetaTileEntity.getWorld(); Iterator iterator = aWorld.playerEntities.iterator(); -- cgit From e8b5ae1a46ed2e207c8c428bfa0aa2c1dc1219db Mon Sep 17 00:00:00 2001 From: Bass Date: Sat, 17 Aug 2019 00:19:54 +0100 Subject: Lightning alignment --- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 75 ++++++++++++---------- 1 file changed, 41 insertions(+), 34 deletions(-) (limited to 'src/main/java') 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 f82a444fc6..66743338b8 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 @@ -66,16 +66,21 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private float overdriveEfficiency = 0.95F; //Overdrive efficiency added losses //Scan range fields - private int xPosScanMin; - private int xPosScanMax; - private int yPosScan0; - private int yPosScan1; - private int yPosScan2; - private int yPosScan3; - private int yPosScan4; - private int yPosScan5; - private int zPosScanMin; - private int zPosScanMax; + private static int xPosOffsetScanMin; + private static int xPosOffsetScanMax; + private static byte yPosOffsetScan0; + private static byte yPosOffsetScan1; + private static byte yPosOffsetScan2; + private static byte yPosOffsetScan3; + private static byte yPosOffsetScan4; + private static byte yPosOffsetScan5; + private static int zPosOffsetScanMin; + private static int zPosOffsetScanMax; + + //Lightning Origin + private static int xPosTop; + private static byte yPosTop; + private static int zPosTop; //region structure private static final String[][] shape0 = new String[][]{//3 16 0 @@ -489,23 +494,29 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } } - //Calculate coordinates for scanning and apply offsets + //Calculate offsets for scanning int[] xyzOffsets=getTranslatedOffsets(40,0,43); - xPosScanMin=xyzOffsets[0]; - yPosScan0=xyzOffsets[1]; - zPosScanMin=xyzOffsets[2]; + xPosOffsetScanMin =xyzOffsets[0]; + yPosOffsetScan0 =(byte)xyzOffsets[1]; + zPosOffsetScanMin =xyzOffsets[2]; xyzOffsets=getTranslatedOffsets(-40,-4,-37); - yPosScan1=xyzOffsets[1]; + yPosOffsetScan1 =(byte)xyzOffsets[1]; xyzOffsets=getTranslatedOffsets(-40,-8,-37); - yPosScan2=xyzOffsets[1]; + yPosOffsetScan2 =(byte)xyzOffsets[1]; xyzOffsets=getTranslatedOffsets(-40,-12,-37); - yPosScan3=xyzOffsets[1]; + yPosOffsetScan3 =(byte)xyzOffsets[1]; xyzOffsets=getTranslatedOffsets(-40,-16,-37); - yPosScan4=xyzOffsets[1]; + yPosOffsetScan4 =(byte)xyzOffsets[1]; xyzOffsets=getTranslatedOffsets(-40,-20,-37); - xPosScanMax=xyzOffsets[0]; - yPosScan5=xyzOffsets[1]; - zPosScanMax=xyzOffsets[2]; + xPosOffsetScanMax=xyzOffsets[0]; + yPosOffsetScan5 =(byte)xyzOffsets[1]; + zPosOffsetScanMax =xyzOffsets[2]; + + //Calculate coordinates of the top of the tesla + xyzOffsets=getTranslatedOffsets(0,-14,2); + xPosTop = iGregTechTileEntity.getXCoord() + xyzOffsets[0]; + yPosTop = (byte)(iGregTechTileEntity.getYCoord() + xyzOffsets[1]); + zPosTop = iGregTechTileEntity.getZCoord() + xyzOffsets[2]; return true; } @@ -608,17 +619,13 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } private static void thaumLightning(IGregTechTileEntity mte, IGregTechTileEntity node) { - int x = mte.getXCoord(); - byte y = (byte) mte.getYCoord(); - int z = mte.getZCoord(); - - byte xR = (byte) (node.getXCoord() - x); - byte yR = (byte) (node.getYCoord() - y); - byte zR = (byte) (node.getZCoord() - z); + byte xR = (byte) (node.getXCoord() - xPosTop); + byte yR = (byte) (node.getYCoord() - yPosTop); + byte zR = (byte) (node.getZCoord() - zPosTop); int wID = mte.getWorld().provider.dimensionId; - sparkList.add(new Util.thaumSpark(x,y,z,xR,yR,zR,wID)); + sparkList.add(new Util.thaumSpark(xPosTop,yPosTop,zPosTop,xR,yR,zR,wID)); } @Override @@ -645,23 +652,23 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock switch (scanTime) { case 0: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets(xPosScanMin, yPosScan0, zPosScanMin, xPosScanMax - 1, yPosScan1 - 1, zPosScanMax - 1); + scanForTransmissionTargets(xPosOffsetScanMin, yPosOffsetScan0, zPosOffsetScanMin, xPosOffsetScanMax - 1, yPosOffsetScan1 - 1, zPosOffsetScanMax - 1); break; case 20: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets(xPosScanMin, yPosScan1, zPosScanMin, xPosScanMax - 1, yPosScan1 - 1, zPosScanMax - 1); + scanForTransmissionTargets(xPosOffsetScanMin, yPosOffsetScan1, zPosOffsetScanMin, xPosOffsetScanMax - 1, yPosOffsetScan1 - 1, zPosOffsetScanMax - 1); break; case 40: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets(xPosScanMin, yPosScan2, zPosScanMin, xPosScanMax - 1, yPosScan1 - 1, zPosScanMax - 1); + scanForTransmissionTargets(xPosOffsetScanMin, yPosOffsetScan2, zPosOffsetScanMin, xPosOffsetScanMax - 1, yPosOffsetScan1 - 1, zPosOffsetScanMax - 1); break; case 60: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets(xPosScanMin, yPosScan3, zPosScanMin, xPosScanMax - 1, yPosScan4 - 1, zPosScanMax - 1); + scanForTransmissionTargets(xPosOffsetScanMin, yPosOffsetScan3, zPosOffsetScanMin, xPosOffsetScanMax - 1, yPosOffsetScan4 - 1, zPosOffsetScanMax - 1); break; case 80: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets(xPosScanMin, yPosScan4, zPosScanMin, xPosScanMax, yPosScan5, zPosScanMax); + scanForTransmissionTargets(xPosOffsetScanMin, yPosOffsetScan4, zPosOffsetScanMin, xPosOffsetScanMax, yPosOffsetScan5, zPosOffsetScanMax); break; default: if (scanTime == (int) scanTimeMinSetting.get() - 1) { -- cgit From d3ce9e9b2df98c4ea85497814e69ce86b74c74a0 Mon Sep 17 00:00:00 2001 From: Bass Date: Sat, 17 Aug 2019 12:08:52 +0100 Subject: Lightning alignment bettered --- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 41 +++++++++++++++++----- .../single/GT_MetaTileEntity_TeslaCoil.java | 22 +++++++++--- 2 files changed, 50 insertions(+), 13 deletions(-) (limited to 'src/main/java') 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 66743338b8..639024732a 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 @@ -78,10 +78,11 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private static int zPosOffsetScanMax; //Lightning Origin - private static int xPosTop; - private static byte yPosTop; - private static int zPosTop; + public int xPosTop; + public byte yPosTop; + public int zPosTop; + //TODO Add center bottom //region structure private static final String[][] shape0 = new String[][]{//3 16 0 {"\u000F", "A . ",}, @@ -618,7 +619,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } - private static void thaumLightning(IGregTechTileEntity mte, IGregTechTileEntity node) { + private void thaumLightning(IGregTechTileEntity mte, IGregTechTileEntity node) { byte xR = (byte) (node.getXCoord() - xPosTop); byte yR = (byte) (node.getYCoord() - yPosTop); byte zR = (byte) (node.getZCoord() - zPosTop); @@ -648,6 +649,31 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock ePowerPass = false; } + //Clean the eTeslaMap + for (Map.Entry Rx : eTeslaMap.entrySet()) { + IGregTechTileEntity node = Rx.getKey(); + if (node != null) { + IMetaTileEntity nodeInside = node.getMetaTileEntity(); + try { + if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive()) { + GT_MetaTileEntity_TM_teslaCoil teslaTower = (GT_MetaTileEntity_TM_teslaCoil) nodeInside; + if (teslaTower.maxEUStore() > 0) { + continue; + } + } else if (nodeInside instanceof GT_MetaTileEntity_TeslaCoil){ + GT_MetaTileEntity_TeslaCoil teslaTransceiver = (GT_MetaTileEntity_TeslaCoil) nodeInside; + if (teslaTransceiver.mBatteryCount > 0){ + continue; + } + } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil) && node.getEUCapacity() > 0) { + continue; + } + } catch (Exception e) { + } + } + eTeslaMap.remove(Rx.getKey()); + } + //Scan for transmission targets switch (scanTime) { case 0: @@ -683,11 +709,11 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock GT_MetaTileEntity_TeslaCoil teslaCoil = (GT_MetaTileEntity_TeslaCoil) nodeInside; int tX = node.getXCoord(); - int tY = node.getYCoord(); + byte tY = (byte)node.getYCoord(); int tZ = node.getZCoord(); int tXN = mte.getXCoord(); - int tYN = mte.getYCoord(); + byte tYN = (byte)mte.getYCoord(); int tZN = mte.getZCoord(); int tOffset = (int) Math.ceil(Math.sqrt(Math.pow(tX - tXN, 2) + Math.pow(tY - tYN, 2) + Math.pow(tZ - tZN, 2))); @@ -699,7 +725,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock continue; } tXN = nodeN.getXCoord(); - tYN = nodeN.getYCoord(); + tYN = (byte)nodeN.getYCoord(); tZN = nodeN.getZCoord(); tOffset = (int) Math.ceil(Math.sqrt(Math.pow(tX - tXN, 2) + Math.pow(tY - tYN, 2) + Math.pow(tZ - tZN, 2))); if (tOffset > 20) { @@ -720,7 +746,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock scanTime++; scanTimeDisplay.set(scanTime); - //Power Limit Settings long outputVoltage; if (outputVoltageSetting.get() > 0) { 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 690afd8ee6..83e79cacb9 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 @@ -180,18 +180,30 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB return new GT_MetaTileEntity_TeslaCoil(mName, mTier, mDescription, mTextures, mInventory.length); } - private static void thaumLightning(IGregTechTileEntity mte, IGregTechTileEntity node) { + private void thaumLightning(IGregTechTileEntity mte, IGregTechTileEntity node) { int x = mte.getXCoord(); byte y = (byte) mte.getYCoord(); int z = mte.getZCoord(); - byte xR = (byte) (node.getXCoord() - x); - byte yR = (byte) (node.getYCoord() - y); - byte zR = (byte) (node.getZCoord() - z); + byte xR; + byte yR; + byte zR; + + IMetaTileEntity nodeInside = node.getMetaTileEntity(); + if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil) {//TODO Fix lightning alignment + GT_MetaTileEntity_TM_teslaCoil nodeTesla = (GT_MetaTileEntity_TM_teslaCoil) nodeInside; + xR = (byte) (nodeTesla.xPosTop - x); + yR = (byte) (nodeTesla.yPosTop - y); + zR = (byte) (nodeTesla.zPosTop - z); + } else { + xR = (byte) (node.getXCoord() - x); + yR = (byte) (node.getYCoord() - y); + zR = (byte) (node.getZCoord() - z); + } int wID = mte.getWorld().provider.dimensionId; - sparkList.add(new Util.thaumSpark(x,y,z,xR,yR,zR,wID)); + sparkList.add(new Util.thaumSpark(x, y, z, xR, yR, zR, wID)); } @Override -- cgit From 4f2726d40b956fb5831566ef5d63bbd4cbe9ef09 Mon Sep 17 00:00:00 2001 From: Bass Date: Sun, 18 Aug 2019 04:47:45 +0100 Subject: Tesla work extras --- src/main/java/com/github/technus/tectech/Util.java | 8 +- .../tectech/mechanics/data/RendererMessage.java | 23 +++-- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 112 ++++++++++++--------- .../single/GT_MetaTileEntity_TeslaCoil.java | 4 +- 4 files changed, 84 insertions(+), 63 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/Util.java b/src/main/java/com/github/technus/tectech/Util.java index 774e8a45c8..17c50c92d6 100644 --- a/src/main/java/com/github/technus/tectech/Util.java +++ b/src/main/java/com/github/technus/tectech/Util.java @@ -149,8 +149,8 @@ public final class Util { public static class thaumSpark implements Serializable { private static final long serialVersionUID = 3235649915488422364L; - public int x, z, wID; - public byte y, xR, yR, zR; + public int x, y, z, wID; + public byte xR, yR, zR; public thaumSpark(){ this.x = 0; @@ -164,7 +164,7 @@ public final class Util { this.wID = 0; } - public thaumSpark(int x, byte y, int z, byte xR, byte yR, byte zR, int wID) { + public thaumSpark(int x, int y, int z, byte xR, byte yR, byte zR, int wID) { this.x = x; this.z = z; this.y = y; @@ -192,7 +192,7 @@ public final class Util { @Override public int hashCode() { - return Objects.hash(x, z, y, wID, xR, yR, zR); + return Objects.hash(x, y, z, wID, xR, yR, zR); } } diff --git a/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java b/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java index 70ea9cd158..796e6ec40a 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java +++ b/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java @@ -19,7 +19,8 @@ import java.util.HashSet; public class RendererMessage implements IMessage { HashSet sparkList = new HashSet(); - public RendererMessage(){} + public RendererMessage() { + } @Override public void fromBytes(ByteBuf pBuffer) { @@ -30,7 +31,7 @@ public class RendererMessage implements IMessage { InputStream is = new ByteArrayInputStream(boop); ObjectInputStream ois = new ObjectInputStream(is); Object data = ois.readObject(); - sparkList = (HashSet)data; + sparkList = (HashSet) data; } catch (IOException | ClassNotFoundException ex) { } } @@ -58,20 +59,20 @@ public class RendererMessage implements IMessage { public RendererData() { } - public RendererData(RendererQuery query){ - sparkList=query.sparkList; + public RendererData(RendererQuery query) { + sparkList = query.sparkList; } public RendererData(HashSet eSparkList) { - sparkList=eSparkList; + sparkList = eSparkList; } } - public static class ClientHandler extends AbstractClientMessageHandler{ + public static class ClientHandler extends AbstractClientMessageHandler { @Override public IMessage handleClientMessage(EntityPlayer pPlayer, RendererData pMessage, MessageContext pCtx) { - for(Util.thaumSpark sp : pMessage.sparkList){ + for (Util.thaumSpark sp : pMessage.sparkList) { thaumLightning(sp.x, sp.y, sp.z, sp.xR, sp.yR, sp.zR, sp.wID); } pMessage.sparkList.clear(); @@ -79,17 +80,17 @@ public class RendererMessage implements IMessage { } } - public static class ServerHandler extends AbstractServerMessageHandler{ + public static class ServerHandler extends AbstractServerMessageHandler { @Override public IMessage handleServerMessage(EntityPlayer pPlayer, RendererQuery pMessage, MessageContext pCtx) { return new RendererData(pMessage); } } - private static void thaumLightning(int tX, byte tY, int tZ, int tXN, byte tYN, int tZN, int wID){ - if(Loader.isModLoaded("Thaumcraft")){ + private static void thaumLightning(int tX, int tY, int tZ, int tXN, int tYN, int tZN, int wID) { + if (Loader.isModLoaded("Thaumcraft")) { World world = DimensionManager.getWorld(wID); - FXLightningBolt bolt = new FXLightningBolt(world,tX+0.5F,tY+0.5F,tZ+0.5F,tX+tXN+0.5F,tY+tYN+0.5F,tZ+tZN+0.5F,world.rand.nextLong(), 6, 0.5F, 8); + FXLightningBolt bolt = new FXLightningBolt(world, tX + 0.5F, tY + 0.5F, tZ + 0.5F, tX + tXN + 0.5F, tY + tYN + 0.5F, tZ + tZN + 0.5F, world.rand.nextLong(), 6, 0.5F, 8); bolt.defaultFractal(); bolt.setType(2); bolt.setWidth(0.125F); 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 639024732a..53c949da36 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 @@ -68,21 +68,25 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock //Scan range fields private static int xPosOffsetScanMin; private static int xPosOffsetScanMax; - private static byte yPosOffsetScan0; - private static byte yPosOffsetScan1; - private static byte yPosOffsetScan2; - private static byte yPosOffsetScan3; - private static byte yPosOffsetScan4; - private static byte yPosOffsetScan5; + private static int yPosOffsetScan0; + private static int yPosOffsetScan1; + private static int yPosOffsetScan2; + private static int yPosOffsetScan3; + private static int yPosOffsetScan4; + private static int yPosOffsetScan5; private static int zPosOffsetScanMin; private static int zPosOffsetScanMax; + //Power Transfer Origin + public int xPosZap; + public int yPosZap; + public int zPosZap; + //Lightning Origin public int xPosTop; - public byte yPosTop; + public int yPosTop; public int zPosTop; - //TODO Add center bottom //region structure private static final String[][] shape0 = new String[][]{//3 16 0 {"\u000F", "A . ",}, @@ -496,27 +500,33 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } //Calculate offsets for scanning - int[] xyzOffsets=getTranslatedOffsets(40,0,43); - xPosOffsetScanMin =xyzOffsets[0]; - yPosOffsetScan0 =(byte)xyzOffsets[1]; - zPosOffsetScanMin =xyzOffsets[2]; - xyzOffsets=getTranslatedOffsets(-40,-4,-37); - yPosOffsetScan1 =(byte)xyzOffsets[1]; - xyzOffsets=getTranslatedOffsets(-40,-8,-37); - yPosOffsetScan2 =(byte)xyzOffsets[1]; - xyzOffsets=getTranslatedOffsets(-40,-12,-37); - yPosOffsetScan3 =(byte)xyzOffsets[1]; - xyzOffsets=getTranslatedOffsets(-40,-16,-37); - yPosOffsetScan4 =(byte)xyzOffsets[1]; - xyzOffsets=getTranslatedOffsets(-40,-20,-37); - xPosOffsetScanMax=xyzOffsets[0]; - yPosOffsetScan5 =(byte)xyzOffsets[1]; - zPosOffsetScanMax =xyzOffsets[2]; - - //Calculate coordinates of the top of the tesla + int[] xyzOffsets = getTranslatedOffsets(40,0,43); + xPosOffsetScanMin = xyzOffsets[0]; + yPosOffsetScan0 = xyzOffsets[1]; + zPosOffsetScanMin = xyzOffsets[2]; + xyzOffsets = getTranslatedOffsets(-40,-4,-37); + yPosOffsetScan1 = xyzOffsets[1]; + xyzOffsets = getTranslatedOffsets(-40,-8,-37); + yPosOffsetScan2 = xyzOffsets[1]; + xyzOffsets = getTranslatedOffsets(-40,-12,-37); + yPosOffsetScan3 = xyzOffsets[1]; + xyzOffsets = getTranslatedOffsets(-40,-16,-37); + yPosOffsetScan4 = xyzOffsets[1]; + xyzOffsets = getTranslatedOffsets(-40,-20,-37); + xPosOffsetScanMax= xyzOffsets[0]; + yPosOffsetScan5 = xyzOffsets[1]; + zPosOffsetScanMax = xyzOffsets[2]; + + //Calculate coordinates of the middle bottom + xyzOffsets=getTranslatedOffsets(0,0,2); + xPosZap = iGregTechTileEntity.getXCoord() + xyzOffsets[0]; + yPosZap = iGregTechTileEntity.getYCoord() + xyzOffsets[1]; + zPosZap = iGregTechTileEntity.getZCoord() + xyzOffsets[2]; + + //Calculate coordinates of the top sphere xyzOffsets=getTranslatedOffsets(0,-14,2); xPosTop = iGregTechTileEntity.getXCoord() + xyzOffsets[0]; - yPosTop = (byte)(iGregTechTileEntity.getYCoord() + xyzOffsets[1]); + yPosTop = iGregTechTileEntity.getYCoord() + xyzOffsets[1]; zPosTop = iGregTechTileEntity.getZCoord() + xyzOffsets[2]; return true; @@ -570,14 +580,17 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } } + energyCapacity = 0; + outputCurrentMax = 0; + if(vTier < 0){ - return false; + //Returning true to allow for 'passive running' + outputVoltageMax = 0; + return true; } else if (vTier > mTier && getEUVar() > 0){ explodeMultiblock(); } - energyCapacity = 0; - outputCurrentMax = 0; outputVoltageMax = V[vTier+1]; for (GT_MetaTileEntity_Hatch_Capacitor cap : eCapacitorHatches) { if (!GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { @@ -598,14 +611,21 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock return true; } - private void scanForTransmissionTargets(int xMin,int yMin, int zMin, int xMax, int yMax, int zMax){ + private void scanForTransmissionTargets(IGregTechTileEntity mte, int xMin, int yMin, int zMin, int xMax, int yMax, int zMax){ + int rX = mte.getXCoord(); + int rY = mte.getYCoord(); + int rZ = mte.getZCoord(); + for (int xPosOffset = xMin; xPosOffset <= xMax; xPosOffset++) { for (int yPosOffset = yMin; yPosOffset <= yMax; yPosOffset++) { for (int zPosOffset = zMin; zPosOffset <= zMax; zPosOffset++) { - if (xPosOffset == 0 && yPosOffset == 0 && zPosOffset == 0) { + int tX = xPosZap+xPosOffset; + int tY = yPosZap+yPosOffset; + int tZ = zPosZap+zPosOffset; + if (rX == tX && rY == tY && rZ == tZ) { continue; } - IGregTechTileEntity node = getBaseMetaTileEntity().getIGregTechTileEntityOffset(xPosOffset, yPosOffset, zPosOffset); + IGregTechTileEntity node = getBaseMetaTileEntity().getIGregTechTileEntity(tX,tY,tZ); if (node == null) { continue; } @@ -620,9 +640,9 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } private void thaumLightning(IGregTechTileEntity mte, IGregTechTileEntity node) { - byte xR = (byte) (node.getXCoord() - xPosTop); - byte yR = (byte) (node.getYCoord() - yPosTop); - byte zR = (byte) (node.getZCoord() - zPosTop); + byte xR = (byte)(node.getXCoord() - xPosTop); + byte yR = (byte)(node.getYCoord() - yPosTop); + byte zR = (byte)(node.getZCoord() - zPosTop); int wID = mte.getWorld().provider.dimensionId; @@ -678,23 +698,23 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock switch (scanTime) { case 0: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets(xPosOffsetScanMin, yPosOffsetScan0, zPosOffsetScanMin, xPosOffsetScanMax - 1, yPosOffsetScan1 - 1, zPosOffsetScanMax - 1); + scanForTransmissionTargets(mte, xPosOffsetScanMin, yPosOffsetScan0, zPosOffsetScanMin, xPosOffsetScanMax - 1, yPosOffsetScan1 - 1, zPosOffsetScanMax - 1); break; case 20: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets(xPosOffsetScanMin, yPosOffsetScan1, zPosOffsetScanMin, xPosOffsetScanMax - 1, yPosOffsetScan1 - 1, zPosOffsetScanMax - 1); + scanForTransmissionTargets(mte, xPosOffsetScanMin, yPosOffsetScan1, zPosOffsetScanMin, xPosOffsetScanMax - 1, yPosOffsetScan1 - 1, zPosOffsetScanMax - 1); break; case 40: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets(xPosOffsetScanMin, yPosOffsetScan2, zPosOffsetScanMin, xPosOffsetScanMax - 1, yPosOffsetScan1 - 1, zPosOffsetScanMax - 1); + scanForTransmissionTargets(mte, xPosOffsetScanMin, yPosOffsetScan2, zPosOffsetScanMin, xPosOffsetScanMax - 1, yPosOffsetScan1 - 1, zPosOffsetScanMax - 1); break; case 60: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets(xPosOffsetScanMin, yPosOffsetScan3, zPosOffsetScanMin, xPosOffsetScanMax - 1, yPosOffsetScan4 - 1, zPosOffsetScanMax - 1); + scanForTransmissionTargets(mte, xPosOffsetScanMin, yPosOffsetScan3, zPosOffsetScanMin, xPosOffsetScanMax - 1, yPosOffsetScan4 - 1, zPosOffsetScanMax - 1); break; case 80: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets(xPosOffsetScanMin, yPosOffsetScan4, zPosOffsetScanMin, xPosOffsetScanMax, yPosOffsetScan5, zPosOffsetScanMax); + scanForTransmissionTargets(mte, xPosOffsetScanMin, yPosOffsetScan4, zPosOffsetScanMin, xPosOffsetScanMax, yPosOffsetScan5, zPosOffsetScanMax); break; default: if (scanTime == (int) scanTimeMinSetting.get() - 1) { @@ -709,12 +729,12 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock GT_MetaTileEntity_TeslaCoil teslaCoil = (GT_MetaTileEntity_TeslaCoil) nodeInside; int tX = node.getXCoord(); - byte tY = (byte)node.getYCoord(); + int tY = node.getYCoord(); int tZ = node.getZCoord(); - int tXN = mte.getXCoord(); - byte tYN = (byte)mte.getYCoord(); - int tZN = mte.getZCoord(); + int tXN = xPosZap; + int tYN = yPosZap; + int tZN = zPosZap; int tOffset = (int) Math.ceil(Math.sqrt(Math.pow(tX - tXN, 2) + Math.pow(tY - tYN, 2) + Math.pow(tZ - tZN, 2))); teslaCoil.eTeslaMap.put(mte, tOffset); @@ -725,7 +745,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock continue; } tXN = nodeN.getXCoord(); - tYN = (byte)nodeN.getYCoord(); + tYN = nodeN.getYCoord(); tZN = nodeN.getZCoord(); tOffset = (int) Math.ceil(Math.sqrt(Math.pow(tX - tXN, 2) + Math.pow(tY - tYN, 2) + Math.pow(tZ - tZN, 2))); if (tOffset > 20) { 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 83e79cacb9..16488403a4 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 @@ -182,7 +182,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB private void thaumLightning(IGregTechTileEntity mte, IGregTechTileEntity node) { int x = mte.getXCoord(); - byte y = (byte) mte.getYCoord(); + int y = mte.getYCoord(); int z = mte.getZCoord(); byte xR; @@ -190,7 +190,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB byte zR; IMetaTileEntity nodeInside = node.getMetaTileEntity(); - if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil) {//TODO Fix lightning alignment + if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil) { GT_MetaTileEntity_TM_teslaCoil nodeTesla = (GT_MetaTileEntity_TM_teslaCoil) nodeInside; xR = (byte) (nodeTesla.xPosTop - x); yR = (byte) (nodeTesla.yPosTop - y); -- cgit From be02b26accb1fa5279c33edc0d07dc03182f65a6 Mon Sep 17 00:00:00 2001 From: Bass Date: Sun, 18 Aug 2019 12:40:48 +0100 Subject: Tesla efficiency formulas redone --- src/main/java/com/github/technus/tectech/Util.java | 6 +- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 142 +++++++++++---------- .../multi/base/render/TT_RenderedTexture.java | 1 + .../single/GT_MetaTileEntity_TeslaCoil.java | 35 ++--- 4 files changed, 98 insertions(+), 86 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/Util.java b/src/main/java/com/github/technus/tectech/Util.java index 17c50c92d6..b669585733 100644 --- a/src/main/java/com/github/technus/tectech/Util.java +++ b/src/main/java/com/github/technus/tectech/Util.java @@ -148,7 +148,7 @@ public final class Util { } public static class thaumSpark implements Serializable { - private static final long serialVersionUID = 3235649915488422364L; + private static final long serialVersionUID = -7037856938316679566L; public int x, y, z, wID; public byte xR, yR, zR; @@ -196,6 +196,10 @@ public final class Util { } } + public static float map(float x, float in_min, float in_max, float out_min, float out_max) { + return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; + } + //region junk /* //Check Machine Structure based on string[][] (effectively char[][][]), ond offset of the controller 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 53c949da36..7ec1bb3b16 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 @@ -33,8 +33,7 @@ import net.minecraft.world.chunk.Chunk; import java.util.*; import static com.github.technus.tectech.CommonValues.V; -import static com.github.technus.tectech.Util.StructureBuilder; -import static com.github.technus.tectech.Util.entriesSortedByValues; +import static com.github.technus.tectech.Util.*; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsBA0; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; @@ -47,8 +46,14 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private static Textures.BlockIcons.CustomIcon ScreenON; private int mTier = 0; //Determines max voltage and efficiency (MV to LuV) - private int maxTier = 6; //Max tier for efficiency calcuation private int minTier = 1; //Min tier for efficiency calcuation + private int maxTier = 6; //Max tier for efficiency calcuation + + private float energyEfficiency = 1; + private float overdriveEfficiency = 1; + private float minEfficency = 0.955F; + private float maxEfficency = 0.98F; + private float overdriveEfficiencyExtra = 0.005F; private Map eTeslaMap = new HashMap<>(); //Used to store targets for power transmission private final ArrayList eCapacitorHatches = new ArrayList<>(); //Used to determine count and tier of capacitors present @@ -60,27 +65,22 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private int vTier = -1; //Tesla voltage tier limited by capacitors private long outputCurrentMax = 0; //Tesla current output limited by capacitors - private long lossPerBlock = 1; //Distance loss of each packet sent - private float energyEfficiencyMax = 0.95F; //Max efficiency of each packet sent at highest mTier - private float energyEfficiencyMin = 0.75F; //Min efficiency of each packet sent at lowest mTier - private float overdriveEfficiency = 0.95F; //Overdrive efficiency added losses - //Scan range fields - private static int xPosOffsetScanMin; - private static int xPosOffsetScanMax; - private static int yPosOffsetScan0; - private static int yPosOffsetScan1; - private static int yPosOffsetScan2; - private static int yPosOffsetScan3; - private static int yPosOffsetScan4; - private static int yPosOffsetScan5; - private static int zPosOffsetScanMin; - private static int zPosOffsetScanMax; + private static int xPosScanMin; + private static int xPosScanMax; + private static int yPosScan0; + private static int yPosScan1; + private static int yPosScan2; + private static int yPosScan3; + private static int yPosScan4; + private static int yPosScan5; + private static int zPosScanMin; + private static int zPosScanMax; //Power Transfer Origin - public int xPosZap; - public int yPosZap; - public int zPosZap; + private int xPosZap; + private int yPosZap; + private int zPosZap; //Lightning Origin public int xPosTop; @@ -342,24 +342,25 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock @Override public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); - aNBT.setLong("energyCapacity",energyCapacity); + aNBT.setLong("eEnergyCapacity",energyCapacity); } @Override public void loadNBTData(NBTTagCompound aNBT) { super.loadNBTData(aNBT); - energyCapacity=aNBT.getLong("energyCapacity"); + energyCapacity=aNBT.getLong("eEnergyCapacity"); } - //TODO Rewrite efficiency formulas - private long getEnergyEfficiency(long voltage, int mTier, boolean overDriveToggle){ - if (overDriveToggle){ - return (long)(voltage * (2-energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maxTier - minTier + 1) * mTier)*(2 - overdriveEfficiency)); //Sum overdrive efficiency formula + //Efficiency function used on power transfers + private long getEnergyEfficiency(long voltage, int distance, boolean overDriveToggle) { + if (overDriveToggle) { + return (long)((voltage * 2) - (voltage * Math.pow(overdriveEfficiency, distance))); } else { - return (long)(voltage * energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maxTier - minTier + 1) * mTier); //TODO redo Efficiency Formula + return (long)(voltage * Math.pow(energyEfficiency, distance)); } - }//Efficiency function used on power transfers + } + //Over-tiered coils will add +25% range private float getRangeMulti(int mTier, int vTier){ if (vTier > mTier){ return 1.25F; @@ -499,24 +500,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } } - //Calculate offsets for scanning - int[] xyzOffsets = getTranslatedOffsets(40,0,43); - xPosOffsetScanMin = xyzOffsets[0]; - yPosOffsetScan0 = xyzOffsets[1]; - zPosOffsetScanMin = xyzOffsets[2]; - xyzOffsets = getTranslatedOffsets(-40,-4,-37); - yPosOffsetScan1 = xyzOffsets[1]; - xyzOffsets = getTranslatedOffsets(-40,-8,-37); - yPosOffsetScan2 = xyzOffsets[1]; - xyzOffsets = getTranslatedOffsets(-40,-12,-37); - yPosOffsetScan3 = xyzOffsets[1]; - xyzOffsets = getTranslatedOffsets(-40,-16,-37); - yPosOffsetScan4 = xyzOffsets[1]; - xyzOffsets = getTranslatedOffsets(-40,-20,-37); - xPosOffsetScanMax= xyzOffsets[0]; - yPosOffsetScan5 = xyzOffsets[1]; - zPosOffsetScanMax = xyzOffsets[2]; - + int[] xyzOffsets; //Calculate coordinates of the middle bottom xyzOffsets=getTranslatedOffsets(0,0,2); xPosZap = iGregTechTileEntity.getXCoord() + xyzOffsets[0]; @@ -529,6 +513,28 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock yPosTop = iGregTechTileEntity.getYCoord() + xyzOffsets[1]; zPosTop = iGregTechTileEntity.getZCoord() + xyzOffsets[2]; + //Calculate offsets for scanning + xyzOffsets = getTranslatedOffsets(40,0,43); + xPosScanMin = xPosZap +xyzOffsets[0]; + yPosScan0 = yPosZap + xyzOffsets[1]; + zPosScanMin = zPosZap + xyzOffsets[2]; + xyzOffsets = getTranslatedOffsets(-40,-4,-37); + yPosScan1 = yPosZap + xyzOffsets[1]; + xyzOffsets = getTranslatedOffsets(-40,-8,-37); + yPosScan2 = yPosZap + xyzOffsets[1]; + xyzOffsets = getTranslatedOffsets(-40,-12,-37); + yPosScan3 = yPosZap + xyzOffsets[1]; + xyzOffsets = getTranslatedOffsets(-40,-16,-37); + yPosScan4 = yPosZap + xyzOffsets[1]; + xyzOffsets = getTranslatedOffsets(-40,-20,-37); + xPosScanMax = xPosZap + xyzOffsets[0]; + yPosScan5 = yPosZap + xyzOffsets[1]; + zPosScanMax = zPosZap + xyzOffsets[2]; + + //Calculate Efficiency values + energyEfficiency = map(mTier+1, minTier, maxTier, minEfficency, maxEfficency); + overdriveEfficiency = energyEfficiency - overdriveEfficiencyExtra; + return true; } return false; @@ -612,26 +618,23 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } private void scanForTransmissionTargets(IGregTechTileEntity mte, int xMin, int yMin, int zMin, int xMax, int yMax, int zMax){ - int rX = mte.getXCoord(); - int rY = mte.getYCoord(); - int rZ = mte.getZCoord(); - - for (int xPosOffset = xMin; xPosOffset <= xMax; xPosOffset++) { - for (int yPosOffset = yMin; yPosOffset <= yMax; yPosOffset++) { - for (int zPosOffset = zMin; zPosOffset <= zMax; zPosOffset++) { - int tX = xPosZap+xPosOffset; - int tY = yPosZap+yPosOffset; - int tZ = zPosZap+zPosOffset; - if (rX == tX && rY == tY && rZ == tZ) { + int mX = mte.getXCoord(); + int mY = mte.getYCoord(); + int mZ = mte.getZCoord(); + + for (int xPos = xMin; xPos <= xMax; xPos++) { + for (int yPos = yMin; yPos <= yMax; yPos++) { + for (int zPos = zMin; zPos <= zMax; zPos++) { + if (mX == xPos && mY == yPos && mZ == zPos) { continue; } - IGregTechTileEntity node = getBaseMetaTileEntity().getIGregTechTileEntity(tX,tY,tZ); + IGregTechTileEntity node = getBaseMetaTileEntity().getIGregTechTileEntity(xPos,yPos,zPos); if (node == null) { continue; } IMetaTileEntity nodeInside = node.getMetaTileEntity(); if (nodeInside instanceof GT_MetaTileEntity_TeslaCoil || nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive() || (node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil)) { - eTeslaMap.put(node, (int) Math.ceil(Math.sqrt(Math.pow(xPosOffset,2) + Math.pow(yPosOffset,2) + Math.pow(zPosOffset,2)))); + eTeslaMap.put(node, (int) Math.ceil(Math.sqrt(Math.pow(xPos,2) + Math.pow(yPos,2) + Math.pow(zPos,2)))); } } } @@ -698,23 +701,23 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock switch (scanTime) { case 0: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets(mte, xPosOffsetScanMin, yPosOffsetScan0, zPosOffsetScanMin, xPosOffsetScanMax - 1, yPosOffsetScan1 - 1, zPosOffsetScanMax - 1); + scanForTransmissionTargets(mte, xPosScanMin, yPosScan0, zPosScanMin, xPosScanMax, yPosScan1 - 1, zPosScanMax); break; case 20: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets(mte, xPosOffsetScanMin, yPosOffsetScan1, zPosOffsetScanMin, xPosOffsetScanMax - 1, yPosOffsetScan1 - 1, zPosOffsetScanMax - 1); + scanForTransmissionTargets(mte, xPosScanMin, yPosScan1, zPosScanMin, xPosScanMax, yPosScan2 - 1, zPosScanMax); break; case 40: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets(mte, xPosOffsetScanMin, yPosOffsetScan2, zPosOffsetScanMin, xPosOffsetScanMax - 1, yPosOffsetScan1 - 1, zPosOffsetScanMax - 1); + scanForTransmissionTargets(mte, xPosScanMin, yPosScan2, zPosScanMin, xPosScanMax, yPosScan3 - 1, zPosScanMax); break; case 60: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets(mte, xPosOffsetScanMin, yPosOffsetScan3, zPosOffsetScanMin, xPosOffsetScanMax - 1, yPosOffsetScan4 - 1, zPosOffsetScanMax - 1); + scanForTransmissionTargets(mte, xPosScanMin, yPosScan3, zPosScanMin, xPosScanMax, yPosScan4 - 1, zPosScanMax); break; case 80: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets(mte, xPosOffsetScanMin, yPosOffsetScan4, zPosOffsetScanMin, xPosOffsetScanMax, yPosOffsetScan5, zPosOffsetScanMax); + scanForTransmissionTargets(mte, xPosScanMin, yPosScan4, zPosScanMin, xPosScanMax, yPosScan5, zPosScanMax); break; default: if (scanTime == (int) scanTimeMinSetting.get() - 1) { @@ -822,19 +825,20 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock //Power transfer long sparks = outputCurrent; while (sparks > 0) { + boolean overdriveToggle = overDriveSetting.get() > 0; boolean idle = true; for (Map.Entry Rx : entriesSortedByValues(eTeslaMap)) { - if (energyStored >= (overDriveSetting.get() > 0 ? outputVoltage * 2 : outputVoltage)) { + if (energyStored >= (overdriveToggle ? outputVoltage * 2 : outputVoltage)) { IGregTechTileEntity node = Rx.getKey(); IMetaTileEntity nodeInside = node.getMetaTileEntity(); long outputVoltageInjectable; long outputVoltageConsumption; - if (overDriveSetting.get() > 0) { + if (overdriveToggle) { outputVoltageInjectable = outputVoltage; - outputVoltageConsumption = getEnergyEfficiency(outputVoltage, mTier, true) + (lossPerBlock * Rx.getValue()); + outputVoltageConsumption = getEnergyEfficiency(outputVoltage, Rx.getValue(), true); } else { - outputVoltageInjectable = getEnergyEfficiency(outputVoltage, mTier, false) - (lossPerBlock * Rx.getValue()); + outputVoltageInjectable = getEnergyEfficiency(outputVoltage, Rx.getValue(), false); outputVoltageConsumption = outputVoltage; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/render/TT_RenderedTexture.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/render/TT_RenderedTexture.java index 142214f43c..39a12f1f86 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/render/TT_RenderedTexture.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/render/TT_RenderedTexture.java @@ -229,6 +229,7 @@ public class TT_RenderedTexture implements ITexture,IColorModulationContainer { if (aRenderer.renderMinZ < 0.0D || aRenderer.renderMaxZ > 1.0D) { d5 = (double) icon.getMinV(); + d6 = (double) icon.getMaxV(); } 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 16488403a4..50be0adc75 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 @@ -25,6 +25,7 @@ import java.util.Map; import static com.github.technus.tectech.CommonValues.V; import static com.github.technus.tectech.Util.entriesSortedByValues; +import static com.github.technus.tectech.Util.map; import static com.github.technus.tectech.thing.metaTileEntity.Textures.TESLA_TRANSCEIVER_TOP_BA; import static java.lang.Math.round; @@ -47,29 +48,23 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB private int transferRadiusTower = 0; //Radius for transceiver to tower transfers private int transferRadiusCover = 0; //Radius for transceiver to cover transfers - //TODO Rewrite histSetting to improve readability public boolean powerPassToggle = false; //Power Pass for public viewing private int histSteps = 20; //Hysteresis Resolution private int histSettingLow = 3; //Hysteresis Low Limit private int histSettingHigh = 15; //Hysteresis High Limit private int histLowLimit = 1; //How low can you configure it? - private int histHighLimit = histSteps - 1; //How high can you configure it? + private int histHighLimit = 19; //How high can you configure it? private float histLow = (float) histSettingLow / histSteps; //Power pass is disabled if power is under this fraction private float histHigh = (float) histSettingHigh / histSteps; //Power pass is enabled if power is over this fraction - //TODO Rewrite efficiency formulas - private long lossPerBlock = 2; //EU lost per block traveled - private float energyEfficiencyMax = 0.95F; //Max efficiency - private float energyEfficiencyMin = 0.75F; //Min efficiency - private float overdriveEfficiency = 0.95F; //Overdrive efficiency - private float energyEfficiency = energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maxTier - minTier + 1) * mTier; //Efficiency Formula - private float sumOverdriveEfficiency = (2 - energyEfficiency) * (2 - overdriveEfficiency); //Sum overdrive efficiency formula - - //TODO Rewrite over drive efficiency formulas + private long outputVoltage = V[mTier]; + private float minEfficency = 0.955F; + private float maxEfficency = 0.975F; + private float overdriveEfficiencyExtra = 0.010F; + private float energyEfficiency = map(mTier+1, minTier, maxTier, minEfficency, maxEfficency); + private float overdriveEfficiency = energyEfficiency - overdriveEfficiencyExtra; private boolean overDriveToggle = false; //Overdrive toggle - private long outputVoltage = V[mTier]; //Tesla Voltage Output - private long outputVoltagePostEfficiency = (long) (outputVoltage * energyEfficiency); //Max power a machine can actually receive - private long outputVoltagePostOverdrive = (long) (outputVoltage * sumOverdriveEfficiency); //Max power the sender can consume + public GT_MetaTileEntity_TeslaCoil(int aID, String aName, String aNameRegional, int aTier, int aSlotCount) { super(aID, aName, aNameRegional, aTier, "Tesla Coil Transceiver", aSlotCount); @@ -206,6 +201,14 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB sparkList.add(new Util.thaumSpark(x, y, z, xR, yR, zR, wID)); } + private long getEnergyEfficiency(long voltage, int distance, boolean overDriveToggle) { + if (overDriveToggle) { + return (long)((voltage * 2) - (voltage * Math.pow(overdriveEfficiency, distance))); + } else { + return (long)(voltage * Math.pow(energyEfficiency, distance)); + } + } + @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { super.onPostTick(aBaseMetaTileEntity, aTick); @@ -264,9 +267,9 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB long outputVoltageConsumption; if (overDriveToggle) { outputVoltageInjectable = outputVoltage; - outputVoltageConsumption = outputVoltagePostOverdrive + (lossPerBlock * Rx.getValue()); + outputVoltageConsumption = getEnergyEfficiency(outputVoltage, Rx.getValue(), true); } else { - outputVoltageInjectable = outputVoltagePostEfficiency - (lossPerBlock * Rx.getValue()); + outputVoltageInjectable = getEnergyEfficiency(outputVoltage, Rx.getValue(), false); outputVoltageConsumption = outputVoltage; } if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && Rx.getValue() <= transferRadiusTower) { -- cgit From 67651e65f95aaf3b3eb5c715242265642870e46f Mon Sep 17 00:00:00 2001 From: Bass Date: Sun, 18 Aug 2019 12:49:32 +0100 Subject: Good Health --- .../thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java') 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 50be0adc75..55647af3cb 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 @@ -61,7 +61,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB private float minEfficency = 0.955F; private float maxEfficency = 0.975F; private float overdriveEfficiencyExtra = 0.010F; - private float energyEfficiency = map(mTier+1, minTier, maxTier, minEfficency, maxEfficency); + private float energyEfficiency = map(mTier+1, minTier+1, maxTier+1, minEfficency, maxEfficency); private float overdriveEfficiency = energyEfficiency - overdriveEfficiencyExtra; private boolean overDriveToggle = false; //Overdrive toggle -- cgit From d8d3971678ed490579b740795a72f18304bb07ff Mon Sep 17 00:00:00 2001 From: Bass Date: Sun, 18 Aug 2019 13:02:02 +0100 Subject: Lightning Net code streamline --- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 35 +++++++---------- .../single/GT_MetaTileEntity_TeslaCoil.java | 45 ++++++++-------------- 2 files changed, 30 insertions(+), 50 deletions(-) (limited to 'src/main/java') 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 7ec1bb3b16..122a08e075 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 @@ -23,14 +23,14 @@ import gregtech.api.metatileentity.implementations.*; import gregtech.api.objects.GT_RenderedTexture; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; -import net.minecraft.world.chunk.Chunk; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; import static com.github.technus.tectech.CommonValues.V; import static com.github.technus.tectech.Util.*; @@ -683,9 +683,9 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock if (teslaTower.maxEUStore() > 0) { continue; } - } else if (nodeInside instanceof GT_MetaTileEntity_TeslaCoil){ + } else if (nodeInside instanceof GT_MetaTileEntity_TeslaCoil) { GT_MetaTileEntity_TeslaCoil teslaTransceiver = (GT_MetaTileEntity_TeslaCoil) nodeInside; - if (teslaTransceiver.mBatteryCount > 0){ + if (teslaTransceiver.mBatteryCount > 0) { continue; } } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil) && node.getEUCapacity() > 0) { @@ -885,23 +885,14 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } outputCurrentDisplay.set(outputCurrent - sparks); if (scanTime % 60 == 0 && !sparkList.isEmpty()) { - World aWorld = mte.getWorld(); - Iterator iterator = aWorld.playerEntities.iterator(); - while (iterator.hasNext()) { - Object tObject = iterator.next(); - - if (!(tObject instanceof EntityPlayerMP)) { - break; - } - - EntityPlayerMP tPlayer = (EntityPlayerMP) tObject; - Chunk tChunk = aWorld.getChunkFromBlockCoords(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getZCoord()); - if (tPlayer.getServerForPlayer().getPlayerManager().isPlayerWatchingChunk(tPlayer, tChunk.xPosition, tChunk.zPosition)) { - NetworkDispatcher.INSTANCE.sendTo(new RendererMessage.RendererData(sparkList), tPlayer); - } - } - sparkList.clear(); + NetworkDispatcher.INSTANCE.sendToAllAround(new RendererMessage.RendererData(sparkList), + mte.getWorld().provider.dimensionId, + mte.getXCoord(), + mte.getYCoord(), + mte.getZCoord(), + 256); } + sparkList.clear(); } else { outputCurrentDisplay.set(0); } 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 55647af3cb..9a5a7ea6bc 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 @@ -14,13 +14,9 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicBatteryBuffer; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.world.World; -import net.minecraft.world.chunk.Chunk; import java.util.HashMap; import java.util.HashSet; -import java.util.Iterator; import java.util.Map; import static com.github.technus.tectech.CommonValues.V; @@ -61,7 +57,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB private float minEfficency = 0.955F; private float maxEfficency = 0.975F; private float overdriveEfficiencyExtra = 0.010F; - private float energyEfficiency = map(mTier+1, minTier+1, maxTier+1, minEfficency, maxEfficency); + private float energyEfficiency = map(mTier + 1, minTier + 1, maxTier + 1, minEfficency, maxEfficency); private float overdriveEfficiency = energyEfficiency - overdriveEfficiencyExtra; private boolean overDriveToggle = false; //Overdrive toggle @@ -150,13 +146,15 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB } @Override - public boolean isFacingValid(byte aSide) {return aSide != 1;}//Prevents output at the top side + public boolean isFacingValid(byte aSide) { + return aSide != 1; + }//Prevents output at the top side @Override public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new ITexture[3][17][]; - for(byte i = -1; i < 16; ++i) { + for (byte i = -1; i < 16; ++i) { rTextures[0][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1]}; rTextures[1][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1], TESLA_TRANSCEIVER_TOP_BA}; rTextures[2][i + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][i + 1], this.mInventory.length == 16 ? Textures.BlockIcons.OVERLAYS_ENERGY_OUT_POWER[this.mTier] : (this.mInventory.length > 4 ? Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier] : Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier])}; @@ -203,9 +201,9 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB private long getEnergyEfficiency(long voltage, int distance, boolean overDriveToggle) { if (overDriveToggle) { - return (long)((voltage * 2) - (voltage * Math.pow(overdriveEfficiency, distance))); + return (long) ((voltage * 2) - (voltage * Math.pow(overdriveEfficiency, distance))); } else { - return (long)(voltage * Math.pow(energyEfficiency, distance)); + return (long) (voltage * Math.pow(energyEfficiency, distance)); } } @@ -278,7 +276,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB if (nodeTesla.getEUVar() + outputVoltageInjectable <= (nodeTesla.maxEUStore() / 2)) { setEUVar(getEUVar() - outputVoltageConsumption); node.increaseStoredEnergyUnits(outputVoltageInjectable, true); - thaumLightning(aBaseMetaTileEntity,node); + thaumLightning(aBaseMetaTileEntity, node); outputCurrent--; idle = false; } @@ -286,7 +284,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil) && !(node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil_Ultimate) && Rx.getValue() <= transferRadiusCover) { if (node.injectEnergyUnits((byte) 1, outputVoltageInjectable, 1L) > 0L) { setEUVar(getEUVar() - outputVoltageConsumption); - thaumLightning(aBaseMetaTileEntity,node); + thaumLightning(aBaseMetaTileEntity, node); outputCurrent--; idle = false; } @@ -305,24 +303,15 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB } } sparkCount++; - if (sparkCount == 60 && !sparkList.isEmpty()){ + if (sparkCount == 60 && !sparkList.isEmpty()) { sparkCount = 0; - World aWorld = aBaseMetaTileEntity.getWorld(); - Iterator iterator = aWorld.playerEntities.iterator(); - while (iterator.hasNext()) { - Object tObject = iterator.next(); - - if (!(tObject instanceof EntityPlayerMP)) { - break; - } - - EntityPlayerMP tPlayer = (EntityPlayerMP) tObject; - Chunk tChunk = aWorld.getChunkFromBlockCoords(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getZCoord()); - if (tPlayer.getServerForPlayer().getPlayerManager().isPlayerWatchingChunk(tPlayer, tChunk.xPosition, tChunk.zPosition)) { - NetworkDispatcher.INSTANCE.sendTo(new RendererMessage.RendererData(sparkList), tPlayer); - } - } - sparkList.clear(); + NetworkDispatcher.INSTANCE.sendToAllAround(new RendererMessage.RendererData(sparkList), + aBaseMetaTileEntity.getWorld().provider.dimensionId, + aBaseMetaTileEntity.getXCoord(), + aBaseMetaTileEntity.getYCoord(), + aBaseMetaTileEntity.getZCoord(), + 256); } + sparkList.clear(); } } \ No newline at end of file -- cgit From 3077ee28533837d5651d1b4ae4212e52713ce6d7 Mon Sep 17 00:00:00 2001 From: Bass Date: Mon, 19 Aug 2019 01:30:02 +0100 Subject: Small teslas improved --- .../metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/main/java') 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 9a5a7ea6bc..916032ea18 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 @@ -35,10 +35,9 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB public Map eTeslaMap = new HashMap();//Tesla Map to map them tesla bois! - //TODO Rewrite range limits, use new formula - private int transferRadiusMax = 20; //Tesla scan radius - private int transferRadiusMin = 4; //Tesla scan radius - private int transferRadiusLimitTop = transferRadiusMin + (transferRadiusMax - transferRadiusMin) / (maxTier - minTier + 1) * mTier; //Tesla scan radius Formula + private int transferRadiusMax = 20; + private int transferRadiusMin = 4; + private int transferRadiusLimitTop = (int) map(mTier + 1, minTier + 1, maxTier + 1, transferRadiusMin, transferRadiusMax); private int transferRadiusLimitBottom = 1; //Minimum user configurable private int transferRadius = transferRadiusLimitTop; //Default transferRadius setting private int transferRadiusTower = 0; //Radius for transceiver to tower transfers @@ -54,14 +53,13 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB private float histHigh = (float) histSettingHigh / histSteps; //Power pass is enabled if power is over this fraction private long outputVoltage = V[mTier]; - private float minEfficency = 0.955F; - private float maxEfficency = 0.975F; + private float minEfficency = 0.91F; + private float maxEfficency = 0.95F; private float overdriveEfficiencyExtra = 0.010F; private float energyEfficiency = map(mTier + 1, minTier + 1, maxTier + 1, minEfficency, maxEfficency); private float overdriveEfficiency = energyEfficiency - overdriveEfficiencyExtra; private boolean overDriveToggle = false; //Overdrive toggle - - + public GT_MetaTileEntity_TeslaCoil(int aID, String aName, String aNameRegional, int aTier, int aSlotCount) { super(aID, aName, aNameRegional, aTier, "Tesla Coil Transceiver", aSlotCount); Util.setTier(aTier, this); -- cgit From 00f85c0dac173b42032094acf9f32bd862866756 Mon Sep 17 00:00:00 2001 From: Bass Date: Mon, 19 Aug 2019 10:12:40 +0100 Subject: Power loss now configurable --- .../technus/tectech/loader/TecTechConfig.java | 26 ++++++++++++++++++++++ .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 9 ++++---- .../single/GT_MetaTileEntity_TeslaCoil.java | 23 ++++++++++--------- 3 files changed, 43 insertions(+), 15 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/loader/TecTechConfig.java b/src/main/java/com/github/technus/tectech/loader/TecTechConfig.java index e7eb0c0945..e16580befe 100644 --- a/src/main/java/com/github/technus/tectech/loader/TecTechConfig.java +++ b/src/main/java/com/github/technus/tectech/loader/TecTechConfig.java @@ -20,6 +20,14 @@ public class TecTechConfig extends ConfigManager { public boolean DISABLE_MATERIAL_LOADING_FFS; public float TURRET_DAMAGE_FACTOR; public float TURRET_EXPLOSION_FACTOR; + public float TESLA_MULTI_MIN_EFFICIENCY; + public float TESLA_MULTI_MAX_EFFICIENCY; + public float TESLA_MULTI_OVERDRIVE_LOSS; + public float TESLA_SINGLE_MIN_EFFICIENCY; + public float TESLA_SINGLE_MAX_EFFICIENCY; + public float TESLA_SINGLE_OVERDRIVE_LOSS; + + /** * This loading phases do not correspond to mod loading phases! @@ -34,6 +42,12 @@ public class TecTechConfig extends ConfigManager { DISABLE_MATERIAL_LOADING_FFS=false; TURRET_DAMAGE_FACTOR = 10; TURRET_EXPLOSION_FACTOR = 1; + TESLA_MULTI_MIN_EFFICIENCY = 0.955F; + TESLA_MULTI_MAX_EFFICIENCY = 0.98F; + TESLA_MULTI_OVERDRIVE_LOSS = 0.005F; + TESLA_SINGLE_MIN_EFFICIENCY = 0.91F; + TESLA_SINGLE_MAX_EFFICIENCY = 0.95F; + TESLA_SINGLE_OVERDRIVE_LOSS = 0.010F; } @@ -60,6 +74,18 @@ public class TecTechConfig extends ConfigManager { "Explosion strength is multiplied by this number"); DISABLE_MATERIAL_LOADING_FFS = _mainConfig.getBoolean("DisableMaterialLoading", "Debug", DISABLE_MATERIAL_LOADING_FFS, "Set to true to disable gregtech material processing"); + TESLA_MULTI_MIN_EFFICIENCY = _mainConfig.getFloat("teslaMultiMinEfficency", "Features", TESLA_MULTI_MIN_EFFICIENCY, 0, 1, + "Worst possible power loss per block for the multi block tesla"); + TESLA_MULTI_MAX_EFFICIENCY = _mainConfig.getFloat("teslaMultiMaxEfficency", "Features", TESLA_MULTI_MAX_EFFICIENCY, 0, 1, + "Best possible power loss per block for the multi block tesla"); + TESLA_MULTI_OVERDRIVE_LOSS = _mainConfig.getFloat("teslaMultiOverdriveLoss", "Features", TESLA_MULTI_OVERDRIVE_LOSS, 0, 1, + "Additional losses for overdrive use on the multi block tesla"); + TESLA_SINGLE_MIN_EFFICIENCY = _mainConfig.getFloat("teslaSingleMinEfficency", "Features", TESLA_SINGLE_MIN_EFFICIENCY, 0, 1, + "Worst possible power loss per block for the single block tesla"); + TESLA_SINGLE_MAX_EFFICIENCY = _mainConfig.getFloat("teslaSingleMaxEfficency", "Features", TESLA_SINGLE_MAX_EFFICIENCY, 0, 1, + "Best possible power loss per block for the single block tesla"); + TESLA_SINGLE_OVERDRIVE_LOSS = _mainConfig.getFloat("teslaSingleOverdriveLoss", "Features", TESLA_SINGLE_OVERDRIVE_LOSS, 0, 1, + "Additional losses for overdrive use on the single block tesla"); } /** 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 122a08e075..097380d715 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 @@ -1,6 +1,7 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.CommonValues; +import com.github.technus.tectech.TecTech; import com.github.technus.tectech.Util; import com.github.technus.tectech.loader.NetworkDispatcher; import com.github.technus.tectech.mechanics.data.RendererMessage; @@ -51,9 +52,9 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private float energyEfficiency = 1; private float overdriveEfficiency = 1; - private float minEfficency = 0.955F; - private float maxEfficency = 0.98F; - private float overdriveEfficiencyExtra = 0.005F; + private float minEfficiency = TecTech.configTecTech.TESLA_MULTI_MIN_EFFICIENCY;//Default is 0.955F + private float maxEfficiency = TecTech.configTecTech.TESLA_MULTI_MAX_EFFICIENCY;//Default is 0.98F; + private float overdriveEfficiencyExtra = TecTech.configTecTech.TESLA_MULTI_OVERDRIVE_LOSS;//Default is 0.005F private Map eTeslaMap = new HashMap<>(); //Used to store targets for power transmission private final ArrayList eCapacitorHatches = new ArrayList<>(); //Used to determine count and tier of capacitors present @@ -532,7 +533,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock zPosScanMax = zPosZap + xyzOffsets[2]; //Calculate Efficiency values - energyEfficiency = map(mTier+1, minTier, maxTier, minEfficency, maxEfficency); + energyEfficiency = map(mTier+1, minTier, maxTier, minEfficiency, maxEfficiency); overdriveEfficiency = energyEfficiency - overdriveEfficiencyExtra; return true; 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 916032ea18..46cc1bd3ea 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 @@ -1,5 +1,6 @@ package com.github.technus.tectech.thing.metaTileEntity.single; +import com.github.technus.tectech.TecTech; import com.github.technus.tectech.Util; import com.github.technus.tectech.loader.NetworkDispatcher; import com.github.technus.tectech.mechanics.data.RendererMessage; @@ -53,13 +54,13 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB private float histHigh = (float) histSettingHigh / histSteps; //Power pass is enabled if power is over this fraction private long outputVoltage = V[mTier]; - private float minEfficency = 0.91F; - private float maxEfficency = 0.95F; - private float overdriveEfficiencyExtra = 0.010F; - private float energyEfficiency = map(mTier + 1, minTier + 1, maxTier + 1, minEfficency, maxEfficency); + private float minEfficiency = TecTech.configTecTech.TESLA_SINGLE_MIN_EFFICIENCY;//Default is 0.91F + private float maxEfficiency = TecTech.configTecTech.TESLA_SINGLE_MAX_EFFICIENCY;//Default is 0.95F + private float overdriveEfficiencyExtra = TecTech.configTecTech.TESLA_SINGLE_OVERDRIVE_LOSS;//Default is 0.010F + private float energyEfficiency = map(mTier + 1, minTier + 1, maxTier + 1, minEfficiency, maxEfficiency); private float overdriveEfficiency = energyEfficiency - overdriveEfficiencyExtra; - private boolean overDriveToggle = false; //Overdrive toggle - + private boolean overdriveToggle = false; + public GT_MetaTileEntity_TeslaCoil(int aID, String aName, String aNameRegional, int aTier, int aSlotCount) { super(aID, aName, aNameRegional, aTier, "Tesla Coil Transceiver", aSlotCount); Util.setTier(aTier, this); @@ -71,11 +72,11 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB @Override public boolean onSolderingToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (overDriveToggle) { - overDriveToggle = false; + if (overdriveToggle) { + overdriveToggle = false; PlayerChatHelper.SendInfo(aPlayer, "Overdrive disengaged"); } else { - overDriveToggle = true; + overdriveToggle = true; PlayerChatHelper.SendInfo(aPlayer, "Overdrive engaged"); } return true; @@ -255,13 +256,13 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB while (outputCurrent > 0) { boolean idle = true; for (Map.Entry Rx : entriesSortedByValues(eTeslaMap)) { - if (getEUVar() >= (overDriveToggle ? outputVoltage * 2 : outputVoltage)) { + if (getEUVar() >= (overdriveToggle ? outputVoltage * 2 : outputVoltage)) { IGregTechTileEntity node = Rx.getKey(); IMetaTileEntity nodeInside = node.getMetaTileEntity(); long outputVoltageInjectable; long outputVoltageConsumption; - if (overDriveToggle) { + if (overdriveToggle) { outputVoltageInjectable = outputVoltage; outputVoltageConsumption = getEnergyEfficiency(outputVoltage, Rx.getValue(), true); } else { -- cgit From a9fccec1808bdfdc39256856468d749b5a480c72 Mon Sep 17 00:00:00 2001 From: Bass Date: Mon, 19 Aug 2019 11:00:18 +0100 Subject: Tesla Tooltips rework --- .../tectech/thing/casing/GT_Block_CasingsBA0.java | 12 ++--- .../tectech/thing/casing/GT_Item_CasingsBA0.java | 51 ++++++++++------------ .../technus/tectech/thing/item/TeslaCoilCover.java | 4 +- .../tectech/thing/item/TeslaCoilCoverUltimate.java | 4 +- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 4 +- 5 files changed, 36 insertions(+), 39 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java index 5fb1d31652..9c6fdc1765 100644 --- a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java @@ -43,12 +43,12 @@ public class GT_Block_CasingsBA0 extends GT_Block_Casings_Abstract { /*IMPORTANT for block recoloring**/ } - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "T0 Primary Tesla Windings");//TODO Decide tesla coil winding materials to rename - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "T1 Primary Tesla Windings"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "T2 Primary Tesla Windings"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "T3 Primary Tesla Windings"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "T4 Primary Tesla Windings"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "T5 Primary Tesla Windings"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Redstone Alloy Primary Tesla Windings"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "MV Superconductor Primary Tesla Windings"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "HV Superconductor Primary Tesla Windings"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "EV Superconductor Primary Tesla Windings"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "IV Superconductor Primary Tesla Windings"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "LuV Superconductor Primary Tesla Windings"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Tesla Base Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Tesla Toroid Casing"); 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 8a494baea1..bb3a68a960 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 @@ -10,9 +10,6 @@ import java.util.List; import static com.github.technus.tectech.CommonValues.*; -/** - * Created by danie_000 on 03.10.2016. - */ public class GT_Item_CasingsBA0 extends GT_Item_Casings_Abstract { public GT_Item_CasingsBA0(Block par1) { super(par1); @@ -26,41 +23,41 @@ public class GT_Item_CasingsBA0 extends GT_Item_Casings_Abstract { aList.add(COSMIC_MARK); } switch (aStack.getItemDamage()) { - case 0://"T0 Primary Tesla Windings" - aList.add("Well suited for high power applications."); - aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "The power levels are rising!"); + case 0://"Redstone Alloy Primary Tesla Windings" + aList.add("Handles up to 32 EU/t"); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "What one man calls God, another calls the laws of physics."); break; - case 1://"T1 Primary Tesla Windings" - aList.add("Nice and clean casing."); - aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Dust can break it!?"); + case 1://"MV Superconductor Primary Tesla Windings" + aList.add("Handles up to 128 EU/t"); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "What one man calls God, another calls the laws of physics."); break; - case 2://"T2 Primary Tesla Windings" - aList.add("Air vent with a filter."); - aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Perfectly muffled sound!"); + case 2://"HV Superconductor Primary Tesla Windings" + aList.add("Handles up to 512 EU/t"); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "What one man calls God, another calls the laws of physics."); break; - case 3://"T3 Primary Tesla Windings" - aList.add("Contains high bandwidth bus"); - aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "couple thousand qubits wide."); + case 3://"EV Superconductor Primary Tesla Windings" + aList.add("Handles up to 2048 EU/t"); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "What one man calls God, another calls the laws of physics."); break; - case 4://"T4 Primary Tesla Windings" - aList.add("Stops elemental things."); - aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Radiation and emotions too..."); + case 4://"IV Superconductor Primary Tesla Windings" + aList.add("Handles up to 8192 EU/t"); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "What one man calls God, another calls the laws of physics."); break; - case 5://"T5 Primary Tesla Windings" - aList.add("Cooling and stabilization."); - aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "A comfortable machine bed."); + case 5://"LuV Superconductor Primary Tesla Windings" + aList.add("Handles up to 32768 EU/t"); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "What one man calls God, another calls the laws of physics."); break; case 6://"Tesla Base Casing" - aList.add("Creates a field that..."); - aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "can stop even force carriers."); + aList.add("The base of a wondrous contraption"); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "it's alive, IT'S ALIVE!"); break; case 7://"Tesla Toroid Casing" - aList.add("Well it does things too..."); - aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "[Use this coil!]"); + aList.add("A shell for your coils"); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Faraday suits might come later"); break; case 8://"Tesla Secondary Windings" - aList.add("Reinforced accelerator tunnel."); - aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Most advanced pipe ever."); + aList.add("Picks up power from a primary coil"); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Who wouldn't want a 32k epoxy multi?"); break; default://WTF? aList.add("Damn son where did you get that!?"); 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 d789f9d7f5..64ba2de78e 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 @@ -24,8 +24,8 @@ public final class TeslaCoilCover extends Item { public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) { aList.add(CommonValues.BASS_MARK); aList.add("Tesla-Enables Machines!"); - aList.add(EnumChatFormatting.BLUE + "Use on a machine to apply Tesla capabilities"); - aList.add(EnumChatFormatting.BLUE + "Who the hell need cables anyway?"); + aList.add(EnumChatFormatting.BLUE + "Use on top of a machine to enable Tesla capabilities"); + aList.add(EnumChatFormatting.BLUE + "Who the hell uses cables anyway?"); } public static void run() { diff --git a/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCoverUltimate.java b/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCoverUltimate.java index a85a3b2f1a..71ef0bd0c8 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCoverUltimate.java +++ b/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCoverUltimate.java @@ -24,8 +24,8 @@ public final class TeslaCoilCoverUltimate extends Item { public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) { aList.add(CommonValues.BASS_MARK); aList.add("Tesla-Enables Machines! (BUT LOUDER!!)"); - aList.add(EnumChatFormatting.BLUE + "Use on a machine to apply Tesla capabilities"); - aList.add(EnumChatFormatting.BLUE + "Who the hell need cables anyway?"); + aList.add(EnumChatFormatting.BLUE + "Use on top of a machine to enable Tesla capabilities"); + aList.add(EnumChatFormatting.BLUE + "Who the hell uses cables anyway?"); } public static void run() { 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 097380d715..c837fcf099 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 @@ -141,9 +141,9 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private static final byte[] blockMetaFallback = new byte[]{6, 0}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + "Hint Details:", - "1 - Classic Hatches or Steel Pipe Casing", + "1 - Classic Hatches, Capacitor Hatches or Tesla Base Casing", "2 - Titanium Frames", - };//TODO Update casings + hatches + }; //endregion //region parameters -- cgit From 175e78daeb259cdc3a4f54c56d443517984638fa Mon Sep 17 00:00:00 2001 From: Bass Date: Mon, 19 Aug 2019 11:34:51 +0100 Subject: Fix Tesla Capacitor Values --- .../tectech/thing/item/TeslaCoilCapacitor.java | 24 +++++----------------- .../hatch/GT_MetaTileEntity_Hatch_Capacitor.java | 10 ++++----- 2 files changed, 10 insertions(+), 24 deletions(-) (limited to 'src/main/java') 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 f842fc8af2..22c6fe335b 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 @@ -15,6 +15,7 @@ import net.minecraft.util.IIcon; import java.util.List; +import static com.github.technus.tectech.CommonValues.V; import static com.github.technus.tectech.Reference.MODID; @@ -36,25 +37,10 @@ public final class TeslaCoilCapacitor extends Item { @Override public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) { aList.add(CommonValues.BASS_MARK); - switch (aStack.getItemDamage()) { - case 0://"LV" - aList.add("Stores energy for tesla towers! (LV)"); - break; - case 1://"MV" - aList.add("Stores energy for tesla towers! (MV)"); - break; - case 2://"HV" - aList.add("Stores energy for tesla towers! (HV)"); - break; - case 3://"EV" - aList.add("Stores energy for tesla towers! (EV)"); - break; - case 4://"IV" - aList.add("Stores energy for tesla towers! (IV)"); - break; - default:// - aList.add("Yeet this broken item into some spicy water!"); - break; + if (aStack.getItemDamage() >= 0 && aStack.getItemDamage() <= 4){ + aList.add("Stores " + V[aStack.getItemDamage()+1]*512 + " EU in a tesla tower at " + V[aStack.getItemDamage()+1] +" EU/t"); + } else { + aList.add("Yeet this broken item into some spicy water!"); } aList.add(EnumChatFormatting.BLUE + "Insert into a Capacitor hatch of a Tesla Tower"); aList.add(EnumChatFormatting.BLUE + "Capacitors are the same thing as batteries, right?"); 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 3ea31b537e..f263191b13 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 @@ -172,11 +172,11 @@ public class GT_MetaTileEntity_Hatch_Capacitor extends GT_MetaTileEntity_Hatch { } public static void run() { - new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.0", 0, 1, V[0]*512);//LV Capacitor - new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.1", 1, 1, V[1]*512);//MV Capacitor - new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.2", 2, 1, V[2]*512);//HV Capacitor - new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.3", 3, 1, V[3]*512);//EV Capacitor - new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.4", 4, 1, V[4]*512);//IV Capacitor + new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.0", 0, 1, V[1]*512);//LV Capacitor + new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.1", 1, 1, V[2]*512);//MV Capacitor + new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.2", 2, 1, V[3]*512);//HV Capacitor + new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.3", 3, 1, V[4]*512);//EV Capacitor + new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.4", 4, 1, V[5]*512);//IV Capacitor } public static class CapacitorComponent implements Comparable { -- cgit From aa6dde99ba4652ec2559282f105cc298598ad0b9 Mon Sep 17 00:00:00 2001 From: Bass Date: Tue, 20 Aug 2019 08:08:02 +0100 Subject: Tesla orientation update Now uses the updated Extreme rotation and checker methods properly --- .../hatch/GT_MetaTileEntity_Hatch_Capacitor.java | 2 +- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 148 +++------------------ .../single/GT_MetaTileEntity_TeslaCoil.java | 6 + 3 files changed, 26 insertions(+), 130 deletions(-) (limited to 'src/main/java') 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 f263191b13..44612f0c9b 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 @@ -79,7 +79,7 @@ public class GT_MetaTileEntity_Hatch_Capacitor extends GT_MetaTileEntity_Hatch { @Override public boolean isFacingValid(byte aFacing) { - return aFacing >= 2; + return true; } @Override 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 c837fcf099..dfbfebd84a 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 @@ -13,6 +13,7 @@ import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_H import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Param; import com.github.technus.tectech.thing.metaTileEntity.multi.base.*; +import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedTexture; import com.github.technus.tectech.thing.metaTileEntity.single.GT_MetaTileEntity_TeslaCoil; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -21,7 +22,6 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.*; -import gregtech.api.objects.GT_RenderedTexture; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; @@ -89,7 +89,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock public int zPosTop; //region structure - private static final String[][] shape0 = new String[][]{//3 16 0 + private static final String[][] shape = new String[][]{//3 16 0 {"\u000F", "A . ",}, {E, "B000", "B000", "B000", "\u0001", "B000", E, "B000", E, "B000", E, "B000", "\u0001", "B111", " 22222 ",}, {"B000", "A00000", "A00000", "A00000", "B000", E, "A0A!A0", E, "A0A!A0", E, "A0A!A0", E, "A0A!A0", "\u0001", "A1C1", " 21112 ",}, @@ -98,35 +98,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock {E, "B000", "B000", "B000", "\u0001", "B000", E, "B000", E, "B000", E, "B000", "\u0001", "B111", " 22222 ",}, {"\u000F", "A ",}, }; - private static final String[][] shape1 = new String[][]{//3 0 0 - {"A . ",}, - {" 22222 ","A11111","\u0001","B000",E,"B000",E,"B000",E,"B000","\u0001","B000","B000","B000",}, - {" 21112 ","A1C1","\u0001","A0A!A0",E,"A0A!A0",E,"A0A!A0",E,"A0A!A0",E,"B000","A00000","A00000","A00000","B000",}, - {" 21212 ","A1A3A1","C3","C3","A0!3!0","C3","A0!3!0","C3","A0!3!0","C3","A0!3!0","C3","B030","A00000","A00000","A00000","B000",}, - {" 21112 ","A1C1","\u0001","A0A!A0",E,"A0A!A0",E,"A0A!A0",E,"A0A!A0",E,"B000","A00000","A00000","A00000","B000",}, - {" 22222 ","A11111","\u0001","B000",E,"B000",E,"B000",E,"B000","\u0001","B000","B000","B000",}, - {"A ",}, - }; - private static final String[][] shape2 = new String[][]{//16 3 0 - {E,"P ","P ","P.","P ","P ",}, - {"P ","O12","A000B0A0A0A0B12","A000B0A0A0A0B12","A000B0A0A0A0B12","O12","P ",}, - {"P ","A000B0A0A0A0B12","00000K1","00000A!A!A!A!C1","00000K1","A000B0A0A0A0B12","P ",}, - {"P ","A000B0A0A0A0B12","00000A!A!A!A!C1","00003333333333332","00000A!A!A!A!C1","A000B0A0A0A0B12","P ",}, - {"P ","A000B0A0A0A0B12","00000K1","00000A!A!A!A!C1","00000K1","A000B0A0A0A0B12","P ",}, - {"P ","O12","A000B0A0A0A0B12","A000B0A0A0A0B12","A000B0A0A0A0B12","F0H12","P ",}, - {E,"P ","P ","P ","P ","P ",}, - }; - private static final String[][] shape3 = new String[][]{//0 3 0 - {E," "," ","."," "," ",}, - {" ","21","21B0A0A0A0B000","21B0A0A0A0B000","21B0A0A0A0B000","21H0"," ",}, - {" ","21B0A0A0A0B000","1K00000","1C!A!A!A!A00000","1K00000","21B0A0A0A0B000"," ",}, - {" ","21B0A0A0A0B000","1C!A!A!A!A00000","23333333333330000","1C!A!A!A!A00000","21B0A0A0A0B000"," ",}, - {" ","21B0A0A0A0B000","1K00000","1C!A!A!A!A00000","1K00000","21B0A0A0A0B000"," ",}, - {" ","21","21B0A0A0A0B000","21B0A0A0A0B000","21B0A0A0A0B000","21"," ",}, - {E," "," "," "," "," ",}, - }; - - private static final String[][][] shapes = new String[][][]{shape0,shape1,shape2,shape3}; private static final Block[] blockType = new Block[]{sBlockCasingsBA0,sBlockCasingsBA0,sBlockCasingsBA0,sBlockCasingsBA0}; private static final byte[] blockMetaT0 = new byte[]{7, 0, 6, 8}; private static final byte[] blockMetaT1 = new byte[]{7, 1, 6, 8}; @@ -352,7 +323,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock energyCapacity=aNBT.getLong("eEnergyCapacity"); } - //Efficiency function used on power transfers private long getEnergyEfficiency(long voltage, int distance, boolean overDriveToggle) { if (overDriveToggle) { return (long)((voltage * 2) - (voltage * Math.pow(overdriveEfficiency, distance))); @@ -361,8 +331,8 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } } - //Over-tiered coils will add +25% range private float getRangeMulti(int mTier, int vTier){ + //Over-tiered coils will add +25% range if (vTier > mTier){ return 1.25F; } @@ -377,7 +347,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock @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][16+6], new GT_RenderedTexture(aActive ? ScreenON : ScreenOFF)}; + return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][16+6], new TT_RenderedTexture(aActive ? ScreenON : ScreenOFF)}; } return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][16+6]}; } @@ -411,129 +381,49 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } eCapacitorHatches.clear(); - int coilX0 = 0; - int coilX1 = 0; - int coilX2 = 0; - - int coilY0 = 1; - int coilY1 = 0; - int coilY2 = 0; - - int coilZ0 = 0; - int coilZ1 = 0; - int coilZ2 = 0; - - switch (iGregTechTileEntity.getFrontFacing()) { - case 2: - coilZ0 = 1; - coilZ1 = 1; - coilZ2 = 1; - coilX1 = 1; - coilX2 = -1; - break; - case 3: - coilZ0 = -1; - coilZ1 = -1; - coilZ2 = -1; - coilX1 = -1; - coilX2 = 1; - break; - case 4: - coilX0 = 1; - coilX1 = 1; - coilX2 = 1; - coilZ1 = -1; - coilZ2 = 1; - break; - case 5: - coilX0 = -1; - coilX1 = -1; - coilX2 = -1; - coilZ1 = 1; - coilZ2 = -1; - break; - default: - return false; - } - - Block coil0 = iGregTechTileEntity.getBlockOffset(coilX0, coilY0, coilZ0); - Block coil1 = iGregTechTileEntity.getBlockOffset(coilX0, -coilY0, coilZ0); - Block coil2 = iGregTechTileEntity.getBlockOffset(coilX1, coilY1, coilZ1); - Block coil3 = iGregTechTileEntity.getBlockOffset(coilX2, coilY2, coilZ2); - - int xOffset; - int yOffset; - int zOffset; - int orientation; - - if (coil0 == sBlockCasingsBA0) { - xOffset = 3; - yOffset = 16; - zOffset = 0; - orientation = 0; - mTier = iGregTechTileEntity.getMetaIDOffset(coilX0, coilY0, coilZ0); - } else if (coil1 == sBlockCasingsBA0) { - xOffset = 3; - yOffset = 0; - zOffset = 0; - orientation = 1; - mTier = iGregTechTileEntity.getMetaIDOffset(coilX0, -coilY0, coilZ0); - } else if (coil2 == sBlockCasingsBA0) { - xOffset = 16; - yOffset = 3; - zOffset = 0; - orientation = 2; - mTier = iGregTechTileEntity.getMetaIDOffset(coilX1, coilY1, coilZ1); - } else if (coil3 == sBlockCasingsBA0) { - xOffset = 0; - yOffset = 3; - zOffset = 0; - orientation = 3; - mTier = iGregTechTileEntity.getMetaIDOffset(coilX2, coilY2, coilZ2); - } else { - return false; - } + int[] xyzOffsets; + xyzOffsets = getTranslatedOffsets(0, -1, 1); + mTier = iGregTechTileEntity.getMetaIDOffset(xyzOffsets[0], xyzOffsets[1], xyzOffsets[2]); - if (structureCheck_EM(shapes[orientation], blockType, blockMetas[mTier], addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, xOffset, yOffset, zOffset) && eCapacitorHatches.size() > 0) { + if (structureCheck_EM(shape, blockType, blockMetas[0], addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 3, 16, 0) && eCapacitorHatches.size() > 0) { for (GT_MetaTileEntity_Hatch_Capacitor cap : eCapacitorHatches) { if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { cap.getBaseMetaTileEntity().setActive(iGregTechTileEntity.isActive()); } } - int[] xyzOffsets; //Calculate coordinates of the middle bottom - xyzOffsets=getTranslatedOffsets(0,0,2); + xyzOffsets = getTranslatedOffsets(0, 0, 2); xPosZap = iGregTechTileEntity.getXCoord() + xyzOffsets[0]; yPosZap = iGregTechTileEntity.getYCoord() + xyzOffsets[1]; zPosZap = iGregTechTileEntity.getZCoord() + xyzOffsets[2]; //Calculate coordinates of the top sphere - xyzOffsets=getTranslatedOffsets(0,-14,2); + xyzOffsets = getTranslatedOffsets(0, -14, 2); xPosTop = iGregTechTileEntity.getXCoord() + xyzOffsets[0]; yPosTop = iGregTechTileEntity.getYCoord() + xyzOffsets[1]; zPosTop = iGregTechTileEntity.getZCoord() + xyzOffsets[2]; //Calculate offsets for scanning - xyzOffsets = getTranslatedOffsets(40,0,43); - xPosScanMin = xPosZap +xyzOffsets[0]; + xyzOffsets = getTranslatedOffsets(40, 0, 43); + xPosScanMin = xPosZap + xyzOffsets[0]; yPosScan0 = yPosZap + xyzOffsets[1]; zPosScanMin = zPosZap + xyzOffsets[2]; - xyzOffsets = getTranslatedOffsets(-40,-4,-37); + xyzOffsets = getTranslatedOffsets(-40, -4, -37); yPosScan1 = yPosZap + xyzOffsets[1]; - xyzOffsets = getTranslatedOffsets(-40,-8,-37); + xyzOffsets = getTranslatedOffsets(-40, -8, -37); yPosScan2 = yPosZap + xyzOffsets[1]; - xyzOffsets = getTranslatedOffsets(-40,-12,-37); + xyzOffsets = getTranslatedOffsets(-40, -12, -37); yPosScan3 = yPosZap + xyzOffsets[1]; - xyzOffsets = getTranslatedOffsets(-40,-16,-37); + xyzOffsets = getTranslatedOffsets(-40, -16, -37); yPosScan4 = yPosZap + xyzOffsets[1]; - xyzOffsets = getTranslatedOffsets(-40,-20,-37); + xyzOffsets = getTranslatedOffsets(-40, -20, -37); xPosScanMax = xPosZap + xyzOffsets[0]; yPosScan5 = yPosZap + xyzOffsets[1]; zPosScanMax = zPosZap + xyzOffsets[2]; //Calculate Efficiency values - energyEfficiency = map(mTier+1, minTier, maxTier, minEfficiency, maxEfficiency); + energyEfficiency = map(mTier + 1, minTier, maxTier, minEfficiency, maxEfficiency); overdriveEfficiency = energyEfficiency - overdriveEfficiencyExtra; return true; @@ -543,7 +433,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock @Override public void construct(int stackSize, boolean hintsOnly) { - StructureBuilder(shapes[0], blockType, blockMetas[(stackSize-1)%6], 3, 16, 0, getBaseMetaTileEntity(), hintsOnly); + StructureBuilderExtreme(shape, blockType, blockMetas[(stackSize-1)%6], 3, 16, 0, getBaseMetaTileEntity(), this, hintsOnly); } @Override 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 46cc1bd3ea..4285f2b6f3 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 @@ -281,6 +281,12 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB } } } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil) && !(node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil_Ultimate) && Rx.getValue() <= transferRadiusCover) { + if (nodeInside instanceof GT_MetaTileEntity_TeslaCoil){ + GT_MetaTileEntity_TeslaCoil nodeTesla = (GT_MetaTileEntity_TeslaCoil) nodeInside; + if (nodeTesla.powerPassToggle){ + continue; + } + } if (node.injectEnergyUnits((byte) 1, outputVoltageInjectable, 1L) > 0L) { setEUVar(getEUVar() - outputVoltageConsumption); thaumLightning(aBaseMetaTileEntity, node); -- cgit From 8d4962c7bfdb37bf1d7fe5d7ce83be0afb30d3b7 Mon Sep 17 00:00:00 2001 From: Bass Date: Tue, 20 Aug 2019 13:53:46 +0100 Subject: Offset checking optimisation --- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 79 ++++++++++++---------- 1 file changed, 44 insertions(+), 35 deletions(-) (limited to 'src/main/java') 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 dfbfebd84a..ac399aeb0d 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 @@ -66,6 +66,10 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private int vTier = -1; //Tesla voltage tier limited by capacitors private long outputCurrentMax = 0; //Tesla current output limited by capacitors + //Prevents unnecessary offset calculation + private byte oldRotation; + private byte oldOrientation; + //Scan range fields private static int xPosScanMin; private static int xPosScanMax; @@ -385,47 +389,48 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock xyzOffsets = getTranslatedOffsets(0, -1, 1); mTier = iGregTechTileEntity.getMetaIDOffset(xyzOffsets[0], xyzOffsets[1], xyzOffsets[2]); - if (structureCheck_EM(shape, blockType, blockMetas[0], addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 3, 16, 0) && eCapacitorHatches.size() > 0) { + if (structureCheck_EM(shape, blockType, blockMetas[mTier], addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 3, 16, 0) && eCapacitorHatches.size() > 0) { for (GT_MetaTileEntity_Hatch_Capacitor cap : eCapacitorHatches) { if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { cap.getBaseMetaTileEntity().setActive(iGregTechTileEntity.isActive()); } } - //Calculate coordinates of the middle bottom - xyzOffsets = getTranslatedOffsets(0, 0, 2); - xPosZap = iGregTechTileEntity.getXCoord() + xyzOffsets[0]; - yPosZap = iGregTechTileEntity.getYCoord() + xyzOffsets[1]; - zPosZap = iGregTechTileEntity.getZCoord() + xyzOffsets[2]; - - //Calculate coordinates of the top sphere - xyzOffsets = getTranslatedOffsets(0, -14, 2); - xPosTop = iGregTechTileEntity.getXCoord() + xyzOffsets[0]; - yPosTop = iGregTechTileEntity.getYCoord() + xyzOffsets[1]; - zPosTop = iGregTechTileEntity.getZCoord() + xyzOffsets[2]; - - //Calculate offsets for scanning - xyzOffsets = getTranslatedOffsets(40, 0, 43); - xPosScanMin = xPosZap + xyzOffsets[0]; - yPosScan0 = yPosZap + xyzOffsets[1]; - zPosScanMin = zPosZap + xyzOffsets[2]; - xyzOffsets = getTranslatedOffsets(-40, -4, -37); - yPosScan1 = yPosZap + xyzOffsets[1]; - xyzOffsets = getTranslatedOffsets(-40, -8, -37); - yPosScan2 = yPosZap + xyzOffsets[1]; - xyzOffsets = getTranslatedOffsets(-40, -12, -37); - yPosScan3 = yPosZap + xyzOffsets[1]; - xyzOffsets = getTranslatedOffsets(-40, -16, -37); - yPosScan4 = yPosZap + xyzOffsets[1]; - xyzOffsets = getTranslatedOffsets(-40, -20, -37); - xPosScanMax = xPosZap + xyzOffsets[0]; - yPosScan5 = yPosZap + xyzOffsets[1]; - zPosScanMax = zPosZap + xyzOffsets[2]; - - //Calculate Efficiency values - energyEfficiency = map(mTier + 1, minTier, maxTier, minEfficiency, maxEfficiency); - overdriveEfficiency = energyEfficiency - overdriveEfficiencyExtra; - + //Only recalculate offsets on orientation or rotation change + if (oldRotation != getFrontRotation() || oldOrientation != iGregTechTileEntity.getFrontFacing()) { + oldRotation = getFrontRotation(); + oldOrientation = iGregTechTileEntity.getFrontFacing(); + + //Calculate coordinates of the middle bottom + xyzOffsets = getTranslatedOffsets(0, 0, 2); + xPosZap = iGregTechTileEntity.getXCoord() + xyzOffsets[0]; + yPosZap = iGregTechTileEntity.getYCoord() + xyzOffsets[1]; + zPosZap = iGregTechTileEntity.getZCoord() + xyzOffsets[2]; + + //Calculate coordinates of the top sphere + xyzOffsets = getTranslatedOffsets(0, -14, 2); + xPosTop = iGregTechTileEntity.getXCoord() + xyzOffsets[0]; + yPosTop = iGregTechTileEntity.getYCoord() + xyzOffsets[1]; + zPosTop = iGregTechTileEntity.getZCoord() + xyzOffsets[2]; + + //Calculate offsets for scanning + xyzOffsets = getTranslatedOffsets(40, 0, 43); + xPosScanMin = xPosZap + xyzOffsets[0]; + yPosScan0 = yPosZap + xyzOffsets[1]; + zPosScanMin = zPosZap + xyzOffsets[2]; + xyzOffsets = getTranslatedOffsets(-40, -4, -37); + yPosScan1 = yPosZap + xyzOffsets[1]; + xyzOffsets = getTranslatedOffsets(-40, -8, -37); + yPosScan2 = yPosZap + xyzOffsets[1]; + xyzOffsets = getTranslatedOffsets(-40, -12, -37); + yPosScan3 = yPosZap + xyzOffsets[1]; + xyzOffsets = getTranslatedOffsets(-40, -16, -37); + yPosScan4 = yPosZap + xyzOffsets[1]; + xyzOffsets = getTranslatedOffsets(-40, -20, -37); + xPosScanMax = xPosZap + xyzOffsets[0]; + yPosScan5 = yPosZap + xyzOffsets[1]; + zPosScanMax = zPosZap + xyzOffsets[2]; + } return true; } return false; @@ -477,6 +482,10 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } } + //Calculate Efficiency values + energyEfficiency = map(mTier + 1, minTier, maxTier, minEfficiency, maxEfficiency); + overdriveEfficiency = energyEfficiency - overdriveEfficiencyExtra; + energyCapacity = 0; outputCurrentMax = 0; -- cgit From 32222a152686e1fb8ce65c9436b25640845080a8 Mon Sep 17 00:00:00 2001 From: Bass Date: Wed, 21 Aug 2019 12:30:22 +0100 Subject: Tesla Cover Item Refactor --- .../technus/tectech/loader/thing/CoverLoader.java | 7 ++- .../technus/tectech/loader/thing/ThingsLoader.java | 8 +--- .../technus/tectech/thing/CustomItemList.java | 2 +- .../tectech/thing/item/ParametrizerMemoryCard.java | 40 ++++++++-------- .../tectech/thing/item/TeslaCoilCapacitor.java | 8 +++- .../technus/tectech/thing/item/TeslaCoilCover.java | 53 +++++++++++++++++++++- .../tectech/thing/item/TeslaCoilCoverUltimate.java | 35 -------------- src/main/resources/assets/tectech/lang/en_US.lang | 3 -- 8 files changed, 81 insertions(+), 75 deletions(-) delete mode 100644 src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCoverUltimate.java (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java b/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java index e87ac69f2a..d7e9a21a67 100644 --- a/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java @@ -4,7 +4,6 @@ import com.github.technus.tectech.TecTech; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil_Ultimate; import com.github.technus.tectech.thing.item.TeslaCoilCover; -import com.github.technus.tectech.thing.item.TeslaCoilCoverUltimate; import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; @@ -14,12 +13,12 @@ import net.minecraft.item.ItemStack; public class CoverLoader implements Runnable { - public void run(){ + public void run() { final IIconContainer TESLA_OVERLAY = new Textures.BlockIcons.CustomIcon("iconsets/TESLA_OVERLAY"); final IIconContainer TESLA_OVERLAY_ULTIMATE = new Textures.BlockIcons.CustomIcon("iconsets/TESLA_OVERLAY_ULTIMATE"); - GregTech_API.registerCover(new ItemStack(TeslaCoilCover.INSTANCE, 1), new GT_RenderedTexture(TESLA_OVERLAY), new GT_Cover_TM_TeslaCoil()); - GregTech_API.registerCover(new ItemStack(TeslaCoilCoverUltimate.INSTANCE, 1), new GT_RenderedTexture(TESLA_OVERLAY_ULTIMATE), new GT_Cover_TM_TeslaCoil_Ultimate()); + GregTech_API.registerCover(new ItemStack(TeslaCoilCover.INSTANCE, 1, 0), new GT_RenderedTexture(TESLA_OVERLAY), new GT_Cover_TM_TeslaCoil()); + GregTech_API.registerCover(new ItemStack(TeslaCoilCover.INSTANCE, 1, 1), new GT_RenderedTexture(TESLA_OVERLAY_ULTIMATE), new GT_Cover_TM_TeslaCoil_Ultimate()); TecTech.LOGGER.info("Cover functionality registered"); } } 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 13d8861d31..6a12c640f3 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 @@ -52,19 +52,13 @@ public class ThingsLoader implements Runnable { ReactorSimBlock.run(); TecTech.LOGGER.info("Reactor Simulator registered"); - TeslaCoilCover.run(); - TeslaCoilCoverUltimate.run(); - TecTech.LOGGER.info("Covers Items registered"); - ConstructableTriggerItem.run(); FrontRotationTriggerItem.run(); ParametrizerMemoryCard.run(); ElementalDefinitionScanStorage_EM.run(); EuMeterGT.run(); - - + TeslaCoilCover.run(); TeslaCoilCapacitor.run(); - TecTech.LOGGER.info("Useful Items registered"); ElementalDefinitionContainer_EM.run(); 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 fdbda7ecd5..8bbb8fd4ce 100644 --- a/src/main/java/com/github/technus/tectech/thing/CustomItemList.java +++ b/src/main/java/com/github/technus/tectech/thing/CustomItemList.java @@ -92,7 +92,7 @@ public enum CustomItemList implements IItemContainer { Machine_Multi_BHG, hint_0,hint_1,hint_2,hint_3,hint_4,hint_5,hint_6,hint_7,hint_8,hint_9,hint_10,hint_11, hint_general,hint_air,hint_noAir,hint_error, - scanContainer,parametrizerMemory, + scanContainer,parametrizerMemory,teslaCapacitor,teslaCoilCover, Machine_TeslaCoil_LV_1A, Machine_TeslaCoil_MV_1A, Machine_TeslaCoil_HV_1A, Machine_TeslaCoil_EV_1A, Machine_TeslaCoil_IV_1A, Machine_TeslaCoil_LV_4A, Machine_TeslaCoil_MV_4A, Machine_TeslaCoil_HV_4A, Machine_TeslaCoil_EV_4A, Machine_TeslaCoil_IV_4A, 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 dafc425163..611fba6376 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 @@ -31,11 +31,10 @@ import static com.github.technus.tectech.thing.CustomItemList.parametrizerMemory */ public final class ParametrizerMemoryCard extends Item { public static ParametrizerMemoryCard INSTANCE; - public static IIcon locked,unlocked; + private static IIcon locked, unlocked; private ParametrizerMemoryCard() { setMaxStackSize(1); - setHasSubtypes(true); setUnlocalizedName("em.parametrizerMemoryCard"); setTextureName(MODID + ":itemParametrizerMemoryCardUnlocked"); } @@ -66,13 +65,13 @@ public final class ParametrizerMemoryCard extends Item { tNBT.setDouble("value1D", parametrizer.value1D); } return true; - }else if(metaTE instanceof GT_MetaTileEntity_MultiblockBase_EM){ + } else if (metaTE instanceof GT_MetaTileEntity_MultiblockBase_EM) { GT_MetaTileEntity_MultiblockBase_EM base = (GT_MetaTileEntity_MultiblockBase_EM) metaTE; if (aStack.getTagCompound() == null) { aStack.setTagCompound(new NBTTagCompound()); } NBTTagCompound tNBT = aStack.getTagCompound(); - if(aStack.getItemDamage()== 1){ + if (aStack.getItemDamage() == 1) { base.parametrization.trySetParameters( tNBT.getInteger("param"), tNBT.getDouble("value0D"), @@ -90,9 +89,9 @@ public final class ParametrizerMemoryCard extends Item { public ItemStack onItemRightClick(ItemStack aStack, World aWorld, EntityPlayer aPlayer) { if (aPlayer instanceof EntityPlayerMP && aPlayer.isSneaking()) { aStack.stackSize = 1; - if(aStack.getItemDamage()==1) { + if (aStack.getItemDamage() == 1) { aStack.setItemDamage(0); - }else{ + } else { aStack.setItemDamage(1); } return aStack; @@ -106,23 +105,23 @@ public final class ParametrizerMemoryCard extends Item { aList.add(CommonValues.BASS_MARK); aList.add("Stores Parameters"); - if(aStack.getItemDamage()==1) { + if (aStack.getItemDamage() == 1) { aList.add(EnumChatFormatting.BLUE + "Use on Parametrizer/Controller to configure it"); - }else{ + } else { aList.add(EnumChatFormatting.BLUE + "Use on Parametrizer to store parameters"); } aList.add(EnumChatFormatting.BLUE + "Sneak right click to lock/unlock"); long temp; - if(tNBT!=null && tNBT.hasKey("param")) { - aList.add("Hatch ID: "+EnumChatFormatting.AQUA + tNBT.getInteger("param")); - temp=tNBT.getInteger("value0D"); - aList.add("Value 0D: "+EnumChatFormatting.AQUA + temp); - aList.add("Value 0B: "+EnumChatFormatting.AQUA + Util.longBitsToShortString(Double.doubleToLongBits(temp))); - temp=tNBT.getInteger("value1D"); - aList.add("Value 1D: "+EnumChatFormatting.AQUA + temp); - aList.add("Value 1B: "+EnumChatFormatting.AQUA + Util.longBitsToShortString(Double.doubleToLongBits(temp))); - aList.add("Uses Floats: "+(tNBT.getBoolean("usesFloats")?EnumChatFormatting.GREEN+"TRUE":EnumChatFormatting.RED+"FALSE")); + if (tNBT != null && tNBT.hasKey("param")) { + aList.add("Hatch ID: " + EnumChatFormatting.AQUA + tNBT.getInteger("param")); + temp = tNBT.getInteger("value0D"); + aList.add("Value 0D: " + EnumChatFormatting.AQUA + temp); + aList.add("Value 0B: " + EnumChatFormatting.AQUA + Util.longBitsToShortString(Double.doubleToLongBits(temp))); + temp = tNBT.getInteger("value1D"); + aList.add("Value 1D: " + EnumChatFormatting.AQUA + temp); + aList.add("Value 1B: " + EnumChatFormatting.AQUA + Util.longBitsToShortString(Double.doubleToLongBits(temp))); + aList.add("Uses Floats: " + (tNBT.getBoolean("usesFloats") ? EnumChatFormatting.GREEN + "TRUE" : EnumChatFormatting.RED + "FALSE")); } } @@ -136,17 +135,16 @@ public final class ParametrizerMemoryCard extends Item { @Override @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister iconRegister) { - locked =iconRegister.registerIcon(MODID + ":itemParametrizerMemoryCardLocked"); + locked = iconRegister.registerIcon(MODID + ":itemParametrizerMemoryCardLocked"); unlocked = itemIcon = iconRegister.registerIcon(getIconString()); } @Override public IIcon getIconFromDamage(int damage) { - if(damage==1) { + if (damage == 1) { return locked; - }else{ - return unlocked; } + return unlocked; } @Override 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 22c6fe335b..13b7f311d2 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 @@ -17,6 +17,7 @@ import java.util.List; import static com.github.technus.tectech.CommonValues.V; import static com.github.technus.tectech.Reference.MODID; +import static com.github.technus.tectech.thing.CustomItemList.teslaCapacitor; public final class TeslaCoilCapacitor extends Item { @@ -24,6 +25,7 @@ public final class TeslaCoilCapacitor extends Item { private static IIcon LVicon, MVicon, HVicon, EVicon, IVicon; private TeslaCoilCapacitor() { + setHasSubtypes(true); setUnlocalizedName("tm.teslaCoilCapacitor"); setTextureName(MODID + ":itemCapacitorLV"); @@ -37,8 +39,8 @@ public final class TeslaCoilCapacitor extends Item { @Override public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) { aList.add(CommonValues.BASS_MARK); - if (aStack.getItemDamage() >= 0 && aStack.getItemDamage() <= 4){ - aList.add("Stores " + V[aStack.getItemDamage()+1]*512 + " EU in a tesla tower at " + V[aStack.getItemDamage()+1] +" EU/t"); + if (aStack.getItemDamage() >= 0 && aStack.getItemDamage() <= 4) { + aList.add("Stores " + V[aStack.getItemDamage() + 1] * 512 + " EU in a tesla tower at " + V[aStack.getItemDamage() + 1] + " EU/t"); } else { aList.add("Yeet this broken item into some spicy water!"); } @@ -54,6 +56,7 @@ public final class TeslaCoilCapacitor extends Item { public static void run() { INSTANCE = new TeslaCoilCapacitor(); GameRegistry.registerItem(INSTANCE, INSTANCE.getUnlocalizedName()); + teslaCapacitor.set(INSTANCE); } @Override @@ -82,6 +85,7 @@ public final class TeslaCoilCapacitor extends Item { } } + @Override public void getSubItems(Item aItem, CreativeTabs par2CreativeTabs, List aList) { for (int i = 0; i <= 4; i++) { aList.add(new ItemStack(aItem, 1, i)); 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 64ba2de78e..82f71ec9c6 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 @@ -2,34 +2,83 @@ package com.github.technus.tectech.thing.item; import com.github.technus.tectech.CommonValues; import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.util.GT_LanguageManager; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; import java.util.List; import static com.github.technus.tectech.Reference.MODID; +import static com.github.technus.tectech.thing.CustomItemList.teslaCoilCover; public final class TeslaCoilCover extends Item { public static TeslaCoilCover INSTANCE; + private static IIcon ultItemIcon; - public TeslaCoilCover() { + private TeslaCoilCover() { + setHasSubtypes(true); setUnlocalizedName("tm.teslaCoilCover"); setTextureName(MODID + ":itemTeslaCover"); + + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Tesla Coil Cover"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Tesla Coil Cover Rich Edition"); } @Override public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) { aList.add(CommonValues.BASS_MARK); - aList.add("Tesla-Enables Machines!"); + switch (aStack.getItemDamage()) { + case 0: + aList.add("Tesla-Enables Machines!"); + break; + case 1: + aList.add("Tesla-Enables Machines! (BUT LOUDER!!)"); + break; + default: + aList.add("Yeet this broken item into some spicy water!"); + break; + } aList.add(EnumChatFormatting.BLUE + "Use on top of a machine to enable Tesla capabilities"); aList.add(EnumChatFormatting.BLUE + "Who the hell uses cables anyway?"); } + @Override + public String getUnlocalizedName(ItemStack aStack) { + return getUnlocalizedName() + "." + getDamage(aStack); + } + public static void run() { INSTANCE = new TeslaCoilCover(); GameRegistry.registerItem(INSTANCE, INSTANCE.getUnlocalizedName()); + teslaCoilCover.set(INSTANCE); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) { + itemIcon = iconRegister.registerIcon(getIconString()); + ultItemIcon = iconRegister.registerIcon(MODID + ":itemTeslaCoverUltimate"); + } + + @Override + public IIcon getIconFromDamage(int damage) { + if (damage == 1) { + return ultItemIcon; + } + return itemIcon; + } + + @Override + public void getSubItems(Item aItem, CreativeTabs par2CreativeTabs, List aList) { + aList.add(new ItemStack(aItem, 1, 0)); + aList.add(new ItemStack(aItem, 1, 1)); } } diff --git a/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCoverUltimate.java b/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCoverUltimate.java deleted file mode 100644 index 71ef0bd0c8..0000000000 --- a/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCoverUltimate.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.github.technus.tectech.thing.item; - -import com.github.technus.tectech.CommonValues; -import cpw.mods.fml.common.registry.GameRegistry; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; - -import java.util.List; - -import static com.github.technus.tectech.Reference.MODID; - - -public final class TeslaCoilCoverUltimate extends Item { - public static TeslaCoilCoverUltimate INSTANCE; - - public TeslaCoilCoverUltimate() { - setUnlocalizedName("tm.teslaCoilCoverUltimate"); - setTextureName(MODID + ":itemTeslaCoverUltimate"); - } - - @Override - public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) { - aList.add(CommonValues.BASS_MARK); - aList.add("Tesla-Enables Machines! (BUT LOUDER!!)"); - aList.add(EnumChatFormatting.BLUE + "Use on top of a machine to enable Tesla capabilities"); - aList.add(EnumChatFormatting.BLUE + "Who the hell uses cables anyway?"); - } - - public static void run() { - INSTANCE = new TeslaCoilCoverUltimate(); - GameRegistry.registerItem(INSTANCE, INSTANCE.getUnlocalizedName()); - } -} diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index e097c612ba..59a0d720de 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -9,9 +9,6 @@ item.em.frontRotate.name=Front Rotation Scrench item.em.parametrizerMemoryCard.name=Parametrizer Memory Card item.em.EuMeterGT.name=GT EU meter -item.tm.teslaCoilCover.name=Tesla Coil Cover -item.tm.teslaCoilCoverUltimate.name=Tesla Coil Cover Rich Edition - death.attack.microwaving=%1$s was dehydrated by radiation. death.attack.microwaving.player=%1$s was dehydrated by radiation while fighting %2$s. -- cgit From c89ae96bd0b9d8328386511ee0df1920d4f0bcf3 Mon Sep 17 00:00:00 2001 From: Bass Date: Wed, 21 Aug 2019 15:56:13 +0100 Subject: Tesla omnidirectionallity --- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 420 +++++++++++---------- .../single/GT_MetaTileEntity_TeslaCoil.java | 6 +- 2 files changed, 215 insertions(+), 211 deletions(-) (limited to 'src/main/java') 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 ac399aeb0d..5a003f4eec 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 @@ -47,7 +47,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private static Textures.BlockIcons.CustomIcon ScreenON; private int mTier = 0; //Determines max voltage and efficiency (MV to LuV) - private int minTier = 1; //Min tier for efficiency calcuation private int maxTier = 6; //Max tier for efficiency calcuation private float energyEfficiency = 1; @@ -67,30 +66,13 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private long outputCurrentMax = 0; //Tesla current output limited by capacitors //Prevents unnecessary offset calculation - private byte oldRotation; - private byte oldOrientation; - - //Scan range fields - private static int xPosScanMin; - private static int xPosScanMax; - private static int yPosScan0; - private static int yPosScan1; - private static int yPosScan2; - private static int yPosScan3; - private static int yPosScan4; - private static int yPosScan5; - private static int zPosScanMin; - private static int zPosScanMax; - - //Power Transfer Origin - private int xPosZap; - private int yPosZap; - private int zPosZap; - - //Lightning Origin - public int xPosTop; - public int yPosTop; - public int zPosTop; + private byte oldRotation = -1; + private byte oldOrientation = -1; + + //Coordinate Arrays + private int[][] scanPosOffsets = new int[10][3]; + private int[] posZap = new int[3];//Power Transfer Origin + public int[] posTop = new int[3];//Lightning Origin //region structure private static final String[][] shape = new String[][]{//3 16 0 @@ -102,16 +84,16 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock {E, "B000", "B000", "B000", "\u0001", "B000", E, "B000", E, "B000", E, "B000", "\u0001", "B111", " 22222 ",}, {"\u000F", "A ",}, }; - private static final Block[] blockType = new Block[]{sBlockCasingsBA0,sBlockCasingsBA0,sBlockCasingsBA0,sBlockCasingsBA0}; + private static final Block[] blockType = new Block[]{sBlockCasingsBA0, sBlockCasingsBA0, sBlockCasingsBA0, sBlockCasingsBA0}; private static final byte[] blockMetaT0 = new byte[]{7, 0, 6, 8}; private static final byte[] blockMetaT1 = new byte[]{7, 1, 6, 8}; private static final byte[] blockMetaT2 = new byte[]{7, 2, 6, 8}; private static final byte[] blockMetaT3 = new byte[]{7, 3, 6, 8}; private static final byte[] blockMetaT4 = new byte[]{7, 4, 6, 8}; private static final byte[] blockMetaT5 = new byte[]{7, 5, 6, 8}; - private static final byte[][] blockMetas = new byte[][]{blockMetaT0,blockMetaT1,blockMetaT2,blockMetaT3,blockMetaT4,blockMetaT5}; + private static final byte[][] blockMetas = new byte[][]{blockMetaT0, blockMetaT1, blockMetaT2, blockMetaT3, blockMetaT4, blockMetaT5}; private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addCapacitorToMachineList, this::addFrameToMachineList}; - private static final short[] casingTextures = new short[]{(texturePage << 7)+16+6, 0}; + private static final short[] casingTextures = new short[]{(texturePage << 7) + 16 + 6, 0}; private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsBA0, null}; private static final byte[] blockMetaFallback = new byte[]{6, 0}; private static final String[] description = new String[]{ @@ -122,112 +104,114 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock //endregion //region parameters - protected Parameters.Group.ParameterIn popogaSetting,histLowSetting,histHighSetting,transferRadiusTowerSetting,transferRadiusTransceiverSetting,transferRadiusCoverUltimateSetting,outputVoltageSetting,outputCurrentSetting,scanTimeMinSetting,overDriveSetting; - protected Parameters.Group.ParameterOut popogaDisplay,transferRadiusTowerDisplay,transferRadiusTransceiverDisplay,transferRadiusCoverUltimateDisplay,outputVoltageDisplay,outputCurrentDisplay,energyCapacityDisplay,energyStoredDisplay,energyFractionDisplay,scanTimeDisplay; - - private static final INameFunction HYSTERESIS_LOW_SETTING_NAME = (base, p)-> "Hysteresis low setting"; - private static final INameFunction HYSTERESIS_HIGH_SETTING_NAME = (base, p)-> "Hysteresis high setting"; - private static final INameFunction TRANSFER_RADIUS_TOWER_SETTING_NAME = (base, p)-> "Tesla Towers transfer radius setting"; - private static final INameFunction TRANSFER_RADIUS_TRANSCEIVER_SETTING_NAME = (base, p)-> "Tesla Transceiver transfer radius setting"; - private static final INameFunction TRANSFER_RADIUS_COVER_ULTIMATE_SETTING_NAME = (base, p)-> "Tesla Ultimate Cover transfer radius setting"; - private static final INameFunction OUTPUT_VOLTAGE_SETTING_NAME = (base, p)-> "Output voltage setting"; - private static final INameFunction OUTPUT_CURRENT_SETTING_NAME = (base, p)-> "Output current setting"; - private static final INameFunction SCAN_TIME_MIN_SETTING_NAME = (base, p)-> "Scan time Min setting"; - private static final INameFunction OVERDRIVE_SETTING_NAME = (base, p)-> "Overdrive setting"; - private static final INameFunction POPOGA_NAME = (base, p)-> "Unused"; - - private static final INameFunction TRANSFER_RADIUS_TOWER_DISPLAY_NAME = (base, p)-> "Tesla Towers transfer radius display"; - private static final INameFunction TRANSFER_RADIUS_TRANSCEIVER_DISPLAY_NAME = (base, p)-> "Tesla Transceiver transfer radius display"; - private static final INameFunction TRANSFER_RADIUS_COVER_ULTIMATE_DISPLAY_NAME = (base, p)-> "Tesla Ultimate Cover transfer radius display"; - private static final INameFunction OUTPUT_VOLTAGE_DISPLAY_NAME = (base, p)-> "Output voltage display"; - private static final INameFunction OUTPUT_CURRENT_DISPLAY_NAME = (base, p)-> "Output current display"; - private static final INameFunction ENERGY_CAPACITY_DISPLAY_NAME = (base, p)-> "Energy Capacity display"; - private static final INameFunction ENERGY_STORED_DISPLAY_NAME = (base, p)-> "Energy Stored display"; - private static final INameFunction ENERGY_FRACTION_DISPLAY_NAME = (base, p)-> "Energy Fraction display"; - private static final INameFunction SCAN_TIME_DISPLAY_NAME = (base, p)-> "Scan time display"; - - private static final IStatusFunction HYSTERESIS_LOW_STATUS=(base, p)->{ - double value=p.get(); - if(Double.isNaN(value)){return STATUS_WRONG;} - if(value<=0.05) return STATUS_TOO_LOW; - if(value>base.histHighSetting.get()) return STATUS_TOO_HIGH; + protected Parameters.Group.ParameterIn popogaSetting, histLowSetting, histHighSetting, transferRadiusTowerSetting, transferRadiusTransceiverSetting, transferRadiusCoverUltimateSetting, outputVoltageSetting, outputCurrentSetting, scanTimeMinSetting, overDriveSetting; + protected Parameters.Group.ParameterOut popogaDisplay, transferRadiusTowerDisplay, transferRadiusTransceiverDisplay, transferRadiusCoverUltimateDisplay, outputVoltageDisplay, outputCurrentDisplay, energyCapacityDisplay, energyStoredDisplay, energyFractionDisplay, scanTimeDisplay; + + private static final INameFunction HYSTERESIS_LOW_SETTING_NAME = (base, p) -> "Hysteresis low setting"; + private static final INameFunction HYSTERESIS_HIGH_SETTING_NAME = (base, p) -> "Hysteresis high setting"; + private static final INameFunction TRANSFER_RADIUS_TOWER_SETTING_NAME = (base, p) -> "Tesla Towers transfer radius setting"; + private static final INameFunction TRANSFER_RADIUS_TRANSCEIVER_SETTING_NAME = (base, p) -> "Tesla Transceiver transfer radius setting"; + private static final INameFunction TRANSFER_RADIUS_COVER_ULTIMATE_SETTING_NAME = (base, p) -> "Tesla Ultimate Cover transfer radius setting"; + private static final INameFunction OUTPUT_VOLTAGE_SETTING_NAME = (base, p) -> "Output voltage setting"; + private static final INameFunction OUTPUT_CURRENT_SETTING_NAME = (base, p) -> "Output current setting"; + private static final INameFunction SCAN_TIME_MIN_SETTING_NAME = (base, p) -> "Scan time Min setting"; + private static final INameFunction OVERDRIVE_SETTING_NAME = (base, p) -> "Overdrive setting"; + private static final INameFunction POPOGA_NAME = (base, p) -> "Unused"; + + private static final INameFunction TRANSFER_RADIUS_TOWER_DISPLAY_NAME = (base, p) -> "Tesla Towers transfer radius display"; + private static final INameFunction TRANSFER_RADIUS_TRANSCEIVER_DISPLAY_NAME = (base, p) -> "Tesla Transceiver transfer radius display"; + private static final INameFunction TRANSFER_RADIUS_COVER_ULTIMATE_DISPLAY_NAME = (base, p) -> "Tesla Ultimate Cover transfer radius display"; + private static final INameFunction OUTPUT_VOLTAGE_DISPLAY_NAME = (base, p) -> "Output voltage display"; + private static final INameFunction OUTPUT_CURRENT_DISPLAY_NAME = (base, p) -> "Output current display"; + private static final INameFunction ENERGY_CAPACITY_DISPLAY_NAME = (base, p) -> "Energy Capacity display"; + private static final INameFunction ENERGY_STORED_DISPLAY_NAME = (base, p) -> "Energy Stored display"; + private static final INameFunction ENERGY_FRACTION_DISPLAY_NAME = (base, p) -> "Energy Fraction display"; + private static final INameFunction SCAN_TIME_DISPLAY_NAME = (base, p) -> "Scan time display"; + + private static final IStatusFunction HYSTERESIS_LOW_STATUS = (base, p) -> { + double value = p.get(); + if (Double.isNaN(value)) { + return STATUS_WRONG; + } + if (value <= 0.05) return STATUS_TOO_LOW; + if (value > base.histHighSetting.get()) return STATUS_TOO_HIGH; return STATUS_OK; }; - private static final IStatusFunction HYSTERESIS_HIGH_STATUS=(base, p)->{ - double value=p.get(); - if(Double.isNaN(value)) return STATUS_WRONG; - if(value<=base.histLowSetting.get()) return STATUS_TOO_LOW; - if(value>0.95) return STATUS_TOO_HIGH; + private static final IStatusFunction HYSTERESIS_HIGH_STATUS = (base, p) -> { + double value = p.get(); + if (Double.isNaN(value)) return STATUS_WRONG; + if (value <= base.histLowSetting.get()) return STATUS_TOO_LOW; + if (value > 0.95) return STATUS_TOO_HIGH; return STATUS_OK; }; - private static final IStatusFunction TRANSFER_RADIUS_TOWER_STATUS=(base, p)->{ - double value=p.get(); - if(Double.isNaN(value)) return STATUS_WRONG; - value=(int)value; - if(value<0) return STATUS_TOO_LOW; - if(value>40) return STATUS_TOO_HIGH; - if(value<32) return STATUS_LOW; + private static final IStatusFunction TRANSFER_RADIUS_TOWER_STATUS = (base, p) -> { + double value = p.get(); + if (Double.isNaN(value)) return STATUS_WRONG; + value = (int) value; + if (value < 0) return STATUS_TOO_LOW; + if (value > 40) return STATUS_TOO_HIGH; + if (value < 32) return STATUS_LOW; return STATUS_OK; }; - private static final IStatusFunction TRANSFER_RADIUS_TRANSCEIVER_OR_COVER_ULTIMATE_STATUS=(base, p)->{ - double value=p.get(); - if(Double.isNaN(value)) return STATUS_WRONG; - value=(int)value; - if(value<0) return STATUS_TOO_LOW; - if(value>20) return STATUS_TOO_HIGH; - if(value<16) return STATUS_LOW; + private static final IStatusFunction TRANSFER_RADIUS_TRANSCEIVER_OR_COVER_ULTIMATE_STATUS = (base, p) -> { + double value = p.get(); + if (Double.isNaN(value)) return STATUS_WRONG; + value = (int) value; + if (value < 0) return STATUS_TOO_LOW; + if (value > 20) return STATUS_TOO_HIGH; + if (value < 16) return STATUS_LOW; return STATUS_OK; }; - private static final IStatusFunction OUTPUT_VOLTAGE_OR_CURRENT_STATUS=(base, p)->{ - double value=p.get(); - if(Double.isNaN(value)) return STATUS_WRONG; - value=(long)value; - if(value==-1) return STATUS_OK; - if(value<=0) return STATUS_TOO_LOW; + private static final IStatusFunction OUTPUT_VOLTAGE_OR_CURRENT_STATUS = (base, p) -> { + double value = p.get(); + if (Double.isNaN(value)) return STATUS_WRONG; + value = (long) value; + if (value == -1) return STATUS_OK; + if (value <= 0) return STATUS_TOO_LOW; return STATUS_OK; }; - private static final IStatusFunction SCAN_TIME_MIN_STATUS=(base, p)->{ - double value=p.get(); - if(Double.isNaN(value)) return STATUS_WRONG; - value=(int)value; - if(value<100) return STATUS_TOO_LOW; - if(value==100) return STATUS_OK; + private static final IStatusFunction SCAN_TIME_MIN_STATUS = (base, p) -> { + double value = p.get(); + if (Double.isNaN(value)) return STATUS_WRONG; + value = (int) value; + if (value < 100) return STATUS_TOO_LOW; + if (value == 100) return STATUS_OK; return STATUS_HIGH; }; - private static final IStatusFunction OVERDRIVE_STATUS=(base, p)->{ - double value=p.get(); - if(Double.isNaN(value)) return STATUS_WRONG; - value=(int)value; - if(value<0) return STATUS_TOO_LOW; - if(value==0) return STATUS_LOW; + private static final IStatusFunction OVERDRIVE_STATUS = (base, p) -> { + double value = p.get(); + if (Double.isNaN(value)) return STATUS_WRONG; + value = (int) value; + if (value < 0) return STATUS_TOO_LOW; + if (value == 0) return STATUS_LOW; return STATUS_HIGH; }; - private static final IStatusFunction POPOGA_STATUS=(base, p)->{ - if(base.getBaseMetaTileEntity().getWorld().isThundering()){ + private static final IStatusFunction POPOGA_STATUS = (base, p) -> { + if (base.getBaseMetaTileEntity().getWorld().isThundering()) { return STATUS_WTF; } return STATUS_NEUTRAL; }; - private static final IStatusFunction SCAN_TIME_STATUS=(base, p)->{ - double value=p.get(); - if(Double.isNaN(value)) return STATUS_WRONG; - value=(int)value; - if(value==0||value==20||value==40||value==60||value==80) return STATUS_HIGH; + private static final IStatusFunction SCAN_TIME_STATUS = (base, p) -> { + double value = p.get(); + if (Double.isNaN(value)) return STATUS_WRONG; + value = (int) value; + if (value == 0 || value == 20 || value == 40 || value == 60 || value == 80) return STATUS_HIGH; return STATUS_LOW; }; - private static final IStatusFunction POWER_STATUS=(base, p)-> { + private static final IStatusFunction POWER_STATUS = (base, p) -> { double value = p.get(); if (Double.isNaN(value)) return STATUS_WRONG; - value=(long)value; + value = (long) value; if (value > 0) { return STATUS_OK; } else { return STATUS_LOW; } }; - private static final IStatusFunction ENERGY_STATUS=(base, p)->{ - double value=p.get(); - if(Double.isNaN(value)) return STATUS_WRONG; + private static final IStatusFunction ENERGY_STATUS = (base, p) -> { + double value = p.get(); + if (Double.isNaN(value)) return STATUS_WRONG; if (base.energyFractionDisplay.get() > base.histHighSetting.get()) { return STATUS_HIGH; } else if (base.energyFractionDisplay.get() < base.histLowSetting.get()) { @@ -248,58 +232,58 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock @Override protected void parametersInstantiation_EM() { - Parameters.Group hatch_0=parametrization.getGroup(0, true); - Parameters.Group hatch_1=parametrization.getGroup(1, true); - Parameters.Group hatch_2=parametrization.getGroup(2, true); - Parameters.Group hatch_3=parametrization.getGroup(3, true); - Parameters.Group hatch_4=parametrization.getGroup(4, true); - Parameters.Group hatch_5=parametrization.getGroup(5, true); - Parameters.Group hatch_6=parametrization.getGroup(6, true); - Parameters.Group hatch_7=parametrization.getGroup(7, true); - Parameters.Group hatch_8=parametrization.getGroup(8, true); - Parameters.Group hatch_9=parametrization.getGroup(9, true); - - histLowSetting=hatch_0.makeInParameter(0,0.25, HYSTERESIS_LOW_SETTING_NAME,HYSTERESIS_LOW_STATUS); - popogaSetting=hatch_0.makeInParameter(1,0, POPOGA_NAME,POPOGA_STATUS); - histHighSetting=hatch_1.makeInParameter(0,0.75, HYSTERESIS_HIGH_SETTING_NAME,HYSTERESIS_HIGH_STATUS); - popogaSetting=hatch_1.makeInParameter(1,0, POPOGA_NAME,POPOGA_STATUS); - transferRadiusTowerSetting=hatch_2.makeInParameter(0,32, TRANSFER_RADIUS_TOWER_SETTING_NAME,TRANSFER_RADIUS_TOWER_STATUS); - popogaSetting=hatch_2.makeInParameter(1,0, POPOGA_NAME,POPOGA_STATUS); - transferRadiusTransceiverSetting=hatch_3.makeInParameter(0,16, TRANSFER_RADIUS_TRANSCEIVER_SETTING_NAME,TRANSFER_RADIUS_TRANSCEIVER_OR_COVER_ULTIMATE_STATUS); - transferRadiusCoverUltimateSetting=hatch_3.makeInParameter(1,16, TRANSFER_RADIUS_COVER_ULTIMATE_SETTING_NAME,TRANSFER_RADIUS_TRANSCEIVER_OR_COVER_ULTIMATE_STATUS); - outputVoltageSetting=hatch_4.makeInParameter(0,-1, OUTPUT_VOLTAGE_SETTING_NAME,OUTPUT_VOLTAGE_OR_CURRENT_STATUS); - popogaSetting=hatch_4.makeInParameter(1,0, POPOGA_NAME,POPOGA_STATUS); - outputCurrentSetting=hatch_5.makeInParameter(0,-1, OUTPUT_CURRENT_SETTING_NAME,OUTPUT_VOLTAGE_OR_CURRENT_STATUS); - popogaSetting=hatch_5.makeInParameter(1,0, POPOGA_NAME,POPOGA_STATUS); - popogaSetting=hatch_6.makeInParameter(0,0, POPOGA_NAME,POPOGA_STATUS); - popogaSetting=hatch_6.makeInParameter(1,0, POPOGA_NAME,POPOGA_STATUS); - scanTimeMinSetting=hatch_7.makeInParameter(0,100, SCAN_TIME_MIN_SETTING_NAME,SCAN_TIME_MIN_STATUS); - popogaSetting=hatch_7.makeInParameter(1,0, POPOGA_NAME,POPOGA_STATUS); - overDriveSetting=hatch_8.makeInParameter(0,0, OVERDRIVE_SETTING_NAME,OVERDRIVE_STATUS); - popogaSetting=hatch_8.makeInParameter(1,0, POPOGA_NAME,POPOGA_STATUS); - popogaSetting=hatch_9.makeInParameter(0,0, POPOGA_NAME,POPOGA_STATUS); - popogaSetting=hatch_9.makeInParameter(1,0, POPOGA_NAME,POPOGA_STATUS); - - popogaDisplay=hatch_0.makeOutParameter(0,0, POPOGA_NAME,POPOGA_STATUS); - popogaDisplay=hatch_0.makeOutParameter(1,0, POPOGA_NAME,POPOGA_STATUS); - popogaDisplay=hatch_1.makeOutParameter(0,0, POPOGA_NAME,POPOGA_STATUS); - popogaDisplay=hatch_1.makeOutParameter(1,0, POPOGA_NAME,POPOGA_STATUS); - transferRadiusTowerDisplay=hatch_2.makeOutParameter(0,0, TRANSFER_RADIUS_TOWER_DISPLAY_NAME,TRANSFER_RADIUS_TOWER_STATUS); - popogaDisplay=hatch_2.makeOutParameter(1,0, POPOGA_NAME,POPOGA_STATUS); - transferRadiusTransceiverDisplay=hatch_3.makeOutParameter(0,0, TRANSFER_RADIUS_TRANSCEIVER_DISPLAY_NAME,TRANSFER_RADIUS_TRANSCEIVER_OR_COVER_ULTIMATE_STATUS); - transferRadiusCoverUltimateDisplay=hatch_3.makeOutParameter(1,0, TRANSFER_RADIUS_COVER_ULTIMATE_DISPLAY_NAME,TRANSFER_RADIUS_TRANSCEIVER_OR_COVER_ULTIMATE_STATUS); - outputVoltageDisplay=hatch_4.makeOutParameter(0,0, OUTPUT_VOLTAGE_DISPLAY_NAME,POWER_STATUS); - popogaDisplay=hatch_4.makeOutParameter(1,0, POPOGA_NAME,POPOGA_STATUS); - outputCurrentDisplay=hatch_5.makeOutParameter(0,0, OUTPUT_CURRENT_DISPLAY_NAME,POWER_STATUS); - energyCapacityDisplay=hatch_5.makeOutParameter(1,0, ENERGY_CAPACITY_DISPLAY_NAME,ENERGY_STATUS); - energyStoredDisplay=hatch_6.makeOutParameter(0,0, ENERGY_STORED_DISPLAY_NAME,ENERGY_STATUS); - energyFractionDisplay=hatch_6.makeOutParameter(1,0, ENERGY_FRACTION_DISPLAY_NAME,ENERGY_STATUS); - scanTimeDisplay=hatch_7.makeOutParameter(0,0, SCAN_TIME_DISPLAY_NAME,SCAN_TIME_STATUS); - popogaDisplay=hatch_7.makeOutParameter(1,0, POPOGA_NAME,POPOGA_STATUS); - popogaDisplay=hatch_8.makeOutParameter(0,0, POPOGA_NAME,POPOGA_STATUS); - popogaDisplay=hatch_8.makeOutParameter(1,0, POPOGA_NAME,POPOGA_STATUS); - popogaDisplay=hatch_9.makeOutParameter(0,0, POPOGA_NAME,POPOGA_STATUS); - popogaDisplay=hatch_9.makeOutParameter(1,0, POPOGA_NAME,POPOGA_STATUS); + Parameters.Group hatch_0 = parametrization.getGroup(0, true); + Parameters.Group hatch_1 = parametrization.getGroup(1, true); + Parameters.Group hatch_2 = parametrization.getGroup(2, true); + Parameters.Group hatch_3 = parametrization.getGroup(3, true); + Parameters.Group hatch_4 = parametrization.getGroup(4, true); + Parameters.Group hatch_5 = parametrization.getGroup(5, true); + Parameters.Group hatch_6 = parametrization.getGroup(6, true); + Parameters.Group hatch_7 = parametrization.getGroup(7, true); + Parameters.Group hatch_8 = parametrization.getGroup(8, true); + Parameters.Group hatch_9 = parametrization.getGroup(9, true); + + histLowSetting = hatch_0.makeInParameter(0, 0.25, HYSTERESIS_LOW_SETTING_NAME, HYSTERESIS_LOW_STATUS); + popogaSetting = hatch_0.makeInParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + histHighSetting = hatch_1.makeInParameter(0, 0.75, HYSTERESIS_HIGH_SETTING_NAME, HYSTERESIS_HIGH_STATUS); + popogaSetting = hatch_1.makeInParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + transferRadiusTowerSetting = hatch_2.makeInParameter(0, 32, TRANSFER_RADIUS_TOWER_SETTING_NAME, TRANSFER_RADIUS_TOWER_STATUS); + popogaSetting = hatch_2.makeInParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + transferRadiusTransceiverSetting = hatch_3.makeInParameter(0, 16, TRANSFER_RADIUS_TRANSCEIVER_SETTING_NAME, TRANSFER_RADIUS_TRANSCEIVER_OR_COVER_ULTIMATE_STATUS); + transferRadiusCoverUltimateSetting = hatch_3.makeInParameter(1, 16, TRANSFER_RADIUS_COVER_ULTIMATE_SETTING_NAME, TRANSFER_RADIUS_TRANSCEIVER_OR_COVER_ULTIMATE_STATUS); + outputVoltageSetting = hatch_4.makeInParameter(0, -1, OUTPUT_VOLTAGE_SETTING_NAME, OUTPUT_VOLTAGE_OR_CURRENT_STATUS); + popogaSetting = hatch_4.makeInParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + outputCurrentSetting = hatch_5.makeInParameter(0, -1, OUTPUT_CURRENT_SETTING_NAME, OUTPUT_VOLTAGE_OR_CURRENT_STATUS); + popogaSetting = hatch_5.makeInParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + popogaSetting = hatch_6.makeInParameter(0, 0, POPOGA_NAME, POPOGA_STATUS); + popogaSetting = hatch_6.makeInParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + scanTimeMinSetting = hatch_7.makeInParameter(0, 100, SCAN_TIME_MIN_SETTING_NAME, SCAN_TIME_MIN_STATUS); + popogaSetting = hatch_7.makeInParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + overDriveSetting = hatch_8.makeInParameter(0, 0, OVERDRIVE_SETTING_NAME, OVERDRIVE_STATUS); + popogaSetting = hatch_8.makeInParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + popogaSetting = hatch_9.makeInParameter(0, 0, POPOGA_NAME, POPOGA_STATUS); + popogaSetting = hatch_9.makeInParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + + popogaDisplay = hatch_0.makeOutParameter(0, 0, POPOGA_NAME, POPOGA_STATUS); + popogaDisplay = hatch_0.makeOutParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + popogaDisplay = hatch_1.makeOutParameter(0, 0, POPOGA_NAME, POPOGA_STATUS); + popogaDisplay = hatch_1.makeOutParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + transferRadiusTowerDisplay = hatch_2.makeOutParameter(0, 0, TRANSFER_RADIUS_TOWER_DISPLAY_NAME, TRANSFER_RADIUS_TOWER_STATUS); + popogaDisplay = hatch_2.makeOutParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + transferRadiusTransceiverDisplay = hatch_3.makeOutParameter(0, 0, TRANSFER_RADIUS_TRANSCEIVER_DISPLAY_NAME, TRANSFER_RADIUS_TRANSCEIVER_OR_COVER_ULTIMATE_STATUS); + transferRadiusCoverUltimateDisplay = hatch_3.makeOutParameter(1, 0, TRANSFER_RADIUS_COVER_ULTIMATE_DISPLAY_NAME, TRANSFER_RADIUS_TRANSCEIVER_OR_COVER_ULTIMATE_STATUS); + outputVoltageDisplay = hatch_4.makeOutParameter(0, 0, OUTPUT_VOLTAGE_DISPLAY_NAME, POWER_STATUS); + popogaDisplay = hatch_4.makeOutParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + outputCurrentDisplay = hatch_5.makeOutParameter(0, 0, OUTPUT_CURRENT_DISPLAY_NAME, POWER_STATUS); + energyCapacityDisplay = hatch_5.makeOutParameter(1, 0, ENERGY_CAPACITY_DISPLAY_NAME, ENERGY_STATUS); + energyStoredDisplay = hatch_6.makeOutParameter(0, 0, ENERGY_STORED_DISPLAY_NAME, ENERGY_STATUS); + energyFractionDisplay = hatch_6.makeOutParameter(1, 0, ENERGY_FRACTION_DISPLAY_NAME, ENERGY_STATUS); + scanTimeDisplay = hatch_7.makeOutParameter(0, 0, SCAN_TIME_DISPLAY_NAME, SCAN_TIME_STATUS); + popogaDisplay = hatch_7.makeOutParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + popogaDisplay = hatch_8.makeOutParameter(0, 0, POPOGA_NAME, POPOGA_STATUS); + popogaDisplay = hatch_8.makeOutParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + popogaDisplay = hatch_9.makeOutParameter(0, 0, POPOGA_NAME, POPOGA_STATUS); + popogaDisplay = hatch_9.makeOutParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); } @Override @@ -318,26 +302,26 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock @Override public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); - aNBT.setLong("eEnergyCapacity",energyCapacity); + aNBT.setLong("eEnergyCapacity", energyCapacity); } @Override public void loadNBTData(NBTTagCompound aNBT) { super.loadNBTData(aNBT); - energyCapacity=aNBT.getLong("eEnergyCapacity"); + energyCapacity = aNBT.getLong("eEnergyCapacity"); } private long getEnergyEfficiency(long voltage, int distance, boolean overDriveToggle) { if (overDriveToggle) { - return (long)((voltage * 2) - (voltage * Math.pow(overdriveEfficiency, distance))); + return (long) ((voltage * 2) - (voltage * Math.pow(overdriveEfficiency, distance))); } else { - return (long)(voltage * Math.pow(energyEfficiency, distance)); + return (long) (voltage * Math.pow(energyEfficiency, distance)); } } - private float getRangeMulti(int mTier, int vTier){ + private float getRangeMulti(int mTier, int vTier) { //Over-tiered coils will add +25% range - if (vTier > mTier){ + if (vTier > mTier) { return 1.25F; } return 1F; @@ -351,9 +335,9 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock @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][16+6], new TT_RenderedTexture(aActive ? ScreenON : ScreenOFF)}; + return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][16 + 6], new TT_RenderedTexture(aActive ? ScreenON : ScreenOFF)}; } - return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][16+6]}; + return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][16 + 6]}; } @Override @@ -403,33 +387,31 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock //Calculate coordinates of the middle bottom xyzOffsets = getTranslatedOffsets(0, 0, 2); - xPosZap = iGregTechTileEntity.getXCoord() + xyzOffsets[0]; - yPosZap = iGregTechTileEntity.getYCoord() + xyzOffsets[1]; - zPosZap = iGregTechTileEntity.getZCoord() + xyzOffsets[2]; + posZap[0] = iGregTechTileEntity.getXCoord() + xyzOffsets[0]; + posZap[1] = iGregTechTileEntity.getYCoord() + xyzOffsets[1]; + posZap[2] = iGregTechTileEntity.getZCoord() + xyzOffsets[2]; //Calculate coordinates of the top sphere xyzOffsets = getTranslatedOffsets(0, -14, 2); - xPosTop = iGregTechTileEntity.getXCoord() + xyzOffsets[0]; - yPosTop = iGregTechTileEntity.getYCoord() + xyzOffsets[1]; - zPosTop = iGregTechTileEntity.getZCoord() + xyzOffsets[2]; + posTop[0] = iGregTechTileEntity.getXCoord() + xyzOffsets[0]; + posTop[1] = iGregTechTileEntity.getYCoord() + xyzOffsets[1]; + posTop[2] = iGregTechTileEntity.getZCoord() + xyzOffsets[2]; //Calculate offsets for scanning - xyzOffsets = getTranslatedOffsets(40, 0, 43); - xPosScanMin = xPosZap + xyzOffsets[0]; - yPosScan0 = yPosZap + xyzOffsets[1]; - zPosScanMin = zPosZap + xyzOffsets[2]; - xyzOffsets = getTranslatedOffsets(-40, -4, -37); - yPosScan1 = yPosZap + xyzOffsets[1]; - xyzOffsets = getTranslatedOffsets(-40, -8, -37); - yPosScan2 = yPosZap + xyzOffsets[1]; - xyzOffsets = getTranslatedOffsets(-40, -12, -37); - yPosScan3 = yPosZap + xyzOffsets[1]; - xyzOffsets = getTranslatedOffsets(-40, -16, -37); - yPosScan4 = yPosZap + xyzOffsets[1]; - xyzOffsets = getTranslatedOffsets(-40, -20, -37); - xPosScanMax = xPosZap + xyzOffsets[0]; - yPosScan5 = yPosZap + xyzOffsets[1]; - zPosScanMax = zPosZap + xyzOffsets[2]; + scanPosOffsets[0] = getTranslatedOffsets(40, 0, 43); + scanPosOffsets[1] = getTranslatedOffsets(-40, -4, -37); + + scanPosOffsets[2] = getTranslatedOffsets(40, -5, 43); + scanPosOffsets[3] = getTranslatedOffsets(-40, -8, -37); + + scanPosOffsets[4] = getTranslatedOffsets(40, -9, 43); + scanPosOffsets[5] = getTranslatedOffsets(-40, -12, -37); + + scanPosOffsets[6] = getTranslatedOffsets(40, -13, 43); + scanPosOffsets[7] = getTranslatedOffsets(-40, -16, -37); + + scanPosOffsets[8] = getTranslatedOffsets(40, -17, 43); + scanPosOffsets[9] = getTranslatedOffsets(-40, -20, -37); } return true; } @@ -483,7 +465,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } //Calculate Efficiency values - energyEfficiency = map(mTier + 1, minTier, maxTier, minEfficiency, maxEfficiency); + energyEfficiency = map(mTier + 1, 1, maxTier, minEfficiency, maxEfficiency); overdriveEfficiency = energyEfficiency - overdriveEfficiencyExtra; energyCapacity = 0; @@ -517,24 +499,46 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock return true; } - private void scanForTransmissionTargets(IGregTechTileEntity mte, int xMin, int yMin, int zMin, int xMax, int yMax, int zMax){ - int mX = mte.getXCoord(); - int mY = mte.getYCoord(); - int mZ = mte.getZCoord(); + private void scanForTransmissionTargets(int[] coordsMin, int[] coordsMax) { + int xMin = coordsMin[0]; + int yMin = coordsMin[1]; + int zMin = coordsMin[2]; + + int xMax = coordsMax[0]; + int yMax = coordsMax[1]; + int zMax = coordsMax[2]; + + if (xMin > xMax) { + int xMax2 = xMin; + xMin = xMax; + xMax = xMax2; + } + + if (yMin > yMax) { + int yMax2 = yMin; + yMin = yMax; + yMax = yMax2; + } + + if (zMin > zMax) { + int zMax2 = zMin; + zMin = zMax; + zMax = zMax2; + } for (int xPos = xMin; xPos <= xMax; xPos++) { for (int yPos = yMin; yPos <= yMax; yPos++) { for (int zPos = zMin; zPos <= zMax; zPos++) { - if (mX == xPos && mY == yPos && mZ == zPos) { + if (xPos == 0 && yPos == 0 && zPos == 0) { continue; } - IGregTechTileEntity node = getBaseMetaTileEntity().getIGregTechTileEntity(xPos,yPos,zPos); + IGregTechTileEntity node = getBaseMetaTileEntity().getIGregTechTileEntityOffset(xPos, yPos, zPos); if (node == null) { continue; } IMetaTileEntity nodeInside = node.getMetaTileEntity(); if (nodeInside instanceof GT_MetaTileEntity_TeslaCoil || nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive() || (node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil)) { - eTeslaMap.put(node, (int) Math.ceil(Math.sqrt(Math.pow(xPos,2) + Math.pow(yPos,2) + Math.pow(zPos,2)))); + eTeslaMap.put(node, (int) Math.ceil(Math.sqrt(Math.pow(xPos, 2) + Math.pow(yPos, 2) + Math.pow(zPos, 2)))); } } } @@ -543,13 +547,13 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } private void thaumLightning(IGregTechTileEntity mte, IGregTechTileEntity node) { - byte xR = (byte)(node.getXCoord() - xPosTop); - byte yR = (byte)(node.getYCoord() - yPosTop); - byte zR = (byte)(node.getZCoord() - zPosTop); + byte xR = (byte)(node.getXCoord() - posTop[0]); + byte yR = (byte)(node.getYCoord() - posTop[1]); + byte zR = (byte)(node.getZCoord() - posTop[2]); int wID = mte.getWorld().provider.dimensionId; - sparkList.add(new Util.thaumSpark(xPosTop,yPosTop,zPosTop,xR,yR,zR,wID)); + sparkList.add(new Util.thaumSpark(posTop[0],posTop[1],posTop[2],xR,yR,zR,wID)); } @Override @@ -601,23 +605,23 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock switch (scanTime) { case 0: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets(mte, xPosScanMin, yPosScan0, zPosScanMin, xPosScanMax, yPosScan1 - 1, zPosScanMax); + scanForTransmissionTargets(scanPosOffsets[0],scanPosOffsets[1]); break; case 20: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets(mte, xPosScanMin, yPosScan1, zPosScanMin, xPosScanMax, yPosScan2 - 1, zPosScanMax); + scanForTransmissionTargets(scanPosOffsets[2],scanPosOffsets[3]); break; case 40: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets(mte, xPosScanMin, yPosScan2, zPosScanMin, xPosScanMax, yPosScan3 - 1, zPosScanMax); + scanForTransmissionTargets(scanPosOffsets[4],scanPosOffsets[5]); break; case 60: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets(mte, xPosScanMin, yPosScan3, zPosScanMin, xPosScanMax, yPosScan4 - 1, zPosScanMax); + scanForTransmissionTargets(scanPosOffsets[6],scanPosOffsets[7]); break; case 80: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets(mte, xPosScanMin, yPosScan4, zPosScanMin, xPosScanMax, yPosScan5, zPosScanMax); + scanForTransmissionTargets(scanPosOffsets[8],scanPosOffsets[9]); break; default: if (scanTime == (int) scanTimeMinSetting.get() - 1) { @@ -635,9 +639,9 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock int tY = node.getYCoord(); int tZ = node.getZCoord(); - int tXN = xPosZap; - int tYN = yPosZap; - int tZN = zPosZap; + int tXN = posZap[0]; + int tYN = posZap[1]; + int tZN = posZap[2]; int tOffset = (int) Math.ceil(Math.sqrt(Math.pow(tX - tXN, 2) + Math.pow(tY - tYN, 2) + Math.pow(tZ - tZN, 2))); teslaCoil.eTeslaMap.put(mte, tOffset); 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 4285f2b6f3..74a1834818 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 @@ -184,9 +184,9 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB IMetaTileEntity nodeInside = node.getMetaTileEntity(); if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil) { GT_MetaTileEntity_TM_teslaCoil nodeTesla = (GT_MetaTileEntity_TM_teslaCoil) nodeInside; - xR = (byte) (nodeTesla.xPosTop - x); - yR = (byte) (nodeTesla.yPosTop - y); - zR = (byte) (nodeTesla.zPosTop - z); + xR = (byte) (nodeTesla.posTop[0] - x); + yR = (byte) (nodeTesla.posTop[1] - y); + zR = (byte) (nodeTesla.posTop[2] - z); } else { xR = (byte) (node.getXCoord() - x); yR = (byte) (node.getYCoord() - y); -- cgit From 2c6b970fec478026cbd6e70b6d4364134d17fdc4 Mon Sep 17 00:00:00 2001 From: Bass Date: Wed, 21 Aug 2019 16:41:27 +0100 Subject: Tesla Winding Components --- .../technus/tectech/loader/thing/ThingsLoader.java | 3 + .../technus/tectech/thing/CustomItemList.java | 2 +- .../tectech/thing/item/TeslaCoilComponent.java | 72 +++++++++++++++++++ .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 79 ++++++++------------- .../tectech/textures/items/itemTeslaComponent.png | Bin 0 -> 482 bytes .../textures/items/itemTeslaComponentUltimate.png | Bin 0 -> 492 bytes 6 files changed, 107 insertions(+), 49 deletions(-) create mode 100644 src/main/java/com/github/technus/tectech/thing/item/TeslaCoilComponent.java create mode 100644 src/main/resources/assets/tectech/textures/items/itemTeslaComponent.png create mode 100644 src/main/resources/assets/tectech/textures/items/itemTeslaComponentUltimate.png (limited to 'src/main/java') 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 6a12c640f3..6aa238df49 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 @@ -61,6 +61,9 @@ public class ThingsLoader implements Runnable { TeslaCoilCapacitor.run(); TecTech.LOGGER.info("Useful Items registered"); + TeslaCoilComponent.run(); + TecTech.LOGGER.info("Crafting Components registered"); + ElementalDefinitionContainer_EM.run(); DebugElementalInstanceContainer_EM.run(); TecTech.LOGGER.info("Debug Items registered"); 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 8bbb8fd4ce..9ea92f507a 100644 --- a/src/main/java/com/github/technus/tectech/thing/CustomItemList.java +++ b/src/main/java/com/github/technus/tectech/thing/CustomItemList.java @@ -92,7 +92,7 @@ public enum CustomItemList implements IItemContainer { Machine_Multi_BHG, hint_0,hint_1,hint_2,hint_3,hint_4,hint_5,hint_6,hint_7,hint_8,hint_9,hint_10,hint_11, hint_general,hint_air,hint_noAir,hint_error, - scanContainer,parametrizerMemory,teslaCapacitor,teslaCoilCover, + scanContainer,parametrizerMemory,teslaCapacitor,teslaCoilCover,teslaComponent, Machine_TeslaCoil_LV_1A, Machine_TeslaCoil_MV_1A, Machine_TeslaCoil_HV_1A, Machine_TeslaCoil_EV_1A, Machine_TeslaCoil_IV_1A, Machine_TeslaCoil_LV_4A, Machine_TeslaCoil_MV_4A, Machine_TeslaCoil_HV_4A, Machine_TeslaCoil_EV_4A, Machine_TeslaCoil_IV_4A, 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 new file mode 100644 index 0000000000..32b75ebce7 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilComponent.java @@ -0,0 +1,72 @@ +package com.github.technus.tectech.thing.item; + +import com.github.technus.tectech.CommonValues; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.util.GT_LanguageManager; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; + +import java.util.List; + +import static com.github.technus.tectech.Reference.MODID; +import static com.github.technus.tectech.thing.CustomItemList.teslaComponent; + + +public final class TeslaCoilComponent extends Item { + public static TeslaCoilComponent INSTANCE; + private static IIcon ultItemIcon; + + private TeslaCoilComponent() { + setHasSubtypes(true); + setUnlocalizedName("tm.itemTeslaComponent"); + setTextureName(MODID + ":itemTeslaComponent"); + + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Electrum Tesla Windings"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Superconductive Tesla Windings"); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) { + aList.add(CommonValues.BASS_MARK); + aList.add(EnumChatFormatting.BLUE + "Tesla bois need these!"); + } + + @Override + public String getUnlocalizedName(ItemStack aStack) { + return getUnlocalizedName() + "." + getDamage(aStack); + } + + public static void run() { + INSTANCE = new TeslaCoilComponent(); + GameRegistry.registerItem(INSTANCE, INSTANCE.getUnlocalizedName()); + teslaComponent.set(INSTANCE); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) { + itemIcon = iconRegister.registerIcon(getIconString()); + ultItemIcon = iconRegister.registerIcon(MODID + ":itemTeslaComponentUltimate"); + } + + @Override + public IIcon getIconFromDamage(int damage) { + if (damage == 1) { + return ultItemIcon; + } + return itemIcon; + } + + @Override + public void getSubItems(Item aItem, CreativeTabs par2CreativeTabs, List aList) { + aList.add(new ItemStack(aItem, 1, 0)); + aList.add(new ItemStack(aItem, 1, 1)); + } +} 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 5a003f4eec..df8f44b133 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 @@ -420,7 +420,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock @Override public void construct(int stackSize, boolean hintsOnly) { - StructureBuilderExtreme(shape, blockType, blockMetas[(stackSize-1)%6], 3, 16, 0, getBaseMetaTileEntity(), this, hintsOnly); + StructureBuilderExtreme(shape, blockType, blockMetas[(stackSize - 1) % 6], 3, 16, 0, getBaseMetaTileEntity(), this, hintsOnly); } @Override @@ -440,14 +440,14 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock @Override public boolean checkRecipe_EM(ItemStack itemStack) { - if (!histHighSetting.getStatus(false).isOk|| - !histLowSetting.getStatus(false).isOk|| - !transferRadiusTowerSetting.getStatus(false).isOk|| - !transferRadiusTransceiverSetting.getStatus(false).isOk|| - !transferRadiusCoverUltimateSetting.getStatus(false).isOk|| - !outputVoltageSetting.getStatus(false).isOk|| - !outputCurrentSetting.getStatus(false).isOk|| - !scanTimeMinSetting.getStatus(false).isOk|| + if (!histHighSetting.getStatus(false).isOk || + !histLowSetting.getStatus(false).isOk || + !transferRadiusTowerSetting.getStatus(false).isOk || + !transferRadiusTransceiverSetting.getStatus(false).isOk || + !transferRadiusCoverUltimateSetting.getStatus(false).isOk || + !outputVoltageSetting.getStatus(false).isOk || + !outputCurrentSetting.getStatus(false).isOk || + !scanTimeMinSetting.getStatus(false).isOk || !overDriveSetting.getStatus(false).isOk ) return false; @@ -471,15 +471,15 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock energyCapacity = 0; outputCurrentMax = 0; - if(vTier < 0){ + if (vTier < 0) { //Returning true to allow for 'passive running' outputVoltageMax = 0; return true; - } else if (vTier > mTier && getEUVar() > 0){ + } else if (vTier > mTier && getEUVar() > 0) { explodeMultiblock(); } - outputVoltageMax = V[vTier+1]; + outputVoltageMax = V[vTier + 1]; for (GT_MetaTileEntity_Hatch_Capacitor cap : eCapacitorHatches) { if (!GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { continue; @@ -487,7 +487,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock cap.getBaseMetaTileEntity().setActive(true); capacitorData = cap.getCapacitors(); if (capacitorData[0] < vTier) { - if(getEUVar() > 0 && capacitorData[0] != 0){ + if (getEUVar() > 0 && capacitorData[0] != 0) { cap.getBaseMetaTileEntity().setToFire(); } eCapacitorHatches.remove(cap); @@ -500,31 +500,14 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } private void scanForTransmissionTargets(int[] coordsMin, int[] coordsMax) { - int xMin = coordsMin[0]; - int yMin = coordsMin[1]; - int zMin = coordsMin[2]; - - int xMax = coordsMax[0]; - int yMax = coordsMax[1]; - int zMax = coordsMax[2]; - - if (xMin > xMax) { - int xMax2 = xMin; - xMin = xMax; - xMax = xMax2; - } - - if (yMin > yMax) { - int yMax2 = yMin; - yMin = yMax; - yMax = yMax2; - } - - if (zMin > zMax) { - int zMax2 = zMin; - zMin = zMax; - zMax = zMax2; - } + //This makes sure the minimums are actually smaller than the maximums + int xMin = coordsMin[0] < coordsMax[0] ? coordsMin[0] : coordsMax[0]; + int yMin = coordsMin[1] < coordsMax[1] ? coordsMin[1] : coordsMax[1]; + int zMin = coordsMin[2] < coordsMax[2] ? coordsMin[2] : coordsMax[2]; + //And vice versa + int xMax = coordsMin[0] > coordsMax[0] ? coordsMin[0] : coordsMax[0]; + int yMax = coordsMin[1] > coordsMax[1] ? coordsMin[1] : coordsMax[1]; + int zMax = coordsMin[2] > coordsMax[2] ? coordsMin[2] : coordsMax[2]; for (int xPos = xMin; xPos <= xMax; xPos++) { for (int yPos = yMin; yPos <= yMax; yPos++) { @@ -547,13 +530,13 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } private void thaumLightning(IGregTechTileEntity mte, IGregTechTileEntity node) { - byte xR = (byte)(node.getXCoord() - posTop[0]); - byte yR = (byte)(node.getYCoord() - posTop[1]); - byte zR = (byte)(node.getZCoord() - posTop[2]); + byte xR = (byte) (node.getXCoord() - posTop[0]); + byte yR = (byte) (node.getYCoord() - posTop[1]); + byte zR = (byte) (node.getZCoord() - posTop[2]); int wID = mte.getWorld().provider.dimensionId; - sparkList.add(new Util.thaumSpark(posTop[0],posTop[1],posTop[2],xR,yR,zR,wID)); + sparkList.add(new Util.thaumSpark(posTop[0], posTop[1], posTop[2], xR, yR, zR, wID)); } @Override @@ -605,23 +588,23 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock switch (scanTime) { case 0: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets(scanPosOffsets[0],scanPosOffsets[1]); + scanForTransmissionTargets(scanPosOffsets[0], scanPosOffsets[1]); break; case 20: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets(scanPosOffsets[2],scanPosOffsets[3]); + scanForTransmissionTargets(scanPosOffsets[2], scanPosOffsets[3]); break; case 40: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets(scanPosOffsets[4],scanPosOffsets[5]); + scanForTransmissionTargets(scanPosOffsets[4], scanPosOffsets[5]); break; case 60: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets(scanPosOffsets[6],scanPosOffsets[7]); + scanForTransmissionTargets(scanPosOffsets[6], scanPosOffsets[7]); break; case 80: scanTimeDisplay.updateStatus(); - scanForTransmissionTargets(scanPosOffsets[8],scanPosOffsets[9]); + scanForTransmissionTargets(scanPosOffsets[8], scanPosOffsets[9]); break; default: if (scanTime == (int) scanTimeMinSetting.get() - 1) { @@ -845,4 +828,4 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } return false; } -} +} \ No newline at end of file diff --git a/src/main/resources/assets/tectech/textures/items/itemTeslaComponent.png b/src/main/resources/assets/tectech/textures/items/itemTeslaComponent.png new file mode 100644 index 0000000000..77441e2b21 Binary files /dev/null and b/src/main/resources/assets/tectech/textures/items/itemTeslaComponent.png differ diff --git a/src/main/resources/assets/tectech/textures/items/itemTeslaComponentUltimate.png b/src/main/resources/assets/tectech/textures/items/itemTeslaComponentUltimate.png new file mode 100644 index 0000000000..8a19f7a142 Binary files /dev/null and b/src/main/resources/assets/tectech/textures/items/itemTeslaComponentUltimate.png differ -- cgit From 26d3d327a09d4ab2f8670acb21f30db720bbd281 Mon Sep 17 00:00:00 2001 From: Bass Date: Wed, 21 Aug 2019 17:30:03 +0100 Subject: Minor Enum refactors --- .../java/com/github/technus/tectech/loader/thing/MachineLoader.java | 2 +- src/main/java/com/github/technus/tectech/thing/CustomItemList.java | 4 ++-- .../com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java') 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 f44c4f6634..3fb8550c5b 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 @@ -518,7 +518,7 @@ public class MachineLoader implements Runnable { Machine_Multi_Computer.set(new GT_MetaTileEntity_EM_computer(15311, "multimachine.em.computer", "Quantum Computer").getStackForm(1L)); Machine_Multi_Microwave.set(new GT_MetaTileEntity_TM_microwave(15312, "multimachine.tm.microwave", "Microwave Grinder").getStackForm(1L)); Machine_Multi_DataBank.set(new GT_MetaTileEntity_EM_dataBank(15313, "multimachine.em.databank", "Data Bank").getStackForm(1L)); - Machine_Multi_teslaCoil.set(new GT_MetaTileEntity_TM_teslaCoil(15314, "multimachine.tm.teslaCoil", "Tesla Coil").getStackForm(1L)); + Machine_Multi_TeslaCoil.set(new GT_MetaTileEntity_TM_teslaCoil(15314, "multimachine.tm.teslaCoil", "Tesla Tower").getStackForm(1L)); Machine_Multi_EMjunction.set(new GT_MetaTileEntity_EM_junction(15320, "multimachine.em.junction", "Matter Junction").getStackForm(1L)); Machine_Multi_MatterToEM.set(new GT_MetaTileEntity_EM_quantizer(15321, "multimachine.em.mattertoem", "Matter Quantizer").getStackForm(1L)); 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 9ea92f507a..e763bd4179 100644 --- a/src/main/java/com/github/technus/tectech/thing/CustomItemList.java +++ b/src/main/java/com/github/technus/tectech/thing/CustomItemList.java @@ -78,9 +78,9 @@ public enum CustomItemList implements IItemContainer { eM_Containment, eM_Containment_Field, eM_Containment_Advanced, eM_Coil, eM_Teleportation, eM_Dimensional, eM_Ultimate_Containment, eM_Ultimate_Containment_Advanced, eM_Ultimate_Containment_Field, eM_Spacetime, eM_Computer_Casing, eM_Computer_Bus, eM_Computer_Vent, eM_Hollow, eM_Power, debugBlock, - tM_TeslaBase, tM_TeslaToroid, tM_TeslaFrame, tM_TeslaPrimary_0, tM_TeslaPrimary_1, tM_TeslaPrimary_2, tM_TeslaPrimary_3, tM_TeslaPrimary_4, tM_TeslaPrimary_5, + tM_TeslaBase, tM_TeslaToroid, tM_TeslaSecondary, tM_TeslaPrimary_0, tM_TeslaPrimary_1, tM_TeslaPrimary_2, tM_TeslaPrimary_3, tM_TeslaPrimary_4, tM_TeslaPrimary_5, - Machine_Multi_Microwave, Machine_Multi_teslaCoil, + Machine_Multi_Microwave, Machine_Multi_TeslaCoil, Machine_Multi_Transformer, Machine_Multi_Computer, Machine_Multi_Switch, Machine_Multi_Research, Machine_Multi_DataBank, Machine_Multi_MatterToEM, Machine_Multi_EMToMatter, Machine_Multi_EMjunction, Machine_Multi_Scanner, diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java index 9c6fdc1765..6d5bcd2b04 100644 --- a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java @@ -63,7 +63,7 @@ public class GT_Block_CasingsBA0 extends GT_Block_Casings_Abstract { CustomItemList.tM_TeslaBase.set(new ItemStack(this, 1, 6)); CustomItemList.tM_TeslaToroid.set(new ItemStack(this, 1, 7)); - CustomItemList.tM_TeslaFrame.set(new ItemStack(this, 1, 8)); + CustomItemList.tM_TeslaSecondary.set(new ItemStack(this, 1, 8)); } @Override -- cgit From 673427b3abde1821dbf476ee23f0e3622b5900ad Mon Sep 17 00:00:00 2001 From: Bass Date: Thu, 22 Aug 2019 14:20:02 +0100 Subject: Recipes (ultra beta version) --- .../dreamcraft/DreamCraftRecipeLoader.java | 69 ++++++++++++++++++++-- 1 file changed, 65 insertions(+), 4 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java index 79c776f911..eae1121d80 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java +++ b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java @@ -71,8 +71,6 @@ public class DreamCraftRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silver, 8) }, Materials.Polytetrafluoroethylene.getMolten(144), CustomItemList.DATApipe.get(1), 200, 30720); - //endregion - //Tunnel addAssemblerRecipeWithCleanroom(new ItemStack[]{ CustomItemList.DATApipe.get(1), @@ -90,7 +88,7 @@ public class DreamCraftRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Osmiridium, 2) }, null, CustomItemList.LASERpipe.get(1), 100, 500000); - //endregoin + //endregion //region casing @@ -417,6 +415,70 @@ public class DreamCraftRecipeLoader implements Runnable { //region multi blocks + //Tesla Coil + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + CustomItemList.tM_TeslaSecondary.get(6), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 4), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 4), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.AnnealedCopper, 16), + ItemList.Upgrade_Overclocker.get(4), + }, Materials.Copper.getMolten(576), CustomItemList.Machine_Multi_TeslaCoil.get(1), 800, 480); + + //Tesla Winding Components + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 4), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.NickelZincFerrite, 1), + }, Materials.Epoxid.getMolten(18), CustomItemList.teslaComponent.getWithDamage(1,0), 320, 30); + + //Tesla Winding Components Ultimate + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUV,4), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.NickelZincFerrite, 1), + }, Materials.Polytetrafluoroethylene.getMolten(18), CustomItemList.teslaComponent.getWithDamage(1,1), 320, 7680); + + //Tesla Secondary Windings + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + CustomItemList.teslaComponent.getWithDamage(64,0), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.StainlessSteel, 1), + com.dreammaster.item.ItemList.MicaInsulatorFoil.getIS(12) + }, Materials.Silver.getMolten(144), CustomItemList.tM_TeslaSecondary.get(1), 200, 120); + + //Tesla Primary Coils T0 + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.RedstoneAlloy, 8), + com.dreammaster.item.ItemList.MicaInsulatorFoil.getIS(8) + }, Materials.RedAlloy.getMolten(144), CustomItemList.tM_TeslaPrimary_0.get(1), 200, 30); + + //Tesla Primary Coils T1 + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorMV, 8), + com.dreammaster.item.ItemList.MicaInsulatorFoil.getIS(12) + }, Materials.RedAlloy.getMolten(144), CustomItemList.tM_TeslaPrimary_1.get(1), 200, 120); + + //Tesla Primary Coils T2 + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorHV, 8), + com.dreammaster.item.ItemList.MicaInsulatorFoil.getIS(16) + }, Materials.RedAlloy.getMolten(144), CustomItemList.tM_TeslaPrimary_2.get(1), 200, 480); + + //Tesla Primary Coils T3 + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorEV, 8), + com.dreammaster.item.ItemList.MicaInsulatorFoil.getIS(20) + }, Materials.RedAlloy.getMolten(144), CustomItemList.tM_TeslaPrimary_3.get(1), 200, 1920); + + //Tesla Primary Coils T4 + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorIV, 8), + com.dreammaster.item.ItemList.MicaInsulatorFoil.getIS(24) + }, Materials.RedAlloy.getMolten(144), CustomItemList.tM_TeslaPrimary_4.get(1), 200, 7680); + + //Tesla Primary Coils T5 + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorLuV, 8), + com.dreammaster.item.ItemList.MicaInsulatorFoil.getIS(28) + }, Materials.RedAlloy.getMolten(144), CustomItemList.tM_TeslaPrimary_5.get(1), 200, 30720); + //Microwave Grinder GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Machine_HV_Microwave.get(1), @@ -431,7 +493,6 @@ public class DreamCraftRecipeLoader implements Runnable { getItemContainer("WetTransformer_ZPM_LuV").get(1), getItemContainer("HighEnergyFlowCircuit").get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt01, getOrDefault("SuperconductorLuV",Materials.Superconductor), 16), - ItemList.valueOf("Circuit_Chip_UHPIC").get(2), }, Materials.TungstenSteel.getMolten(576), CustomItemList.Machine_Multi_Transformer.get(1), 400, 30720); //Network Switch -- cgit From 635e177d06c3b4d50e46978bc8ff30dcd8c3cd4f Mon Sep 17 00:00:00 2001 From: Bass Date: Thu, 22 Aug 2019 20:02:13 +0100 Subject: Ultra Uber Unlimited Unusable Recipe Commit --- .../dreamcraft/DreamCraftRecipeLoader.java | 131 ++++++++++++--------- .../tectech/loader/recipe/BloodyRecipeLoader.java | 73 ++++++++++-- .../tectech/thing/casing/GT_Item_CasingsBA0.java | 2 +- 3 files changed, 142 insertions(+), 64 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java index eae1121d80..d51f317975 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java +++ b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java @@ -168,8 +168,71 @@ public class DreamCraftRecipeLoader implements Runnable { getOrDefault("Trinium",Materials.Osmium).getMolten(1296), }, CustomItemList.eM_Coil.get(4), 800, 2000000); - //endregion + //Tesla Base + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NickelZincFerrite, 6), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.NickelZincFerrite, 1) + }, null, CustomItemList.tM_TeslaBase.get(1), 50, 16); + GT_ModHandler.addCraftingRecipe(CustomItemList.tM_TeslaBase.get(1), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[]{"PhP","PFP","PwP", + 'P', OrePrefixes.plate.get(Materials.NickelZincFerrite), + 'F', OrePrefixes.frameGt.get(Materials.NickelZincFerrite)}); + + //Tesla Toroid + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 6), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Aluminium, 1) + }, null, CustomItemList.tM_TeslaToroid.get(1), 50, 16); + GT_ModHandler.addCraftingRecipe(CustomItemList.tM_TeslaToroid.get(1), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[]{"PhP","PFP","PwP", + 'P', OrePrefixes.foil.get(Materials.Aluminium), + 'F', OrePrefixes.frameGt.get(Materials.Aluminium)}); + + //Tesla Secondary Windings + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + CustomItemList.teslaComponent.getWithDamage(8,0), + com.dreammaster.item.ItemList.MicaInsulatorFoil.getIS(12) + }, Materials.Silver.getMolten(144), CustomItemList.tM_TeslaSecondary.get(1), 200, 120); + + //Tesla Primary Coils T0 + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.RedstoneAlloy, 8), + com.dreammaster.item.ItemList.MicaInsulatorFoil.getIS(8) + }, Materials.RedAlloy.getMolten(144), CustomItemList.tM_TeslaPrimary_0.get(1), 200, 30); + + //Tesla Primary Coils T1 + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorMV, 8), + com.dreammaster.item.ItemList.MicaInsulatorFoil.getIS(12) + }, Materials.Magnesium.getMolten(144), CustomItemList.tM_TeslaPrimary_1.get(1), 200, 120); + + //Tesla Primary Coils T2 + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorHV, 8), + com.dreammaster.item.ItemList.MicaInsulatorFoil.getIS(16) + }, Materials.Barium.getMolten(144), CustomItemList.tM_TeslaPrimary_2.get(1), 200, 480); + + //Tesla Primary Coils T3 + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorEV, 8), + com.dreammaster.item.ItemList.MicaInsulatorFoil.getIS(20) + }, Materials.Platinum.getMolten(144), CustomItemList.tM_TeslaPrimary_3.get(1), 200, 1920); + //Tesla Primary Coils T4 + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorIV, 8), + com.dreammaster.item.ItemList.MicaInsulatorFoil.getIS(24) + }, Materials.Vanadium.getMolten(144), CustomItemList.tM_TeslaPrimary_4.get(1), 200, 7680); + + //Tesla Primary Coils T5 + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorLuV, 8), + com.dreammaster.item.ItemList.MicaInsulatorFoil.getIS(28) + }, Materials.Indium.getMolten(144), CustomItemList.tM_TeslaPrimary_5.get(1), 50, 30720); + + //endregion //region hatches @@ -412,72 +475,28 @@ public class DreamCraftRecipeLoader implements Runnable { //endregion - //region multi blocks - //Tesla Coil + //Tesla Winding Components (ADD BLOOD VARIANT) GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.tM_TeslaSecondary.get(6), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 4), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 4), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.AnnealedCopper, 16), - ItemList.Upgrade_Overclocker.get(4), - }, Materials.Copper.getMolten(576), CustomItemList.Machine_Multi_TeslaCoil.get(1), 800, 480); - - //Tesla Winding Components - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 4), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.NickelZincFerrite, 1), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 32), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.NickelZincFerrite, 8), }, Materials.Epoxid.getMolten(18), CustomItemList.teslaComponent.getWithDamage(1,0), 320, 30); - //Tesla Winding Components Ultimate + //Tesla Winding Components Ultimate (ADD BLOOD VARIANT) GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUV,4), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.NickelZincFerrite, 1), }, Materials.Polytetrafluoroethylene.getMolten(18), CustomItemList.teslaComponent.getWithDamage(1,1), 320, 7680); - //Tesla Secondary Windings - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.teslaComponent.getWithDamage(64,0), - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.StainlessSteel, 1), - com.dreammaster.item.ItemList.MicaInsulatorFoil.getIS(12) - }, Materials.Silver.getMolten(144), CustomItemList.tM_TeslaSecondary.get(1), 200, 120); - - //Tesla Primary Coils T0 + //Tesla Coil (ADD BLOOD VARIANT) GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.RedstoneAlloy, 8), - com.dreammaster.item.ItemList.MicaInsulatorFoil.getIS(8) - }, Materials.RedAlloy.getMolten(144), CustomItemList.tM_TeslaPrimary_0.get(1), 200, 30); - - //Tesla Primary Coils T1 - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorMV, 8), - com.dreammaster.item.ItemList.MicaInsulatorFoil.getIS(12) - }, Materials.RedAlloy.getMolten(144), CustomItemList.tM_TeslaPrimary_1.get(1), 200, 120); - - //Tesla Primary Coils T2 - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorHV, 8), - com.dreammaster.item.ItemList.MicaInsulatorFoil.getIS(16) - }, Materials.RedAlloy.getMolten(144), CustomItemList.tM_TeslaPrimary_2.get(1), 200, 480); - - //Tesla Primary Coils T3 - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorEV, 8), - com.dreammaster.item.ItemList.MicaInsulatorFoil.getIS(20) - }, Materials.RedAlloy.getMolten(144), CustomItemList.tM_TeslaPrimary_3.get(1), 200, 1920); - - //Tesla Primary Coils T4 - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorIV, 8), - com.dreammaster.item.ItemList.MicaInsulatorFoil.getIS(24) - }, Materials.RedAlloy.getMolten(144), CustomItemList.tM_TeslaPrimary_4.get(1), 200, 7680); - - //Tesla Primary Coils T5 - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorLuV, 8), - com.dreammaster.item.ItemList.MicaInsulatorFoil.getIS(28) - }, Materials.RedAlloy.getMolten(144), CustomItemList.tM_TeslaPrimary_5.get(1), 200, 30720); + CustomItemList.tM_TeslaSecondary.get(6), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 4), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 4), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.AnnealedCopper, 16), + ItemList.Upgrade_Overclocker.get(4), + }, Materials.Copper.getMolten(576), CustomItemList.Machine_Multi_TeslaCoil.get(1), 800, 480); //Microwave Grinder GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ diff --git a/src/main/java/com/github/technus/tectech/loader/recipe/BloodyRecipeLoader.java b/src/main/java/com/github/technus/tectech/loader/recipe/BloodyRecipeLoader.java index 89b6eb1a56..02dc1a794e 100644 --- a/src/main/java/com/github/technus/tectech/loader/recipe/BloodyRecipeLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/recipe/BloodyRecipeLoader.java @@ -39,8 +39,6 @@ public class BloodyRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Silver, 6) }, Materials.Polytetrafluoroethylene.getMolten(144), CustomItemList.DATApipe.get(1), 200, 30720); - //endregion - //Tunnel GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ CustomItemList.DATApipe.get(1), @@ -57,9 +55,8 @@ public class BloodyRecipeLoader implements Runnable { GT_ModHandler.getIC2Item("reinforcedGlass", 1L), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Osmium, 2) }, null, CustomItemList.LASERpipe.get(1), 100, 500000); - - //endregoin + //endregion //region casing @@ -139,8 +136,71 @@ public class BloodyRecipeLoader implements Runnable { Materials.Americium.getMolten(1296), }, CustomItemList.eM_Coil.get(4), 800, 2000000); - //endregion + //Tesla Base + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NickelZincFerrite, 6), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.NickelZincFerrite, 1) + }, null, CustomItemList.tM_TeslaBase.get(1), 50, 16); + GT_ModHandler.addCraftingRecipe(CustomItemList.tM_TeslaBase.get(1), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[]{"PhP","PFP","PwP", + 'P', OrePrefixes.plate.get(Materials.NickelZincFerrite), + 'F', OrePrefixes.frameGt.get(Materials.NickelZincFerrite)}); + + //Tesla Toroid + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 6), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Aluminium, 1) + }, null, CustomItemList.tM_TeslaToroid.get(1), 50, 16); + GT_ModHandler.addCraftingRecipe(CustomItemList.tM_TeslaToroid.get(1), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[]{"PhP","PFP","PwP", + 'P', OrePrefixes.foil.get(Materials.Aluminium), + 'F', OrePrefixes.frameGt.get(Materials.Aluminium)}); + + //Tesla Secondary Windings + GT_ModHandler.addCraftingRecipe(CustomItemList.tM_TeslaSecondary.get(1), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[]{"WWW","WwW","WWW", + 'W', CustomItemList.teslaComponent.getWithDamage(1,0)}); + + //Tesla Primary Coils T0 + GT_ModHandler.addCraftingRecipe(CustomItemList.tM_TeslaPrimary_0.get(1), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[]{"WWW","WwW","WWW", + 'W', OrePrefixes.wireGt02.get(Materials.RedstoneAlloy)}); + + //Tesla Primary Coils T1 + GT_ModHandler.addCraftingRecipe(CustomItemList.tM_TeslaPrimary_1.get(1), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[]{"WWW","WwW","WWW", + 'W', OrePrefixes.wireGt02.get(Materials.SuperconductorMV)}); + + //Tesla Primary Coils T2 + GT_ModHandler.addCraftingRecipe(CustomItemList.tM_TeslaPrimary_2.get(1), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[]{"WWW","WwW","WWW", + 'W', OrePrefixes.wireGt02.get(Materials.SuperconductorHV)}); + + //Tesla Primary Coils T3 + GT_ModHandler.addCraftingRecipe(CustomItemList.tM_TeslaPrimary_3.get(1), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[]{"WWW","WwW","WWW", + 'W', OrePrefixes.wireGt02.get(Materials.SuperconductorEV)}); + + //Tesla Primary Coils T4 + GT_ModHandler.addCraftingRecipe(CustomItemList.tM_TeslaPrimary_4.get(1), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[]{"WWW","WwW","WWW", + 'W', OrePrefixes.wireGt02.get(Materials.SuperconductorIV)}); + + //Tesla Primary Coils T5 + GT_ModHandler.addCraftingRecipe(CustomItemList.tM_TeslaPrimary_5.get(1), + GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[]{"WWW","WwW","WWW", + 'W', OrePrefixes.wireGt02.get(Materials.SuperconductorLuV)}); + //endregion //region hatches @@ -538,8 +598,7 @@ public class BloodyRecipeLoader implements Runnable { }, Materials.Osmiridium.getMolten(1296), CustomItemList.eM_muffler_UV.get(1), 800, 500000); //endregion - - + //region multiblocks //Microwave Grinder 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 bb3a68a960..7decce34ae 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 @@ -52,7 +52,7 @@ public class GT_Item_CasingsBA0 extends GT_Item_Casings_Abstract { aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "it's alive, IT'S ALIVE!"); break; case 7://"Tesla Toroid Casing" - aList.add("A shell for your coils"); + aList.add("Made out of the finest tin foil!"); aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Faraday suits might come later"); break; case 8://"Tesla Secondary Windings" -- cgit From 306459bc9ee83725dbcc408c7ef9b4ab69dbc5dd Mon Sep 17 00:00:00 2001 From: Bass Date: Fri, 23 Aug 2019 10:41:54 +0100 Subject: Recipes & Refactors Refactors to match GT5u Naming conventions Recipes for Tesla transceivers --- .../dreamcraft/DreamCraftRecipeLoader.java | 372 ++++++++++++++++++++- .../tectech/loader/recipe/BloodyRecipeLoader.java | 365 +++++++++++++++++++- .../tectech/loader/thing/MachineLoader.java | 46 +-- .../technus/tectech/thing/CustomItemList.java | 8 +- .../single/GT_MetaTileEntity_TeslaCoil.java | 16 + 5 files changed, 767 insertions(+), 40 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java index d51f317975..c4f39373f0 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java +++ b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java @@ -475,13 +475,7 @@ public class DreamCraftRecipeLoader implements Runnable { //endregion - //region multi blocks - - //Tesla Winding Components (ADD BLOOD VARIANT) - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 32), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.NickelZincFerrite, 8), - }, Materials.Epoxid.getMolten(18), CustomItemList.teslaComponent.getWithDamage(1,0), 320, 30); + //region multiblocks //Tesla Winding Components Ultimate (ADD BLOOD VARIANT) GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ @@ -489,14 +483,14 @@ public class DreamCraftRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.ring, Materials.NickelZincFerrite, 1), }, Materials.Polytetrafluoroethylene.getMolten(18), CustomItemList.teslaComponent.getWithDamage(1,1), 320, 7680); - //Tesla Coil (ADD BLOOD VARIANT) + //Tesla Coil GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.tM_TeslaSecondary.get(6), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 4), + GT_ModHandler.getIC2Item("teslaCoil", 1), + CustomItemList.tM_TeslaSecondary.get(4), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NickelZincFerrite, 4), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 4), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.AnnealedCopper, 16), ItemList.Upgrade_Overclocker.get(4), - }, Materials.Copper.getMolten(576), CustomItemList.Machine_Multi_TeslaCoil.get(1), 800, 480); + }, Materials.Silver.getMolten(576), CustomItemList.Machine_Multi_TeslaCoil.get(1), 800, 480); //Microwave Grinder GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ @@ -1171,6 +1165,360 @@ public class DreamCraftRecipeLoader implements Runnable { } //endregion + //region singleblocks + + //Tesla Transceiver LV 1A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_LV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_1by1_LV.get(1), 400, 30); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_LV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_1by1_LV.get(1), 400, 30); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_LV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_1by1_LV.get(1), 400, 30); + + //Tesla Transceiver MV 1A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_MV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_1by1_MV.get(1), 400, 120); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_MV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_1by1_MV.get(1), 400, 120); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_MV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_1by1_MV.get(1), 400, 120); + + //Tesla Transceiver HV 1A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_HV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_1by1_HV.get(1), 400, 480); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_HV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_1by1_HV.get(1), 400, 480); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_HV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_1by1_HV.get(1), 400, 480); + + //Tesla Transceiver EV 1A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_EV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_1by1_EV.get(1), 400, 1920); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_EV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_1by1_EV.get(1), 400, 1920); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_EV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_1by1_EV.get(1), 400, 1920); + + //Tesla Transceiver IV 1A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_IV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_1by1_IV.get(1), 400, 7680); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_IV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_1by1_IV.get(1), 400, 7680); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_IV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_1by1_IV.get(1), 400, 7680); + + //Tesla Transceiver LV 4A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_LV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_2by2_LV.get(1), 400, 30); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_LV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_2by2_LV.get(1), 400, 30); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_LV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_2by2_LV.get(1), 400, 30); + + //Tesla Transceiver MV 4A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_MV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_2by2_MV.get(1), 400, 120); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_MV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_2by2_MV.get(1), 400, 120); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_MV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_2by2_MV.get(1), 400, 120); + + //Tesla Transceiver HV 4A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_HV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_2by2_HV.get(1), 400, 480); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_HV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_2by2_HV.get(1), 400, 480); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_HV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_2by2_HV.get(1), 400, 480); + + //Tesla Transceiver EV 4A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_EV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_2by2_EV.get(1), 400, 1920); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_EV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_2by2_EV.get(1), 400, 1920); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_EV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_2by2_EV.get(1), 400, 1920); + + //Tesla Transceiver IV 4A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_IV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_2by2_IV.get(1), 400, 7680); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_IV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_2by2_IV.get(1), 400, 7680); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_IV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_2by2_IV.get(1), 400, 7680); + + //Tesla Transceiver LV 9A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_LV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_3by3_LV.get(1), 400, 30); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_LV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_3by3_LV.get(1), 400, 30); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_LV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_3by3_LV.get(1), 400, 30); + + //Tesla Transceiver MV 9A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_MV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_3by3_MV.get(1), 400, 120); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_LV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_3by3_MV.get(1), 400, 120); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_MV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_3by3_MV.get(1), 400, 120); + + //Tesla Transceiver HV 9A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_HV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_3by3_HV.get(1), 400, 480); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_HV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_3by3_HV.get(1), 400, 480); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_HV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_3by3_HV.get(1), 400, 480); + + //Tesla Transceiver EV 9A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_EV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_3by3_EV.get(1), 400, 1920); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_EV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_3by3_EV.get(1), 400, 1920); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_EV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_3by3_EV.get(1), 400, 1920); + + //Tesla Transceiver IV 9A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_IV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_3by3_IV.get(1), 400, 7680); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_IV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_3by3_IV.get(1), 400, 7680); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_IV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_3by3_IV.get(1), 400, 7680); + + //Tesla Transceiver LV 16A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_LV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_4by4_LV.get(1), 400, 30); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_LV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_4by4_LV.get(1), 400, 30); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_LV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_4by4_LV.get(1), 400, 30); + + //Tesla Transceiver MV 16A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_MV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_4by4_MV.get(1), 400, 120); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_MV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_4by4_MV.get(1), 400, 120); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_MV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_4by4_MV.get(1), 400, 120); + + //Tesla Transceiver HV 16A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_HV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_4by4_HV.get(1), 400, 480); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_HV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_4by4_HV.get(1), 400, 480); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_HV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_4by4_HV.get(1), 400, 480); + + //Tesla Transceiver EV 16A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_EV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_4by4_EV.get(1), 400, 1920); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_EV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_4by4_EV.get(1), 400, 1920); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_EV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_4by4_EV.get(1), 400, 1920); + + //Tesla Transceiver IV 16A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_IV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_4by4_IV.get(1), 400, 7680); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_IV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_4by4_IV.get(1), 400, 7680); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_IV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_4by4_IV.get(1), 400, 7680); + + //endregion + + //region crafting components + + //Tesla Winding Components + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 32), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.NickelZincFerrite, 8), + }, Materials.Epoxid.getMolten(288), CustomItemList.teslaComponent.getWithDamage(1,0), 320, 30); + + //endregion + register_machine_EM_behaviours(); } diff --git a/src/main/java/com/github/technus/tectech/loader/recipe/BloodyRecipeLoader.java b/src/main/java/com/github/technus/tectech/loader/recipe/BloodyRecipeLoader.java index 02dc1a794e..7eb46d0551 100644 --- a/src/main/java/com/github/technus/tectech/loader/recipe/BloodyRecipeLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/recipe/BloodyRecipeLoader.java @@ -598,9 +598,18 @@ public class BloodyRecipeLoader implements Runnable { }, Materials.Osmiridium.getMolten(1296), CustomItemList.eM_muffler_UV.get(1), 800, 500000); //endregion - + //region multiblocks + //Tesla Coil + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_ModHandler.getIC2Item("teslaCoil", 1), + CustomItemList.tM_TeslaSecondary.get(4), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NickelZincFerrite, 4), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 4), + ItemList.Upgrade_Overclocker.get(4), + }, Materials.Silver.getMolten(576), CustomItemList.Machine_Multi_TeslaCoil.get(1), 800, 480); + //Microwave Grinder GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Machine_HV_Microwave.get(1), @@ -767,6 +776,360 @@ public class BloodyRecipeLoader implements Runnable { //endregion + //region singleblocks + + //Tesla Transceiver LV 1A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_LV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_1by1_LV.get(1), 400, 30); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_LV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_1by1_LV.get(1), 400, 30); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_LV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_1by1_LV.get(1), 400, 30); + + //Tesla Transceiver MV 1A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_MV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_1by1_MV.get(1), 400, 120); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_MV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_1by1_MV.get(1), 400, 120); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_MV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_1by1_MV.get(1), 400, 120); + + //Tesla Transceiver HV 1A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_HV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_1by1_HV.get(1), 400, 480); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_HV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_1by1_HV.get(1), 400, 480); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_HV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_1by1_HV.get(1), 400, 480); + + //Tesla Transceiver EV 1A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_EV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_1by1_EV.get(1), 400, 1920); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_EV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_1by1_EV.get(1), 400, 1920); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_EV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_1by1_EV.get(1), 400, 1920); + + //Tesla Transceiver IV 1A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_IV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_1by1_IV.get(1), 400, 7680); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_IV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_1by1_IV.get(1), 400, 7680); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_1by1_IV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_1by1_IV.get(1), 400, 7680); + + //Tesla Transceiver LV 4A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_LV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_2by2_LV.get(1), 400, 30); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_LV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_2by2_LV.get(1), 400, 30); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_LV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_2by2_LV.get(1), 400, 30); + + //Tesla Transceiver MV 4A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_MV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_2by2_MV.get(1), 400, 120); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_MV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_2by2_MV.get(1), 400, 120); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_MV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_2by2_MV.get(1), 400, 120); + + //Tesla Transceiver HV 4A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_HV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_2by2_HV.get(1), 400, 480); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_HV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_2by2_HV.get(1), 400, 480); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_HV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_2by2_HV.get(1), 400, 480); + + //Tesla Transceiver EV 4A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_EV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_2by2_EV.get(1), 400, 1920); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_EV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_2by2_EV.get(1), 400, 1920); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_EV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_2by2_EV.get(1), 400, 1920); + + //Tesla Transceiver IV 4A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_IV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_2by2_IV.get(1), 400, 7680); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_IV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_2by2_IV.get(1), 400, 7680); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_2by2_IV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_2by2_IV.get(1), 400, 7680); + + //Tesla Transceiver LV 9A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_LV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_3by3_LV.get(1), 400, 30); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_LV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_3by3_LV.get(1), 400, 30); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_LV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_3by3_LV.get(1), 400, 30); + + //Tesla Transceiver MV 9A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_MV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_3by3_MV.get(1), 400, 120); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_LV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_3by3_MV.get(1), 400, 120); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_MV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_3by3_MV.get(1), 400, 120); + + //Tesla Transceiver HV 9A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_HV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_3by3_HV.get(1), 400, 480); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_HV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_3by3_HV.get(1), 400, 480); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_HV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_3by3_HV.get(1), 400, 480); + + //Tesla Transceiver EV 9A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_EV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_3by3_EV.get(1), 400, 1920); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_EV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_3by3_EV.get(1), 400, 1920); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_EV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_3by3_EV.get(1), 400, 1920); + + //Tesla Transceiver IV 9A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_IV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_3by3_IV.get(1), 400, 7680); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_IV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_3by3_IV.get(1), 400, 7680); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_3by3_IV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_3by3_IV.get(1), 400, 7680); + + //Tesla Transceiver LV 16A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_LV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_4by4_LV.get(1), 400, 30); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_LV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_4by4_LV.get(1), 400, 30); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_LV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_4by4_LV.get(1), 400, 30); + + //Tesla Transceiver MV 16A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_MV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_4by4_MV.get(1), 400, 120); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_MV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_4by4_MV.get(1), 400, 120); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_MV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_4by4_MV.get(1), 400, 120); + + //Tesla Transceiver HV 16A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_HV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_4by4_HV.get(1), 400, 480); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_HV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_4by4_HV.get(1), 400, 480); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_HV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_4by4_HV.get(1), 400, 480); + + //Tesla Transceiver EV 16A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_EV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_4by4_EV.get(1), 400, 1920); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_EV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_4by4_EV.get(1), 400, 1920); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_EV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_4by4_EV.get(1), 400, 1920); + + //Tesla Transceiver IV 16A + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_IV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Lead.getMolten(576), + CustomItemList.Machine_TeslaCoil_4by4_IV.get(1), 400, 7680); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_IV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.Tin.getMolten(288), + CustomItemList.Machine_TeslaCoil_4by4_IV.get(1), 400, 7680); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Battery_Buffer_4by4_IV.get(1), + CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + Materials.SolderingAlloy.getMolten(144), + CustomItemList.Machine_TeslaCoil_4by4_IV.get(1), 400, 7680); + + //endregion + + //region crafting components + + //Tesla Winding Components + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 32), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.NickelZincFerrite, 8), + }, Materials.Epoxid.getMolten(288), CustomItemList.teslaComponent.getWithDamage(1,0), 320, 30); + + //endregion + //ha trafos //if(Loader.isModLoaded(Reference.GTPLUSPLUS)){ // GT_Values.RA.addAssemblerRecipe(CustomItemList.HA) 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 3fb8550c5b..00cad864bf 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 @@ -600,29 +600,29 @@ public class MachineLoader implements Runnable { // Tesla Transceiver // =================================================================================================== - Machine_TeslaCoil_LV_1A.set(new GT_MetaTileEntity_TeslaCoil(16000, "machine.tt.tesla.01", "Basic Tesla Transceiver", 1,1).getStackForm(1L)); - Machine_TeslaCoil_MV_1A.set(new GT_MetaTileEntity_TeslaCoil(16001, "machine.tt.tesla.02", "Advanced Tesla Transceiver", 2, 1).getStackForm(1L)); - Machine_TeslaCoil_HV_1A.set(new GT_MetaTileEntity_TeslaCoil(16002, "machine.tt.tesla.03", "Epyc Tesla Transceiver", 3, 1).getStackForm(1L)); - Machine_TeslaCoil_EV_1A.set(new GT_MetaTileEntity_TeslaCoil(16003, "machine.tt.tesla.04", "Ultimate Power Tesla Transceiver", 4, 1).getStackForm(1L)); - Machine_TeslaCoil_IV_1A.set(new GT_MetaTileEntity_TeslaCoil(16004, "machine.tt.tesla.05", "Insane Tesla Transceiver", 5, 1).getStackForm(1L)); - - Machine_TeslaCoil_LV_4A.set(new GT_MetaTileEntity_TeslaCoil(16005, "machine.tt.tesla.01", "Basic Tesla Transceiver", 1,4).getStackForm(1L)); - Machine_TeslaCoil_MV_4A.set(new GT_MetaTileEntity_TeslaCoil(16006, "machine.tt.tesla.02", "Advanced Tesla Transceiver", 2, 4).getStackForm(1L)); - Machine_TeslaCoil_HV_4A.set(new GT_MetaTileEntity_TeslaCoil(16007, "machine.tt.tesla.03", "Epyc Tesla Transceiver", 3, 4).getStackForm(1L)); - Machine_TeslaCoil_EV_4A.set(new GT_MetaTileEntity_TeslaCoil(16008, "machine.tt.tesla.04", "Ultimate Power Tesla Transceiver", 4, 4).getStackForm(1L)); - Machine_TeslaCoil_IV_4A.set(new GT_MetaTileEntity_TeslaCoil(16009, "machine.tt.tesla.05", "Insane Tesla Transceiver", 5, 4).getStackForm(1L)); - - Machine_TeslaCoil_LV_9A.set(new GT_MetaTileEntity_TeslaCoil(16010, "machine.tt.tesla.01", "Basic Tesla Transceiver", 1,9).getStackForm(1L)); - Machine_TeslaCoil_MV_9A.set(new GT_MetaTileEntity_TeslaCoil(16011, "machine.tt.tesla.02", "Advanced Tesla Transceiver", 2, 9).getStackForm(1L)); - Machine_TeslaCoil_HV_9A.set(new GT_MetaTileEntity_TeslaCoil(16012, "machine.tt.tesla.03", "Epyc Tesla Transceiver", 3, 9).getStackForm(1L)); - Machine_TeslaCoil_EV_9A.set(new GT_MetaTileEntity_TeslaCoil(16013, "machine.tt.tesla.04", "Ultimate Power Tesla Transceiver", 4, 9).getStackForm(1L)); - Machine_TeslaCoil_IV_9A.set(new GT_MetaTileEntity_TeslaCoil(16014, "machine.tt.tesla.05", "Insane Tesla Transceiver", 5, 9).getStackForm(1L)); - - Machine_TeslaCoil_LV_16A.set(new GT_MetaTileEntity_TeslaCoil(16015, "machine.tt.tesla.01", "Basic Tesla Transceiver", 1,16).getStackForm(1L)); - Machine_TeslaCoil_MV_16A.set(new GT_MetaTileEntity_TeslaCoil(16016, "machine.tt.tesla.02", "Advanced Tesla Transceiver", 2, 16).getStackForm(1L)); - Machine_TeslaCoil_HV_16A.set(new GT_MetaTileEntity_TeslaCoil(16017, "machine.tt.tesla.03", "Epyc Tesla Transceiver", 3, 16).getStackForm(1L)); - Machine_TeslaCoil_EV_16A.set(new GT_MetaTileEntity_TeslaCoil(16018, "machine.tt.tesla.04", "Ultimate Power Tesla Transceiver", 4, 16).getStackForm(1L)); - Machine_TeslaCoil_IV_16A.set(new GT_MetaTileEntity_TeslaCoil(16019, "machine.tt.tesla.05", "Insane Tesla Transceiver", 5, 16).getStackForm(1L)); + Machine_TeslaCoil_1by1_LV.set(new GT_MetaTileEntity_TeslaCoil(16000, "machine.tt.tesla.01", "Basic Tesla Transceiver", 1,1).getStackForm(1L)); + Machine_TeslaCoil_1by1_MV.set(new GT_MetaTileEntity_TeslaCoil(16001, "machine.tt.tesla.02", "Advanced Tesla Transceiver", 2, 1).getStackForm(1L)); + Machine_TeslaCoil_1by1_HV.set(new GT_MetaTileEntity_TeslaCoil(16002, "machine.tt.tesla.03", "Epyc Tesla Transceiver", 3, 1).getStackForm(1L)); + Machine_TeslaCoil_1by1_EV.set(new GT_MetaTileEntity_TeslaCoil(16003, "machine.tt.tesla.04", "Ultimate Power Tesla Transceiver", 4, 1).getStackForm(1L)); + Machine_TeslaCoil_1by1_IV.set(new GT_MetaTileEntity_TeslaCoil(16004, "machine.tt.tesla.05", "Insane Tesla Transceiver", 5, 1).getStackForm(1L)); + + Machine_TeslaCoil_2by2_LV.set(new GT_MetaTileEntity_TeslaCoil(16005, "machine.tt.tesla.01", "Basic Tesla Transceiver", 1,4).getStackForm(1L)); + Machine_TeslaCoil_2by2_MV.set(new GT_MetaTileEntity_TeslaCoil(16006, "machine.tt.tesla.02", "Advanced Tesla Transceiver", 2, 4).getStackForm(1L)); + Machine_TeslaCoil_2by2_HV.set(new GT_MetaTileEntity_TeslaCoil(16007, "machine.tt.tesla.03", "Epyc Tesla Transceiver", 3, 4).getStackForm(1L)); + Machine_TeslaCoil_2by2_EV.set(new GT_MetaTileEntity_TeslaCoil(16008, "machine.tt.tesla.04", "Ultimate Power Tesla Transceiver", 4, 4).getStackForm(1L)); + Machine_TeslaCoil_2by2_IV.set(new GT_MetaTileEntity_TeslaCoil(16009, "machine.tt.tesla.05", "Insane Tesla Transceiver", 5, 4).getStackForm(1L)); + + Machine_TeslaCoil_3by3_LV.set(new GT_MetaTileEntity_TeslaCoil(16010, "machine.tt.tesla.01", "Basic Tesla Transceiver", 1,9).getStackForm(1L)); + Machine_TeslaCoil_3by3_MV.set(new GT_MetaTileEntity_TeslaCoil(16011, "machine.tt.tesla.02", "Advanced Tesla Transceiver", 2, 9).getStackForm(1L)); + Machine_TeslaCoil_3by3_HV.set(new GT_MetaTileEntity_TeslaCoil(16012, "machine.tt.tesla.03", "Epyc Tesla Transceiver", 3, 9).getStackForm(1L)); + Machine_TeslaCoil_3by3_EV.set(new GT_MetaTileEntity_TeslaCoil(16013, "machine.tt.tesla.04", "Ultimate Power Tesla Transceiver", 4, 9).getStackForm(1L)); + Machine_TeslaCoil_3by3_IV.set(new GT_MetaTileEntity_TeslaCoil(16014, "machine.tt.tesla.05", "Insane Tesla Transceiver", 5, 9).getStackForm(1L)); + + Machine_TeslaCoil_4by4_LV.set(new GT_MetaTileEntity_TeslaCoil(16015, "machine.tt.tesla.01", "Basic Tesla Transceiver", 1,16).getStackForm(1L)); + Machine_TeslaCoil_4by4_MV.set(new GT_MetaTileEntity_TeslaCoil(16016, "machine.tt.tesla.02", "Advanced Tesla Transceiver", 2, 16).getStackForm(1L)); + Machine_TeslaCoil_4by4_HV.set(new GT_MetaTileEntity_TeslaCoil(16017, "machine.tt.tesla.03", "Epyc Tesla Transceiver", 3, 16).getStackForm(1L)); + Machine_TeslaCoil_4by4_EV.set(new GT_MetaTileEntity_TeslaCoil(16018, "machine.tt.tesla.04", "Ultimate Power Tesla Transceiver", 4, 16).getStackForm(1L)); + Machine_TeslaCoil_4by4_IV.set(new GT_MetaTileEntity_TeslaCoil(16019, "machine.tt.tesla.05", "Insane Tesla Transceiver", 5, 16).getStackForm(1L)); // =================================================================================================== // Debug Stuff 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 e763bd4179..766aca565f 100644 --- a/src/main/java/com/github/technus/tectech/thing/CustomItemList.java +++ b/src/main/java/com/github/technus/tectech/thing/CustomItemList.java @@ -94,10 +94,10 @@ public enum CustomItemList implements IItemContainer { scanContainer,parametrizerMemory,teslaCapacitor,teslaCoilCover,teslaComponent, - Machine_TeslaCoil_LV_1A, Machine_TeslaCoil_MV_1A, Machine_TeslaCoil_HV_1A, Machine_TeslaCoil_EV_1A, Machine_TeslaCoil_IV_1A, - Machine_TeslaCoil_LV_4A, Machine_TeslaCoil_MV_4A, Machine_TeslaCoil_HV_4A, Machine_TeslaCoil_EV_4A, Machine_TeslaCoil_IV_4A, - Machine_TeslaCoil_LV_9A, Machine_TeslaCoil_MV_9A, Machine_TeslaCoil_HV_9A, Machine_TeslaCoil_EV_9A, Machine_TeslaCoil_IV_9A, - Machine_TeslaCoil_LV_16A, Machine_TeslaCoil_MV_16A, Machine_TeslaCoil_HV_16A, Machine_TeslaCoil_EV_16A, Machine_TeslaCoil_IV_16A; + Machine_TeslaCoil_1by1_LV, Machine_TeslaCoil_1by1_MV, Machine_TeslaCoil_1by1_HV, Machine_TeslaCoil_1by1_EV, Machine_TeslaCoil_1by1_IV, + Machine_TeslaCoil_2by2_LV, Machine_TeslaCoil_2by2_MV, Machine_TeslaCoil_2by2_HV, Machine_TeslaCoil_2by2_EV, Machine_TeslaCoil_2by2_IV, + Machine_TeslaCoil_3by3_LV, Machine_TeslaCoil_3by3_MV, Machine_TeslaCoil_3by3_HV, Machine_TeslaCoil_3by3_EV, Machine_TeslaCoil_3by3_IV, + Machine_TeslaCoil_4by4_LV, Machine_TeslaCoil_4by4_MV, Machine_TeslaCoil_4by4_HV, Machine_TeslaCoil_4by4_EV, Machine_TeslaCoil_4by4_IV; private ItemStack mStack; private boolean mHasNotBeenSet = true; 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 74a1834818..b144902824 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 @@ -1,5 +1,6 @@ package com.github.technus.tectech.thing.metaTileEntity.single; +import com.github.technus.tectech.CommonValues; import com.github.technus.tectech.TecTech; import com.github.technus.tectech.Util; import com.github.technus.tectech.loader.NetworkDispatcher; @@ -15,7 +16,10 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicBatteryBuffer; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.EnumChatFormatting; +import org.apache.commons.lang3.ArrayUtils; +import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.Map; @@ -70,6 +74,18 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB super(aName, aTier, aDescription, aTextures, aSlotCount); } + @Override + public String[] getDescription() { + String[] jargon = new String[3]; + jargon[0] = CommonValues.BASS_MARK; + jargon[1] = "Your Tesla I/O machine of choice"; + jargon[2] = EnumChatFormatting.AQUA + "Lightning stoves for the rich"; + String[] sDesc = super.getDescription(); + sDesc = Arrays.copyOfRange(sDesc, 1, sDesc.length); + String[] desc = ArrayUtils.addAll(jargon, sDesc); + return desc; + } + @Override public boolean onSolderingToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (overdriveToggle) { -- cgit From 059315df29da6115d5c79cfdbefa5db8167e76c1 Mon Sep 17 00:00:00 2001 From: Bass Date: Fri, 23 Aug 2019 13:04:44 +0100 Subject: Capacitor Recipes --- .../dreamcraft/DreamCraftRecipeLoader.java | 866 +++++++++++---------- .../tectech/loader/recipe/BloodyRecipeLoader.java | 578 ++++++++------ .../tectech/thing/item/ParametrizerMemoryCard.java | 1 + 3 files changed, 791 insertions(+), 654 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java index c4f39373f0..6d9d8e1c75 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java +++ b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java @@ -61,7 +61,7 @@ public class DreamCraftRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ CustomItemList.eM_Containment.get(1), GT_ModHandler.getIC2Item("reinforcedGlass", 1L) - }, getOrDefault("Trinium",Materials.Osmium).getMolten(576), new ItemStack(QuantumGlassBlock.INSTANCE, 1), 200, 500000); + }, getOrDefault("Trinium", Materials.Osmium).getMolten(576), new ItemStack(QuantumGlassBlock.INSTANCE, 1), 200, 500000); //region pipes @@ -80,14 +80,14 @@ public class DreamCraftRecipeLoader implements Runnable { ItemList.Field_Generator_MV.get(1), ItemList.Circuit_Quantummainframe.get(1) }, Materials.Osmium.getMolten(288), CustomItemList.EMpipe.get(1), 400, 500000); - + //Laser addAssemblerRecipeWithCleanroom(new ItemStack[]{ CustomItemList.DATApipe.get(1), GT_ModHandler.getIC2Item("reinforcedGlass", 1L), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Osmiridium, 2) }, null, CustomItemList.LASERpipe.get(1), 100, 500000); - + //endregion //region casing @@ -116,7 +116,7 @@ public class DreamCraftRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.StainlessSteel, 2), GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.StainlessSteel, 16), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Copper, 16), - GT_OreDictUnificator.get(OrePrefixes.wireGt01, getOrDefault("SuperconductorIV",Materials.Superconductor), 1) + GT_OreDictUnificator.get(OrePrefixes.wireGt01, getOrDefault("SuperconductorIV", Materials.Superconductor), 1) }, Materials.SolderingAlloy.getMolten(1296), CustomItemList.eM_Computer_Vent.get(1), 100, 1920); //Advanced Computer Casing addAssemblerRecipeWithCleanroom(new ItemStack[]{ @@ -124,14 +124,14 @@ public class DreamCraftRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Ultimate, 1), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Cobalt, 64), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 64), - GT_OreDictUnificator.get(OrePrefixes.wireGt02, getOrDefault("SuperconductorLuV",Materials.Superconductor), 4) + GT_OreDictUnificator.get(OrePrefixes.wireGt02, getOrDefault("SuperconductorLuV", Materials.Superconductor), 4) }, Materials.Iridium.getMolten(1296), CustomItemList.eM_Computer_Bus.get(1), 200, 122880); //Molecular Casing GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ CustomItemList.eM_Power.get(1), GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Osmiridium, 6), - GT_OreDictUnificator.get(OrePrefixes.foil, getOrDefault("Trinium",Materials.Osmium), 12), + GT_OreDictUnificator.get(OrePrefixes.foil, getOrDefault("Trinium", Materials.Osmium), 12), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.TungstenSteel, 24), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.TungstenSteel, 24), ItemList.Field_Generator_IV.get(1) @@ -139,15 +139,15 @@ public class DreamCraftRecipeLoader implements Runnable { //Hollow Casing TT_recipeAdder.addResearchableAssemblylineRecipe(CustomItemList.eM_Containment.get(1), - 12000,32, 500000, 6, new ItemStack[]{ + 12000, 32, 500000, 6, new ItemStack[]{ CustomItemList.eM_Containment.get(1), GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Neutronium, 2), GT_OreDictUnificator.get(OrePrefixes.plateQuadruple, Materials.Plutonium, 4), GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Lead, 8), - GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("BlackPlutonium",Materials.Americium), 16), - GT_OreDictUnificator.get(OrePrefixes.screw, getOrDefault("Quantium",Materials.Neutronium), 16), + GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("BlackPlutonium", Materials.Americium), 16), + GT_OreDictUnificator.get(OrePrefixes.screw, getOrDefault("Quantium", Materials.Neutronium), 16), }, new FluidStack[]{ - getOrDefault("Trinium",Materials.Osmium).getMolten(1296), + getOrDefault("Trinium", Materials.Osmium).getMolten(1296), Materials.Osmium.getMolten(1296), new FluidStack(FluidRegistry.getFluid("ic2coolant"), 2000), Materials.Argon.getGas(1000), @@ -155,17 +155,17 @@ public class DreamCraftRecipeLoader implements Runnable { //EM Coil TT_recipeAdder.addResearchableAssemblylineRecipe(CustomItemList.eM_Hollow.get(1), - 48000,128, 1000000, 16, new ItemStack[]{ + 48000, 128, 1000000, 16, new ItemStack[]{ CustomItemList.eM_Hollow.get(1), ItemList.Casing_Fusion_Coil.get(4), - ItemList.Casing_Coil_NaquadahAlloy.get( 4), + ItemList.Casing_Coil_NaquadahAlloy.get(4), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Neutronium, 64), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Neutronium, 64), }, new FluidStack[]{ Materials.Glass.getMolten(2304), Materials.Silicone.getMolten(1872), new FluidStack(FluidRegistry.getFluid("ic2coolant"), 2000), - getOrDefault("Trinium",Materials.Osmium).getMolten(1296), + getOrDefault("Trinium", Materials.Osmium).getMolten(1296), }, CustomItemList.eM_Coil.get(4), 800, 2000000); //Tesla Base @@ -175,7 +175,7 @@ public class DreamCraftRecipeLoader implements Runnable { }, null, CustomItemList.tM_TeslaBase.get(1), 50, 16); GT_ModHandler.addCraftingRecipe(CustomItemList.tM_TeslaBase.get(1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[]{"PhP","PFP","PwP", + new Object[]{"PhP", "PFP", "PwP", 'P', OrePrefixes.plate.get(Materials.NickelZincFerrite), 'F', OrePrefixes.frameGt.get(Materials.NickelZincFerrite)}); @@ -186,13 +186,13 @@ public class DreamCraftRecipeLoader implements Runnable { }, null, CustomItemList.tM_TeslaToroid.get(1), 50, 16); GT_ModHandler.addCraftingRecipe(CustomItemList.tM_TeslaToroid.get(1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[]{"PhP","PFP","PwP", + new Object[]{"PhP", "PFP", "PwP", 'P', OrePrefixes.foil.get(Materials.Aluminium), 'F', OrePrefixes.frameGt.get(Materials.Aluminium)}); //Tesla Secondary Windings GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.teslaComponent.getWithDamage(8,0), + CustomItemList.teslaComponent.getWithDamage(8, 0), com.dreammaster.item.ItemList.MicaInsulatorFoil.getIS(12) }, Materials.Silver.getMolten(144), CustomItemList.tM_TeslaSecondary.get(1), 200, 120); @@ -257,9 +257,9 @@ public class DreamCraftRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Transformer_UEV_UHV").get(1), CustomItemList.eM_dynamoMulti4_UHV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.SuperconductorUHV, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 4)}, Materials.Electrum.getMolten(2304), CustomItemList.eM_dynamoMulti16_UHV.get(1), 200, 500000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("WetTransformer_UEV_UHV").get(1), CustomItemList.eM_dynamoMulti16_UHV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.SuperconductorUHV, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 6)}, Materials.Tungsten.getMolten(2304), CustomItemList.eM_dynamoMulti64_UHV.get(1), 400, 500000); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Hatch_Dynamo_UEV").get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Draconium, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("Bedrockium",Materials.Neutronium), 2)}, Materials.Silver.getMolten(4608), CustomItemList.eM_dynamoMulti4_UEV.get(1), 100, 2000000); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Transformer_UIV_UEV").get(1), CustomItemList.eM_dynamoMulti4_UEV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Draconium, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("Bedrockium",Materials.Neutronium), 4)}, Materials.Electrum.getMolten(4608), CustomItemList.eM_dynamoMulti16_UEV.get(1), 200, 2000000); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("WetTransformer_UIV_UEV").get(1), CustomItemList.eM_dynamoMulti16_UEV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.Draconium, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("Bedrockium",Materials.Neutronium), 6)}, Materials.Tungsten.getMolten(4608), CustomItemList.eM_dynamoMulti64_UEV.get(1), 400, 2000000); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Hatch_Dynamo_UEV").get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Draconium, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("Bedrockium", Materials.Neutronium), 2)}, Materials.Silver.getMolten(4608), CustomItemList.eM_dynamoMulti4_UEV.get(1), 100, 2000000); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Transformer_UIV_UEV").get(1), CustomItemList.eM_dynamoMulti4_UEV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Draconium, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("Bedrockium", Materials.Neutronium), 4)}, Materials.Electrum.getMolten(4608), CustomItemList.eM_dynamoMulti16_UEV.get(1), 200, 2000000); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("WetTransformer_UIV_UEV").get(1), CustomItemList.eM_dynamoMulti16_UEV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.Draconium, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("Bedrockium", Materials.Neutronium), 6)}, Materials.Tungsten.getMolten(4608), CustomItemList.eM_dynamoMulti64_UEV.get(1), 400, 2000000); //GT_Values.RA.ADD_ASSEMBLER_RECIPE(new ItemStack[]{com.dreammaster.gthandler.CustomItemList.Hatch_Dynamo_UIV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BlackPlutonium, 2)}, Materials.Silver.getMolten(8000), CustomItemList.eM_dynamoMulti4_UIV.get(1), 100, 8000000); //GT_Values.RA.ADD_ASSEMBLER_RECIPE(new ItemStack[]{com.dreammaster.gthandler.CustomItemList.Transformer_UMV_UIV.get(1), CustomItemList.eM_dynamoMulti4_UIV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BlackPlutonium, 4)}, Materials.Electrum.getMolten(8000), CustomItemList.eM_dynamoMulti16_UIV.get(1), 200, 8000000); @@ -274,9 +274,9 @@ public class DreamCraftRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Transformer_UEV_UHV").get(1), CustomItemList.eM_energyMulti4_UHV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.SuperconductorUHV, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 4)}, Materials.Electrum.getMolten(2000), CustomItemList.eM_energyMulti16_UHV.get(1), 200, 500000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("WetTransformer_UEV_UHV").get(1), CustomItemList.eM_energyMulti16_UHV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.SuperconductorUHV, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 6)}, Materials.Tungsten.getMolten(2000), CustomItemList.eM_energyMulti64_UHV.get(1), 400, 500000); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Hatch_Energy_UEV").get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Draconium, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("Bedrockium",Materials.Neutronium), 2)}, Materials.Silver.getMolten(4000), CustomItemList.eM_energyMulti4_UEV.get(1), 100, 2000000); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Transformer_UIV_UEV").get(1), CustomItemList.eM_energyMulti4_UEV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Draconium, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("Bedrockium",Materials.Neutronium), 4)}, Materials.Electrum.getMolten(4000), CustomItemList.eM_energyMulti16_UEV.get(1), 200, 2000000); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("WetTransformer_UIV_UEV").get(1), CustomItemList.eM_energyMulti16_UEV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.Draconium, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("Bedrockium",Materials.Neutronium),6)}, Materials.Tungsten.getMolten(4000), CustomItemList.eM_energyMulti64_UEV.get(1), 400, 2000000); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Hatch_Energy_UEV").get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Draconium, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("Bedrockium", Materials.Neutronium), 2)}, Materials.Silver.getMolten(4000), CustomItemList.eM_energyMulti4_UEV.get(1), 100, 2000000); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Transformer_UIV_UEV").get(1), CustomItemList.eM_energyMulti4_UEV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Draconium, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("Bedrockium", Materials.Neutronium), 4)}, Materials.Electrum.getMolten(4000), CustomItemList.eM_energyMulti16_UEV.get(1), 200, 2000000); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("WetTransformer_UIV_UEV").get(1), CustomItemList.eM_energyMulti16_UEV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.Draconium, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("Bedrockium", Materials.Neutronium), 6)}, Materials.Tungsten.getMolten(4000), CustomItemList.eM_energyMulti64_UEV.get(1), 400, 2000000); //GT_Values.RA.ADD_ASSEMBLER_RECIPE(new ItemStack[]{com.dreammaster.gthandler.CustomItemList.Hatch_Energy_UIV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BlackPlutonium, 2)}, Materials.Silver.getMolten(8000), CustomItemList.eM_energyMulti4_UIV.get(1), 100, 8000000); //GT_Values.RA.ADD_ASSEMBLER_RECIPE(new ItemStack[]{com.dreammaster.gthandler.CustomItemList.Transformer_UMV_UIV.get(1), CustomItemList.eM_energyMulti4_UIV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BlackPlutonium, 4)}, Materials.Electrum.getMolten(8000), CustomItemList.eM_energyMulti16_UIV.get(1), 200, 8000000); @@ -289,7 +289,7 @@ public class DreamCraftRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 1), ItemList.Emitter_UV.get(1), ItemList.Electric_Pump_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.NaquadahAlloy, 2), GT_Utility.getIntegratedCircuit(1)}, null, CustomItemList.eM_dynamoTunnel1_UV.get(1), 1000, 500000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_MAX.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 1), ItemList.Emitter_UHV.get(1), ItemList.Electric_Pump_UHV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Bedrockium, 2), GT_Utility.getIntegratedCircuit(1)}, null, CustomItemList.eM_dynamoTunnel1_UHV.get(1), 1000, 2000000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Hull_UEV").get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 1), ItemList.Emitter_UEV.get(1), ItemList.Electric_Pump_UEV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Draconium, 2), GT_Utility.getIntegratedCircuit(1)}, null, CustomItemList.eM_dynamoTunnel1_UEV.get(1), 1000, 8000000); - + //Laser Dynamo IV-UEV 1024/t GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 2), ItemList.Emitter_IV.get(2), ItemList.Electric_Pump_IV.get(2), GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.TungstenSteel, 4), GT_Utility.getIntegratedCircuit(2)}, null, CustomItemList.eM_dynamoTunnel2_IV.get(1), 2000, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 2), ItemList.Emitter_LuV.get(2), ItemList.Electric_Pump_LuV.get(2), GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.VanadiumGallium, 4), GT_Utility.getIntegratedCircuit(2)}, null, CustomItemList.eM_dynamoTunnel2_LuV.get(1), 2000, 30720); @@ -297,7 +297,7 @@ public class DreamCraftRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 2), ItemList.Emitter_UV.get(2), ItemList.Electric_Pump_UV.get(2), GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.NaquadahAlloy, 4), GT_Utility.getIntegratedCircuit(2)}, null, CustomItemList.eM_dynamoTunnel2_UV.get(1), 2000, 500000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_MAX.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 2), ItemList.Emitter_UHV.get(2), ItemList.Electric_Pump_UHV.get(2), GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.Bedrockium, 4), GT_Utility.getIntegratedCircuit(2)}, null, CustomItemList.eM_dynamoTunnel2_UHV.get(1), 2000, 2000000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Hull_UEV").get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 2), ItemList.Emitter_UEV.get(2), ItemList.Electric_Pump_UEV.get(2), GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.Draconium, 4), GT_Utility.getIntegratedCircuit(2)}, null, CustomItemList.eM_dynamoTunnel2_UEV.get(1), 2000, 8000000); - + //Laser Dynamo IV-UEV 4096/t GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 4), ItemList.Emitter_IV.get(4), ItemList.Electric_Pump_IV.get(4), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.TungstenSteel, 4), GT_Utility.getIntegratedCircuit(3)}, null, CustomItemList.eM_dynamoTunnel3_IV.get(1), 4000, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 4), ItemList.Emitter_LuV.get(4), ItemList.Electric_Pump_LuV.get(4), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.VanadiumGallium, 4), GT_Utility.getIntegratedCircuit(3)}, null, CustomItemList.eM_dynamoTunnel3_LuV.get(1), 4000, 30720); @@ -305,7 +305,7 @@ public class DreamCraftRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 4), ItemList.Emitter_UV.get(4), ItemList.Electric_Pump_UV.get(4), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NaquadahAlloy, 4), GT_Utility.getIntegratedCircuit(3)}, null, CustomItemList.eM_dynamoTunnel3_UV.get(1), 4000, 500000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_MAX.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 4), ItemList.Emitter_UHV.get(4), ItemList.Electric_Pump_UHV.get(4), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Bedrockium, 4), GT_Utility.getIntegratedCircuit(3)}, null, CustomItemList.eM_dynamoTunnel3_UHV.get(1), 4000, 2000000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Hull_UEV").get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 4), ItemList.Emitter_UEV.get(4), ItemList.Electric_Pump_UEV.get(4), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Draconium, 4), GT_Utility.getIntegratedCircuit(3)}, null, CustomItemList.eM_dynamoTunnel3_UEV.get(1), 4000, 8000000); - + //Laser Dynamo IV-UEV 16384/t GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 8), ItemList.Emitter_IV.get(8), ItemList.Electric_Pump_IV.get(8), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.TungstenSteel, 8), GT_Utility.getIntegratedCircuit(4)}, null, CustomItemList.eM_dynamoTunnel4_IV.get(1), 8000, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 8), ItemList.Emitter_LuV.get(8), ItemList.Electric_Pump_LuV.get(8), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.VanadiumGallium, 8), GT_Utility.getIntegratedCircuit(4)}, null, CustomItemList.eM_dynamoTunnel4_LuV.get(1), 8000, 30720); @@ -313,7 +313,7 @@ public class DreamCraftRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 8), ItemList.Emitter_UV.get(8), ItemList.Electric_Pump_UV.get(8), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NaquadahAlloy, 8), GT_Utility.getIntegratedCircuit(4)}, null, CustomItemList.eM_dynamoTunnel4_UV.get(1), 8000, 500000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_MAX.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 8), ItemList.Emitter_UHV.get(8), ItemList.Electric_Pump_UHV.get(8), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Bedrockium, 8), GT_Utility.getIntegratedCircuit(4)}, null, CustomItemList.eM_dynamoTunnel4_UHV.get(1), 8000, 2000000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Hull_UEV").get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 8), ItemList.Emitter_UEV.get(8), ItemList.Electric_Pump_UEV.get(8), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Draconium, 8), GT_Utility.getIntegratedCircuit(4)}, null, CustomItemList.eM_dynamoTunnel4_UEV.get(1), 8000, 8000000); - + //Laser Dynamo IV-UEV 65536/t GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 16), ItemList.Emitter_IV.get(16), ItemList.Electric_Pump_IV.get(16), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.TungstenSteel, 8), GT_Utility.getIntegratedCircuit(5)}, null, CustomItemList.eM_dynamoTunnel5_IV.get(1), 16000, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 16), ItemList.Emitter_LuV.get(16), ItemList.Electric_Pump_LuV.get(16), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.VanadiumGallium, 8), GT_Utility.getIntegratedCircuit(5)}, null, CustomItemList.eM_dynamoTunnel5_LuV.get(1), 16000, 30720); @@ -321,7 +321,7 @@ public class DreamCraftRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 16), ItemList.Emitter_UV.get(16), ItemList.Electric_Pump_UV.get(16), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.NaquadahAlloy, 8), GT_Utility.getIntegratedCircuit(5)}, null, CustomItemList.eM_dynamoTunnel5_UV.get(1), 16000, 500000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_MAX.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 16), ItemList.Emitter_UHV.get(16), ItemList.Electric_Pump_UHV.get(16), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Bedrockium, 8), GT_Utility.getIntegratedCircuit(5)}, null, CustomItemList.eM_dynamoTunnel5_UHV.get(1), 16000, 2000000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Hull_UEV").get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 16), ItemList.Emitter_UEV.get(16), ItemList.Electric_Pump_UEV.get(16), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Draconium, 8), GT_Utility.getIntegratedCircuit(5)}, null, CustomItemList.eM_dynamoTunnel5_UEV.get(1), 16000, 8000000); - + //Laser Dynamo IV-UEV 262144/t GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 32), ItemList.Emitter_IV.get(32), ItemList.Electric_Pump_IV.get(32), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.TungstenSteel, 16), GT_Utility.getIntegratedCircuit(6)}, null, CustomItemList.eM_dynamoTunnel6_IV.get(1), 32000, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 32), ItemList.Emitter_LuV.get(32), ItemList.Electric_Pump_LuV.get(32), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.VanadiumGallium, 16), GT_Utility.getIntegratedCircuit(6)}, null, CustomItemList.eM_dynamoTunnel6_LuV.get(1), 32000, 30720); @@ -329,7 +329,7 @@ public class DreamCraftRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 32), ItemList.Emitter_UV.get(32), ItemList.Electric_Pump_UV.get(32), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.NaquadahAlloy, 16), GT_Utility.getIntegratedCircuit(6)}, null, CustomItemList.eM_dynamoTunnel6_UV.get(1), 32000, 500000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_MAX.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 32), ItemList.Emitter_UHV.get(32), ItemList.Electric_Pump_UHV.get(32), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Bedrockium, 16), GT_Utility.getIntegratedCircuit(6)}, null, CustomItemList.eM_dynamoTunnel6_UHV.get(1), 32000, 2000000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Hull_UEV").get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 32), ItemList.Emitter_UEV.get(32), ItemList.Electric_Pump_UEV.get(32), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Draconium, 16), GT_Utility.getIntegratedCircuit(6)}, null, CustomItemList.eM_dynamoTunnel6_UEV.get(1), 32000, 8000000); - + //Laser Dynamo IV-UEV 1048576/t GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 64), ItemList.Emitter_IV.get(64), ItemList.Electric_Pump_IV.get(64), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.TungstenSteel, 16), GT_Utility.getIntegratedCircuit(7)}, null, CustomItemList.eM_dynamoTunnel7_IV.get(1), 64000, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 64), ItemList.Emitter_LuV.get(64), ItemList.Electric_Pump_LuV.get(64), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.VanadiumGallium, 16), GT_Utility.getIntegratedCircuit(7)}, null, CustomItemList.eM_dynamoTunnel7_LuV.get(1), 64000, 30720); @@ -337,7 +337,7 @@ public class DreamCraftRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 64), ItemList.Emitter_UV.get(64), ItemList.Electric_Pump_UV.get(64), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.NaquadahAlloy, 16), GT_Utility.getIntegratedCircuit(7)}, null, CustomItemList.eM_dynamoTunnel7_UV.get(1), 64000, 500000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_MAX.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 64), ItemList.Emitter_UHV.get(64), ItemList.Electric_Pump_UHV.get(64), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.Bedrockium, 16), GT_Utility.getIntegratedCircuit(7)}, null, CustomItemList.eM_dynamoTunnel7_UHV.get(1), 64000, 2000000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Hull_UEV").get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 64), ItemList.Emitter_UEV.get(64), ItemList.Electric_Pump_UEV.get(64), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.Draconium, 16), GT_Utility.getIntegratedCircuit(7)}, null, CustomItemList.eM_dynamoTunnel7_UEV.get(1), 64000, 8000000); - + //Laser Target IV-UEV 256/t GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 1), ItemList.Sensor_IV.get(1), ItemList.Electric_Pump_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.TungstenSteel, 2), GT_Utility.getIntegratedCircuit(1)}, null, CustomItemList.eM_energyTunnel1_IV.get(1), 1000, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 1), ItemList.Sensor_LuV.get(1), ItemList.Electric_Pump_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.VanadiumGallium, 2), GT_Utility.getIntegratedCircuit(1)}, null, CustomItemList.eM_energyTunnel1_LuV.get(1), 1000, 30720); @@ -345,7 +345,7 @@ public class DreamCraftRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 1), ItemList.Sensor_UV.get(1), ItemList.Electric_Pump_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.NaquadahAlloy, 2), GT_Utility.getIntegratedCircuit(1)}, null, CustomItemList.eM_energyTunnel1_UV.get(1), 1000, 500000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_MAX.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 1), ItemList.Sensor_UHV.get(1), ItemList.Electric_Pump_UHV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Bedrockium, 2), GT_Utility.getIntegratedCircuit(1)}, null, CustomItemList.eM_energyTunnel1_UHV.get(1), 1000, 2000000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Hull_UEV").get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 1), ItemList.Sensor_UEV.get(1), ItemList.Electric_Pump_UEV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Draconium, 2), GT_Utility.getIntegratedCircuit(1)}, null, CustomItemList.eM_energyTunnel1_UEV.get(1), 1000, 8000000); - + //Laser Target IV-UEV 1024/t GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 2), ItemList.Sensor_IV.get(2), ItemList.Electric_Pump_IV.get(2), GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.TungstenSteel, 4), GT_Utility.getIntegratedCircuit(2)}, null, CustomItemList.eM_energyTunnel2_IV.get(1), 2000, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 2), ItemList.Sensor_LuV.get(2), ItemList.Electric_Pump_LuV.get(2), GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.VanadiumGallium, 4), GT_Utility.getIntegratedCircuit(2)}, null, CustomItemList.eM_energyTunnel2_LuV.get(1), 2000, 30720); @@ -353,7 +353,7 @@ public class DreamCraftRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 2), ItemList.Sensor_UV.get(2), ItemList.Electric_Pump_UV.get(2), GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.NaquadahAlloy, 4), GT_Utility.getIntegratedCircuit(2)}, null, CustomItemList.eM_energyTunnel2_UV.get(1), 2000, 500000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_MAX.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 2), ItemList.Sensor_UHV.get(2), ItemList.Electric_Pump_UHV.get(2), GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.Bedrockium, 4), GT_Utility.getIntegratedCircuit(2)}, null, CustomItemList.eM_energyTunnel2_UHV.get(1), 2000, 2000000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Hull_UEV").get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 2), ItemList.Sensor_UEV.get(2), ItemList.Electric_Pump_UEV.get(2), GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.Draconium, 4), GT_Utility.getIntegratedCircuit(2)}, null, CustomItemList.eM_energyTunnel2_UEV.get(1), 2000, 8000000); - + //Laser Target IV-UEV 4096/t GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 4), ItemList.Sensor_IV.get(4), ItemList.Electric_Pump_IV.get(4), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.TungstenSteel, 4), GT_Utility.getIntegratedCircuit(3)}, null, CustomItemList.eM_energyTunnel3_IV.get(1), 4000, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 4), ItemList.Sensor_LuV.get(4), ItemList.Electric_Pump_LuV.get(4), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.VanadiumGallium, 4), GT_Utility.getIntegratedCircuit(3)}, null, CustomItemList.eM_energyTunnel3_LuV.get(1), 4000, 30720); @@ -361,7 +361,7 @@ public class DreamCraftRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 4), ItemList.Sensor_UV.get(4), ItemList.Electric_Pump_UV.get(4), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NaquadahAlloy, 4), GT_Utility.getIntegratedCircuit(3)}, null, CustomItemList.eM_energyTunnel3_UV.get(1), 4000, 500000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_MAX.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 4), ItemList.Sensor_UHV.get(4), ItemList.Electric_Pump_UHV.get(4), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Bedrockium, 4), GT_Utility.getIntegratedCircuit(3)}, null, CustomItemList.eM_energyTunnel3_UHV.get(1), 4000, 2000000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Hull_UEV").get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 4), ItemList.Sensor_UEV.get(4), ItemList.Electric_Pump_UEV.get(4), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Draconium, 4), GT_Utility.getIntegratedCircuit(3)}, null, CustomItemList.eM_energyTunnel3_UEV.get(1), 4000, 8000000); - + //Laser Target IV-UEV 16384/t GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 8), ItemList.Sensor_IV.get(8), ItemList.Electric_Pump_IV.get(8), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.TungstenSteel, 8), GT_Utility.getIntegratedCircuit(4)}, null, CustomItemList.eM_energyTunnel4_IV.get(1), 8000, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 8), ItemList.Sensor_LuV.get(8), ItemList.Electric_Pump_LuV.get(8), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.VanadiumGallium, 8), GT_Utility.getIntegratedCircuit(4)}, null, CustomItemList.eM_energyTunnel4_LuV.get(1), 8000, 30720); @@ -369,7 +369,7 @@ public class DreamCraftRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 8), ItemList.Sensor_UV.get(8), ItemList.Electric_Pump_UV.get(8), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NaquadahAlloy, 8), GT_Utility.getIntegratedCircuit(4)}, null, CustomItemList.eM_energyTunnel4_UV.get(1), 8000, 500000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_MAX.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 8), ItemList.Sensor_UHV.get(8), ItemList.Electric_Pump_UHV.get(8), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Bedrockium, 8), GT_Utility.getIntegratedCircuit(4)}, null, CustomItemList.eM_energyTunnel4_UHV.get(1), 8000, 2000000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Hull_UEV").get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 8), ItemList.Sensor_UEV.get(8), ItemList.Electric_Pump_UEV.get(8), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Draconium, 8), GT_Utility.getIntegratedCircuit(4)}, null, CustomItemList.eM_energyTunnel4_UEV.get(1), 8000, 8000000); - + //Laser Target IV-UEV 65536/t GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 16), ItemList.Sensor_IV.get(16), ItemList.Electric_Pump_IV.get(16), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.TungstenSteel, 8), GT_Utility.getIntegratedCircuit(5)}, null, CustomItemList.eM_energyTunnel5_IV.get(1), 16000, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 16), ItemList.Sensor_LuV.get(16), ItemList.Electric_Pump_LuV.get(16), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.VanadiumGallium, 8), GT_Utility.getIntegratedCircuit(5)}, null, CustomItemList.eM_energyTunnel5_LuV.get(1), 16000, 30720); @@ -377,7 +377,7 @@ public class DreamCraftRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 16), ItemList.Sensor_UV.get(16), ItemList.Electric_Pump_UV.get(16), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.NaquadahAlloy, 8), GT_Utility.getIntegratedCircuit(5)}, null, CustomItemList.eM_energyTunnel5_UV.get(1), 16000, 500000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_MAX.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 16), ItemList.Sensor_UHV.get(16), ItemList.Electric_Pump_UHV.get(16), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Bedrockium, 8), GT_Utility.getIntegratedCircuit(5)}, null, CustomItemList.eM_energyTunnel5_UHV.get(1), 16000, 2000000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Hull_UEV").get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 16), ItemList.Sensor_UEV.get(16), ItemList.Electric_Pump_UEV.get(16), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Draconium, 8), GT_Utility.getIntegratedCircuit(5)}, null, CustomItemList.eM_energyTunnel5_UEV.get(1), 16000, 8000000); - + //Laser Target IV-UEV 262144/t GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 32), ItemList.Sensor_IV.get(32), ItemList.Electric_Pump_IV.get(32), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.TungstenSteel, 16), GT_Utility.getIntegratedCircuit(6)}, null, CustomItemList.eM_energyTunnel6_IV.get(1), 32000, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 32), ItemList.Sensor_LuV.get(32), ItemList.Electric_Pump_LuV.get(32), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.VanadiumGallium, 16), GT_Utility.getIntegratedCircuit(6)}, null, CustomItemList.eM_energyTunnel6_LuV.get(1), 32000, 30720); @@ -385,7 +385,7 @@ public class DreamCraftRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 32), ItemList.Sensor_UV.get(32), ItemList.Electric_Pump_UV.get(32), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.NaquadahAlloy, 16), GT_Utility.getIntegratedCircuit(6)}, null, CustomItemList.eM_energyTunnel6_UV.get(1), 32000, 500000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_MAX.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 32), ItemList.Sensor_UHV.get(32), ItemList.Electric_Pump_UHV.get(32), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Bedrockium, 16), GT_Utility.getIntegratedCircuit(6)}, null, CustomItemList.eM_energyTunnel6_UHV.get(1), 32000, 2000000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Hull_UEV").get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 32), ItemList.Sensor_UEV.get(32), ItemList.Electric_Pump_UEV.get(32), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Draconium, 16), GT_Utility.getIntegratedCircuit(6)}, null, CustomItemList.eM_energyTunnel6_UEV.get(1), 32000, 8000000); - + //Laser Target IV-UEV 1048576/t GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 64), ItemList.Sensor_IV.get(64), ItemList.Electric_Pump_IV.get(64), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.TungstenSteel, 16), GT_Utility.getIntegratedCircuit(7)}, null, CustomItemList.eM_energyTunnel7_IV.get(1), 64000, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 64), ItemList.Sensor_LuV.get(64), ItemList.Electric_Pump_LuV.get(64), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.VanadiumGallium, 16), GT_Utility.getIntegratedCircuit(7)}, null, CustomItemList.eM_energyTunnel7_LuV.get(1), 64000, 30720); @@ -393,7 +393,7 @@ public class DreamCraftRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 64), ItemList.Sensor_UV.get(64), ItemList.Electric_Pump_UV.get(64), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.NaquadahAlloy, 16), GT_Utility.getIntegratedCircuit(7)}, null, CustomItemList.eM_energyTunnel7_UV.get(1), 64000, 500000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_MAX.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 64), ItemList.Sensor_UHV.get(64), ItemList.Electric_Pump_UHV.get(64), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.Bedrockium, 16), GT_Utility.getIntegratedCircuit(7)}, null, CustomItemList.eM_energyTunnel7_UHV.get(1), 64000, 2000000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Hull_UEV").get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 64), ItemList.Sensor_UEV.get(64), ItemList.Electric_Pump_UEV.get(64), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.Draconium, 16), GT_Utility.getIntegratedCircuit(7)}, null, CustomItemList.eM_energyTunnel7_UEV.get(1), 64000, 8000000); - + //Data Input addAssemblerRecipeWithCleanroom(new ItemStack[]{ CustomItemList.eM_Computer_Casing.get(1), @@ -439,7 +439,7 @@ public class DreamCraftRecipeLoader implements Runnable { CustomItemList.eM_Computer_Casing.get(1), ItemList.Circuit_Masterquantumcomputer.get(1), CustomItemList.DATApipe.get(4), - ItemList.Cover_Screen.get(1 ), + ItemList.Cover_Screen.get(1), new ItemStack(Blocks.stone_button, 16), }, Materials.Iridium.getMolten(2592), CustomItemList.Parametrizer_Hatch.get(1), 800, 122880); //Uncertainty @@ -447,7 +447,7 @@ public class DreamCraftRecipeLoader implements Runnable { CustomItemList.eM_Computer_Casing.get(1), ItemList.Circuit_Ultimatecrystalcomputer.get(1), CustomItemList.DATApipe.get(16), - ItemList.Cover_Screen.get(1 ), + ItemList.Cover_Screen.get(1), new ItemStack(Blocks.stone_button, 16), }, Materials.Iridium.getMolten(2592), CustomItemList.Uncertainty_Hatch.get(1), 1200, 122880); @@ -479,9 +479,9 @@ public class DreamCraftRecipeLoader implements Runnable { //Tesla Winding Components Ultimate (ADD BLOOD VARIANT) GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUV,4), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUV, 4), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.NickelZincFerrite, 1), - }, Materials.Polytetrafluoroethylene.getMolten(18), CustomItemList.teslaComponent.getWithDamage(1,1), 320, 7680); + }, Materials.Polytetrafluoroethylene.getMolten(18), CustomItemList.teslaComponent.getWithDamage(1, 1), 320, 7680); //Tesla Coil GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ @@ -505,7 +505,7 @@ public class DreamCraftRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ getItemContainer("WetTransformer_ZPM_LuV").get(1), getItemContainer("HighEnergyFlowCircuit").get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt01, getOrDefault("SuperconductorLuV",Materials.Superconductor), 16), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, getOrDefault("SuperconductorLuV", Materials.Superconductor), 16), }, Materials.TungstenSteel.getMolten(576), CustomItemList.Machine_Multi_Transformer.get(1), 400, 30720); //Network Switch @@ -551,83 +551,83 @@ public class DreamCraftRecipeLoader implements Runnable { //Matter Junction TT_recipeAdder.addResearchableAssemblylineRecipe(CustomItemList.Machine_Multi_Switch.get(1), - 8000,32, 500000, 4, new ItemStack[]{ - CustomItemList.Machine_Multi_Transformer.get(1), - GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Naquadah, 4), - ItemList.Robot_Arm_LuV.get(2), - ItemList.Electric_Piston_LuV.get(2), - ItemList.Circuit_Wetwaresupercomputer.get(2), - GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.Superconductor, 4), - }, new FluidStack[]{ - Materials.UUMatter.getFluid(1000), - Materials.Naquadah.getMolten(1296), - new FluidStack(FluidRegistry.getFluid("ic2coolant"), 2000), - Materials.Osmium.getMolten(1296), - }, CustomItemList.Machine_Multi_EMjunction.get(1), 12000, 100000); + 8000, 32, 500000, 4, new ItemStack[]{ + CustomItemList.Machine_Multi_Transformer.get(1), + GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Naquadah, 4), + ItemList.Robot_Arm_LuV.get(2), + ItemList.Electric_Piston_LuV.get(2), + ItemList.Circuit_Wetwaresupercomputer.get(2), + GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.Superconductor, 4), + }, new FluidStack[]{ + Materials.UUMatter.getFluid(1000), + Materials.Naquadah.getMolten(1296), + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 2000), + Materials.Osmium.getMolten(1296), + }, CustomItemList.Machine_Multi_EMjunction.get(1), 12000, 100000); //Matter Quantizer TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Hatch_Input_UV.get(1), - 12000,32, 500000, 6, new ItemStack[]{ - CustomItemList.Machine_Multi_Transformer.get(1), - GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Naquadah, 4), - ItemList.Emitter_UV.get(2), - ItemList.Circuit_Wetwaresupercomputer.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.Superconductor, 2), - }, new FluidStack[]{ - Materials.UUMatter.getFluid(1000), - Materials.Naquadah.getMolten(1296), - new FluidStack(FluidRegistry.getFluid("ic2coolant"), 2000), - Materials.Osmium.getMolten(1296), - }, CustomItemList.Machine_Multi_MatterToEM.get(1), 12000, 100000); + 12000, 32, 500000, 6, new ItemStack[]{ + CustomItemList.Machine_Multi_Transformer.get(1), + GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Naquadah, 4), + ItemList.Emitter_UV.get(2), + ItemList.Circuit_Wetwaresupercomputer.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.Superconductor, 2), + }, new FluidStack[]{ + Materials.UUMatter.getFluid(1000), + Materials.Naquadah.getMolten(1296), + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 2000), + Materials.Osmium.getMolten(1296), + }, CustomItemList.Machine_Multi_MatterToEM.get(1), 12000, 100000); //Matter DeQuantizer TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Hatch_Output_UV.get(1), - 12000,32, 500000, 6, new ItemStack[]{ - CustomItemList.Machine_Multi_Transformer.get(1), - GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Naquadah, 4), - ItemList.Sensor_UV.get(2), - ItemList.Circuit_Wetwaresupercomputer.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.Superconductor, 2), - }, new FluidStack[]{ - Materials.UUMatter.getFluid(1000), - Materials.Naquadah.getMolten(1296), - new FluidStack(FluidRegistry.getFluid("ic2coolant"), 2000), - Materials.Osmium.getMolten(1296), - }, CustomItemList.Machine_Multi_EMToMatter.get(1), 12000, 100000); + 12000, 32, 500000, 6, new ItemStack[]{ + CustomItemList.Machine_Multi_Transformer.get(1), + GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Naquadah, 4), + ItemList.Sensor_UV.get(2), + ItemList.Circuit_Wetwaresupercomputer.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.Superconductor, 2), + }, new FluidStack[]{ + Materials.UUMatter.getFluid(1000), + Materials.Naquadah.getMolten(1296), + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 2000), + Materials.Osmium.getMolten(1296), + }, CustomItemList.Machine_Multi_EMToMatter.get(1), 12000, 100000); //Essentia Quantizer TT_recipeAdder.addResearchableAssemblylineRecipe(CustomItemList.Machine_Multi_MatterToEM.get(1), - 15000,32, 500000, 8, new ItemStack[]{ - CustomItemList.Machine_Multi_MatterToEM.get(1), - GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Neutronium, 4), - ItemList.Emitter_UV.get(2), - ItemList.Circuit_Wetwaresupercomputer.get(1), - GT_OreDictUnificator.get(OrePrefixes.cableGt02, Materials.Draconium, 2), - }, new FluidStack[]{ - Materials.UUMatter.getFluid(2000), - Materials.Void.getMolten(2592), - new FluidStack(FluidRegistry.getFluid("ic2coolant"), 4000), - Materials.Osmium.getMolten(1296), - }, CustomItemList.Machine_Multi_EssentiaToEM.get(1), 24000, 500000); + 15000, 32, 500000, 8, new ItemStack[]{ + CustomItemList.Machine_Multi_MatterToEM.get(1), + GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Neutronium, 4), + ItemList.Emitter_UV.get(2), + ItemList.Circuit_Wetwaresupercomputer.get(1), + GT_OreDictUnificator.get(OrePrefixes.cableGt02, Materials.Draconium, 2), + }, new FluidStack[]{ + Materials.UUMatter.getFluid(2000), + Materials.Void.getMolten(2592), + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 4000), + Materials.Osmium.getMolten(1296), + }, CustomItemList.Machine_Multi_EssentiaToEM.get(1), 24000, 500000); //Essentia DeQuantizer TT_recipeAdder.addResearchableAssemblylineRecipe(CustomItemList.Machine_Multi_EMToMatter.get(1), - 15000,32, 500000, 8, new ItemStack[]{ - CustomItemList.Machine_Multi_EMToMatter.get(1), - GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Neutronium, 4), - ItemList.Sensor_UV.get(2), - ItemList.Circuit_Wetwaresupercomputer.get(1), - GT_OreDictUnificator.get(OrePrefixes.cableGt02, Materials.Draconium, 2), - }, new FluidStack[]{ - Materials.UUMatter.getFluid(2000), - Materials.Void.getMolten(2592), - new FluidStack(FluidRegistry.getFluid("ic2coolant"), 4000), - Materials.Osmium.getMolten(1296), - }, CustomItemList.Machine_Multi_EMToEssentia.get(1), 24000, 500000); + 15000, 32, 500000, 8, new ItemStack[]{ + CustomItemList.Machine_Multi_EMToMatter.get(1), + GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Neutronium, 4), + ItemList.Sensor_UV.get(2), + ItemList.Circuit_Wetwaresupercomputer.get(1), + GT_OreDictUnificator.get(OrePrefixes.cableGt02, Materials.Draconium, 2), + }, new FluidStack[]{ + Materials.UUMatter.getFluid(2000), + Materials.Void.getMolten(2592), + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 4000), + Materials.Osmium.getMolten(1296), + }, CustomItemList.Machine_Multi_EMToEssentia.get(1), 24000, 500000); //EM Scanner TT_recipeAdder.addResearchableAssemblylineRecipe(CustomItemList.Machine_Multi_Research.get(1), - 150000,128, 500000, 16, new ItemStack[]{ + 150000, 128, 500000, 16, new ItemStack[]{ CustomItemList.Machine_Multi_EMjunction.get(1), CustomItemList.eM_Computer_Bus.get(4), ItemList.Field_Generator_UV.get(4), @@ -644,10 +644,10 @@ public class DreamCraftRecipeLoader implements Runnable { //Multi Infuser TT_recipeAdder.addResearchableAssemblylineRecipe(CustomItemList.Machine_Multi_Transformer.get(1), - 192000,512, 2000000, 32, new ItemStack[]{ + 192000, 512, 2000000, 32, new ItemStack[]{ CustomItemList.Machine_Multi_Transformer.get(1), CustomItemList.eM_Coil.get(8), - CustomItemList.eM_Power.get( 8), + CustomItemList.eM_Power.get(8), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.NeodymiumMagnetic, 16), }, new FluidStack[]{ Materials.Electrum.getMolten(2592), @@ -657,158 +657,158 @@ public class DreamCraftRecipeLoader implements Runnable { //Motor UV-UHV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Electric_Motor_UV.get(1L), - 24000, 32, 100000, 4, new ItemStack[]{ - GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.SamariumMagnetic, 4L), - GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.CosmicNeutronium, 8L), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.CosmicNeutronium, 8L), - GT_OreDictUnificator.get(OrePrefixes.round, Materials.CosmicNeutronium, 32L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Neutronium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Neutronium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Neutronium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Neutronium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Neutronium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Neutronium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Neutronium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Neutronium, 64L), - GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Bedrockium, 2L)}, new FluidStack[]{ - Materials.Naquadria.getMolten(2592), - Materials.SolderingAlloy.getMolten(2592), - Materials.Lubricant.getFluid(4000)}, ItemList.Electric_Motor_UHV.get(1L), 1000, 200000); + 24000, 32, 100000, 4, new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.SamariumMagnetic, 4L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.CosmicNeutronium, 8L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.CosmicNeutronium, 8L), + GT_OreDictUnificator.get(OrePrefixes.round, Materials.CosmicNeutronium, 32L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Neutronium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Neutronium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Neutronium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Neutronium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Neutronium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Neutronium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Neutronium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Neutronium, 64L), + GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Bedrockium, 2L)}, new FluidStack[]{ + Materials.Naquadria.getMolten(2592), + Materials.SolderingAlloy.getMolten(2592), + Materials.Lubricant.getFluid(4000)}, ItemList.Electric_Motor_UHV.get(1L), 1000, 200000); TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Electric_Motor_UHV.get(1L), - 48000, 64, 2000000, 8, new ItemStack[]{ - GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.SamariumMagnetic, 8L), - GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Infinity, 16L), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Infinity, 8L), - GT_OreDictUnificator.get(OrePrefixes.round, Materials.Infinity, 32L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.CosmicNeutronium, 64L),//TODO Fusion T4 Material - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.CosmicNeutronium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.CosmicNeutronium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.CosmicNeutronium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.CosmicNeutronium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.CosmicNeutronium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.CosmicNeutronium, 64L), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.CosmicNeutronium, 64L), - GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Draconium, 2L)}, new FluidStack[]{ - Materials.Quantium.getMolten(2592), - Materials.SolderingAlloy.getMolten(5184), - Materials.Lubricant.getFluid(8000)}, ItemList.Electric_Motor_UEV.get(1L), 2000, 800000); + 48000, 64, 2000000, 8, new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.SamariumMagnetic, 8L), + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Infinity, 16L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Infinity, 8L), + GT_OreDictUnificator.get(OrePrefixes.round, Materials.Infinity, 32L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.CosmicNeutronium, 64L),//TODO Fusion T4 Material + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.CosmicNeutronium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.CosmicNeutronium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.CosmicNeutronium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.CosmicNeutronium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.CosmicNeutronium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.CosmicNeutronium, 64L), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.CosmicNeutronium, 64L), + GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Draconium, 2L)}, new FluidStack[]{ + Materials.Quantium.getMolten(2592), + Materials.SolderingAlloy.getMolten(5184), + Materials.Lubricant.getFluid(8000)}, ItemList.Electric_Motor_UEV.get(1L), 2000, 800000); //Pumps UV-UHV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Electric_Pump_UV.get(1L), - 24000, 32, 100000, 4, new ItemStack[]{ - ItemList.Electric_Motor_UHV.get(1L), - GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Neutronium, 2L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.CosmicNeutronium, 4L), - GT_OreDictUnificator.get(OrePrefixes.screw, Materials.CosmicNeutronium, 16L), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.AnySyntheticRubber, 32L), - GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.CosmicNeutronium, 4L), - GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Bedrockium, 2L)}, new FluidStack[]{ - Materials.Naquadria.getMolten(2592), - Materials.SolderingAlloy.getMolten(2592), - Materials.Lubricant.getFluid(4000)}, ItemList.Electric_Pump_UHV.get(1), 1000, 200000); + 24000, 32, 100000, 4, new ItemStack[]{ + ItemList.Electric_Motor_UHV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Neutronium, 2L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.CosmicNeutronium, 4L), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.CosmicNeutronium, 16L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.AnySyntheticRubber, 32L), + GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.CosmicNeutronium, 4L), + GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Bedrockium, 2L)}, new FluidStack[]{ + Materials.Naquadria.getMolten(2592), + Materials.SolderingAlloy.getMolten(2592), + Materials.Lubricant.getFluid(4000)}, ItemList.Electric_Pump_UHV.get(1), 1000, 200000); TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Electric_Pump_UHV.get(1L), - 48000, 64, 200000, 8, new ItemStack[]{ - ItemList.Electric_Motor_UEV.get(1L), - GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.NetherStar, 2L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Infinity, 4L), - GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Infinity, 16L), - GT_OreDictUnificator.get(OrePrefixes.ring, (Materials.AnySyntheticRubber), 64L), - GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Infinity, 4L), - GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Draconium, 2L)}, new FluidStack[]{ - Materials.Quantium.getMolten(2592), - Materials.SolderingAlloy.getMolten(5184), - Materials.Lubricant.getFluid(8000)}, ItemList.Electric_Pump_UEV.get(1), 2000, 800000); + 48000, 64, 200000, 8, new ItemStack[]{ + ItemList.Electric_Motor_UEV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.NetherStar, 2L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Infinity, 4L), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Infinity, 16L), + GT_OreDictUnificator.get(OrePrefixes.ring, (Materials.AnySyntheticRubber), 64L), + GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Infinity, 4L), + GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Draconium, 2L)}, new FluidStack[]{ + Materials.Quantium.getMolten(2592), + Materials.SolderingAlloy.getMolten(5184), + Materials.Lubricant.getFluid(8000)}, ItemList.Electric_Pump_UEV.get(1), 2000, 800000); //Conveyor Belt UV-UHV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Conveyor_Module_UV.get(1L), - 24000, 32, 100000, 4, new ItemStack[]{ - ItemList.Electric_Motor_UHV.get(2L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.CosmicNeutronium, 2L), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.CosmicNeutronium, 8L), - GT_OreDictUnificator.get(OrePrefixes.round, Materials.CosmicNeutronium, 64L), - GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Bedrockium, 2L)}, new FluidStack[]{ - Materials.Naquadria.getMolten(2592), - Materials.SolderingAlloy.getMolten(2592), - Materials.Lubricant.getFluid(4000), - Materials.Silicone.getMolten(5760)}, ItemList.Conveyor_Module_UHV.get(1), 1000, 200000); + 24000, 32, 100000, 4, new ItemStack[]{ + ItemList.Electric_Motor_UHV.get(2L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.CosmicNeutronium, 2L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.CosmicNeutronium, 8L), + GT_OreDictUnificator.get(OrePrefixes.round, Materials.CosmicNeutronium, 64L), + GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Bedrockium, 2L)}, new FluidStack[]{ + Materials.Naquadria.getMolten(2592), + Materials.SolderingAlloy.getMolten(2592), + Materials.Lubricant.getFluid(4000), + Materials.Silicone.getMolten(5760)}, ItemList.Conveyor_Module_UHV.get(1), 1000, 200000); TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Conveyor_Module_UHV.get(1L), - 48000, 64, 200000, 8, new ItemStack[]{ - ItemList.Electric_Motor_UEV.get(2L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Infinity, 2L), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Infinity, 8L), - GT_OreDictUnificator.get(OrePrefixes.round, Materials.Infinity, 64L), - GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Draconium, 2L)}, new FluidStack[]{ - Materials.Quantium.getMolten(2592), - Materials.SolderingAlloy.getMolten(5184), - Materials.Lubricant.getFluid(8000), - Materials.Silicone.getMolten(11520)}, ItemList.Conveyor_Module_UEV.get(1), 2000, 800000); + 48000, 64, 200000, 8, new ItemStack[]{ + ItemList.Electric_Motor_UEV.get(2L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Infinity, 2L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Infinity, 8L), + GT_OreDictUnificator.get(OrePrefixes.round, Materials.Infinity, 64L), + GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Draconium, 2L)}, new FluidStack[]{ + Materials.Quantium.getMolten(2592), + Materials.SolderingAlloy.getMolten(5184), + Materials.Lubricant.getFluid(8000), + Materials.Silicone.getMolten(11520)}, ItemList.Conveyor_Module_UEV.get(1), 2000, 800000); //Piston UV-UHV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Electric_Piston_UV.get(1L), - 24000, 32, 100000, 4, new ItemStack[]{ - ItemList.Electric_Motor_UHV.get(1L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.CosmicNeutronium, 6L), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.CosmicNeutronium, 8L), - GT_OreDictUnificator.get(OrePrefixes.round, Materials.CosmicNeutronium, 64L), - GT_OreDictUnificator.get(OrePrefixes.stick, Materials.CosmicNeutronium, 8L), - GT_OreDictUnificator.get(OrePrefixes.gear, Materials.CosmicNeutronium, 2L), - GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.CosmicNeutronium, 4L), - GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Bedrockium, 4L)}, new FluidStack[]{ - Materials.Naquadria.getMolten(2592), - Materials.SolderingAlloy.getMolten(2592), - Materials.Lubricant.getFluid(4000)}, ItemList.Electric_Piston_UHV.get(1), 1000, 200000); + 24000, 32, 100000, 4, new ItemStack[]{ + ItemList.Electric_Motor_UHV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.CosmicNeutronium, 6L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.CosmicNeutronium, 8L), + GT_OreDictUnificator.get(OrePrefixes.round, Materials.CosmicNeutronium, 64L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.CosmicNeutronium, 8L), + GT_OreDictUnificator.get(OrePrefixes.gear, Materials.CosmicNeutronium, 2L), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.CosmicNeutronium, 4L), + GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Bedrockium, 4L)}, new FluidStack[]{ + Materials.Naquadria.getMolten(2592), + Materials.SolderingAlloy.getMolten(2592), + Materials.Lubricant.getFluid(4000)}, ItemList.Electric_Piston_UHV.get(1), 1000, 200000); TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Electric_Piston_UHV.get(1L), - 48000, 64, 200000, 8, new ItemStack[]{ - ItemList.Electric_Motor_UEV.get(1L), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Infinity, 6L), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Infinity, 8L), - GT_OreDictUnificator.get(OrePrefixes.round, Materials.Infinity, 64L), - GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Infinity, 8L), - GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Infinity, 2L), - GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Infinity, 4L), - GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Draconium, 4L)}, new FluidStack[]{ - Materials.Quantium.getMolten(2592), - Materials.SolderingAlloy.getMolten(5184), - Materials.Lubricant.getFluid(8000)}, ItemList.Electric_Piston_UEV.get(1), 2000, 800000); + 48000, 64, 200000, 8, new ItemStack[]{ + ItemList.Electric_Motor_UEV.get(1L), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Infinity, 6L), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Infinity, 8L), + GT_OreDictUnificator.get(OrePrefixes.round, Materials.Infinity, 64L), + GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Infinity, 8L), + GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Infinity, 2L), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Infinity, 4L), + GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Draconium, 4L)}, new FluidStack[]{ + Materials.Quantium.getMolten(2592), + Materials.SolderingAlloy.getMolten(5184), + Materials.Lubricant.getFluid(8000)}, ItemList.Electric_Piston_UEV.get(1), 2000, 800000); //Robot Arm UV-UHV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Robot_Arm_UV.get(1L), - 24000, 32, 100000, 4, new Object[]{ - GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.CosmicNeutronium, 8L), - GT_OreDictUnificator.get(OrePrefixes.gear, Materials.CosmicNeutronium, 2L), - GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.CosmicNeutronium, 6L), - ItemList.Electric_Motor_UHV.get(2L), - ItemList.Electric_Piston_UHV.get(1L), + 24000, 32, 100000, 4, new Object[]{ + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.CosmicNeutronium, 8L), + GT_OreDictUnificator.get(OrePrefixes.gear, Materials.CosmicNeutronium, 2L), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.CosmicNeutronium, 6L), + ItemList.Electric_Motor_UHV.get(2L), + ItemList.Electric_Piston_UHV.get(1L), new Object[]{OrePrefixes.circuit.get(Materials.Infinite), 2L}, new Object[]{OrePrefixes.circuit.get(Materials.Superconductor), 4L}, new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), 8L}, - GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Bedrockium, 6L)}, new FluidStack[]{ - Materials.Naquadria.getMolten(2592), - Materials.SolderingAlloy.getMolten(4608), - Materials.Lubricant.getFluid(4000)}, ItemList.Robot_Arm_UHV.get(1L), 1000, 200000); + GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Bedrockium, 6L)}, new FluidStack[]{ + Materials.Naquadria.getMolten(2592), + Materials.SolderingAlloy.getMolten(4608), + Materials.Lubricant.getFluid(4000)}, ItemList.Robot_Arm_UHV.get(1L), 1000, 200000); TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Robot_Arm_UHV.get(1L), - 48000, 64, 200000, 8, new Object[]{ - GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Infinity, 8L), - GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Infinity, 2L), - GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Infinity, 6L), - ItemList.Electric_Motor_UEV.get(2L), - ItemList.Electric_Piston_UEV.get(1L), + 48000, 64, 200000, 8, new Object[]{ + GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Infinity, 8L), + GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Infinity, 2L), + GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, Materials.Infinity, 6L), + ItemList.Electric_Motor_UEV.get(2L), + ItemList.Electric_Piston_UEV.get(1L), new Object[]{OrePrefixes.circuit.get(Materials.Bio), 2L}, new Object[]{OrePrefixes.circuit.get(Materials.Infinite), 4L}, new Object[]{OrePrefixes.circuit.get(Materials.Superconductor), 8L}, - GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Draconium, 6L)}, new FluidStack[]{ - Materials.Quantium.getMolten(2592), - Materials.SolderingAlloy.getMolten(9216), - Materials.Lubricant.getFluid(8000)}, ItemList.Robot_Arm_UEV.get(1L), 2000, 800000); + GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Draconium, 6L)}, new FluidStack[]{ + Materials.Quantium.getMolten(2592), + Materials.SolderingAlloy.getMolten(9216), + Materials.Lubricant.getFluid(8000)}, ItemList.Robot_Arm_UEV.get(1L), 2000, 800000); //Emitter UV-UHV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Emitter_UV.get(1L), - 24000, 32, 100000, 4, new Object[]{ + 24000, 32, 100000, 4, new Object[]{ GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.CosmicNeutronium, 1L), ItemList.Electric_Motor_UHV.get(1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.CosmicNeutronium, 8L), @@ -824,7 +824,7 @@ public class DreamCraftRecipeLoader implements Runnable { ItemList.Emitter_UHV.get(1L), 1000, 200000); TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Emitter_UHV.get(1L), - 48000, 64, 200000, 8, new Object[]{ + 48000, 64, 200000, 8, new Object[]{ GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Infinity, 1L), ItemList.Electric_Motor_UEV.get(1L), GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Infinity, 16L), @@ -841,7 +841,7 @@ public class DreamCraftRecipeLoader implements Runnable { //Sensor UV-UHV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Sensor_UV.get(1L), - 24000, 32, 100000, 4, new Object[]{ + 24000, 32, 100000, 4, new Object[]{ GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.CosmicNeutronium, 1L), ItemList.Electric_Motor_UHV.get(1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.CosmicNeutronium, 8L), @@ -857,7 +857,7 @@ public class DreamCraftRecipeLoader implements Runnable { ItemList.Sensor_UHV.get(1L), 1000, 200000); TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Sensor_UHV.get(1L), - 48000, 64, 200000, 8, new Object[]{ + 48000, 64, 200000, 8, new Object[]{ GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Infinity, 1L), ItemList.Electric_Motor_UEV.get(1), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Infinity, 8L), @@ -874,7 +874,7 @@ public class DreamCraftRecipeLoader implements Runnable { //Fieldgen UV and UHV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Field_Generator_UV.get(1), - 48000, 64, 200000, 8, new Object[]{ + 48000, 64, 200000, 8, new Object[]{ GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.CosmicNeutronium, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.CosmicNeutronium, 6L), new Object[]{OrePrefixes.circuit.get(Materials.Bio), 4L}, @@ -893,7 +893,7 @@ public class DreamCraftRecipeLoader implements Runnable { ItemList.Field_Generator_UHV.get(1L), 2000, 200000); TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Field_Generator_UHV.get(1L), - 96000, 128, 400000, 16, new Object[]{ + 96000, 128, 400000, 16, new Object[]{ GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Infinity, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Infinity, 6L), new Object[]{OrePrefixes.circuit.get(Materials.Bio), 8L}, @@ -913,7 +913,7 @@ public class DreamCraftRecipeLoader implements Runnable { //UHV Energy Hatch TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Hatch_Energy_UV.get(1L), - 24000, 16, 50000, 2, new Object[]{ + 24000, 16, 50000, 2, new Object[]{ ItemList.Hull_MAX.get(1L), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.SuperconductorUHV, 2L), ItemList.Circuit_Chip_QPIC.get(2L), @@ -934,7 +934,7 @@ public class DreamCraftRecipeLoader implements Runnable { }, ItemList.Hatch_Energy_MAX.get(1L), 1000, 2000000); TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Hatch_Dynamo_UV.get(1L), - 48000, 32, 100000, 4, new Object[]{ + 48000, 32, 100000, 4, new Object[]{ ItemList.Hull_MAX.get(1L), GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Longasssuperconductornameforuhvwire, 8L), ItemList.Circuit_Chip_QPIC.get(2L), @@ -956,26 +956,26 @@ public class DreamCraftRecipeLoader implements Runnable { //UHV Circuit TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Circuit_Wetwaresupercomputer.get(1L), - 24000, 64, 50000, 4, new ItemStack[]{ - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Tritanium, 2), - ItemList.Circuit_Wetwaresupercomputer.get(2L), - ItemList.ZPM_Coil.get(16L), - ItemList.Circuit_Parts_CapacitorSMD.get(64L), - ItemList.Circuit_Parts_ResistorSMD.get(64L), - ItemList.Circuit_Parts_TransistorSMD.get(64L), - ItemList.Circuit_Parts_DiodeSMD.get(64L), - ItemList.Circuit_Chip_Ram.get(48L), - GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorZPM, 64L), - GT_OreDictUnificator.get(OrePrefixes.foil, (Materials.AnySyntheticRubber), 64L), - }, new FluidStack[]{ - Materials.SolderingAlloy.getMolten(2880L), - new FluidStack(FluidRegistry.getFluid("ic2coolant"), 10000), - Materials.Radon.getGas(2500L), - }, ItemList.Circuit_Wetwaremainframe.get(1L), 2000, 300000); + 24000, 64, 50000, 4, new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Tritanium, 2), + ItemList.Circuit_Wetwaresupercomputer.get(2L), + ItemList.ZPM_Coil.get(16L), + ItemList.Circuit_Parts_CapacitorSMD.get(64L), + ItemList.Circuit_Parts_ResistorSMD.get(64L), + ItemList.Circuit_Parts_TransistorSMD.get(64L), + ItemList.Circuit_Parts_DiodeSMD.get(64L), + ItemList.Circuit_Chip_Ram.get(48L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorZPM, 64L), + GT_OreDictUnificator.get(OrePrefixes.foil, (Materials.AnySyntheticRubber), 64L), + }, new FluidStack[]{ + Materials.SolderingAlloy.getMolten(2880L), + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 10000), + Materials.Radon.getGas(2500L), + }, ItemList.Circuit_Wetwaremainframe.get(1L), 2000, 300000); //Bio Chips TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Circuit_Biowarecomputer.get(1L), - 48000, 128, 500000, 8, new ItemStack[]{ + 48000, 128, 500000, 8, new ItemStack[]{ ItemList.Circuit_Board_Bio_Ultra.get(2L), ItemList.Circuit_Biowarecomputer.get(2L), ItemList.Circuit_Parts_TransistorSMD.get(16L), @@ -994,7 +994,7 @@ public class DreamCraftRecipeLoader implements Runnable { ItemList.Circuit_Biowaresupercomputer.get(1L), 4000, 500000); TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Circuit_Biowaresupercomputer.get(1L), - 96000, 256, 1000000, 16, new ItemStack[]{ + 96000, 256, 1000000, 16, new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Tritanium, 4L), ItemList.Circuit_Biowaresupercomputer.get(2L), ItemList.UV_Coil.get(16L), @@ -1014,69 +1014,69 @@ public class DreamCraftRecipeLoader implements Runnable { //GTNH Circuits TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Circuit_Biomainframe.get(1L), - 192000, 512, 2000000, 32, new ItemStack[]{ - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Tritanium, 8), - ItemList.Circuit_Biomainframe.get(2L), - ItemList.Circuit_Parts_CapacitorSMD.get(64L), - ItemList.Circuit_Parts_ResistorSMD.get(64L), - ItemList.Circuit_Parts_TransistorSMD.get(64L), - ItemList.Circuit_Parts_DiodeSMD.get(64L), - ItemList.Circuit_Chip_Ram.get(64L), - ItemList.Circuit_Chip_NPIC.get(64L), - GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Draconium, 64), - GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorUHV, 64), - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 64), - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Polybenzimidazole, 64) - }, new FluidStack[]{ - Materials.SolderingAlloy.getMolten(3760L), - Materials.Naquadria.getMolten(4032L), - new FluidStack(FluidRegistry.getFluid("ic2coolant"), 20000) - }, getItemContainer("NanoCircuit").get(1L), 8000, 8000000); + 192000, 512, 2000000, 32, new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Tritanium, 8), + ItemList.Circuit_Biomainframe.get(2L), + ItemList.Circuit_Parts_CapacitorSMD.get(64L), + ItemList.Circuit_Parts_ResistorSMD.get(64L), + ItemList.Circuit_Parts_TransistorSMD.get(64L), + ItemList.Circuit_Parts_DiodeSMD.get(64L), + ItemList.Circuit_Chip_Ram.get(64L), + ItemList.Circuit_Chip_NPIC.get(64L), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Draconium, 64), + GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorUHV, 64), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 64), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Polybenzimidazole, 64) + }, new FluidStack[]{ + Materials.SolderingAlloy.getMolten(3760L), + Materials.Naquadria.getMolten(4032L), + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 20000) + }, getItemContainer("NanoCircuit").get(1L), 8000, 8000000); TT_recipeAdder.addResearchableAssemblylineRecipe(getItemContainer("PicoWafer").get(1), - 384000, 1024, 4000000, 64, new ItemStack[]{ - ItemList.Circuit_Board_Bio_Ultra.get(1L), - getItemContainer("PicoWafer").get(4L), - getItemContainer("NanoCircuit").get(2L), - ItemList.Circuit_Parts_TransistorSMD.get(64L), - ItemList.Circuit_Parts_ResistorSMD.get(64L), - ItemList.Circuit_Parts_CapacitorSMD.get(64L), - ItemList.Circuit_Parts_DiodeSMD.get(64L), - ItemList.Circuit_Chip_PPIC.get(64L), - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.NiobiumTitanium, 16), - GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Osmium, 32), - GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Neutronium, 16), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Lanthanum, 64) - }, new FluidStack[]{ - Materials.SolderingAlloy.getMolten(3760L), - Materials.UUMatter.getFluid(8000L), - Materials.Osmium.getMolten(1152L) - }, getItemContainer("PikoCircuit").get(1L), 10000, 8000000); + 384000, 1024, 4000000, 64, new ItemStack[]{ + ItemList.Circuit_Board_Bio_Ultra.get(1L), + getItemContainer("PicoWafer").get(4L), + getItemContainer("NanoCircuit").get(2L), + ItemList.Circuit_Parts_TransistorSMD.get(64L), + ItemList.Circuit_Parts_ResistorSMD.get(64L), + ItemList.Circuit_Parts_CapacitorSMD.get(64L), + ItemList.Circuit_Parts_DiodeSMD.get(64L), + ItemList.Circuit_Chip_PPIC.get(64L), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.NiobiumTitanium, 16), + GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Osmium, 32), + GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Neutronium, 16), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Lanthanum, 64) + }, new FluidStack[]{ + Materials.SolderingAlloy.getMolten(3760L), + Materials.UUMatter.getFluid(8000L), + Materials.Osmium.getMolten(1152L) + }, getItemContainer("PikoCircuit").get(1L), 10000, 8000000); TT_recipeAdder.addResearchableAssemblylineRecipe(getItemContainer("PikoCircuit").get(1L), - 720000, 2048, 8000000, 128, new ItemStack[]{ - GT_OreDictUnificator.get(OrePrefixes.frameGt,Materials.Neutronium, 16), - getItemContainer("PikoCircuit").get(8L), - ItemList.Circuit_Parts_CapacitorSMD.get(64L), - ItemList.Circuit_Parts_DiodeSMD.get(64L), - ItemList.Circuit_Parts_TransistorSMD.get(64L), - ItemList.Circuit_Parts_ResistorSMD.get(64L), - ItemList.Circuit_Chip_QPIC.get(64L), - GT_OreDictUnificator.get(OrePrefixes.foil, Materials.NiobiumTitanium, 64), - GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Indium, 64), - GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Bedrockium, 8), - GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Lanthanum, 64) - }, new FluidStack[]{ - Materials.SolderingAlloy.getMolten(3760L), - Materials.UUMatter.getFluid(24000L), - Materials.Osmium.getMolten(2304L) - }, getItemContainer("QuantumCircuit").get(1L), 20000, 32000000); + 720000, 2048, 8000000, 128, new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Neutronium, 16), + getItemContainer("PikoCircuit").get(8L), + ItemList.Circuit_Parts_CapacitorSMD.get(64L), + ItemList.Circuit_Parts_DiodeSMD.get(64L), + ItemList.Circuit_Parts_TransistorSMD.get(64L), + ItemList.Circuit_Parts_ResistorSMD.get(64L), + ItemList.Circuit_Chip_QPIC.get(64L), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.NiobiumTitanium, 64), + GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Indium, 64), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Bedrockium, 8), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Lanthanum, 64) + }, new FluidStack[]{ + Materials.SolderingAlloy.getMolten(3760L), + Materials.UUMatter.getFluid(24000L), + Materials.Osmium.getMolten(2304L) + }, getItemContainer("QuantumCircuit").get(1L), 20000, 32000000); //Stargate Stuff - if (Loader.isModLoaded("eternalsingularity")&&Loader.isModLoaded("SGCraft")) { + if (Loader.isModLoaded("eternalsingularity") && Loader.isModLoaded("SGCraft")) { TT_recipeAdder.addResearchableAssemblylineRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Infinity, 1L), - 192000, 512, 2000000, 32, new ItemStack[]{ + 192000, 512, 2000000, 32, new ItemStack[]{ GT_ModHandler.getModItem("eternalsingularity", "eternal_singularity", 1L), ItemList.Sensor_UV.get(16L), GT_OreDictUnificator.get(OrePrefixes.block, Materials.Infinity, 16L), @@ -1095,7 +1095,7 @@ public class DreamCraftRecipeLoader implements Runnable { getItemContainer("StargateShieldingFoil").get(1L), 72000, 2000000); TT_recipeAdder.addResearchableAssemblylineRecipe(getItemContainer("StargateShieldingFoil").get(1L), - 192000, 512, 2000000, 32, new ItemStack[]{ + 192000, 512, 2000000, 32, new ItemStack[]{ ItemList.Electric_Piston_UV.get(16L), ItemList.Electric_Motor_UV.get(64L), GT_OreDictUnificator.get(OrePrefixes.block, Materials.Infinity, 16L), @@ -1117,7 +1117,7 @@ public class DreamCraftRecipeLoader implements Runnable { getItemContainer("StargateChevron").get(1L), 72000, 2000000); TT_recipeAdder.addResearchableAssemblylineRecipe(GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Neutronium, 1L), - 192000, 512, 2000000, 32, new ItemStack[]{ + 192000, 512, 2000000, 32, new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Infinity, 64L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.NaquadahAlloy, 64L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.CosmicNeutronium, 64L), @@ -1132,7 +1132,7 @@ public class DreamCraftRecipeLoader implements Runnable { getItemContainer("StargateFramePart").get(1L), 72000, 2000000); //Batteries - TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Energy_Cluster.get(1L),12000,16,100000,3,new Object[]{ + TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Energy_Cluster.get(1L), 12000, 16, 100000, 3, new Object[]{ GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Tritanium, 64L), new Object[]{OrePrefixes.circuit.get(Materials.Infinite), 4L}, ItemList.Energy_Cluster.get(8L), @@ -1146,7 +1146,7 @@ public class DreamCraftRecipeLoader implements Runnable { new FluidStack(FluidRegistry.getFluid("ic2coolant"), 16000) }, ItemList.ZPM2.get(1), 3000, 400000); - TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.ZPM2.get(1L),24000,64,200000,6,new Object[]{ + TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.ZPM2.get(1L), 24000, 64, 200000, 6, new Object[]{ GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Neutronium, 32L), GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Neutronium, 32L), new Object[]{OrePrefixes.circuit.get(Materials.Bio), 4L}, @@ -1170,340 +1170,340 @@ public class DreamCraftRecipeLoader implements Runnable { //Tesla Transceiver LV 1A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_1by1_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_1by1_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_LV.get(1), 400, 30); //Tesla Transceiver MV 1A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_1by1_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_1by1_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_MV.get(1), 400, 120); //Tesla Transceiver HV 1A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_1by1_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_1by1_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_HV.get(1), 400, 480); //Tesla Transceiver EV 1A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_1by1_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_1by1_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_EV.get(1), 400, 1920); //Tesla Transceiver IV 1A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_1by1_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_1by1_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_IV.get(1), 400, 7680); //Tesla Transceiver LV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_2by2_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_2by2_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_LV.get(1), 400, 30); //Tesla Transceiver MV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_2by2_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_2by2_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_MV.get(1), 400, 120); //Tesla Transceiver HV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_2by2_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_2by2_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_HV.get(1), 400, 480); //Tesla Transceiver EV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_2by2_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_2by2_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_EV.get(1), 400, 1920); //Tesla Transceiver IV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_2by2_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_2by2_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_IV.get(1), 400, 7680); //Tesla Transceiver LV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_3by3_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_3by3_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_LV.get(1), 400, 30); //Tesla Transceiver MV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_3by3_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_3by3_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_MV.get(1), 400, 120); //Tesla Transceiver HV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_3by3_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_3by3_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_HV.get(1), 400, 480); //Tesla Transceiver EV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_3by3_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_3by3_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_EV.get(1), 400, 1920); //Tesla Transceiver IV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_3by3_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_3by3_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_IV.get(1), 400, 7680); //Tesla Transceiver LV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_4by4_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_4by4_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_4by4_LV.get(1), 400, 30); //Tesla Transceiver MV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_4by4_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_4by4_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_4by4_MV.get(1), 400, 120); //Tesla Transceiver HV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_4by4_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_4by4_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_4by4_HV.get(1), 400, 480); //Tesla Transceiver EV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_4by4_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_4by4_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_4by4_EV.get(1), 400, 1920); //Tesla Transceiver IV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_4by4_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_4by4_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_4by4_IV.get(1), 400, 7680); @@ -1515,39 +1515,107 @@ public class DreamCraftRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 32), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.NickelZincFerrite, 8), - }, Materials.Epoxid.getMolten(288), CustomItemList.teslaComponent.getWithDamage(1,0), 320, 30); + }, Materials.Epoxid.getMolten(288), CustomItemList.teslaComponent.getWithDamage(1, 0), 320, 30); + + //endregion + + //region items + + //LV Tesla Capacitor + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Tin, 4), + GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 4), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 8), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 8), + }, Materials.Epoxid.getMolten(72), CustomItemList.teslaCapacitor.getWithDamage(1, 0), 320, 30); + + //MV Tesla Capacitor + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Copper, 4), + GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 6), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 12), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 12), + }, Materials.Epoxid.getMolten(144), CustomItemList.teslaCapacitor.getWithDamage(1, 1), 320, 120); + + //HV Tesla Capacitor + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Gold, 4), + GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 8), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 16), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 16), + }, Materials.Epoxid.getMolten(216), CustomItemList.teslaCapacitor.getWithDamage(1, 2), 320, 480); + + //EV Tesla Capacitor + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Aluminium, 4), + GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 10), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 20), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 20), + }, Materials.Epoxid.getMolten(288), CustomItemList.teslaCapacitor.getWithDamage(1, 3), 320, 1920); + + //IV Tesla Capacitor + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Tungsten, 4), + GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 12), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 24), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 24), + }, Materials.Epoxid.getMolten(360), CustomItemList.teslaCapacitor.getWithDamage(1, 4), 320, 7680); + + //endregion + + //region recycling + + //LV Tesla Capacitor + GT_Values.RA.addExtractorRecipe(CustomItemList.teslaCapacitor.getWithDamage(1, 0), + GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 4), 300, 2); + + //MV Tesla Capacitor + GT_Values.RA.addExtractorRecipe(CustomItemList.teslaCapacitor.getWithDamage(1, 1), + GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 6), 300, 2); + + //HV Tesla Capacitor + GT_Values.RA.addExtractorRecipe(CustomItemList.teslaCapacitor.getWithDamage(1, 2), + GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 8), 300, 2); + + //EV Tesla Capacitor + GT_Values.RA.addExtractorRecipe(CustomItemList.teslaCapacitor.getWithDamage(1, 3), + GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 10), 300, 2); + + //IV Tesla Capacitor + GT_Values.RA.addExtractorRecipe(CustomItemList.teslaCapacitor.getWithDamage(1, 4), + GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 12), 300, 2); //endregion register_machine_EM_behaviours(); } - private void register_machine_EM_behaviours(){ - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Centrifuge(5),ItemList.Machine_IV_Centrifuge.get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Centrifuge(6),getItemContainer("CentrifugeLuV").get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Centrifuge(7),getItemContainer("CentrifugeZPM").get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Centrifuge(8),getItemContainer("CentrifugeUV").get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Centrifuge(9),getItemContainer("CentrifugeUHV").get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Centrifuge(10),getItemContainer("CentrifugeUEV").get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Centrifuge(11),getItemContainer("CentrifugeUIV").get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Centrifuge(12),getItemContainer("CentrifugeUMV").get(1)); - - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_ElectromagneticSeparator(5),ItemList.Machine_IV_ElectromagneticSeparator.get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_ElectromagneticSeparator(6),getItemContainer("ElectromagneticSeparatorLuV").get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_ElectromagneticSeparator(7),getItemContainer("ElectromagneticSeparatorZPM").get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_ElectromagneticSeparator(8),getItemContainer("ElectromagneticSeparatorUV").get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_ElectromagneticSeparator(9),getItemContainer("ElectromagneticSeparatorUHV").get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_ElectromagneticSeparator(10),getItemContainer("ElectromagneticSeparatorUEV").get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_ElectromagneticSeparator(11),getItemContainer("ElectromagneticSeparatorUIV").get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_ElectromagneticSeparator(12),getItemContainer("ElectromagneticSeparatorUMV").get(1)); - - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Recycler(5),ItemList.Machine_IV_Recycler.get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Recycler(6),getItemContainer("RecyclerLuV").get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Recycler(7),getItemContainer("RecyclerZPM").get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Recycler(8),getItemContainer("RecyclerUV").get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Recycler(9),getItemContainer("RecyclerUHV").get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Recycler(10),getItemContainer("RecyclerUEV").get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Recycler(11),getItemContainer("RecyclerUIV").get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Recycler(12),getItemContainer("RecyclerUMV").get(1)); + private void register_machine_EM_behaviours() { + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Centrifuge(5), ItemList.Machine_IV_Centrifuge.get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Centrifuge(6), getItemContainer("CentrifugeLuV").get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Centrifuge(7), getItemContainer("CentrifugeZPM").get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Centrifuge(8), getItemContainer("CentrifugeUV").get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Centrifuge(9), getItemContainer("CentrifugeUHV").get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Centrifuge(10), getItemContainer("CentrifugeUEV").get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Centrifuge(11), getItemContainer("CentrifugeUIV").get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Centrifuge(12), getItemContainer("CentrifugeUMV").get(1)); + + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_ElectromagneticSeparator(5), ItemList.Machine_IV_ElectromagneticSeparator.get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_ElectromagneticSeparator(6), getItemContainer("ElectromagneticSeparatorLuV").get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_ElectromagneticSeparator(7), getItemContainer("ElectromagneticSeparatorZPM").get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_ElectromagneticSeparator(8), getItemContainer("ElectromagneticSeparatorUV").get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_ElectromagneticSeparator(9), getItemContainer("ElectromagneticSeparatorUHV").get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_ElectromagneticSeparator(10), getItemContainer("ElectromagneticSeparatorUEV").get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_ElectromagneticSeparator(11), getItemContainer("ElectromagneticSeparatorUIV").get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_ElectromagneticSeparator(12), getItemContainer("ElectromagneticSeparatorUMV").get(1)); + + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Recycler(5), ItemList.Machine_IV_Recycler.get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Recycler(6), getItemContainer("RecyclerLuV").get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Recycler(7), getItemContainer("RecyclerZPM").get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Recycler(8), getItemContainer("RecyclerUV").get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Recycler(9), getItemContainer("RecyclerUHV").get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Recycler(10), getItemContainer("RecyclerUEV").get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Recycler(11), getItemContainer("RecyclerUIV").get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Recycler(12), getItemContainer("RecyclerUMV").get(1)); } -} +} \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/loader/recipe/BloodyRecipeLoader.java b/src/main/java/com/github/technus/tectech/loader/recipe/BloodyRecipeLoader.java index 7eb46d0551..cd1896b467 100644 --- a/src/main/java/com/github/technus/tectech/loader/recipe/BloodyRecipeLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/recipe/BloodyRecipeLoader.java @@ -48,7 +48,7 @@ public class BloodyRecipeLoader implements Runnable { ItemList.Field_Generator_MV.get(1), ItemList.Circuit_Quantummainframe.get(1) }, Materials.Osmium.getMolten(288), CustomItemList.EMpipe.get(1), 400, 491520); - + //Laser GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ CustomItemList.DATApipe.get(1), @@ -107,7 +107,7 @@ public class BloodyRecipeLoader implements Runnable { //Hollow Casing TT_recipeAdder.addResearchableAssemblylineRecipe(CustomItemList.eM_Containment.get(1), - 12000,32, 500000, 6, new ItemStack[]{ + 12000, 32, 500000, 6, new ItemStack[]{ CustomItemList.eM_Containment.get(1), GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Neutronium, 8), GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Plutonium, 2), @@ -123,10 +123,10 @@ public class BloodyRecipeLoader implements Runnable { //EM Coil TT_recipeAdder.addResearchableAssemblylineRecipe(CustomItemList.eM_Hollow.get(1), - 48000,128, 1000000, 16, new ItemStack[]{ + 48000, 128, 1000000, 16, new ItemStack[]{ CustomItemList.eM_Hollow.get(1), ItemList.Casing_Fusion_Coil.get(4), - ItemList.Casing_Coil_NaquadahAlloy.get( 4), + ItemList.Casing_Coil_NaquadahAlloy.get(4), GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Neutronium, 8), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Americium, 16), }, new FluidStack[]{ @@ -143,7 +143,7 @@ public class BloodyRecipeLoader implements Runnable { }, null, CustomItemList.tM_TeslaBase.get(1), 50, 16); GT_ModHandler.addCraftingRecipe(CustomItemList.tM_TeslaBase.get(1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[]{"PhP","PFP","PwP", + new Object[]{"PhP", "PFP", "PwP", 'P', OrePrefixes.plate.get(Materials.NickelZincFerrite), 'F', OrePrefixes.frameGt.get(Materials.NickelZincFerrite)}); @@ -154,50 +154,50 @@ public class BloodyRecipeLoader implements Runnable { }, null, CustomItemList.tM_TeslaToroid.get(1), 50, 16); GT_ModHandler.addCraftingRecipe(CustomItemList.tM_TeslaToroid.get(1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[]{"PhP","PFP","PwP", + new Object[]{"PhP", "PFP", "PwP", 'P', OrePrefixes.foil.get(Materials.Aluminium), 'F', OrePrefixes.frameGt.get(Materials.Aluminium)}); //Tesla Secondary Windings GT_ModHandler.addCraftingRecipe(CustomItemList.tM_TeslaSecondary.get(1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[]{"WWW","WwW","WWW", - 'W', CustomItemList.teslaComponent.getWithDamage(1,0)}); + new Object[]{"WWW", "WwW", "WWW", + 'W', CustomItemList.teslaComponent.getWithDamage(1, 0)}); //Tesla Primary Coils T0 GT_ModHandler.addCraftingRecipe(CustomItemList.tM_TeslaPrimary_0.get(1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[]{"WWW","WwW","WWW", + new Object[]{"WWW", "WwW", "WWW", 'W', OrePrefixes.wireGt02.get(Materials.RedstoneAlloy)}); //Tesla Primary Coils T1 GT_ModHandler.addCraftingRecipe(CustomItemList.tM_TeslaPrimary_1.get(1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[]{"WWW","WwW","WWW", + new Object[]{"WWW", "WwW", "WWW", 'W', OrePrefixes.wireGt02.get(Materials.SuperconductorMV)}); //Tesla Primary Coils T2 GT_ModHandler.addCraftingRecipe(CustomItemList.tM_TeslaPrimary_2.get(1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[]{"WWW","WwW","WWW", + new Object[]{"WWW", "WwW", "WWW", 'W', OrePrefixes.wireGt02.get(Materials.SuperconductorHV)}); //Tesla Primary Coils T3 GT_ModHandler.addCraftingRecipe(CustomItemList.tM_TeslaPrimary_3.get(1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[]{"WWW","WwW","WWW", + new Object[]{"WWW", "WwW", "WWW", 'W', OrePrefixes.wireGt02.get(Materials.SuperconductorEV)}); //Tesla Primary Coils T4 GT_ModHandler.addCraftingRecipe(CustomItemList.tM_TeslaPrimary_4.get(1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[]{"WWW","WwW","WWW", + new Object[]{"WWW", "WwW", "WWW", 'W', OrePrefixes.wireGt02.get(Materials.SuperconductorIV)}); //Tesla Primary Coils T5 GT_ModHandler.addCraftingRecipe(CustomItemList.tM_TeslaPrimary_5.get(1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[]{"WWW","WwW","WWW", + new Object[]{"WWW", "WwW", "WWW", 'W', OrePrefixes.wireGt02.get(Materials.SuperconductorLuV)}); //endregion @@ -206,116 +206,116 @@ public class BloodyRecipeLoader implements Runnable { //Dynamo Hatches IV-UIV GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - ItemList.Hatch_Dynamo_IV.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Tungsten, 2), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 2)}, + ItemList.Hatch_Dynamo_IV.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Tungsten, 2), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 2)}, Materials.Silver.getMolten(144), CustomItemList.eM_dynamoMulti4_IV.get(1), 100, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.eM_dynamoMulti4_IV.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Tungsten, 2), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 4)}, + CustomItemList.eM_dynamoMulti4_IV.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Tungsten, 2), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 4)}, Materials.Electrum.getMolten(144), CustomItemList.eM_dynamoMulti16_IV.get(1), 200, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.eM_dynamoMulti16_IV.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.Tungsten, 2), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 6)}, + CustomItemList.eM_dynamoMulti16_IV.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.Tungsten, 2), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 6)}, Materials.Tungsten.getMolten(144), CustomItemList.eM_dynamoMulti64_IV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - ItemList.Hatch_Dynamo_LuV.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.VanadiumGallium, 2), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Chrome, 2)}, + ItemList.Hatch_Dynamo_LuV.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.VanadiumGallium, 2), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Chrome, 2)}, Materials.Silver.getMolten(288), CustomItemList.eM_dynamoMulti4_LuV.get(1), 100, 7860); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.eM_dynamoMulti4_LuV.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.VanadiumGallium, 2), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Chrome, 4)}, + CustomItemList.eM_dynamoMulti4_LuV.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.VanadiumGallium, 2), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Chrome, 4)}, Materials.Electrum.getMolten(288), CustomItemList.eM_dynamoMulti16_LuV.get(1), 200, 7860); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.eM_dynamoMulti16_LuV.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.VanadiumGallium, 2), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Chrome, 6)}, + CustomItemList.eM_dynamoMulti16_LuV.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.VanadiumGallium, 2), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Chrome, 6)}, Materials.Tungsten.getMolten(288), CustomItemList.eM_dynamoMulti64_LuV.get(1), 400, 7860); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - ItemList.Hatch_Dynamo_ZPM.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Naquadah, 2), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 2)}, + ItemList.Hatch_Dynamo_ZPM.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Naquadah, 2), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 2)}, Materials.Silver.getMolten(576), CustomItemList.eM_dynamoMulti4_ZPM.get(1), 100, 30720); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.eM_dynamoMulti4_ZPM.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Naquadah, 2), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 4)}, + CustomItemList.eM_dynamoMulti4_ZPM.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Naquadah, 2), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 4)}, Materials.Electrum.getMolten(576), CustomItemList.eM_dynamoMulti16_ZPM.get(1), 200, 30720); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.eM_dynamoMulti16_ZPM.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.Naquadah, 2), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 6)}, + CustomItemList.eM_dynamoMulti16_ZPM.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.Naquadah, 2), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 6)}, Materials.Tungsten.getMolten(576), CustomItemList.eM_dynamoMulti64_ZPM.get(1), 400, 30720); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - ItemList.Hatch_Dynamo_UV.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NaquadahAlloy, 2), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 2)}, + ItemList.Hatch_Dynamo_UV.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NaquadahAlloy, 2), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 2)}, Materials.Silver.getMolten(1152), CustomItemList.eM_dynamoMulti4_UV.get(1), 100, 122880); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.eM_dynamoMulti4_UV.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.NaquadahAlloy, 2), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 4)}, + CustomItemList.eM_dynamoMulti4_UV.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.NaquadahAlloy, 2), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 4)}, Materials.Electrum.getMolten(1152), CustomItemList.eM_dynamoMulti16_UV.get(1), 200, 122880); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.eM_dynamoMulti16_UV.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.NaquadahAlloy, 2), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 6)}, + CustomItemList.eM_dynamoMulti16_UV.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.NaquadahAlloy, 2), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 6)}, Materials.Tungsten.getMolten(1152), CustomItemList.eM_dynamoMulti64_UV.get(1), 400, 122880); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - ItemList.Hatch_Dynamo_MAX.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Superconductor, 2), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 2)}, + ItemList.Hatch_Dynamo_MAX.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Superconductor, 2), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 2)}, Materials.Silver.getMolten(2304), CustomItemList.eM_dynamoMulti4_UHV.get(1), 100, 500000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.eM_dynamoMulti4_UHV.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Superconductor, 2), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 4)}, + CustomItemList.eM_dynamoMulti4_UHV.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Superconductor, 2), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 4)}, Materials.Electrum.getMolten(2304), CustomItemList.eM_dynamoMulti16_UHV.get(1), 200, 500000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.eM_dynamoMulti16_UHV.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.Superconductor, 2), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 6)}, + CustomItemList.eM_dynamoMulti16_UHV.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.Superconductor, 2), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 6)}, Materials.Tungsten.getMolten(2304), CustomItemList.eM_dynamoMulti64_UHV.get(1), 400, 500000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - ItemList.Hatch_Dynamo_MAX.get(4), - GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Superconductor, 8), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 8)}, + ItemList.Hatch_Dynamo_MAX.get(4), + GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Superconductor, 8), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 8)}, Materials.Silver.getMolten(4608), CustomItemList.eM_dynamoMulti4_UEV.get(1), 500, 500000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.eM_dynamoMulti4_UEV.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Superconductor, 8), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 16)}, + CustomItemList.eM_dynamoMulti4_UEV.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Superconductor, 8), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 16)}, Materials.Electrum.getMolten(4608), CustomItemList.eM_dynamoMulti16_UEV.get(1), 1000, 500000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.eM_dynamoMulti16_UEV.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.Superconductor, 8), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 24)}, + CustomItemList.eM_dynamoMulti16_UEV.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.Superconductor, 8), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 24)}, Materials.Tungsten.getMolten(4608), CustomItemList.eM_dynamoMulti64_UEV.get(1), 2000, 500000); @@ -340,184 +340,184 @@ public class BloodyRecipeLoader implements Runnable { CustomItemList.eM_energyMulti64_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - ItemList.Hatch_Energy_LuV.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.VanadiumGallium, 2), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Chrome, 2)}, + ItemList.Hatch_Energy_LuV.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.VanadiumGallium, 2), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Chrome, 2)}, Materials.Silver.getMolten(288), CustomItemList.eM_energyMulti4_LuV.get(1), 100, 30720); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.eM_energyMulti4_LuV.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.VanadiumGallium, 2), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Chrome, 4)}, + CustomItemList.eM_energyMulti4_LuV.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.VanadiumGallium, 2), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Chrome, 4)}, Materials.Electrum.getMolten(288), CustomItemList.eM_energyMulti16_LuV.get(1), 200, 30720); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.eM_energyMulti16_LuV.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.VanadiumGallium, 2), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Chrome, 6)}, + CustomItemList.eM_energyMulti16_LuV.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.VanadiumGallium, 2), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Chrome, 6)}, Materials.Tungsten.getMolten(288), CustomItemList.eM_energyMulti64_LuV.get(1), 400, 30720); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - ItemList.Hatch_Energy_ZPM.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Naquadah, 2), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 2)}, + ItemList.Hatch_Energy_ZPM.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Naquadah, 2), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 2)}, Materials.Silver.getMolten(576), CustomItemList.eM_energyMulti4_ZPM.get(1), 100, 122880); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.eM_energyMulti4_ZPM.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Naquadah, 2), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 4)}, + CustomItemList.eM_energyMulti4_ZPM.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Naquadah, 2), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 4)}, Materials.Electrum.getMolten(576), CustomItemList.eM_energyMulti16_ZPM.get(1), 200, 122880); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.eM_energyMulti16_ZPM.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.Naquadah, 2), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 6)}, + CustomItemList.eM_energyMulti16_ZPM.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.Naquadah, 2), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 6)}, Materials.Tungsten.getMolten(576), CustomItemList.eM_energyMulti64_ZPM.get(1), 400, 122880); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - ItemList.Hatch_Energy_UV.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NaquadahAlloy, 2), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 2)}, + ItemList.Hatch_Energy_UV.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NaquadahAlloy, 2), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 2)}, Materials.Silver.getMolten(1152), CustomItemList.eM_energyMulti4_UV.get(1), 100, 500000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.eM_energyMulti4_UV.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.NaquadahAlloy, 2), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 4)}, + CustomItemList.eM_energyMulti4_UV.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.NaquadahAlloy, 2), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 4)}, Materials.Electrum.getMolten(1152), CustomItemList.eM_energyMulti16_UV.get(1), 200, 500000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.eM_energyMulti16_UV.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.NaquadahAlloy, 2), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 6)}, + CustomItemList.eM_energyMulti16_UV.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.NaquadahAlloy, 2), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 6)}, Materials.Tungsten.getMolten(1152), CustomItemList.eM_energyMulti64_UV.get(1), 400, 500000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - ItemList.Hatch_Energy_MAX.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Superconductor, 2), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 2)}, + ItemList.Hatch_Energy_MAX.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Superconductor, 2), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 2)}, Materials.Silver.getMolten(2304), CustomItemList.eM_energyMulti4_UHV.get(1), 100, 500000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.eM_energyMulti4_UHV.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Superconductor, 2), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 4)}, + CustomItemList.eM_energyMulti4_UHV.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Superconductor, 2), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 4)}, Materials.Electrum.getMolten(2304), CustomItemList.eM_energyMulti16_UHV.get(1), 200, 500000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.eM_energyMulti16_UHV.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.Superconductor, 2), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 6)}, + CustomItemList.eM_energyMulti16_UHV.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.Superconductor, 2), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 6)}, Materials.Tungsten.getMolten(2304), CustomItemList.eM_energyMulti64_UHV.get(1), 400, 500000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - ItemList.Hatch_Energy_MAX.get(4), - GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Superconductor, 8), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 8)}, - Materials.Silver.getMolten(4608), - CustomItemList.eM_energyMulti4_UEV.get(1), 100, 2000000); + ItemList.Hatch_Energy_MAX.get(4), + GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Superconductor, 8), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 8)}, + Materials.Silver.getMolten(4608), + CustomItemList.eM_energyMulti4_UEV.get(1), 100, 2000000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.eM_energyMulti4_UEV.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Superconductor, 8), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 16)}, - Materials.Electrum.getMolten(4608), - CustomItemList.eM_energyMulti16_UEV.get(1), 200, 2000000); + CustomItemList.eM_energyMulti4_UEV.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Superconductor, 8), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 16)}, + Materials.Electrum.getMolten(4608), + CustomItemList.eM_energyMulti16_UEV.get(1), 200, 2000000); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - CustomItemList.eM_energyMulti16_UEV.get(1), - GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.Superconductor, 8), - GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 24)}, - Materials.Tungsten.getMolten(4608), - CustomItemList.eM_energyMulti64_UEV.get(1), 400, 2000000); + CustomItemList.eM_energyMulti16_UEV.get(1), + GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.Superconductor, 8), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 24)}, + Materials.Tungsten.getMolten(4608), + CustomItemList.eM_energyMulti64_UEV.get(1), 400, 2000000); //Laser Dynamo IV-UV 256/t GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 1), ItemList.Emitter_IV.get(1), ItemList.Electric_Pump_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.TungstenSteel, 2), GT_Utility.getIntegratedCircuit(1)}, null, CustomItemList.eM_dynamoTunnel1_IV.get(1), 1000, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 1), ItemList.Emitter_LuV.get(1), ItemList.Electric_Pump_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.VanadiumGallium, 2), GT_Utility.getIntegratedCircuit(1)}, null, CustomItemList.eM_dynamoTunnel1_LuV.get(1), 1000, 30720); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_ZPM.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 1), ItemList.Emitter_ZPM.get(1), ItemList.Electric_Pump_ZPM.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Naquadah, 2), GT_Utility.getIntegratedCircuit(1)}, null, CustomItemList.eM_dynamoTunnel1_ZPM.get(1), 1000, 122880); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 1), ItemList.Emitter_UV.get(1), ItemList.Electric_Pump_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.NaquadahAlloy, 2), GT_Utility.getIntegratedCircuit(1)}, null, CustomItemList.eM_dynamoTunnel1_UV.get(1), 1000, 500000); - + //Laser Dynamo IV-UV 1024/t GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 2), ItemList.Emitter_IV.get(2), ItemList.Electric_Pump_IV.get(2), GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.TungstenSteel, 4), GT_Utility.getIntegratedCircuit(2)}, null, CustomItemList.eM_dynamoTunnel2_IV.get(1), 2000, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 2), ItemList.Emitter_LuV.get(2), ItemList.Electric_Pump_LuV.get(2), GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.VanadiumGallium, 4), GT_Utility.getIntegratedCircuit(2)}, null, CustomItemList.eM_dynamoTunnel2_LuV.get(1), 2000, 30720); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_ZPM.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 2), ItemList.Emitter_ZPM.get(2), ItemList.Electric_Pump_ZPM.get(2), GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.Naquadah, 4), GT_Utility.getIntegratedCircuit(2)}, null, CustomItemList.eM_dynamoTunnel2_ZPM.get(1), 2000, 122880); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 2), ItemList.Emitter_UV.get(2), ItemList.Electric_Pump_UV.get(2), GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.NaquadahAlloy, 4), GT_Utility.getIntegratedCircuit(2)}, null, CustomItemList.eM_dynamoTunnel2_UV.get(1), 2000, 500000); - + //Laser Dynamo IV-UV 4096/t GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 4), ItemList.Emitter_IV.get(4), ItemList.Electric_Pump_IV.get(4), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.TungstenSteel, 4), GT_Utility.getIntegratedCircuit(3)}, null, CustomItemList.eM_dynamoTunnel3_IV.get(1), 4000, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 4), ItemList.Emitter_LuV.get(4), ItemList.Electric_Pump_LuV.get(4), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.VanadiumGallium, 4), GT_Utility.getIntegratedCircuit(3)}, null, CustomItemList.eM_dynamoTunnel3_LuV.get(1), 4000, 30720); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_ZPM.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 4), ItemList.Emitter_ZPM.get(4), ItemList.Electric_Pump_ZPM.get(4), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Naquadah, 4), GT_Utility.getIntegratedCircuit(3)}, null, CustomItemList.eM_dynamoTunnel3_ZPM.get(1), 4000, 122880); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 4), ItemList.Emitter_UV.get(4), ItemList.Electric_Pump_UV.get(4), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NaquadahAlloy, 4), GT_Utility.getIntegratedCircuit(3)}, null, CustomItemList.eM_dynamoTunnel3_UV.get(1), 4000, 500000); - + //Laser Dynamo IV-UV 16384/t GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 8), ItemList.Emitter_IV.get(8), ItemList.Electric_Pump_IV.get(8), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.TungstenSteel, 8), GT_Utility.getIntegratedCircuit(4)}, null, CustomItemList.eM_dynamoTunnel4_IV.get(1), 8000, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 8), ItemList.Emitter_LuV.get(8), ItemList.Electric_Pump_LuV.get(8), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.VanadiumGallium, 8), GT_Utility.getIntegratedCircuit(4)}, null, CustomItemList.eM_dynamoTunnel4_LuV.get(1), 8000, 30720); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_ZPM.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 8), ItemList.Emitter_ZPM.get(8), ItemList.Electric_Pump_ZPM.get(8), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Naquadah, 8), GT_Utility.getIntegratedCircuit(4)}, null, CustomItemList.eM_dynamoTunnel4_ZPM.get(1), 8000, 122880); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 8), ItemList.Emitter_UV.get(8), ItemList.Electric_Pump_UV.get(8), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NaquadahAlloy, 8), GT_Utility.getIntegratedCircuit(4)}, null, CustomItemList.eM_dynamoTunnel4_UV.get(1), 8000, 500000); - + //Laser Dynamo IV-UV 65536/t GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 16), ItemList.Emitter_IV.get(16), ItemList.Electric_Pump_IV.get(16), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.TungstenSteel, 8), GT_Utility.getIntegratedCircuit(5)}, null, CustomItemList.eM_dynamoTunnel5_IV.get(1), 16000, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 16), ItemList.Emitter_LuV.get(16), ItemList.Electric_Pump_LuV.get(16), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.VanadiumGallium, 8), GT_Utility.getIntegratedCircuit(5)}, null, CustomItemList.eM_dynamoTunnel5_LuV.get(1), 16000, 30720); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_ZPM.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 16), ItemList.Emitter_ZPM.get(16), ItemList.Electric_Pump_ZPM.get(16), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Naquadah, 8), GT_Utility.getIntegratedCircuit(5)}, null, CustomItemList.eM_dynamoTunnel5_ZPM.get(1), 16000, 122880); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 16), ItemList.Emitter_UV.get(16), ItemList.Electric_Pump_UV.get(16), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.NaquadahAlloy, 8), GT_Utility.getIntegratedCircuit(5)}, null, CustomItemList.eM_dynamoTunnel5_UV.get(1), 16000, 500000); - + //Laser Dynamo IV-UV 262144/t GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 32), ItemList.Emitter_IV.get(32), ItemList.Electric_Pump_IV.get(32), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.TungstenSteel, 16), GT_Utility.getIntegratedCircuit(6)}, null, CustomItemList.eM_dynamoTunnel6_IV.get(1), 32000, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 32), ItemList.Emitter_LuV.get(32), ItemList.Electric_Pump_LuV.get(32), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.VanadiumGallium, 16), GT_Utility.getIntegratedCircuit(6)}, null, CustomItemList.eM_dynamoTunnel6_LuV.get(1), 32000, 30720); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_ZPM.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 32), ItemList.Emitter_ZPM.get(32), ItemList.Electric_Pump_ZPM.get(32), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Naquadah, 16), GT_Utility.getIntegratedCircuit(6)}, null, CustomItemList.eM_dynamoTunnel6_ZPM.get(1), 32000, 122880); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 32), ItemList.Emitter_UV.get(32), ItemList.Electric_Pump_UV.get(32), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.NaquadahAlloy, 16), GT_Utility.getIntegratedCircuit(6)}, null, CustomItemList.eM_dynamoTunnel6_UV.get(1), 32000, 500000); - + //Laser Dynamo IV-UV 1048576/t GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 64), ItemList.Emitter_IV.get(64), ItemList.Electric_Pump_IV.get(64), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.TungstenSteel, 16), GT_Utility.getIntegratedCircuit(7)}, null, CustomItemList.eM_dynamoTunnel7_IV.get(1), 64000, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 64), ItemList.Emitter_LuV.get(64), ItemList.Electric_Pump_LuV.get(64), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.VanadiumGallium, 16), GT_Utility.getIntegratedCircuit(7)}, null, CustomItemList.eM_dynamoTunnel7_LuV.get(1), 64000, 30720); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_ZPM.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 64), ItemList.Emitter_ZPM.get(64), ItemList.Electric_Pump_ZPM.get(64), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.Naquadah, 16), GT_Utility.getIntegratedCircuit(7)}, null, CustomItemList.eM_dynamoTunnel7_ZPM.get(1), 64000, 122880); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 64), ItemList.Emitter_UV.get(64), ItemList.Electric_Pump_UV.get(64), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.NaquadahAlloy, 16), GT_Utility.getIntegratedCircuit(7)}, null, CustomItemList.eM_dynamoTunnel7_UV.get(1), 64000, 500000); - + //Laser Target IV-UV 256/t GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 1), ItemList.Sensor_IV.get(1), ItemList.Electric_Pump_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.TungstenSteel, 2), GT_Utility.getIntegratedCircuit(1)}, null, CustomItemList.eM_energyTunnel1_IV.get(1), 1000, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 1), ItemList.Sensor_LuV.get(1), ItemList.Electric_Pump_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.VanadiumGallium, 2), GT_Utility.getIntegratedCircuit(1)}, null, CustomItemList.eM_energyTunnel1_LuV.get(1), 1000, 30720); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_ZPM.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 1), ItemList.Sensor_ZPM.get(1), ItemList.Electric_Pump_ZPM.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Naquadah, 2), GT_Utility.getIntegratedCircuit(1)}, null, CustomItemList.eM_energyTunnel1_ZPM.get(1), 1000, 122880); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 1), ItemList.Sensor_UV.get(1), ItemList.Electric_Pump_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.NaquadahAlloy, 2), GT_Utility.getIntegratedCircuit(1)}, null, CustomItemList.eM_energyTunnel1_UV.get(1), 1000, 500000); - + //Laser Target IV-UV 1024/t GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 2), ItemList.Sensor_IV.get(2), ItemList.Electric_Pump_IV.get(2), GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.TungstenSteel, 4), GT_Utility.getIntegratedCircuit(2)}, null, CustomItemList.eM_energyTunnel2_IV.get(1), 2000, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 2), ItemList.Sensor_LuV.get(2), ItemList.Electric_Pump_LuV.get(2), GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.VanadiumGallium, 4), GT_Utility.getIntegratedCircuit(2)}, null, CustomItemList.eM_energyTunnel2_LuV.get(1), 2000, 30720); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_ZPM.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 2), ItemList.Sensor_ZPM.get(2), ItemList.Electric_Pump_ZPM.get(2), GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.Naquadah, 4), GT_Utility.getIntegratedCircuit(2)}, null, CustomItemList.eM_energyTunnel2_ZPM.get(1), 2000, 122880); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 2), ItemList.Sensor_UV.get(2), ItemList.Electric_Pump_UV.get(2), GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.NaquadahAlloy, 4), GT_Utility.getIntegratedCircuit(2)}, null, CustomItemList.eM_energyTunnel2_UV.get(1), 2000, 500000); - + //Laser Target IV-UV 4096/t GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 4), ItemList.Sensor_IV.get(4), ItemList.Electric_Pump_IV.get(4), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.TungstenSteel, 4), GT_Utility.getIntegratedCircuit(3)}, null, CustomItemList.eM_energyTunnel3_IV.get(1), 4000, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 4), ItemList.Sensor_LuV.get(4), ItemList.Electric_Pump_LuV.get(4), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.VanadiumGallium, 4), GT_Utility.getIntegratedCircuit(3)}, null, CustomItemList.eM_energyTunnel3_LuV.get(1), 4000, 30720); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_ZPM.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 4), ItemList.Sensor_ZPM.get(4), ItemList.Electric_Pump_ZPM.get(4), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Naquadah, 4), GT_Utility.getIntegratedCircuit(3)}, null, CustomItemList.eM_energyTunnel3_ZPM.get(1), 4000, 122880); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 4), ItemList.Sensor_UV.get(4), ItemList.Electric_Pump_UV.get(4), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NaquadahAlloy, 4), GT_Utility.getIntegratedCircuit(3)}, null, CustomItemList.eM_energyTunnel3_UV.get(1), 4000, 500000); - + //Laser Target IV-UV 16384/t GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 8), ItemList.Sensor_IV.get(8), ItemList.Electric_Pump_IV.get(8), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.TungstenSteel, 8), GT_Utility.getIntegratedCircuit(4)}, null, CustomItemList.eM_energyTunnel4_IV.get(1), 8000, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 8), ItemList.Sensor_LuV.get(8), ItemList.Electric_Pump_LuV.get(8), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.VanadiumGallium, 8), GT_Utility.getIntegratedCircuit(4)}, null, CustomItemList.eM_energyTunnel4_LuV.get(1), 8000, 30720); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_ZPM.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 8), ItemList.Sensor_ZPM.get(8), ItemList.Electric_Pump_ZPM.get(8), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Naquadah, 8), GT_Utility.getIntegratedCircuit(4)}, null, CustomItemList.eM_energyTunnel4_ZPM.get(1), 8000, 122880); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 8), ItemList.Sensor_UV.get(8), ItemList.Electric_Pump_UV.get(8), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NaquadahAlloy, 8), GT_Utility.getIntegratedCircuit(4)}, null, CustomItemList.eM_energyTunnel4_UV.get(1), 8000, 500000); - + //Laser Target IV-UV 65536/t GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 16), ItemList.Sensor_IV.get(16), ItemList.Electric_Pump_IV.get(16), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.TungstenSteel, 8), GT_Utility.getIntegratedCircuit(5)}, null, CustomItemList.eM_energyTunnel5_IV.get(1), 16000, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 16), ItemList.Sensor_LuV.get(16), ItemList.Electric_Pump_LuV.get(16), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.VanadiumGallium, 8), GT_Utility.getIntegratedCircuit(5)}, null, CustomItemList.eM_energyTunnel5_LuV.get(1), 16000, 30720); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_ZPM.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 16), ItemList.Sensor_ZPM.get(16), ItemList.Electric_Pump_ZPM.get(16), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Naquadah, 8), GT_Utility.getIntegratedCircuit(5)}, null, CustomItemList.eM_energyTunnel5_ZPM.get(1), 16000, 122880); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 16), ItemList.Sensor_UV.get(16), ItemList.Electric_Pump_UV.get(16), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.NaquadahAlloy, 8), GT_Utility.getIntegratedCircuit(5)}, null, CustomItemList.eM_energyTunnel5_UV.get(1), 16000, 500000); - + //Laser Target IV-UV 262144/t GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 32), ItemList.Sensor_IV.get(32), ItemList.Electric_Pump_IV.get(32), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.TungstenSteel, 16), GT_Utility.getIntegratedCircuit(6)}, null, CustomItemList.eM_energyTunnel6_IV.get(1), 32000, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 32), ItemList.Sensor_LuV.get(32), ItemList.Electric_Pump_LuV.get(32), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.VanadiumGallium, 16), GT_Utility.getIntegratedCircuit(6)}, null, CustomItemList.eM_energyTunnel6_LuV.get(1), 32000, 30720); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_ZPM.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 32), ItemList.Sensor_ZPM.get(32), ItemList.Electric_Pump_ZPM.get(32), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Naquadah, 16), GT_Utility.getIntegratedCircuit(6)}, null, CustomItemList.eM_energyTunnel6_ZPM.get(1), 32000, 122880); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 32), ItemList.Sensor_UV.get(32), ItemList.Electric_Pump_UV.get(32), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.NaquadahAlloy, 16), GT_Utility.getIntegratedCircuit(6)}, null, CustomItemList.eM_energyTunnel6_UV.get(1), 32000, 500000); - + //Laser Target IV-UV 1048576/t GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 64), ItemList.Sensor_IV.get(64), ItemList.Electric_Pump_IV.get(64), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.TungstenSteel, 16), GT_Utility.getIntegratedCircuit(7)}, null, CustomItemList.eM_energyTunnel7_IV.get(1), 64000, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 64), ItemList.Sensor_LuV.get(64), ItemList.Electric_Pump_LuV.get(64), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.VanadiumGallium, 16), GT_Utility.getIntegratedCircuit(7)}, null, CustomItemList.eM_energyTunnel7_LuV.get(1), 64000, 30720); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_ZPM.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 64), ItemList.Sensor_ZPM.get(64), ItemList.Electric_Pump_ZPM.get(64), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.Naquadah, 16), GT_Utility.getIntegratedCircuit(7)}, null, CustomItemList.eM_energyTunnel7_ZPM.get(1), 64000, 122880); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_UV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 64), ItemList.Sensor_UV.get(64), ItemList.Electric_Pump_UV.get(64), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.NaquadahAlloy, 16), GT_Utility.getIntegratedCircuit(7)}, null, CustomItemList.eM_energyTunnel7_UV.get(1), 64000, 500000); - + //Data Input GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ CustomItemList.eM_Computer_Casing.get(1), @@ -563,7 +563,7 @@ public class BloodyRecipeLoader implements Runnable { CustomItemList.eM_Computer_Casing.get(1), ItemList.Circuit_Masterquantumcomputer.get(1), CustomItemList.DATApipe.get(4), - ItemList.Cover_Screen.get(1 ), + ItemList.Cover_Screen.get(1), new ItemStack(Blocks.stone_button, 16), }, Materials.Iridium.getMolten(2592), CustomItemList.Parametrizer_Hatch.get(1), 800, 122880); //Uncertainty @@ -571,7 +571,7 @@ public class BloodyRecipeLoader implements Runnable { CustomItemList.eM_Computer_Casing.get(1), ItemList.Circuit_Ultimatecrystalcomputer.get(1), CustomItemList.DATApipe.get(16), - ItemList.Cover_Screen.get(1 ), + ItemList.Cover_Screen.get(1), new ItemStack(Blocks.stone_button, 16), }, Materials.Iridium.getMolten(2592), CustomItemList.Uncertainty_Hatch.get(1), 1200, 122880); @@ -670,7 +670,7 @@ public class BloodyRecipeLoader implements Runnable { //Matter Junction TT_recipeAdder.addResearchableAssemblylineRecipe(CustomItemList.Machine_Multi_Switch.get(1), - 8000,32, 500000, 4, new ItemStack[]{ + 8000, 32, 500000, 4, new ItemStack[]{ CustomItemList.Machine_Multi_Transformer.get(1), GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Naquadah, 16), ItemList.Robot_Arm_LuV.get(2), @@ -686,7 +686,7 @@ public class BloodyRecipeLoader implements Runnable { //Matter Quantizer TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Hatch_Input_UV.get(1), - 12000,32, 500000, 6, new ItemStack[]{ + 12000, 32, 500000, 6, new ItemStack[]{ CustomItemList.Machine_Multi_Transformer.get(1), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Naquadah, 16), ItemList.Emitter_UV.get(2), @@ -701,7 +701,7 @@ public class BloodyRecipeLoader implements Runnable { //Matter DeQuantizer TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Hatch_Output_UV.get(1), - 12000,32, 500000, 6, new ItemStack[]{ + 12000, 32, 500000, 6, new ItemStack[]{ CustomItemList.Machine_Multi_Transformer.get(1), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Naquadah, 16), ItemList.Sensor_UV.get(2), @@ -716,7 +716,7 @@ public class BloodyRecipeLoader implements Runnable { //Essentia Quantizer TT_recipeAdder.addResearchableAssemblylineRecipe(CustomItemList.Machine_Multi_MatterToEM.get(1), - 15000,32, 500000, 8, new ItemStack[]{ + 15000, 32, 500000, 8, new ItemStack[]{ CustomItemList.Machine_Multi_MatterToEM.get(1), GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Neutronium, 8), ItemList.Emitter_UV.get(2), @@ -731,7 +731,7 @@ public class BloodyRecipeLoader implements Runnable { //Essentia DeQuantizer TT_recipeAdder.addResearchableAssemblylineRecipe(CustomItemList.Machine_Multi_EMToMatter.get(1), - 15000,32, 500000, 8, new ItemStack[]{ + 15000, 32, 500000, 8, new ItemStack[]{ CustomItemList.Machine_Multi_EMToMatter.get(1), GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Neutronium, 8), ItemList.Sensor_UV.get(2), @@ -746,13 +746,13 @@ public class BloodyRecipeLoader implements Runnable { //EM Scanner TT_recipeAdder.addResearchableAssemblylineRecipe(CustomItemList.Machine_Multi_Research.get(1), - 150000,128, 500000, 16, new ItemStack[]{ + 150000, 128, 500000, 16, new ItemStack[]{ CustomItemList.Machine_Multi_EMjunction.get(1), CustomItemList.eM_Computer_Bus.get(4), ItemList.Field_Generator_UV.get(4), ItemList.Sensor_UV.get(4), ItemList.Circuit_Wetwaresupercomputer.get(4),//? - GT_OreDictUnificator.get(OrePrefixes.lens,Materials.Diamond,32), + GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 32), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Superconductor, 16), }, new FluidStack[]{ Materials.UUMatter.getFluid(2000), @@ -763,10 +763,10 @@ public class BloodyRecipeLoader implements Runnable { //Multi Infuser TT_recipeAdder.addResearchableAssemblylineRecipe(CustomItemList.Machine_Multi_Transformer.get(1), - 192000,512, 2000000, 32, new ItemStack[]{ + 192000, 512, 2000000, 32, new ItemStack[]{ CustomItemList.Machine_Multi_Transformer.get(1), CustomItemList.eM_Coil.get(8), - CustomItemList.eM_Power.get( 8), + CustomItemList.eM_Power.get(8), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.NeodymiumMagnetic, 16), }, new FluidStack[]{ Materials.Electrum.getMolten(2592), @@ -781,340 +781,340 @@ public class BloodyRecipeLoader implements Runnable { //Tesla Transceiver LV 1A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_1by1_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_1by1_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_LV.get(1), 400, 30); //Tesla Transceiver MV 1A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_1by1_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_1by1_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_MV.get(1), 400, 120); //Tesla Transceiver HV 1A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_1by1_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_1by1_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_HV.get(1), 400, 480); //Tesla Transceiver EV 1A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_1by1_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_1by1_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_EV.get(1), 400, 1920); //Tesla Transceiver IV 1A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_1by1_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_1by1_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_IV.get(1), 400, 7680); //Tesla Transceiver LV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_2by2_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_2by2_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_LV.get(1), 400, 30); //Tesla Transceiver MV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_2by2_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_2by2_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_MV.get(1), 400, 120); //Tesla Transceiver HV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_2by2_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_2by2_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_HV.get(1), 400, 480); //Tesla Transceiver EV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_2by2_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_2by2_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_EV.get(1), 400, 1920); //Tesla Transceiver IV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_2by2_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_2by2_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_IV.get(1), 400, 7680); //Tesla Transceiver LV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_3by3_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_3by3_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_LV.get(1), 400, 30); //Tesla Transceiver MV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_3by3_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_3by3_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_MV.get(1), 400, 120); //Tesla Transceiver HV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_3by3_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_3by3_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_HV.get(1), 400, 480); //Tesla Transceiver EV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_3by3_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_3by3_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_EV.get(1), 400, 1920); //Tesla Transceiver IV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_3by3_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_3by3_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_IV.get(1), 400, 7680); //Tesla Transceiver LV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_4by4_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_4by4_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_4by4_LV.get(1), 400, 30); //Tesla Transceiver MV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_4by4_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_4by4_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_4by4_MV.get(1), 400, 120); //Tesla Transceiver HV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_4by4_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_4by4_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_4by4_HV.get(1), 400, 480); //Tesla Transceiver EV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_4by4_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_4by4_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_4by4_EV.get(1), 400, 1920); //Tesla Transceiver IV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_4by4_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_4by4_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1,0)}, + CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_4by4_IV.get(1), 400, 7680); @@ -1126,7 +1126,75 @@ public class BloodyRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 32), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.NickelZincFerrite, 8), - }, Materials.Epoxid.getMolten(288), CustomItemList.teslaComponent.getWithDamage(1,0), 320, 30); + }, Materials.Epoxid.getMolten(288), CustomItemList.teslaComponent.getWithDamage(1, 0), 320, 30); + + //endregion + + //region items + + //LV Tesla Capacitor + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Tin, 4), + GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 4), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 8), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 8), + }, Materials.Epoxid.getMolten(72), CustomItemList.teslaCapacitor.getWithDamage(1, 0), 320, 30); + + //MV Tesla Capacitor + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Copper, 4), + GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 6), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 12), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 12), + }, Materials.Epoxid.getMolten(144), CustomItemList.teslaCapacitor.getWithDamage(1, 1), 320, 120); + + //HV Tesla Capacitor + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Gold, 4), + GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 8), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 16), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 16), + }, Materials.Epoxid.getMolten(216), CustomItemList.teslaCapacitor.getWithDamage(1, 2), 320, 480); + + //EV Tesla Capacitor + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Aluminium, 4), + GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 10), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 20), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 20), + }, Materials.Epoxid.getMolten(288), CustomItemList.teslaCapacitor.getWithDamage(1, 3), 320, 1920); + + //IV Tesla Capacitor + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Tungsten, 4), + GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 12), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 24), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 24), + }, Materials.Epoxid.getMolten(360), CustomItemList.teslaCapacitor.getWithDamage(1, 4), 320, 7680); + + //endregion + + //region recycling + + //LV Tesla Capacitor + GT_Values.RA.addExtractorRecipe(CustomItemList.teslaCapacitor.getWithDamage(1, 0), + GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 4), 300, 2); + + //MV Tesla Capacitor + GT_Values.RA.addExtractorRecipe(CustomItemList.teslaCapacitor.getWithDamage(1, 1), + GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 6), 300, 2); + + //HV Tesla Capacitor + GT_Values.RA.addExtractorRecipe(CustomItemList.teslaCapacitor.getWithDamage(1, 2), + GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 8), 300, 2); + + //EV Tesla Capacitor + GT_Values.RA.addExtractorRecipe(CustomItemList.teslaCapacitor.getWithDamage(1, 3), + GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 10), 300, 2); + + //IV Tesla Capacitor + GT_Values.RA.addExtractorRecipe(CustomItemList.teslaCapacitor.getWithDamage(1, 4), + GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 12), 300, 2); //endregion @@ -1141,62 +1209,62 @@ public class BloodyRecipeLoader implements Runnable { register_machine_EM_behaviours(); } - private void register_machine_EM_behaviours(){ - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Centrifuge(5),ItemList.Machine_IV_Centrifuge.get(1)); + private void register_machine_EM_behaviours() { + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Centrifuge(5), ItemList.Machine_IV_Centrifuge.get(1)); try { - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Centrifuge(6),ItemList.valueOf("Machine_LuV_Centrifuge").get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Centrifuge(7),ItemList.valueOf("Machine_ZPM_Centrifuge").get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Centrifuge(8),ItemList.valueOf("Machine_UV_Centrifuge").get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Centrifuge(9),ItemList.valueOf("Machine_UV_Centrifuge").get(4)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Centrifuge(10),ItemList.valueOf("Machine_UV_Centrifuge").get(16)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Centrifuge(11),ItemList.valueOf("Machine_UV_Centrifuge").get(40)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Centrifuge(12),ItemList.valueOf("Machine_UV_Centrifuge").get(64)); - }catch (IllegalArgumentException|NullPointerException e){ - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Centrifuge(6),ItemList.Machine_IV_Centrifuge.get(2)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Centrifuge(7),ItemList.Machine_IV_Centrifuge.get(4)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Centrifuge(8),ItemList.Machine_IV_Centrifuge.get(8)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Centrifuge(9),ItemList.Machine_IV_Centrifuge.get(16)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Centrifuge(10),ItemList.Machine_IV_Centrifuge.get(32)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Centrifuge(11),ItemList.Machine_IV_Centrifuge.get(48)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Centrifuge(12),ItemList.Machine_IV_Centrifuge.get(64)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Centrifuge(6), ItemList.valueOf("Machine_LuV_Centrifuge").get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Centrifuge(7), ItemList.valueOf("Machine_ZPM_Centrifuge").get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Centrifuge(8), ItemList.valueOf("Machine_UV_Centrifuge").get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Centrifuge(9), ItemList.valueOf("Machine_UV_Centrifuge").get(4)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Centrifuge(10), ItemList.valueOf("Machine_UV_Centrifuge").get(16)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Centrifuge(11), ItemList.valueOf("Machine_UV_Centrifuge").get(40)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Centrifuge(12), ItemList.valueOf("Machine_UV_Centrifuge").get(64)); + } catch (IllegalArgumentException | NullPointerException e) { + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Centrifuge(6), ItemList.Machine_IV_Centrifuge.get(2)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Centrifuge(7), ItemList.Machine_IV_Centrifuge.get(4)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Centrifuge(8), ItemList.Machine_IV_Centrifuge.get(8)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Centrifuge(9), ItemList.Machine_IV_Centrifuge.get(16)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Centrifuge(10), ItemList.Machine_IV_Centrifuge.get(32)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Centrifuge(11), ItemList.Machine_IV_Centrifuge.get(48)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Centrifuge(12), ItemList.Machine_IV_Centrifuge.get(64)); } - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_ElectromagneticSeparator(5),ItemList.Machine_IV_ElectromagneticSeparator.get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_ElectromagneticSeparator(5), ItemList.Machine_IV_ElectromagneticSeparator.get(1)); try { - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_ElectromagneticSeparator(6),ItemList.valueOf("Machine_LuV_ElectromagneticSeparator").get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_ElectromagneticSeparator(7),ItemList.valueOf("Machine_ZPM_ElectromagneticSeparator").get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_ElectromagneticSeparator(8),ItemList.valueOf("Machine_UV_ElectromagneticSeparator").get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_ElectromagneticSeparator(9),ItemList.valueOf("Machine_UV_ElectromagneticSeparator").get(4)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_ElectromagneticSeparator(10),ItemList.valueOf("Machine_UV_ElectromagneticSeparator").get(16)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_ElectromagneticSeparator(11),ItemList.valueOf("Machine_UV_ElectromagneticSeparator").get(40)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_ElectromagneticSeparator(12),ItemList.valueOf("Machine_UV_ElectromagneticSeparator").get(64)); - }catch (IllegalArgumentException|NullPointerException e){ - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_ElectromagneticSeparator(6),ItemList.Machine_IV_ElectromagneticSeparator.get(2)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_ElectromagneticSeparator(7),ItemList.Machine_IV_ElectromagneticSeparator.get(4)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_ElectromagneticSeparator(8),ItemList.Machine_IV_ElectromagneticSeparator.get(8)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_ElectromagneticSeparator(9),ItemList.Machine_IV_ElectromagneticSeparator.get(16)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_ElectromagneticSeparator(10),ItemList.Machine_IV_ElectromagneticSeparator.get(32)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_ElectromagneticSeparator(11),ItemList.Machine_IV_ElectromagneticSeparator.get(48)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_ElectromagneticSeparator(12),ItemList.Machine_IV_ElectromagneticSeparator.get(64)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_ElectromagneticSeparator(6), ItemList.valueOf("Machine_LuV_ElectromagneticSeparator").get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_ElectromagneticSeparator(7), ItemList.valueOf("Machine_ZPM_ElectromagneticSeparator").get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_ElectromagneticSeparator(8), ItemList.valueOf("Machine_UV_ElectromagneticSeparator").get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_ElectromagneticSeparator(9), ItemList.valueOf("Machine_UV_ElectromagneticSeparator").get(4)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_ElectromagneticSeparator(10), ItemList.valueOf("Machine_UV_ElectromagneticSeparator").get(16)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_ElectromagneticSeparator(11), ItemList.valueOf("Machine_UV_ElectromagneticSeparator").get(40)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_ElectromagneticSeparator(12), ItemList.valueOf("Machine_UV_ElectromagneticSeparator").get(64)); + } catch (IllegalArgumentException | NullPointerException e) { + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_ElectromagneticSeparator(6), ItemList.Machine_IV_ElectromagneticSeparator.get(2)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_ElectromagneticSeparator(7), ItemList.Machine_IV_ElectromagneticSeparator.get(4)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_ElectromagneticSeparator(8), ItemList.Machine_IV_ElectromagneticSeparator.get(8)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_ElectromagneticSeparator(9), ItemList.Machine_IV_ElectromagneticSeparator.get(16)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_ElectromagneticSeparator(10), ItemList.Machine_IV_ElectromagneticSeparator.get(32)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_ElectromagneticSeparator(11), ItemList.Machine_IV_ElectromagneticSeparator.get(48)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_ElectromagneticSeparator(12), ItemList.Machine_IV_ElectromagneticSeparator.get(64)); } - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Recycler(5),ItemList.Machine_IV_Recycler.get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Recycler(5), ItemList.Machine_IV_Recycler.get(1)); try { - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Recycler(6),ItemList.valueOf("Machine_LuV_Recycler").get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Recycler(7),ItemList.valueOf("Machine_ZPM_Recycler").get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Recycler(8),ItemList.valueOf("Machine_UV_Recycler").get(1)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Recycler(9),ItemList.valueOf("Machine_UV_Recycler").get(4)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Recycler(10),ItemList.valueOf("Machine_UV_Recycler").get(16)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Recycler(11),ItemList.valueOf("Machine_UV_Recycler").get(40)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Recycler(12),ItemList.valueOf("Machine_UV_Recycler").get(64)); - }catch (IllegalArgumentException|NullPointerException e){ - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Recycler(6),ItemList.Machine_IV_Recycler.get(2)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Recycler(7),ItemList.Machine_IV_Recycler.get(4)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Recycler(8),ItemList.Machine_IV_Recycler.get(8)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Recycler(9),ItemList.Machine_IV_Recycler.get(16)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Recycler(10),ItemList.Machine_IV_Recycler.get(32)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Recycler(11),ItemList.Machine_IV_Recycler.get(48)); - GT_MetaTileEntity_EM_machine.registerBehaviour(()->new Behaviour_Recycler(12),ItemList.Machine_IV_Recycler.get(64)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Recycler(6), ItemList.valueOf("Machine_LuV_Recycler").get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Recycler(7), ItemList.valueOf("Machine_ZPM_Recycler").get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Recycler(8), ItemList.valueOf("Machine_UV_Recycler").get(1)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Recycler(9), ItemList.valueOf("Machine_UV_Recycler").get(4)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Recycler(10), ItemList.valueOf("Machine_UV_Recycler").get(16)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Recycler(11), ItemList.valueOf("Machine_UV_Recycler").get(40)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Recycler(12), ItemList.valueOf("Machine_UV_Recycler").get(64)); + } catch (IllegalArgumentException | NullPointerException e) { + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Recycler(6), ItemList.Machine_IV_Recycler.get(2)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Recycler(7), ItemList.Machine_IV_Recycler.get(4)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Recycler(8), ItemList.Machine_IV_Recycler.get(8)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Recycler(9), ItemList.Machine_IV_Recycler.get(16)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Recycler(10), ItemList.Machine_IV_Recycler.get(32)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Recycler(11), ItemList.Machine_IV_Recycler.get(48)); + GT_MetaTileEntity_EM_machine.registerBehaviour(() -> new Behaviour_Recycler(12), ItemList.Machine_IV_Recycler.get(64)); } } -} +} \ No newline at end of file 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 611fba6376..f913682fd8 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 @@ -34,6 +34,7 @@ public final class ParametrizerMemoryCard extends Item { private static IIcon locked, unlocked; private ParametrizerMemoryCard() { + setHasSubtypes(true); setMaxStackSize(1); setUnlocalizedName("em.parametrizerMemoryCard"); setTextureName(MODID + ":itemParametrizerMemoryCardUnlocked"); -- cgit From df512059e30d491693a94e7ed11eef1d523c060c Mon Sep 17 00:00:00 2001 From: Bass Date: Fri, 23 Aug 2019 13:28:30 +0100 Subject: Tesla Cover Recipes Along with a tiny Enum refactor --- .../dreamcraft/DreamCraftRecipeLoader.java | 182 +++++++++++++-------- .../tectech/loader/recipe/BloodyRecipeLoader.java | 174 +++++++++++++------- .../technus/tectech/thing/CustomItemList.java | 2 +- .../technus/tectech/thing/item/TeslaCoilCover.java | 6 +- 4 files changed, 231 insertions(+), 133 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java index 6d9d8e1c75..76ae495b40 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java +++ b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java @@ -477,13 +477,7 @@ public class DreamCraftRecipeLoader implements Runnable { //region multiblocks - //Tesla Winding Components Ultimate (ADD BLOOD VARIANT) - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUV, 4), - GT_OreDictUnificator.get(OrePrefixes.ring, Materials.NickelZincFerrite, 1), - }, Materials.Polytetrafluoroethylene.getMolten(18), CustomItemList.teslaComponent.getWithDamage(1, 1), 320, 7680); - - //Tesla Coil + //Tesla Tower GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ GT_ModHandler.getIC2Item("teslaCoil", 1), CustomItemList.tM_TeslaSecondary.get(4), @@ -1170,346 +1164,346 @@ public class DreamCraftRecipeLoader implements Runnable { //Tesla Transceiver LV 1A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_1by1_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_1by1_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_LV.get(1), 400, 30); //Tesla Transceiver MV 1A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_1by1_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_1by1_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_MV.get(1), 400, 120); //Tesla Transceiver HV 1A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_1by1_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_1by1_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_HV.get(1), 400, 480); //Tesla Transceiver EV 1A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_1by1_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_1by1_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_EV.get(1), 400, 1920); //Tesla Transceiver IV 1A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_1by1_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_1by1_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_IV.get(1), 400, 7680); //Tesla Transceiver LV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_2by2_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_2by2_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_LV.get(1), 400, 30); //Tesla Transceiver MV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_2by2_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_2by2_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_MV.get(1), 400, 120); //Tesla Transceiver HV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_2by2_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_2by2_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_HV.get(1), 400, 480); //Tesla Transceiver EV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_2by2_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_2by2_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_EV.get(1), 400, 1920); //Tesla Transceiver IV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_2by2_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_2by2_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_IV.get(1), 400, 7680); //Tesla Transceiver LV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_3by3_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_3by3_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_LV.get(1), 400, 30); //Tesla Transceiver MV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_3by3_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_3by3_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_MV.get(1), 400, 120); //Tesla Transceiver HV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_3by3_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_3by3_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_HV.get(1), 400, 480); //Tesla Transceiver EV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_3by3_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_3by3_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_EV.get(1), 400, 1920); //Tesla Transceiver IV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_3by3_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_3by3_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_IV.get(1), 400, 7680); //Tesla Transceiver LV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_4by4_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_4by4_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_4by4_LV.get(1), 400, 30); //Tesla Transceiver MV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_4by4_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_4by4_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_4by4_MV.get(1), 400, 120); //Tesla Transceiver HV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_4by4_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_4by4_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_4by4_HV.get(1), 400, 480); //Tesla Transceiver EV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_4by4_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_4by4_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_4by4_EV.get(1), 400, 1920); //Tesla Transceiver IV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_4by4_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_4by4_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_4by4_IV.get(1), 400, 7680); //endregion - //region crafting components + //region components //Tesla Winding Components GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ @@ -1517,6 +1511,12 @@ public class DreamCraftRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.ring, Materials.NickelZincFerrite, 8), }, Materials.Epoxid.getMolten(288), CustomItemList.teslaComponent.getWithDamage(1, 0), 320, 30); + //Tesla Winding Components Ultimate (ADD BLOOD VARIANT) + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorLuV, 4), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.NickelZincFerrite, 8), + }, Materials.Epoxid.getMolten(576), CustomItemList.teslaComponent.getWithDamage(1, 1), 320, 7680); + //endregion //region items @@ -1561,6 +1561,52 @@ public class DreamCraftRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 24), }, Materials.Epoxid.getMolten(360), CustomItemList.teslaCapacitor.getWithDamage(1, 4), 320, 7680); + //Tesla Cover + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + CustomItemList.teslaComponent.getWithDamage(4, 0), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 2), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Gold, 16), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NickelZincFerrite, 2), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 8), + }, Materials.Lead.getMolten(288), CustomItemList.teslaCover.getWithDamage(1, 0), 320, 480); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + CustomItemList.teslaComponent.getWithDamage(4, 0), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 2), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Gold, 16), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NickelZincFerrite, 2), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 8), + }, Materials.Tin.getMolten(144), CustomItemList.teslaCover.getWithDamage(1, 0), 320, 480); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + CustomItemList.teslaComponent.getWithDamage(4, 0), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 2), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Gold, 16), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NickelZincFerrite, 2), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 8), + }, Materials.SolderingAlloy.getMolten(72), CustomItemList.teslaCover.getWithDamage(1, 0), 320, 480); + + //Ultimate Tesla Cover + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + CustomItemList.teslaComponent.getWithDamage(4, 1), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Master, 2), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Tungsten, 16), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NickelZincFerrite, 2), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 8), + }, Materials.Lead.getMolten(288), CustomItemList.teslaCover.getWithDamage(1, 1), 320, 7680); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + CustomItemList.teslaComponent.getWithDamage(4, 1), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Master, 2), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Tungsten, 16), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NickelZincFerrite, 2), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 8), + }, Materials.Tin.getMolten(144), CustomItemList.teslaCover.getWithDamage(1, 1), 320, 7680); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + CustomItemList.teslaComponent.getWithDamage(4, 1), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Master, 2), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Tungsten, 16), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NickelZincFerrite, 2), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 8), + }, Materials.SolderingAlloy.getMolten(72), CustomItemList.teslaCover.getWithDamage(1, 1), 320, 7680); + //endregion //region recycling diff --git a/src/main/java/com/github/technus/tectech/loader/recipe/BloodyRecipeLoader.java b/src/main/java/com/github/technus/tectech/loader/recipe/BloodyRecipeLoader.java index cd1896b467..6e3a4dc677 100644 --- a/src/main/java/com/github/technus/tectech/loader/recipe/BloodyRecipeLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/recipe/BloodyRecipeLoader.java @@ -781,346 +781,346 @@ public class BloodyRecipeLoader implements Runnable { //Tesla Transceiver LV 1A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_1by1_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_1by1_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_LV.get(1), 400, 30); //Tesla Transceiver MV 1A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_1by1_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_1by1_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_MV.get(1), 400, 120); //Tesla Transceiver HV 1A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_1by1_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_1by1_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_HV.get(1), 400, 480); //Tesla Transceiver EV 1A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_1by1_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_1by1_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_EV.get(1), 400, 1920); //Tesla Transceiver IV 1A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_1by1_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_1by1_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_IV.get(1), 400, 7680); //Tesla Transceiver LV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_2by2_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_2by2_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_LV.get(1), 400, 30); //Tesla Transceiver MV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_2by2_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_2by2_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_MV.get(1), 400, 120); //Tesla Transceiver HV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_2by2_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_2by2_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_HV.get(1), 400, 480); //Tesla Transceiver EV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_2by2_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_2by2_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_EV.get(1), 400, 1920); //Tesla Transceiver IV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_2by2_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_2by2_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_IV.get(1), 400, 7680); //Tesla Transceiver LV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_3by3_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_3by3_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_LV.get(1), 400, 30); //Tesla Transceiver MV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_3by3_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_3by3_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_MV.get(1), 400, 120); //Tesla Transceiver HV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_3by3_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_3by3_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_HV.get(1), 400, 480); //Tesla Transceiver EV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_3by3_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_3by3_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_EV.get(1), 400, 1920); //Tesla Transceiver IV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_3by3_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_3by3_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_IV.get(1), 400, 7680); //Tesla Transceiver LV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_4by4_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_4by4_LV.get(1), 400, 30); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_LV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_4by4_LV.get(1), 400, 30); //Tesla Transceiver MV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_4by4_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_4by4_MV.get(1), 400, 120); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_MV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_4by4_MV.get(1), 400, 120); //Tesla Transceiver HV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_4by4_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_4by4_HV.get(1), 400, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_HV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_4by4_HV.get(1), 400, 480); //Tesla Transceiver EV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_4by4_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_4by4_EV.get(1), 400, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_EV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_4by4_EV.get(1), 400, 1920); //Tesla Transceiver IV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Lead.getMolten(576), CustomItemList.Machine_TeslaCoil_4by4_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.Tin.getMolten(288), CustomItemList.Machine_TeslaCoil_4by4_IV.get(1), 400, 7680); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_IV.get(1), - CustomItemList.teslaCoilCover.getWithDamage(1, 0)}, + CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_4by4_IV.get(1), 400, 7680); //endregion - //region crafting components + //region components //Tesla Winding Components GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ @@ -1128,6 +1128,12 @@ public class BloodyRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.ring, Materials.NickelZincFerrite, 8), }, Materials.Epoxid.getMolten(288), CustomItemList.teslaComponent.getWithDamage(1, 0), 320, 30); + //Tesla Winding Components Ultimate (ADD BLOOD VARIANT) + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorLuV, 16), + GT_OreDictUnificator.get(OrePrefixes.ring, Materials.NickelZincFerrite, 8), + }, Materials.Epoxid.getMolten(576), CustomItemList.teslaComponent.getWithDamage(1, 1), 320, 7680); + //endregion //region items @@ -1172,6 +1178,52 @@ public class BloodyRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 24), }, Materials.Epoxid.getMolten(360), CustomItemList.teslaCapacitor.getWithDamage(1, 4), 320, 7680); + //Tesla Cover + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + CustomItemList.teslaComponent.getWithDamage(4, 0), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 2), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Gold, 16), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NickelZincFerrite, 2), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 8), + }, Materials.Lead.getMolten(288), CustomItemList.teslaCover.getWithDamage(1, 0), 320, 480); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + CustomItemList.teslaComponent.getWithDamage(4, 0), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 2), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Gold, 16), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NickelZincFerrite, 2), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 8), + }, Materials.Tin.getMolten(144), CustomItemList.teslaCover.getWithDamage(1, 0), 320, 480); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + CustomItemList.teslaComponent.getWithDamage(4, 0), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 2), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Gold, 16), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NickelZincFerrite, 2), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 8), + }, Materials.SolderingAlloy.getMolten(72), CustomItemList.teslaCover.getWithDamage(1, 0), 320, 480); + + //Ultimate Tesla Cover + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + CustomItemList.teslaComponent.getWithDamage(4, 1), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Master, 2), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Tungsten, 16), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NickelZincFerrite, 2), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 8), + }, Materials.Lead.getMolten(288), CustomItemList.teslaCover.getWithDamage(1, 1), 320, 7680); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + CustomItemList.teslaComponent.getWithDamage(4, 1), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Master, 2), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Tungsten, 16), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NickelZincFerrite, 2), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 8), + }, Materials.Tin.getMolten(144), CustomItemList.teslaCover.getWithDamage(1, 1), 320, 7680); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + CustomItemList.teslaComponent.getWithDamage(4, 1), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Master, 2), + GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Tungsten, 16), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NickelZincFerrite, 2), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 8), + }, Materials.SolderingAlloy.getMolten(72), CustomItemList.teslaCover.getWithDamage(1, 1), 320, 7680); + //endregion //region recycling 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 766aca565f..1f83706aad 100644 --- a/src/main/java/com/github/technus/tectech/thing/CustomItemList.java +++ b/src/main/java/com/github/technus/tectech/thing/CustomItemList.java @@ -92,7 +92,7 @@ public enum CustomItemList implements IItemContainer { Machine_Multi_BHG, hint_0,hint_1,hint_2,hint_3,hint_4,hint_5,hint_6,hint_7,hint_8,hint_9,hint_10,hint_11, hint_general,hint_air,hint_noAir,hint_error, - scanContainer,parametrizerMemory,teslaCapacitor,teslaCoilCover,teslaComponent, + scanContainer,parametrizerMemory,teslaCapacitor,teslaCover,teslaComponent, Machine_TeslaCoil_1by1_LV, Machine_TeslaCoil_1by1_MV, Machine_TeslaCoil_1by1_HV, Machine_TeslaCoil_1by1_EV, Machine_TeslaCoil_1by1_IV, Machine_TeslaCoil_2by2_LV, Machine_TeslaCoil_2by2_MV, Machine_TeslaCoil_2by2_HV, Machine_TeslaCoil_2by2_EV, Machine_TeslaCoil_2by2_IV, 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 82f71ec9c6..cacdda56e1 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 @@ -16,7 +16,7 @@ import net.minecraft.util.IIcon; import java.util.List; import static com.github.technus.tectech.Reference.MODID; -import static com.github.technus.tectech.thing.CustomItemList.teslaCoilCover; +import static com.github.technus.tectech.thing.CustomItemList.teslaCover; public final class TeslaCoilCover extends Item { @@ -25,7 +25,7 @@ public final class TeslaCoilCover extends Item { private TeslaCoilCover() { setHasSubtypes(true); - setUnlocalizedName("tm.teslaCoilCover"); + setUnlocalizedName("tm.teslaCover"); setTextureName(MODID + ":itemTeslaCover"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Tesla Coil Cover"); @@ -58,7 +58,7 @@ public final class TeslaCoilCover extends Item { public static void run() { INSTANCE = new TeslaCoilCover(); GameRegistry.registerItem(INSTANCE, INSTANCE.getUnlocalizedName()); - teslaCoilCover.set(INSTANCE); + teslaCover.set(INSTANCE); } @Override -- cgit From 2404af586550067c853c69338e87adb2ab3dcafb Mon Sep 17 00:00:00 2001 From: Bass Date: Fri, 23 Aug 2019 13:41:09 +0100 Subject: Capacitor Hatch Recipes --- .../dreamcraft/DreamCraftRecipeLoader.java | 42 ++++++--------------- .../tectech/loader/recipe/BloodyRecipeLoader.java | 44 +++++++--------------- .../tectech/loader/thing/MachineLoader.java | 2 +- 3 files changed, 26 insertions(+), 62 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java index 76ae495b40..67bbbb9635 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java +++ b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java @@ -473,6 +473,18 @@ public class DreamCraftRecipeLoader implements Runnable { ItemList.Field_Generator_UV.get(1) }, Materials.Osmiridium.getMolten(1296), CustomItemList.eM_muffler_UV.get(1), 800, 500000); + //Capacitor Hatch + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Hatch_Input_Bus_HV.get(1), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NickelZincFerrite, 4), + GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.Gold, 4), + }, Materials.Silver.getMolten(576), CustomItemList.capacitor_Hatch.get(1), 800, 480); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Hatch_Output_Bus_HV.get(1), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NickelZincFerrite, 4), + GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.Gold, 4), + }, Materials.Silver.getMolten(576), CustomItemList.capacitor_Hatch.get(1), 800, 480); + //endregion //region multiblocks @@ -1177,7 +1189,6 @@ public class DreamCraftRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_LV.get(1), 400, 30); - //Tesla Transceiver MV 1A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_MV.get(1), @@ -1194,7 +1205,6 @@ public class DreamCraftRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_MV.get(1), 400, 120); - //Tesla Transceiver HV 1A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_HV.get(1), @@ -1211,7 +1221,6 @@ public class DreamCraftRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_HV.get(1), 400, 480); - //Tesla Transceiver EV 1A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_EV.get(1), @@ -1228,7 +1237,6 @@ public class DreamCraftRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_EV.get(1), 400, 1920); - //Tesla Transceiver IV 1A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_IV.get(1), @@ -1245,7 +1253,6 @@ public class DreamCraftRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_IV.get(1), 400, 7680); - //Tesla Transceiver LV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_LV.get(1), @@ -1262,7 +1269,6 @@ public class DreamCraftRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_LV.get(1), 400, 30); - //Tesla Transceiver MV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_MV.get(1), @@ -1279,7 +1285,6 @@ public class DreamCraftRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_MV.get(1), 400, 120); - //Tesla Transceiver HV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_HV.get(1), @@ -1296,7 +1301,6 @@ public class DreamCraftRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_HV.get(1), 400, 480); - //Tesla Transceiver EV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_EV.get(1), @@ -1313,7 +1317,6 @@ public class DreamCraftRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_EV.get(1), 400, 1920); - //Tesla Transceiver IV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_IV.get(1), @@ -1330,7 +1333,6 @@ public class DreamCraftRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_IV.get(1), 400, 7680); - //Tesla Transceiver LV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_LV.get(1), @@ -1347,7 +1349,6 @@ public class DreamCraftRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_LV.get(1), 400, 30); - //Tesla Transceiver MV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_MV.get(1), @@ -1364,7 +1365,6 @@ public class DreamCraftRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_MV.get(1), 400, 120); - //Tesla Transceiver HV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_HV.get(1), @@ -1381,7 +1381,6 @@ public class DreamCraftRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_HV.get(1), 400, 480); - //Tesla Transceiver EV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_EV.get(1), @@ -1398,7 +1397,6 @@ public class DreamCraftRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_EV.get(1), 400, 1920); - //Tesla Transceiver IV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_IV.get(1), @@ -1415,7 +1413,6 @@ public class DreamCraftRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_IV.get(1), 400, 7680); - //Tesla Transceiver LV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_LV.get(1), @@ -1432,7 +1429,6 @@ public class DreamCraftRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_4by4_LV.get(1), 400, 30); - //Tesla Transceiver MV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_MV.get(1), @@ -1449,7 +1445,6 @@ public class DreamCraftRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_4by4_MV.get(1), 400, 120); - //Tesla Transceiver HV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_HV.get(1), @@ -1466,7 +1461,6 @@ public class DreamCraftRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_4by4_HV.get(1), 400, 480); - //Tesla Transceiver EV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_EV.get(1), @@ -1483,7 +1477,6 @@ public class DreamCraftRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_4by4_EV.get(1), 400, 1920); - //Tesla Transceiver IV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_IV.get(1), @@ -1510,7 +1503,6 @@ public class DreamCraftRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 32), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.NickelZincFerrite, 8), }, Materials.Epoxid.getMolten(288), CustomItemList.teslaComponent.getWithDamage(1, 0), 320, 30); - //Tesla Winding Components Ultimate (ADD BLOOD VARIANT) GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorLuV, 4), @@ -1528,7 +1520,6 @@ public class DreamCraftRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 8), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 8), }, Materials.Epoxid.getMolten(72), CustomItemList.teslaCapacitor.getWithDamage(1, 0), 320, 30); - //MV Tesla Capacitor GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Copper, 4), @@ -1536,7 +1527,6 @@ public class DreamCraftRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 12), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 12), }, Materials.Epoxid.getMolten(144), CustomItemList.teslaCapacitor.getWithDamage(1, 1), 320, 120); - //HV Tesla Capacitor GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Gold, 4), @@ -1544,7 +1534,6 @@ public class DreamCraftRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 16), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 16), }, Materials.Epoxid.getMolten(216), CustomItemList.teslaCapacitor.getWithDamage(1, 2), 320, 480); - //EV Tesla Capacitor GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Aluminium, 4), @@ -1552,7 +1541,6 @@ public class DreamCraftRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 20), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 20), }, Materials.Epoxid.getMolten(288), CustomItemList.teslaCapacitor.getWithDamage(1, 3), 320, 1920); - //IV Tesla Capacitor GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Tungsten, 4), @@ -1560,7 +1548,6 @@ public class DreamCraftRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 24), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 24), }, Materials.Epoxid.getMolten(360), CustomItemList.teslaCapacitor.getWithDamage(1, 4), 320, 7680); - //Tesla Cover GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ CustomItemList.teslaComponent.getWithDamage(4, 0), @@ -1583,7 +1570,6 @@ public class DreamCraftRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NickelZincFerrite, 2), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 8), }, Materials.SolderingAlloy.getMolten(72), CustomItemList.teslaCover.getWithDamage(1, 0), 320, 480); - //Ultimate Tesla Cover GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ CustomItemList.teslaComponent.getWithDamage(4, 1), @@ -1614,19 +1600,15 @@ public class DreamCraftRecipeLoader implements Runnable { //LV Tesla Capacitor GT_Values.RA.addExtractorRecipe(CustomItemList.teslaCapacitor.getWithDamage(1, 0), GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 4), 300, 2); - //MV Tesla Capacitor GT_Values.RA.addExtractorRecipe(CustomItemList.teslaCapacitor.getWithDamage(1, 1), GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 6), 300, 2); - //HV Tesla Capacitor GT_Values.RA.addExtractorRecipe(CustomItemList.teslaCapacitor.getWithDamage(1, 2), GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 8), 300, 2); - //EV Tesla Capacitor GT_Values.RA.addExtractorRecipe(CustomItemList.teslaCapacitor.getWithDamage(1, 3), GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 10), 300, 2); - //IV Tesla Capacitor GT_Values.RA.addExtractorRecipe(CustomItemList.teslaCapacitor.getWithDamage(1, 4), GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 12), 300, 2); diff --git a/src/main/java/com/github/technus/tectech/loader/recipe/BloodyRecipeLoader.java b/src/main/java/com/github/technus/tectech/loader/recipe/BloodyRecipeLoader.java index 6e3a4dc677..0521fdb13a 100644 --- a/src/main/java/com/github/technus/tectech/loader/recipe/BloodyRecipeLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/recipe/BloodyRecipeLoader.java @@ -597,6 +597,18 @@ public class BloodyRecipeLoader implements Runnable { ItemList.Field_Generator_UV.get(1) }, Materials.Osmiridium.getMolten(1296), CustomItemList.eM_muffler_UV.get(1), 800, 500000); + //Capacitor Hatch + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Hatch_Input_Bus_HV.get(1), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NickelZincFerrite, 4), + GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.Gold, 4), + }, Materials.Silver.getMolten(576), CustomItemList.capacitor_Hatch.get(1), 800, 480); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + ItemList.Hatch_Output_Bus_HV.get(1), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NickelZincFerrite, 4), + GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.Gold, 4), + }, Materials.Silver.getMolten(576), CustomItemList.capacitor_Hatch.get(1), 800, 480); + //endregion //region multiblocks @@ -794,7 +806,6 @@ public class BloodyRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_LV.get(1), 400, 30); - //Tesla Transceiver MV 1A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_MV.get(1), @@ -811,7 +822,6 @@ public class BloodyRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_MV.get(1), 400, 120); - //Tesla Transceiver HV 1A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_HV.get(1), @@ -828,7 +838,6 @@ public class BloodyRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_HV.get(1), 400, 480); - //Tesla Transceiver EV 1A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_EV.get(1), @@ -845,7 +854,6 @@ public class BloodyRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_EV.get(1), 400, 1920); - //Tesla Transceiver IV 1A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_1by1_IV.get(1), @@ -862,7 +870,6 @@ public class BloodyRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_1by1_IV.get(1), 400, 7680); - //Tesla Transceiver LV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_LV.get(1), @@ -879,7 +886,6 @@ public class BloodyRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_LV.get(1), 400, 30); - //Tesla Transceiver MV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_MV.get(1), @@ -896,7 +902,6 @@ public class BloodyRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_MV.get(1), 400, 120); - //Tesla Transceiver HV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_HV.get(1), @@ -913,7 +918,6 @@ public class BloodyRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_HV.get(1), 400, 480); - //Tesla Transceiver EV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_EV.get(1), @@ -930,7 +934,6 @@ public class BloodyRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_EV.get(1), 400, 1920); - //Tesla Transceiver IV 4A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_2by2_IV.get(1), @@ -947,7 +950,6 @@ public class BloodyRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_2by2_IV.get(1), 400, 7680); - //Tesla Transceiver LV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_LV.get(1), @@ -964,7 +966,6 @@ public class BloodyRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_LV.get(1), 400, 30); - //Tesla Transceiver MV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_MV.get(1), @@ -981,7 +982,6 @@ public class BloodyRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_MV.get(1), 400, 120); - //Tesla Transceiver HV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_HV.get(1), @@ -998,7 +998,6 @@ public class BloodyRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_HV.get(1), 400, 480); - //Tesla Transceiver EV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_EV.get(1), @@ -1015,7 +1014,6 @@ public class BloodyRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_EV.get(1), 400, 1920); - //Tesla Transceiver IV 9A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_3by3_IV.get(1), @@ -1032,7 +1030,6 @@ public class BloodyRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_3by3_IV.get(1), 400, 7680); - //Tesla Transceiver LV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_LV.get(1), @@ -1049,7 +1046,6 @@ public class BloodyRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_4by4_LV.get(1), 400, 30); - //Tesla Transceiver MV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_MV.get(1), @@ -1066,7 +1062,6 @@ public class BloodyRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_4by4_MV.get(1), 400, 120); - //Tesla Transceiver HV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_HV.get(1), @@ -1083,7 +1078,6 @@ public class BloodyRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_4by4_HV.get(1), 400, 480); - //Tesla Transceiver EV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_EV.get(1), @@ -1100,7 +1094,6 @@ public class BloodyRecipeLoader implements Runnable { CustomItemList.teslaCover.getWithDamage(1, 0)}, Materials.SolderingAlloy.getMolten(144), CustomItemList.Machine_TeslaCoil_4by4_EV.get(1), 400, 1920); - //Tesla Transceiver IV 16A GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ ItemList.Battery_Buffer_4by4_IV.get(1), @@ -1127,8 +1120,7 @@ public class BloodyRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 32), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.NickelZincFerrite, 8), }, Materials.Epoxid.getMolten(288), CustomItemList.teslaComponent.getWithDamage(1, 0), 320, 30); - - //Tesla Winding Components Ultimate (ADD BLOOD VARIANT) + //Tesla Winding Components Ultimate GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorLuV, 16), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.NickelZincFerrite, 8), @@ -1145,7 +1137,6 @@ public class BloodyRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 8), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 8), }, Materials.Epoxid.getMolten(72), CustomItemList.teslaCapacitor.getWithDamage(1, 0), 320, 30); - //MV Tesla Capacitor GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Copper, 4), @@ -1153,7 +1144,6 @@ public class BloodyRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 12), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 12), }, Materials.Epoxid.getMolten(144), CustomItemList.teslaCapacitor.getWithDamage(1, 1), 320, 120); - //HV Tesla Capacitor GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Gold, 4), @@ -1161,7 +1151,6 @@ public class BloodyRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 16), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 16), }, Materials.Epoxid.getMolten(216), CustomItemList.teslaCapacitor.getWithDamage(1, 2), 320, 480); - //EV Tesla Capacitor GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Aluminium, 4), @@ -1169,7 +1158,6 @@ public class BloodyRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 20), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 20), }, Materials.Epoxid.getMolten(288), CustomItemList.teslaCapacitor.getWithDamage(1, 3), 320, 1920); - //IV Tesla Capacitor GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Tungsten, 4), @@ -1177,7 +1165,6 @@ public class BloodyRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 24), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 24), }, Materials.Epoxid.getMolten(360), CustomItemList.teslaCapacitor.getWithDamage(1, 4), 320, 7680); - //Tesla Cover GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ CustomItemList.teslaComponent.getWithDamage(4, 0), @@ -1200,7 +1187,6 @@ public class BloodyRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NickelZincFerrite, 2), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 8), }, Materials.SolderingAlloy.getMolten(72), CustomItemList.teslaCover.getWithDamage(1, 0), 320, 480); - //Ultimate Tesla Cover GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ CustomItemList.teslaComponent.getWithDamage(4, 1), @@ -1231,19 +1217,15 @@ public class BloodyRecipeLoader implements Runnable { //LV Tesla Capacitor GT_Values.RA.addExtractorRecipe(CustomItemList.teslaCapacitor.getWithDamage(1, 0), GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 4), 300, 2); - //MV Tesla Capacitor GT_Values.RA.addExtractorRecipe(CustomItemList.teslaCapacitor.getWithDamage(1, 1), GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 6), 300, 2); - //HV Tesla Capacitor GT_Values.RA.addExtractorRecipe(CustomItemList.teslaCapacitor.getWithDamage(1, 2), GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 8), 300, 2); - //EV Tesla Capacitor GT_Values.RA.addExtractorRecipe(CustomItemList.teslaCapacitor.getWithDamage(1, 3), GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 10), 300, 2); - //IV Tesla Capacitor GT_Values.RA.addExtractorRecipe(CustomItemList.teslaCapacitor.getWithDamage(1, 4), GT_OreDictUnificator.get(OrePrefixes.itemCasing, Materials.BatteryAlloy, 12), 300, 2); 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 00cad864bf..052e3a0159 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 @@ -565,7 +565,7 @@ public class MachineLoader implements Runnable { rack_Hatch.set(new GT_MetaTileEntity_Hatch_Rack(15450, "hatch.rack.tier.08", "Computer Rack", 8, "4 Slot Rack").getStackForm(1L)); holder_Hatch.set(new GT_MetaTileEntity_Hatch_Holder(15451, "hatch.holder.tier.09", "Object Holder", 8, "For Research Station").getStackForm(1L)); - capacitor_Hatch.set(new GT_MetaTileEntity_Hatch_Capacitor(15452, "hatch.capacitor.tier.05", "Capacitor Hatch", 5, "For Tesla Coil").getStackForm(1L)); + capacitor_Hatch.set(new GT_MetaTileEntity_Hatch_Capacitor(15452, "hatch.capacitor.tier.03", "Capacitor Hatch", 3, "For Tesla Tower").getStackForm(1L)); // =================================================================================================== // Pipes -- cgit From 2a4d5bd1f0e168e5ff237f386f8c3802e0057c5a Mon Sep 17 00:00:00 2001 From: Bass Date: Fri, 23 Aug 2019 13:50:41 +0100 Subject: Zeta Ready --- .../dreamcraft/DreamCraftRecipeLoader.java | 22 +++++++--------------- .../tectech/loader/recipe/BloodyRecipeLoader.java | 8 -------- 2 files changed, 7 insertions(+), 23 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java index 67bbbb9635..027ef5542d 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java +++ b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java @@ -178,7 +178,6 @@ public class DreamCraftRecipeLoader implements Runnable { new Object[]{"PhP", "PFP", "PwP", 'P', OrePrefixes.plate.get(Materials.NickelZincFerrite), 'F', OrePrefixes.frameGt.get(Materials.NickelZincFerrite)}); - //Tesla Toroid GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 6), @@ -189,47 +188,40 @@ public class DreamCraftRecipeLoader implements Runnable { new Object[]{"PhP", "PFP", "PwP", 'P', OrePrefixes.foil.get(Materials.Aluminium), 'F', OrePrefixes.frameGt.get(Materials.Aluminium)}); - //Tesla Secondary Windings GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ CustomItemList.teslaComponent.getWithDamage(8, 0), - com.dreammaster.item.ItemList.MicaInsulatorFoil.getIS(12) + getItemContainer("MicaInsulatorFoil").get(12) }, Materials.Silver.getMolten(144), CustomItemList.tM_TeslaSecondary.get(1), 200, 120); - //Tesla Primary Coils T0 GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.RedstoneAlloy, 8), - com.dreammaster.item.ItemList.MicaInsulatorFoil.getIS(8) + getItemContainer("MicaInsulatorFoil").get(8) }, Materials.RedAlloy.getMolten(144), CustomItemList.tM_TeslaPrimary_0.get(1), 200, 30); - //Tesla Primary Coils T1 GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorMV, 8), - com.dreammaster.item.ItemList.MicaInsulatorFoil.getIS(12) + getItemContainer("MicaInsulatorFoil").get(12) }, Materials.Magnesium.getMolten(144), CustomItemList.tM_TeslaPrimary_1.get(1), 200, 120); - //Tesla Primary Coils T2 GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorHV, 8), - com.dreammaster.item.ItemList.MicaInsulatorFoil.getIS(16) + getItemContainer("MicaInsulatorFoil").get(16) }, Materials.Barium.getMolten(144), CustomItemList.tM_TeslaPrimary_2.get(1), 200, 480); - //Tesla Primary Coils T3 GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorEV, 8), - com.dreammaster.item.ItemList.MicaInsulatorFoil.getIS(20) + getItemContainer("MicaInsulatorFoil").get(20) }, Materials.Platinum.getMolten(144), CustomItemList.tM_TeslaPrimary_3.get(1), 200, 1920); - //Tesla Primary Coils T4 GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorIV, 8), - com.dreammaster.item.ItemList.MicaInsulatorFoil.getIS(24) + getItemContainer("MicaInsulatorFoil").get(24) }, Materials.Vanadium.getMolten(144), CustomItemList.tM_TeslaPrimary_4.get(1), 200, 7680); - //Tesla Primary Coils T5 GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorLuV, 8), - com.dreammaster.item.ItemList.MicaInsulatorFoil.getIS(28) + getItemContainer("MicaInsulatorFoil").get(28) }, Materials.Indium.getMolten(144), CustomItemList.tM_TeslaPrimary_5.get(1), 50, 30720); //endregion diff --git a/src/main/java/com/github/technus/tectech/loader/recipe/BloodyRecipeLoader.java b/src/main/java/com/github/technus/tectech/loader/recipe/BloodyRecipeLoader.java index 0521fdb13a..a1d400ed54 100644 --- a/src/main/java/com/github/technus/tectech/loader/recipe/BloodyRecipeLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/recipe/BloodyRecipeLoader.java @@ -146,7 +146,6 @@ public class BloodyRecipeLoader implements Runnable { new Object[]{"PhP", "PFP", "PwP", 'P', OrePrefixes.plate.get(Materials.NickelZincFerrite), 'F', OrePrefixes.frameGt.get(Materials.NickelZincFerrite)}); - //Tesla Toroid GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 6), @@ -157,43 +156,36 @@ public class BloodyRecipeLoader implements Runnable { new Object[]{"PhP", "PFP", "PwP", 'P', OrePrefixes.foil.get(Materials.Aluminium), 'F', OrePrefixes.frameGt.get(Materials.Aluminium)}); - //Tesla Secondary Windings GT_ModHandler.addCraftingRecipe(CustomItemList.tM_TeslaSecondary.get(1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"WWW", "WwW", "WWW", 'W', CustomItemList.teslaComponent.getWithDamage(1, 0)}); - //Tesla Primary Coils T0 GT_ModHandler.addCraftingRecipe(CustomItemList.tM_TeslaPrimary_0.get(1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"WWW", "WwW", "WWW", 'W', OrePrefixes.wireGt02.get(Materials.RedstoneAlloy)}); - //Tesla Primary Coils T1 GT_ModHandler.addCraftingRecipe(CustomItemList.tM_TeslaPrimary_1.get(1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"WWW", "WwW", "WWW", 'W', OrePrefixes.wireGt02.get(Materials.SuperconductorMV)}); - //Tesla Primary Coils T2 GT_ModHandler.addCraftingRecipe(CustomItemList.tM_TeslaPrimary_2.get(1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"WWW", "WwW", "WWW", 'W', OrePrefixes.wireGt02.get(Materials.SuperconductorHV)}); - //Tesla Primary Coils T3 GT_ModHandler.addCraftingRecipe(CustomItemList.tM_TeslaPrimary_3.get(1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"WWW", "WwW", "WWW", 'W', OrePrefixes.wireGt02.get(Materials.SuperconductorEV)}); - //Tesla Primary Coils T4 GT_ModHandler.addCraftingRecipe(CustomItemList.tM_TeslaPrimary_4.get(1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"WWW", "WwW", "WWW", 'W', OrePrefixes.wireGt02.get(Materials.SuperconductorIV)}); - //Tesla Primary Coils T5 GT_ModHandler.addCraftingRecipe(CustomItemList.tM_TeslaPrimary_5.get(1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, -- cgit From 408d8112cc0fcf25ceec068c474e242f3f39ec28 Mon Sep 17 00:00:00 2001 From: Bass Date: Fri, 23 Aug 2019 21:54:11 +0100 Subject: Experimental Lang Stuff --- .../dreamcraft/NoDreamCraftMachineLoader.java | 100 +++++++++++++-------- .../openmodularturrets/TT_turret_loader.java | 2 +- .../definitions/dComplexAspectDefinition.java | 61 ++++++------- .../definitions/ePrimalAspectDefinition.java | 18 ++-- .../tectech/thing/item/TeslaCoilCapacitor.java | 7 -- .../tectech/thing/item/TeslaCoilComponent.java | 4 - .../technus/tectech/thing/item/TeslaCoilCover.java | 4 - .../single/GT_MetaTileEntity_TeslaCoil.java | 2 + src/main/resources/assets/tectech/lang/en_US.lang | 99 +++++++++++++++++++- 9 files changed, 202 insertions(+), 95 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/NoDreamCraftMachineLoader.java b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/NoDreamCraftMachineLoader.java index 53a64a52ae..0570299f4e 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/NoDreamCraftMachineLoader.java +++ b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/NoDreamCraftMachineLoader.java @@ -13,6 +13,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Transformer; import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; import java.lang.reflect.Constructor; import java.lang.reflect.Field; @@ -21,7 +22,7 @@ import java.lang.reflect.Method; import static gregtech.api.GregTech_API.METATILEENTITIES; public class NoDreamCraftMachineLoader implements Runnable { - public final static String imagination=EnumChatFormatting.RESET + + public final static String imagination = EnumChatFormatting.RESET + "You just need " + EnumChatFormatting.DARK_PURPLE + "I" + EnumChatFormatting.LIGHT_PURPLE + "m" + EnumChatFormatting.DARK_RED + @@ -41,69 +42,84 @@ public class NoDreamCraftMachineLoader implements Runnable { try { CustomItemList.WetTransformer_LV_ULV.set(new GT_MetaTileEntity_WetTransformer( 12000, "wettransformer.tier.00", "Ultra Low Voltage Power Transformer", 0, - "LV -> ULV (Use Soft Mallet to invert)").getStackForm(1L)); - }catch (IllegalArgumentException e){ + //LV -> ULV (Use Soft Mallet to invert) + StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.00.desc")).getStackForm(1L)); + } catch (IllegalArgumentException e) { System.out.println(METATILEENTITIES[12000].getClass().getCanonicalName()); TecTech.LOGGER.error(e); e.printStackTrace(); - throw new Error(METATILEENTITIES[12000].getClass().getCanonicalName(),e); + throw new Error(METATILEENTITIES[12000].getClass().getCanonicalName(), e); } CustomItemList.WetTransformer_MV_LV.set(new GT_MetaTileEntity_WetTransformer( 12001, "wetransformer.tier.01", "Low Voltage Power Transformer", 1, - "MV -> LV (Use Soft Mallet to invert)").getStackForm(1L)); + //MV -> LV (Use Soft Mallet to invert) + StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.01.desc")).getStackForm(1L)); CustomItemList.WetTransformer_HV_MV.set(new GT_MetaTileEntity_WetTransformer( 12002, "wettransformer.tier.02", "Medium Voltage Power Transformer", 2, - "HV -> MV (Use Soft Mallet to invert)").getStackForm(1L)); + //HV -> MV (Use Soft Mallet to invert) + StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.02.desc")).getStackForm(1L)); CustomItemList.WetTransformer_EV_HV.set(new GT_MetaTileEntity_WetTransformer( 12003, "wettransformer.tier.03", "High Voltage Power Transformer", 3, - "EV -> HV (Use Soft Mallet to invert)").getStackForm(1L)); + //EV -> HV (Use Soft Mallet to invert) + StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.03.desc")).getStackForm(1L)); CustomItemList.WetTransformer_IV_EV.set(new GT_MetaTileEntity_WetTransformer( 12004, "wettransformer.tier.04", "Extreme Power Transformer", 4, - "IV -> EV (Use Soft Mallet to invert)").getStackForm(1L)); + //IV -> EV (Use Soft Mallet to invert) + StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.04.desc")).getStackForm(1L)); CustomItemList.WetTransformer_LuV_IV.set(new GT_MetaTileEntity_WetTransformer( 12005, "wettransformer.tier.05", "Insane Power Transformer", 5, - "LuV -> IV (Use Soft Mallet to invert)").getStackForm(1L)); + //LuV -> IV (Use Soft Mallet to invert) + StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.05.desc")).getStackForm(1L)); CustomItemList.WetTransformer_ZPM_LuV.set(new GT_MetaTileEntity_WetTransformer( 12006, "wettransformer.tier.06", "Ludicrous Power Transformer", 6, - "ZPM -> LuV (Use Soft Mallet to invert)").getStackForm(1L)); + //ZPM -> LuV (Use Soft Mallet to invert) + StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.06.desc")).getStackForm(1L)); CustomItemList.WetTransformer_UV_ZPM.set(new GT_MetaTileEntity_WetTransformer( 12007, "wettransformer.tier.07", "ZPM Voltage Power Transformer", 7, - "UV -> ZPM (Use Soft Mallet to invert)").getStackForm(1L)); + //UV -> ZPM (Use Soft Mallet to invert) + StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.07.desc")).getStackForm(1L)); CustomItemList.WetTransformer_UHV_UV.set(new GT_MetaTileEntity_WetTransformer( 12008, "wettransformer.tier.08", "Ultimate Power Transformer", 8, - "UHV -> UV (Use Soft Mallet to invert)").getStackForm(1L)); + //UHV -> UV (Use Soft Mallet to invert) + StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.08.desc")).getStackForm(1L)); CustomItemList.WetTransformer_UEV_UHV.set(new GT_MetaTileEntity_WetTransformer( 12009, "wettransformer.tier.09", "Highly Ultimate Power Transformer", 9, - "UEV -> UHV (Use Soft Mallet to invert)").getStackForm(1L)); + //UEV -> UHV (Use Soft Mallet to invert) + StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.09.desc")).getStackForm(1L)); CustomItemList.WetTransformer_UIV_UEV.set(new GT_MetaTileEntity_WetTransformer( 12010, "wettransformer.tier.10", "Extremely Ultimate Power Transformer", 10, - "UIV -> UEV (Use Soft Mallet to invert)").getStackForm(1L)); + //UIV -> UEV (Use Soft Mallet to invert) + StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.10.desc")).getStackForm(1L)); CustomItemList.WetTransformer_UMV_UIV.set(new GT_MetaTileEntity_WetTransformer( 12011, "wettransformer.tier.11", "Insanely Ultimate Power Transformer", 11, - "UMV -> UIV (Use Soft Mallet to invert)").getStackForm(1L)); + //UMV -> UIV (Use Soft Mallet to invert) + StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.11.desc")).getStackForm(1L)); CustomItemList.WetTransformer_UXV_UMV.set(new GT_MetaTileEntity_WetTransformer( 12012, "wettransformer.tier.12", "Mega Ultimate Power Transformer", 12, - "UXV -> UMV (Use Soft Mallet to invert)").getStackForm(1L)); + //UXV -> UMV (Use Soft Mallet to invert) + StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.12.desc")).getStackForm(1L)); CustomItemList.WetTransformer_OPV_UXV.set(new GT_MetaTileEntity_WetTransformer( 12013, "wettransformer.tier.13", "Extended Mega Ultimate Power Transformer", 13, - "OPV -> UXV (Use Soft Mallet to invert)").getStackForm(1L)); + //OPV -> UXV (Use Soft Mallet to invert) + StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.13.desc")).getStackForm(1L)); CustomItemList.WetTransformer_MAXV_OPV.set(new GT_MetaTileEntity_WetTransformer( 12014, "wettransformer.tier.14", "Overpowered Power Transformer", 14, - "MAX -> OPV (Use Soft Mallet to invert)").getStackForm(1L)); + //MAX -> OPV (Use Soft Mallet to invert) + StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.14.desc")).getStackForm(1L)); try { MetaTileEntity temp; @@ -117,7 +133,7 @@ public class NoDreamCraftMachineLoader implements Runnable { } temp = new GT_MetaTileEntity_BasicHull( - 11230, "hull.tier.10", "UEV Machine Hull",10, + 11230, "hull.tier.10", "UEV Machine Hull", 10, imagination); Util.setTier(10, temp); if (GT_Values.GT.isClientSide()) { @@ -126,7 +142,7 @@ public class NoDreamCraftMachineLoader implements Runnable { CustomItemList.Hull_UEV.set(temp.getStackForm(1L)); temp = new GT_MetaTileEntity_BasicHull( - 11231, "hull.tier.11", "UIV Machine Hull",11, + 11231, "hull.tier.11", "UIV Machine Hull", 11, imagination); Util.setTier(11, temp); if (GT_Values.GT.isClientSide()) { @@ -135,7 +151,7 @@ public class NoDreamCraftMachineLoader implements Runnable { CustomItemList.Hull_UIV.set(temp.getStackForm(1L)); temp = new GT_MetaTileEntity_BasicHull( - 11232, "hull.tier.12", "UMV Machine Hull",12, + 11232, "hull.tier.12", "UMV Machine Hull", 12, imagination); Util.setTier(12, temp); if (GT_Values.GT.isClientSide()) { @@ -144,7 +160,7 @@ public class NoDreamCraftMachineLoader implements Runnable { CustomItemList.Hull_UMV.set(temp.getStackForm(1L)); temp = new GT_MetaTileEntity_BasicHull( - 11233, "hull.tier.13", "UXV Machine Hull",13, + 11233, "hull.tier.13", "UXV Machine Hull", 13, imagination); Util.setTier(13, temp); if (GT_Values.GT.isClientSide()) { @@ -153,7 +169,7 @@ public class NoDreamCraftMachineLoader implements Runnable { CustomItemList.Hull_UXV.set(temp.getStackForm(1L)); temp = new GT_MetaTileEntity_BasicHull( - 11234, "hull.tier.14", "OPV Machine Hull",14, + 11234, "hull.tier.14", "OPV Machine Hull", 14, imagination); Util.setTier(14, temp); if (GT_Values.GT.isClientSide()) { @@ -162,7 +178,7 @@ public class NoDreamCraftMachineLoader implements Runnable { CustomItemList.Hull_OPV.set(temp.getStackForm(1L)); temp = new GT_MetaTileEntity_BasicHull( - 11235, "hull.tier.15", "MAX Machine Hull",15, + 11235, "hull.tier.15", "MAX Machine Hull", 15, imagination); Util.setTier(15, temp); if (GT_Values.GT.isClientSide()) { @@ -173,12 +189,14 @@ public class NoDreamCraftMachineLoader implements Runnable { temp = new GT_MetaTileEntity_Transformer( 11220, "transformer.tier.09", "Highly Ultimate Transformer", 9, - "UEV -> UHV (Use Soft Mallet to invert)"); + //UEV -> UHV (Use Soft Mallet to invert) + StatCollector.translateToLocal("gt.blockmachines.transformer.tier.09.desc")); CustomItemList.Transformer_UEV_UHV.set(temp.getStackForm(1L)); temp = new GT_MetaTileEntity_Transformer( 11221, "transformer.tier.10", "Extremely Ultimate Transformer", 10, - "UIV -> UEV (Use Soft Mallet to invert)"); + //UIV -> UEV (Use Soft Mallet to invert) + StatCollector.translateToLocal("gt.blockmachines.transformer.tier.10.desc")); Util.setTier(10, temp); if (GT_Values.GT.isClientSide()) { field.set(temp, method.invoke(temp, iTexture)); @@ -187,7 +205,8 @@ public class NoDreamCraftMachineLoader implements Runnable { temp = new GT_MetaTileEntity_Transformer( 11222, "transformer.tier.11", "Insanely Ultimate Transformer", 11, - "UMV -> UIV (Use Soft Mallet to invert)"); + //UMV -> UIV (Use Soft Mallet to invert) + StatCollector.translateToLocal("gt.blockmachines.transformer.tier.11.desc")); Util.setTier(11, temp); if (GT_Values.GT.isClientSide()) { field.set(temp, method.invoke(temp, iTexture)); @@ -196,7 +215,8 @@ public class NoDreamCraftMachineLoader implements Runnable { temp = new GT_MetaTileEntity_Transformer( 11223, "transformer.tier.12", "Mega Ultimate Transformer", 12, - "UXV -> UMV (Use Soft Mallet to invert)"); + //UXV -> UMV (Use Soft Mallet to invert) + StatCollector.translateToLocal("gt.blockmachines.transformer.tier.12.desc")); Util.setTier(12, temp); if (GT_Values.GT.isClientSide()) { field.set(temp, method.invoke(temp, iTexture)); @@ -205,7 +225,8 @@ public class NoDreamCraftMachineLoader implements Runnable { temp = new GT_MetaTileEntity_Transformer( 11224, "transformer.tier.13", "Extended Mega Ultimate Transformer", 13, - "OPV -> UXV (Use Soft Mallet to invert)"); + //OPV -> UXV (Use Soft Mallet to invert) + StatCollector.translateToLocal("gt.blockmachines.transformer.tier.13.desc")); Util.setTier(13, temp); if (GT_Values.GT.isClientSide()) { field.set(temp, method.invoke(temp, iTexture)); @@ -214,7 +235,8 @@ public class NoDreamCraftMachineLoader implements Runnable { temp = new GT_MetaTileEntity_Transformer( 11225, "transformer.tier.14", "Overpowered Transformer", 14, - "MAX -> OPV (Use Soft Mallet to invert)"); + //MAX -> OPV (Use Soft Mallet to invert) + StatCollector.translateToLocal("gt.blockmachines.transformer.tier.14.desc")); Util.setTier(14, temp); if (GT_Values.GT.isClientSide()) { field.set(temp, method.invoke(temp, iTexture)); @@ -228,12 +250,14 @@ public class NoDreamCraftMachineLoader implements Runnable { temp = constructor.newInstance( 11989, "transformer.ha.tier.09", "Highly Ultimate Hi-Amp Transformer", 9, - "UEV -> UHV (Use Soft Mallet to invert)"); + //UEV -> UHV (Use Soft Mallet to invert + StatCollector.translateToLocal("gt.blockmachines.transformer.ha.tier.09.desc")); CustomItemList.Transformer_HA_UEV_UHV.set(temp.getStackForm(1)); temp = constructor.newInstance( 11910, "transformer.ha.tier.10", "Extremely Ultimate Hi-Amp Transformer", 10, - "UIV -> UEV (Use Soft Mallet to invert)"); + //UIV -> UEV (Use Soft Mallet to invert) + StatCollector.translateToLocal("gt.blockmachines.transformer.ha.tier.10.desc")); Util.setTier(10, temp); if (GT_Values.GT.isClientSide()) { field.set(temp, method.invoke(temp, iTexture)); @@ -242,7 +266,8 @@ public class NoDreamCraftMachineLoader implements Runnable { temp = constructor.newInstance( 11911, "transformer.ha.tier.11", "Insanely Ultimate Hi-Amp Transformer", 11, - "UMV -> UIV (Use Soft Mallet to invert)"); + //UMV -> UIV (Use Soft Mallet to invert) + StatCollector.translateToLocal("gt.blockmachines.transformer.ha.tier.11.desc")); Util.setTier(11, temp); if (GT_Values.GT.isClientSide()) { field.set(temp, method.invoke(temp, iTexture)); @@ -251,7 +276,8 @@ public class NoDreamCraftMachineLoader implements Runnable { temp = constructor.newInstance( 11912, "transformer.ha.tier.12", "Mega Ultimate Hi-Amp Transformer", 12, - "UXV -> UMV (Use Soft Mallet to invert)"); + //UXV -> UMV (Use Soft Mallet to invert) + StatCollector.translateToLocal("gt.blockmachines.transformer.ha.tier.12.desc")); Util.setTier(12, temp); if (GT_Values.GT.isClientSide()) { field.set(temp, method.invoke(temp, iTexture)); @@ -260,7 +286,8 @@ public class NoDreamCraftMachineLoader implements Runnable { temp = constructor.newInstance( 11913, "transformer.ha.tier.13", "Extended Mega Ultimate Hi-Amp Transformer", 13, - "OPV -> UXV (Use Soft Mallet to invert)"); + //OPV -> UXV (Use Soft Mallet to invert) + StatCollector.translateToLocal("gt.blockmachines.transformer.ha.tier.13.desc")); Util.setTier(13, temp); if (GT_Values.GT.isClientSide()) { field.set(temp, method.invoke(temp, iTexture)); @@ -269,7 +296,8 @@ public class NoDreamCraftMachineLoader implements Runnable { temp = constructor.newInstance( 11914, "transformer.ha.tier.14", "Overpowered Hi-Amp Transformer", 14, - "MAX -> OPV (Use Soft Mallet to invert)"); + //MAX -> OPV (Use Soft Mallet to invert) + StatCollector.translateToLocal("gt.blockmachines.transformer.ha.tier.14.desc")); Util.setTier(14, temp); if (GT_Values.GT.isClientSide()) { field.set(temp, method.invoke(temp, iTexture)); diff --git a/src/main/java/com/github/technus/tectech/compatibility/openmodularturrets/TT_turret_loader.java b/src/main/java/com/github/technus/tectech/compatibility/openmodularturrets/TT_turret_loader.java index d03f1bd1c6..d66232671a 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/openmodularturrets/TT_turret_loader.java +++ b/src/main/java/com/github/technus/tectech/compatibility/openmodularturrets/TT_turret_loader.java @@ -14,7 +14,7 @@ import net.minecraftforge.client.MinecraftForgeClient; public class TT_turret_loader implements Runnable { @Override public void run() { - TurretHeadRenderEM turretHeadRenderEM=new TurretHeadRenderEM(); + TurretHeadRenderEM turretHeadRenderEM = new TurretHeadRenderEM(); ClientRegistry.bindTileEntitySpecialRenderer(TileTurretHeadEM.class, turretHeadRenderEM); MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(TurretHeadEM.INSTANCE), new TurretHeadItemRenderEM(turretHeadRenderEM, new TileTurretHeadEM())); diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/dComplexAspectDefinition.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/dComplexAspectDefinition.java index 059ac44da3..d6c4553ed5 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/dComplexAspectDefinition.java +++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/dComplexAspectDefinition.java @@ -13,6 +13,7 @@ import com.github.technus.tectech.mechanics.elementalMatter.core.transformations import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.aOredictDequantizationInfo; import com.github.technus.tectech.mechanics.elementalMatter.definitions.primitive.eBosonDefinition; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.StatCollector; import java.util.ArrayList; @@ -58,12 +59,12 @@ public final class dComplexAspectDefinition extends cElementalDefinition impleme throw new tElementalException("Hadron Definition error"); } aspectStacks = aspects; - float mass=0; - for(cElementalDefinitionStack stack:aspects.values()){ - mass+=stack.getMass(); + float mass = 0; + for (cElementalDefinitionStack stack : aspects.values()) { + mass += stack.getMass(); } - this.mass=mass; - hash=super.hashCode(); + this.mass = mass; + hash = super.hashCode(); } //public but u can just try{}catch(){} the constructor it still calls this method @@ -75,18 +76,18 @@ public final class dComplexAspectDefinition extends cElementalDefinition impleme } amount += aspects.amount; } - return amount==2; + return amount == 2; } @Override public String getName() { - String name= AspectDefinitionCompat.aspectDefinitionCompat.getAspectTag(this); - if(name!=null){ - name=name.substring(0,1).toUpperCase()+name.substring(1); - }else{ - name=getSymbol(); + String name = AspectDefinitionCompat.aspectDefinitionCompat.getAspectTag(this); + if (name != null) { + name = name.substring(0, 1).toUpperCase() + name.substring(1); + } else { + name = getSymbol(); } - return "Aspect: "+name; + return StatCollector.translateToLocal("tt.keyword.Aspect") + ": " + name; } @Override @@ -195,7 +196,7 @@ public final class dComplexAspectDefinition extends cElementalDefinition impleme @Override public float getEnergyDiffBetweenStates(long currentEnergyLevel, long newEnergyLevel) { - return iElementalDefinition.DEFAULT_ENERGY_REQUIREMENT *(newEnergyLevel-currentEnergyLevel); + return iElementalDefinition.DEFAULT_ENERGY_REQUIREMENT * (newEnergyLevel - currentEnergyLevel); } @Override @@ -260,13 +261,13 @@ public final class dComplexAspectDefinition extends cElementalDefinition impleme public static void run() { try { - cElementalDefinition.addCreatorFromNBT(nbtType, dComplexAspectDefinition.class.getMethod("fromNBT", NBTTagCompound.class),(byte)-96); + cElementalDefinition.addCreatorFromNBT(nbtType, dComplexAspectDefinition.class.getMethod("fromNBT", NBTTagCompound.class), (byte) -96); } catch (Exception e) { if (DEBUG_MODE) { e.printStackTrace(); } } - if(DEBUG_MODE) { + if (DEBUG_MODE) { TecTech.LOGGER.info("Registered Elemental Matter Class: ComplexAspect " + nbtType + ' ' + -96); } } @@ -276,7 +277,7 @@ public final class dComplexAspectDefinition extends cElementalDefinition impleme return -96; } - public static byte getClassTypeStatic(){ + public static byte getClassTypeStatic() { return -96; } @@ -287,32 +288,32 @@ public final class dComplexAspectDefinition extends cElementalDefinition impleme @Override public void addScanShortSymbols(ArrayList lines, int capabilities, long energyLevel) { - if(Util.areBitsSet(SCAN_GET_NOMENCLATURE|SCAN_GET_CHARGE|SCAN_GET_MASS, capabilities)) { + if (Util.areBitsSet(SCAN_GET_NOMENCLATURE | SCAN_GET_CHARGE | SCAN_GET_MASS, capabilities)) { lines.add(getShortSymbol()); } } @Override public void addScanResults(ArrayList lines, int capabilities, long energyLevel) { - if(Util.areBitsSet(SCAN_GET_CLASS_TYPE, capabilities)) { - lines.add("CLASS = " + nbtType + ' ' + getClassType()); + if (Util.areBitsSet(SCAN_GET_CLASS_TYPE, capabilities)) { + lines.add(StatCollector.translateToLocal("tt.keyword.CLASS") + " = " + nbtType + ' ' + getClassType()); } - if(Util.areBitsSet(SCAN_GET_NOMENCLATURE|SCAN_GET_CHARGE|SCAN_GET_MASS, capabilities)) { - lines.add("NAME = "+getName()); + if (Util.areBitsSet(SCAN_GET_NOMENCLATURE | SCAN_GET_CHARGE | SCAN_GET_MASS, capabilities)) { + lines.add(StatCollector.translateToLocal("tt.keyword.NAME") + " = " + getName()); //lines.add("SYMBOL = "+getSymbol()); } - if(Util.areBitsSet(SCAN_GET_CHARGE,capabilities)) { - lines.add("CHARGE = " + getCharge() / 3f + " e"); + if (Util.areBitsSet(SCAN_GET_CHARGE, capabilities)) { + lines.add(StatCollector.translateToLocal("tt.keyword.CHARGE") + " = " + getCharge() / 3f + " e"); } - if(Util.areBitsSet(SCAN_GET_COLOR,capabilities)) { - lines.add(getColor() < 0 ? "COLORLESS" : "CARRIES COLOR"); + if (Util.areBitsSet(SCAN_GET_COLOR, capabilities)) { + lines.add(getColor() < 0 ? StatCollector.translateToLocal("tt.keyword.COLORLESS") : StatCollector.translateToLocal("tt.keyword.CARRIES_COLOR")); } - if(Util.areBitsSet(SCAN_GET_MASS,capabilities)) { - lines.add("MASS = " + getMass() + " eV/c\u00b2"); + if (Util.areBitsSet(SCAN_GET_MASS, capabilities)) { + lines.add(StatCollector.translateToLocal("tt.keyword.MASS") + " = " + getMass() + " eV/c\u00b2"); } - if(Util.areBitsSet(SCAN_GET_TIMESPAN_INFO, capabilities)){ - lines.add("LIFE TIME = "+getRawTimeSpan(energyLevel)+ " s"); - lines.add(" "+"At current energy level"); + if (Util.areBitsSet(SCAN_GET_TIMESPAN_INFO, capabilities)) { + lines.add(StatCollector.translateToLocal("tt.keyword.LIFE_TIME") + " = " + getRawTimeSpan(energyLevel) + " s"); + lines.add(" " + StatCollector.translateToLocal("tt.keyphrase.At_current_energy_level")); } } } diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/ePrimalAspectDefinition.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/ePrimalAspectDefinition.java index 7ca125cd5e..b31e7460c8 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/ePrimalAspectDefinition.java +++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/ePrimalAspectDefinition.java @@ -1,6 +1,7 @@ package com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.definitions; import com.github.technus.tectech.mechanics.elementalMatter.core.templates.cElementalPrimitive; +import net.minecraft.util.StatCollector; import static com.github.technus.tectech.mechanics.elementalMatter.core.cElementalDecay.noDecay; @@ -9,12 +10,12 @@ import static com.github.technus.tectech.mechanics.elementalMatter.core.cElement */ public final class ePrimalAspectDefinition extends cElementalPrimitive implements iElementalAspect { public static final ePrimalAspectDefinition - magic_air = new ePrimalAspectDefinition("Air", "a`", 1e1F, 35), - magic_earth = new ePrimalAspectDefinition("Earth", "e`", 1e9F, 34), - magic_fire = new ePrimalAspectDefinition("Fire", "f`", 1e3F, 33), - magic_water = new ePrimalAspectDefinition("Water", "w`", 1e7F, 32), - magic_order = new ePrimalAspectDefinition("Order", "o`", 1e5F, 30), - magic_entropy = new ePrimalAspectDefinition("Entropy", "e`", 1e5F, 31); + magic_air = new ePrimalAspectDefinition(StatCollector.translateToLocal("tt.keyword.Air"), "a`", 1e1F, 35), + magic_earth = new ePrimalAspectDefinition(StatCollector.translateToLocal("tt.keyword.Earth"), "e`", 1e9F, 34), + magic_fire = new ePrimalAspectDefinition(StatCollector.translateToLocal("tt.keyword.Fire"), "f`", 1e3F, 33), + magic_water = new ePrimalAspectDefinition(StatCollector.translateToLocal("tt.keyword.Water"), "w`", 1e7F, 32), + magic_order = new ePrimalAspectDefinition(StatCollector.translateToLocal("tt.keyword.Order"), "o`", 1e5F, 30), + magic_entropy = new ePrimalAspectDefinition(StatCollector.translateToLocal("tt.keyword.Entropy"), "e`", 1e5F, 31); private ePrimalAspectDefinition(String name, String symbol, float mass, int ID) { super(name, symbol, 0, mass, 0, -1, ID); @@ -31,7 +32,7 @@ public final class ePrimalAspectDefinition extends cElementalPrimitive implement @Override public String getName() { - return "Primal: " + name; + return StatCollector.translateToLocal("tt.keyword.Primal")+": " + name; } @Override @@ -43,5 +44,4 @@ public final class ePrimalAspectDefinition extends cElementalPrimitive implement public boolean isTimeSpanHalfLife() { return false; } -} - +} \ No newline at end of file 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 13b7f311d2..557b356d52 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 @@ -4,7 +4,6 @@ import com.github.technus.tectech.CommonValues; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.util.GT_LanguageManager; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; @@ -28,12 +27,6 @@ public final class TeslaCoilCapacitor extends Item { setHasSubtypes(true); setUnlocalizedName("tm.teslaCoilCapacitor"); setTextureName(MODID + ":itemCapacitorLV"); - - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "LV Tesla Capacitor"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "MV Tesla Capacitor"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "HV Tesla Capacitor"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "EV Tesla Capacitor"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "IV Tesla Capacitor"); } @Override 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 32b75ebce7..cfd6b3b653 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 @@ -4,7 +4,6 @@ import com.github.technus.tectech.CommonValues; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.util.GT_LanguageManager; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; @@ -27,9 +26,6 @@ public final class TeslaCoilComponent extends Item { setHasSubtypes(true); setUnlocalizedName("tm.itemTeslaComponent"); setTextureName(MODID + ":itemTeslaComponent"); - - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Electrum Tesla Windings"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Superconductive Tesla Windings"); } @Override 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 cacdda56e1..2a1fff39a3 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 @@ -4,7 +4,6 @@ import com.github.technus.tectech.CommonValues; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.util.GT_LanguageManager; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; @@ -27,9 +26,6 @@ public final class TeslaCoilCover extends Item { setHasSubtypes(true); setUnlocalizedName("tm.teslaCover"); setTextureName(MODID + ":itemTeslaCover"); - - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Tesla Coil Cover"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Tesla Coil Cover Rich Edition"); } @Override 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 b144902824..41d32bdcf2 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 @@ -17,6 +17,7 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicBatteryBuffer; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; import org.apache.commons.lang3.ArrayUtils; import java.util.Arrays; @@ -79,6 +80,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB String[] jargon = new String[3]; jargon[0] = CommonValues.BASS_MARK; jargon[1] = "Your Tesla I/O machine of choice"; + jargon[1] = StatCollector.translateToLocal("desc.test"); jargon[2] = EnumChatFormatting.AQUA + "Lightning stoves for the rich"; String[] sDesc = super.getDescription(); sDesc = Arrays.copyOfRange(sDesc, 1, sDesc.length); diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index 59a0d720de..5f6af25f00 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -1,6 +1,9 @@ +#Creative Tab Name itemGroup.TecTech=TecTech Interdimensional +#Blocks tile.quantumGlass.name=Quantum Glass tile.quantumStuff.name=Quantum Stuff +#Items item.em.debugContainer.name=Debug EM Container item.em.definitionContainer.name=EM Recipe Hint item.em.definitionScanStorage.name=EM Scan Storage @@ -8,12 +11,100 @@ item.em.constructable.name=Multiblock Machine Blueprint item.em.frontRotate.name=Front Rotation Scrench item.em.parametrizerMemoryCard.name=Parametrizer Memory Card item.em.EuMeterGT.name=GT EU meter - +item.tm.teslaCover.0.name=Tesla Coil Cover +item.tm.teslaCover.1.name=Tesla Coil Cover Rich Edition +item.tm.teslaCoilCapacitor.0.name=LV Tesla Capacitor +item.tm.teslaCoilCapacitor.1.name=MV Tesla Capacitor +item.tm.teslaCoilCapacitor.2.name=HV Tesla Capacitor +item.tm.teslaCoilCapacitor.3.name=EV Tesla Capacitor +item.tm.teslaCoilCapacitor.4.name=IV Tesla Capacitor +item.tm.itemTeslaComponent.0.name=Electrum Tesla Windings +item.tm.itemTeslaComponent.1.name=Superconductive Tesla Windings +tile.turretHeadEM.name=Elemental Matter Turret +tile.turretBaseEM.name=Elemental Turret Base +#Death Messages death.attack.microwaving=%1$s was dehydrated by radiation. death.attack.microwaving.player=%1$s was dehydrated by radiation while fighting %2$s. - death.attack.elementalPollution=%1$s was vaping from the wrong hole. death.attack.elementalPollution.player=%1$s was vaping from the wrong hole while fighting %2$s. - death.attack.subspace=%1$s was N-th dimensionally displeased. -death.attack.subspace.player=%1$s N-th dimensionally displeased while fighting %2$s. \ No newline at end of file +death.attack.subspace.player=%1$s N-th dimensionally displeased while fighting %2$s. +#Machines +gt.blockmachines.wetransformer.tier.00.name=Ultra Low Voltage Power Transformer +gt.blockmachines.wetransformer.tier.00.desc=LV -> ULV (Use Soft Mallet to invert) +gt.blockmachines.wetransformer.tier.01.name=Low Voltage Power Transformer +gt.blockmachines.wetransformer.tier.01.desc=MV -> LV (Use Soft Mallet to invert) +gt.blockmachines.wetransformer.tier.02.name=Medium Voltage Power Transformer +gt.blockmachines.wetransformer.tier.02.desc=HV -> MV (Use Soft Mallet to invert) +gt.blockmachines.wetransformer.tier.03.name=High Voltage Power Transformer +gt.blockmachines.wetransformer.tier.03.desc=EV -> HV (Use Soft Mallet to invert) +gt.blockmachines.wetransformer.tier.04.name=Extreme Power Transformer +gt.blockmachines.wetransformer.tier.04.desc=IV -> EV (Use Soft Mallet to invert) +gt.blockmachines.wetransformer.tier.05.name=Insane Power Transformer +gt.blockmachines.wetransformer.tier.05.desc=LuV -> IV (Use Soft Mallet to invert) +gt.blockmachines.wetransformer.tier.06.name=Ludicrous Power Transformer +gt.blockmachines.wetransformer.tier.06.desc=ZPM -> LuV (Use Soft Mallet to invert) +gt.blockmachines.wetransformer.tier.07.name=ZPM Voltage Power Transformer +gt.blockmachines.wetransformer.tier.07.desc=UV -> ZPM (Use Soft Mallet to invert) +gt.blockmachines.wetransformer.tier.08.name=Ultimate Power Transformer +gt.blockmachines.wetransformer.tier.08.desc=UHV -> UV (Use Soft Mallet to invert) +gt.blockmachines.wetransformer.tier.09.name=Highly Ultimate Power Transformer +gt.blockmachines.wetransformer.tier.09.desc=UEV -> UHV (Use Soft Mallet to invert) +gt.blockmachines.wetransformer.tier.10.name=Extremely Ultimate Power Transformer +gt.blockmachines.wetransformer.tier.10.desc=UIV -> UEV (Use Soft Mallet to invert) +gt.blockmachines.wetransformer.tier.11.name=Insanely Ultimate Power Transformer +gt.blockmachines.wetransformer.tier.11.desc=UMV -> UIV (Use Soft Mallet to invert) +gt.blockmachines.wetransformer.tier.12.name=Mega Ultimate Power Transformer +gt.blockmachines.wetransformer.tier.12.desc=UXV -> UMV (Use Soft Mallet to invert) +gt.blockmachines.wetransformer.tier.13.name=Extended Mega Ultimate Power Transformer +gt.blockmachines.wetransformer.tier.13.desc=OPV -> UXV (Use Soft Mallet to invert) +gt.blockmachines.wetransformer.tier.14.name=Overpowered Power Transformer +gt.blockmachines.wetransformer.tier.14.desc=MAX -> OPV (Use Soft Mallet to invert) +#The rainbow 'You just gotta use your Imagination' bit isn't ever translated anyway +gt.blockmachines.hull.tier.10.name=UEV Machine Hull +gt.blockmachines.hull.tier.11.name=UIV Machine Hull +gt.blockmachines.hull.tier.12.name=UMV Machine Hull +gt.blockmachines.hull.tier.13.name=UXV Machine Hull +gt.blockmachines.hull.tier.14.name=OPV Machine Hull +gt.blockmachines.hull.tier.15.name=MAX Machine Hull +gt.blockmachines.transformer.tier.09.name=Highly Ultimate Transformer +gt.blockmachines.transformer.tier.09.desc=UEV -> UHV (Use Soft Mallet to invert) +gt.blockmachines.transformer.tier.10.name=Extremely Ultimate Transformer +gt.blockmachines.transformer.tier.10.desc=UIV -> UEV (Use Soft Mallet to invert) +gt.blockmachines.transformer.tier.11.name=Insanely Ultimate Transformer +gt.blockmachines.transformer.tier.11.desc=UMV -> UIV (Use Soft Mallet to invert) +gt.blockmachines.transformer.tier.12.name=Mega Ultimate Transformer +gt.blockmachines.transformer.tier.12.desc=UXV -> UMV (Use Soft Mallet to invert) +gt.blockmachines.transformer.tier.13.name=Extended Mega Ultimate Transformer +gt.blockmachines.transformer.tier.13.desc=OPV -> UXV (Use Soft Mallet to invert) +gt.blockmachines.transformer.tier.14.name=Overpowered Transformer +gt.blockmachines.transformer.tier.14.desc=MAX -> OPV (Use Soft Mallet to invert) +gt.blockmachines.transformer.ha.tier.09.name=Highly Ultimate Hi-Amp Transformer +gt.blockmachines.transformer.ha.tier.09.desc=UEV -> UHV (Use Soft Mallet to invert +gt.blockmachines.transformer.ha.tier.10.name=Extremely Ultimate Hi-Amp Transformer +gt.blockmachines.transformer.ha.tier.10.desc=UIV -> UEV (Use Soft Mallet to invert) +gt.blockmachines.transformer.ha.tier.11.name=Insanely Ultimate Hi-Amp Transformer +gt.blockmachines.transformer.ha.tier.11.desc=UMV -> UIV (Use Soft Mallet to invert) +gt.blockmachines.transformer.ha.tier.12.name=Mega Ultimate Hi-Amp Transformer +gt.blockmachines.transformer.ha.tier.12.desc=UXV -> UMV (Use Soft Mallet to invert) +gt.blockmachines.transformer.ha.tier.13.name=Extended Mega Ultimate Hi-Amp Transformer +gt.blockmachines.transformer.ha.tier.13.desc=OPV -> UXV (Use Soft Mallet to invert) +gt.blockmachines.transformer.ha.tier.14.name=Overpowered Hi-Amp Transformer +gt.blockmachines.transformer.ha.tier.14.desc=MAX -> OPV (Use Soft Mallet to invert) +#Thaumcraft compatibility +tt.keyword.Air=Air +tt.keyword.Earth=Earth +tt.keyword.Fire=Fire +tt.keyword.Water=Water +tt.keyword.Order=Order +tt.keyword.Entropy=Entropy +tt.keyword.Primal=Primal +tt.keyword.Aspect=Aspect +tt.keyword.CLASS=CLASS +tt.keyword.NAME=NAME +tt.keyword.CHARGE=CHARGE +tt.keyword.COLORLESS=COLORLESS +tt.keyword.CARRIES_COLOR=CARRIES COLOR +tt.keyword.MASS=MASS +tt.keyword.LIFE_TIME=LIFE TIME +tt.keyphrase.At_current_energy_level=At current energy level \ No newline at end of file -- cgit From db11db198e50876dfcf859baa9f8f3a99d03a41d Mon Sep 17 00:00:00 2001 From: Bass Date: Fri, 23 Aug 2019 22:25:45 +0100 Subject: Additional Lang --- .../GT_MetaTileEntity_EM_essentiaDequantizer.java | 59 +++++++++++----------- .../GT_MetaTileEntity_EM_essentiaQuantizer.java | 57 +++++++++++---------- src/main/resources/assets/tectech/lang/en_US.lang | 19 ++++++- 3 files changed, 77 insertions(+), 58 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java index 3d64ceee62..afaa9052cd 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java +++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java @@ -21,6 +21,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; import static com.github.technus.tectech.CommonValues.V; @@ -38,14 +39,14 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_ //region Structure //use multi A energy inputs, use less power the longer it runs private static final String[][] shape = new String[][]{ - {" "," . "," ",}, - {"0A0",E,"0A0",}, - {"121","232","121",}, - {"\"\"\"","\"2\"","\"\"\"",}, - {"202","0!0","202",}, + {" ", " . ", " ",}, + {"0A0", E, "0A0",}, + {"121", "232", "121",}, + {"\"\"\"", "\"2\"", "\"\"\"",}, + {"202", "0!0", "202",}, }; private static final Block[] blockType = new Block[]{QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{0,0,4,8}; + private static final byte[] blockMeta = new byte[]{0, 0, 4, 8}; private final IHatchAdder[] addingMethods = new IHatchAdder[]{ this::addClassicToMachineList, this::addElementalInputToMachineList, @@ -54,11 +55,11 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_ private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0, 4, 4}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA+"Hint Details:", - "1 - Classic Hatches or High Power Casing", - "2 - Elemental Input Hatch", - "3 - Elemental Overflow Hatches or Elemental Casing", - "General - Some sort of Essentia Storage", + EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyword.Hint_Details") + ":", + StatCollector.translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.0"),//1 - Classic Hatches or High Power Casing + StatCollector.translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.1"),//2 - Elemental Input Hatch + StatCollector.translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.2"),//3 - Elemental Overflow Hatches or Elemental Casing + StatCollector.translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.3"),//General - Some sort of Essentia Storage }; //endregion @@ -77,7 +78,7 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_ @Override @SideOnly(Side.CLIENT) - protected ResourceLocation getActivitySound(){ + protected ResourceLocation getActivitySound() { return GT_MetaTileEntity_EM_quantizer.activitySound; } @@ -88,22 +89,22 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_ @Override public void construct(int stackSize, boolean hintsOnly) { - IGregTechTileEntity iGregTechTileEntity=getBaseMetaTileEntity(); + IGregTechTileEntity iGregTechTileEntity = getBaseMetaTileEntity(); int xDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetX; int yDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetY; int zDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetZ; - if(hintsOnly){ + if (hintsOnly) { TecTech.proxy.hint_particle(iGregTechTileEntity.getWorld(), - iGregTechTileEntity.getXCoord()+xDir, - iGregTechTileEntity.getYCoord()+yDir, - iGregTechTileEntity.getZCoord()+zDir, - TT_Container_Casings.sHintCasingsTT,12); - } else{ - if(iGregTechTileEntity.getBlockOffset(xDir,0,zDir).getMaterial() == Material.air) { + iGregTechTileEntity.getXCoord() + xDir, + iGregTechTileEntity.getYCoord() + yDir, + iGregTechTileEntity.getZCoord() + zDir, + TT_Container_Casings.sHintCasingsTT, 12); + } else { + if (iGregTechTileEntity.getBlockOffset(xDir, 0, zDir).getMaterial() == Material.air) { iGregTechTileEntity.getWorld().setBlock(iGregTechTileEntity.getXCoord() + xDir, iGregTechTileEntity.getYCoord() + yDir, iGregTechTileEntity.getZCoord() + zDir, TT_Container_Casings.sHintCasingsTT, 12, 2); } } - StructureBuilderExtreme(shape, blockType, blockMeta,1, 1, 0, iGregTechTileEntity,this,hintsOnly); + StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, iGregTechTileEntity, this, hintsOnly); } @Override @@ -114,20 +115,20 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_ @Override public boolean checkRecipe_EM(ItemStack itemStack) { TileEntity container = essentiaContainerCompat.getContainer(this); - if (eInputHatches.size() < 1 || container ==null) { + if (eInputHatches.size() < 1 || container == null) { stopMachine(); return false; } - cElementalInstanceStackMap inputHatchContainer=eInputHatches.get(0).getContainerHandler(); - if(inputHatchContainer.hasStacks()){ + cElementalInstanceStackMap inputHatchContainer = eInputHatches.get(0).getContainerHandler(); + if (inputHatchContainer.hasStacks()) { cElementalInstanceStack stack = inputHatchContainer.getFirst(); - inputHatchContainer.removeAmount(false,new cElementalInstanceStack(stack.definition,1)); - if(!essentiaContainerCompat.putElementalInstanceStack(container,stack)) { + inputHatchContainer.removeAmount(false, new cElementalInstanceStack(stack.definition, 1)); + if (!essentiaContainerCompat.putElementalInstanceStack(container, stack)) { cleanStackEM_EM(stack); } mMaxProgresstime = 20; mEfficiencyIncrease = 10000; - eAmpereFlow=1; + eAmpereFlow = 1; if (stack.definition instanceof ePrimalAspectDefinition) { mEUt = (int) -V[8]; } else { @@ -142,8 +143,8 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_ public String[] getDescription() { return new String[]{ CommonValues.TEC_MARK_EM, - "Transform quantum form back to...", - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "regular one, but why?" + StatCollector.translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.desc.0"),//Transform quantum form back to... + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + StatCollector.translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.desc.1")//regular one, but why? }; } } diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java index 9bd16c959b..d7570f7889 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java +++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java @@ -21,6 +21,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; import static com.github.technus.tectech.CommonValues.V; @@ -38,27 +39,27 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu //region Structure //use multi A energy inputs, use less power the longer it runs private static final String[][] shape = new String[][]{ - {" "," . "," ",}, - {"0A0",E,"0A0",}, - {"121","232","121",}, - {"\"\"\"","\"1\"","\"\"\"",}, - {"010","1!1","010",}, + {" ", " . ", " ",}, + {"0A0", E, "0A0",}, + {"121", "232", "121",}, + {"\"\"\"", "\"1\"", "\"\"\"",}, + {"010", "1!1", "010",}, }; private static final Block[] blockType = new Block[]{QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{0,4,0,8}; + private static final byte[] blockMeta = new byte[]{0, 4, 0, 8}; private final IHatchAdder[] addingMethods = new IHatchAdder[]{ this::addClassicToMachineList, this::addElementalOutputToMachineList, this::addElementalMufflerToMachineList}; - private static final short[] casingTextures = new short[]{textureOffset, textureOffset+4, textureOffset + 4}; + private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4, textureOffset + 4}; private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0, 4, 4}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA+"Hint Details:", - "1 - Classic Hatches or High Power Casing", - "2 - Elemental Output Hatch", - "3 - Elemental Overflow Hatches or Elemental Casing", - "General - Some sort of Essentia Storage", + EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyword.Hint_Details") + ":", + StatCollector.translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.0"),//1 - Classic Hatches or High Power Casing + StatCollector.translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.1"),//2 - Elemental Output Hatch + StatCollector.translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.2"),//3 - Elemental Overflow Hatches or Elemental Casing + StatCollector.translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.3"),//General - Some sort of Essentia Storage }; //endregion @@ -72,7 +73,7 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu @Override @SideOnly(Side.CLIENT) - protected ResourceLocation getActivitySound(){ + protected ResourceLocation getActivitySound() { return GT_MetaTileEntity_EM_quantizer.activitySound; } @@ -88,22 +89,22 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu @Override public void construct(int stackSize, boolean hintsOnly) { - IGregTechTileEntity iGregTechTileEntity=getBaseMetaTileEntity(); + IGregTechTileEntity iGregTechTileEntity = getBaseMetaTileEntity(); int xDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetX; int yDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetY; int zDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetZ; - if(hintsOnly){ + if (hintsOnly) { TecTech.proxy.hint_particle(iGregTechTileEntity.getWorld(), - iGregTechTileEntity.getXCoord()+xDir, - iGregTechTileEntity.getYCoord()+yDir, - iGregTechTileEntity.getZCoord()+zDir, - TT_Container_Casings.sHintCasingsTT,12); - } else{ - if(iGregTechTileEntity.getBlockOffset(xDir,0,zDir).getMaterial() == Material.air) { + iGregTechTileEntity.getXCoord() + xDir, + iGregTechTileEntity.getYCoord() + yDir, + iGregTechTileEntity.getZCoord() + zDir, + TT_Container_Casings.sHintCasingsTT, 12); + } else { + if (iGregTechTileEntity.getBlockOffset(xDir, 0, zDir).getMaterial() == Material.air) { iGregTechTileEntity.getWorld().setBlock(iGregTechTileEntity.getXCoord() + xDir, iGregTechTileEntity.getYCoord() + yDir, iGregTechTileEntity.getZCoord() + zDir, TT_Container_Casings.sHintCasingsTT, 12, 2); } } - StructureBuilderExtreme(shape, blockType, blockMeta,1, 1, 0, iGregTechTileEntity,this,hintsOnly); + StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, iGregTechTileEntity, this, hintsOnly); } @Override @@ -115,19 +116,19 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu public String[] getDescription() { return new String[]{ CommonValues.TEC_MARK_EM, - "Conveniently convert regular stuff into quantum form.", - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "To make it more inconvenient." + StatCollector.translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.desc.0"),//Conveniently convert regular stuff into quantum form. + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + StatCollector.translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.desc.1")//To make it more inconvenient. }; } @Override public boolean checkRecipe_EM(ItemStack itemStack) { TileEntity container = essentiaContainerCompat.getContainer(this); - cElementalInstanceStack newStack=essentiaContainerCompat.getFromContainer(container); - if(newStack!=null){ + cElementalInstanceStack newStack = essentiaContainerCompat.getFromContainer(container); + if (newStack != null) { mMaxProgresstime = 20; mEfficiencyIncrease = 10000; - eAmpereFlow=1; + eAmpereFlow = 1; outputEM = new cElementalInstanceStackMap[]{ new cElementalInstanceStackMap(newStack) }; @@ -148,6 +149,6 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu return; } eOutputHatches.get(0).getContainerHandler().putUnifyAll(outputEM[0]); - outputEM=null; + outputEM = null; } } diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index 5f6af25f00..60ac67a9a5 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -29,7 +29,7 @@ death.attack.elementalPollution=%1$s was vaping from the wrong hole. death.attack.elementalPollution.player=%1$s was vaping from the wrong hole while fighting %2$s. death.attack.subspace=%1$s was N-th dimensionally displeased. death.attack.subspace.player=%1$s N-th dimensionally displeased while fighting %2$s. -#Machines +#Singleblock Machines gt.blockmachines.wetransformer.tier.00.name=Ultra Low Voltage Power Transformer gt.blockmachines.wetransformer.tier.00.desc=LV -> ULV (Use Soft Mallet to invert) gt.blockmachines.wetransformer.tier.01.name=Low Voltage Power Transformer @@ -91,7 +91,24 @@ gt.blockmachines.transformer.ha.tier.13.name=Extended Mega Ultimate Hi-Amp Trans gt.blockmachines.transformer.ha.tier.13.desc=OPV -> UXV (Use Soft Mallet to invert) gt.blockmachines.transformer.ha.tier.14.name=Overpowered Hi-Amp Transformer gt.blockmachines.transformer.ha.tier.14.desc=MAX -> OPV (Use Soft Mallet to invert) +#Multiblock Machines +gt.blockmachines.multimachine.em.emtoessentia.name=Essentia Dequantizer +gt.blockmachines.multimachine.em.emtoessentia.hint.0=1 - Classic Hatches or High Power Casing +gt.blockmachines.multimachine.em.emtoessentia.hint.1=2 - Elemental Input Hatch +gt.blockmachines.multimachine.em.emtoessentia.hint.2=3 - Elemental Overflow Hatches or Elemental Casing +gt.blockmachines.multimachine.em.emtoessentia.hint.3=General - Some sort of Essentia Storage +gt.blockmachines.multimachine.em.emtoessentia.desc.0=Transform quantum form back to... +gt.blockmachines.multimachine.em.emtoessentia.desc.1=regular one, but why? +gt.blockmachines.multimachine.em.essentiatoem.name=Essentia Quantizer +gt.blockmachines.multimachine.em.essentiatoem.hint.0=1 - Classic Hatches or High Power Casing +gt.blockmachines.multimachine.em.essentiatoem.hint.1=2 - Elemental Output Hatch +gt.blockmachines.multimachine.em.essentiatoem.hint.2=3 - Elemental Overflow Hatches or Elemental Casing +gt.blockmachines.multimachine.em.essentiatoem.hint.3=General - Some sort of Essentia Storage +gt.blockmachines.multimachine.em.essentiatoem.desc.0=Conveniently convert regular stuff into quantum form. +gt.blockmachines.multimachine.em.essentiatoem.desc.1=To make it more inconvenient. + #Thaumcraft compatibility +tt.keyword.Hint_Details=Hint Details tt.keyword.Air=Air tt.keyword.Earth=Earth tt.keyword.Fire=Fire -- cgit From d633c17a949aef4328eeb5cf4f74354864fcba23 Mon Sep 17 00:00:00 2001 From: Bass Date: Sat, 24 Aug 2019 19:49:26 +0100 Subject: Lang extras --- .../tectech/loader/thing/MachineLoader.java | 18 +++--- ...GT_MetaTileEntity_Hatch_ElementalContainer.java | 59 +++++++++---------- .../GT_MetaTileEntity_Hatch_InputElemental.java | 5 +- .../GT_MetaTileEntity_Hatch_OutputElemental.java | 3 +- .../GT_MetaTileEntity_Hatch_OverflowElemental.java | 45 ++++++++------- src/main/resources/assets/tectech/lang/en_US.lang | 67 +++++++++++++++++----- 6 files changed, 121 insertions(+), 76 deletions(-) (limited to 'src/main/java') 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 052e3a0159..6f6d4865fc 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 @@ -297,7 +297,7 @@ public class MachineLoader implements Runnable { eM_energyTunnel7_UXV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel( 15198, "hatch.energytunnel7.tier.13", "UXV 1048576/t Laser Target Hatch", 13, 1048576).getStackForm(1L)); eM_energyTunnel9001.set(new GT_MetaTileEntity_Hatch_EnergyTunnel( - 15199, "hatch.energytunnel.tier.14", "Legendary Laser Target Hatch", 14, (int)V[14]).getStackForm(1L)); + 15199, "hatch.energytunnel.tier.14", "Legendary Laser Target Hatch", 14, (int) V[14]).getStackForm(1L)); // =================================================================================================== // Multi AMP Power OUTPUTS @@ -506,8 +506,8 @@ public class MachineLoader implements Runnable { eM_dynamoTunnel7_UXV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel( 15298, "hatch.dynamotunnel7.tier.13", "UXV 1048576/t Laser Source Hatch", 13, 1048576).getStackForm(1L)); eM_dynamoTunnel9001.set(new GT_MetaTileEntity_Hatch_DynamoTunnel( - 15299, "hatch.dynamotunnel.tier.14", "Legendary Laser Source Hatch", 14, (int)V[14]).getStackForm(1L)); - + 15299, "hatch.dynamotunnel.tier.14", "Legendary Laser Source Hatch", 14, (int) V[14]).getStackForm(1L)); + // =================================================================================================== // MULTIBLOCKS // =================================================================================================== @@ -600,25 +600,25 @@ public class MachineLoader implements Runnable { // Tesla Transceiver // =================================================================================================== - Machine_TeslaCoil_1by1_LV.set(new GT_MetaTileEntity_TeslaCoil(16000, "machine.tt.tesla.01", "Basic Tesla Transceiver", 1,1).getStackForm(1L)); + Machine_TeslaCoil_1by1_LV.set(new GT_MetaTileEntity_TeslaCoil(16000, "machine.tt.tesla.01", "Basic Tesla Transceiver", 1, 1).getStackForm(1L)); Machine_TeslaCoil_1by1_MV.set(new GT_MetaTileEntity_TeslaCoil(16001, "machine.tt.tesla.02", "Advanced Tesla Transceiver", 2, 1).getStackForm(1L)); Machine_TeslaCoil_1by1_HV.set(new GT_MetaTileEntity_TeslaCoil(16002, "machine.tt.tesla.03", "Epyc Tesla Transceiver", 3, 1).getStackForm(1L)); Machine_TeslaCoil_1by1_EV.set(new GT_MetaTileEntity_TeslaCoil(16003, "machine.tt.tesla.04", "Ultimate Power Tesla Transceiver", 4, 1).getStackForm(1L)); Machine_TeslaCoil_1by1_IV.set(new GT_MetaTileEntity_TeslaCoil(16004, "machine.tt.tesla.05", "Insane Tesla Transceiver", 5, 1).getStackForm(1L)); - Machine_TeslaCoil_2by2_LV.set(new GT_MetaTileEntity_TeslaCoil(16005, "machine.tt.tesla.01", "Basic Tesla Transceiver", 1,4).getStackForm(1L)); + Machine_TeslaCoil_2by2_LV.set(new GT_MetaTileEntity_TeslaCoil(16005, "machine.tt.tesla.01", "Basic Tesla Transceiver", 1, 4).getStackForm(1L)); Machine_TeslaCoil_2by2_MV.set(new GT_MetaTileEntity_TeslaCoil(16006, "machine.tt.tesla.02", "Advanced Tesla Transceiver", 2, 4).getStackForm(1L)); Machine_TeslaCoil_2by2_HV.set(new GT_MetaTileEntity_TeslaCoil(16007, "machine.tt.tesla.03", "Epyc Tesla Transceiver", 3, 4).getStackForm(1L)); Machine_TeslaCoil_2by2_EV.set(new GT_MetaTileEntity_TeslaCoil(16008, "machine.tt.tesla.04", "Ultimate Power Tesla Transceiver", 4, 4).getStackForm(1L)); Machine_TeslaCoil_2by2_IV.set(new GT_MetaTileEntity_TeslaCoil(16009, "machine.tt.tesla.05", "Insane Tesla Transceiver", 5, 4).getStackForm(1L)); - Machine_TeslaCoil_3by3_LV.set(new GT_MetaTileEntity_TeslaCoil(16010, "machine.tt.tesla.01", "Basic Tesla Transceiver", 1,9).getStackForm(1L)); + Machine_TeslaCoil_3by3_LV.set(new GT_MetaTileEntity_TeslaCoil(16010, "machine.tt.tesla.01", "Basic Tesla Transceiver", 1, 9).getStackForm(1L)); Machine_TeslaCoil_3by3_MV.set(new GT_MetaTileEntity_TeslaCoil(16011, "machine.tt.tesla.02", "Advanced Tesla Transceiver", 2, 9).getStackForm(1L)); Machine_TeslaCoil_3by3_HV.set(new GT_MetaTileEntity_TeslaCoil(16012, "machine.tt.tesla.03", "Epyc Tesla Transceiver", 3, 9).getStackForm(1L)); Machine_TeslaCoil_3by3_EV.set(new GT_MetaTileEntity_TeslaCoil(16013, "machine.tt.tesla.04", "Ultimate Power Tesla Transceiver", 4, 9).getStackForm(1L)); Machine_TeslaCoil_3by3_IV.set(new GT_MetaTileEntity_TeslaCoil(16014, "machine.tt.tesla.05", "Insane Tesla Transceiver", 5, 9).getStackForm(1L)); - Machine_TeslaCoil_4by4_LV.set(new GT_MetaTileEntity_TeslaCoil(16015, "machine.tt.tesla.01", "Basic Tesla Transceiver", 1,16).getStackForm(1L)); + Machine_TeslaCoil_4by4_LV.set(new GT_MetaTileEntity_TeslaCoil(16015, "machine.tt.tesla.01", "Basic Tesla Transceiver", 1, 16).getStackForm(1L)); Machine_TeslaCoil_4by4_MV.set(new GT_MetaTileEntity_TeslaCoil(16016, "machine.tt.tesla.02", "Advanced Tesla Transceiver", 2, 16).getStackForm(1L)); Machine_TeslaCoil_4by4_HV.set(new GT_MetaTileEntity_TeslaCoil(16017, "machine.tt.tesla.03", "Epyc Tesla Transceiver", 3, 16).getStackForm(1L)); Machine_TeslaCoil_4by4_EV.set(new GT_MetaTileEntity_TeslaCoil(16018, "machine.tt.tesla.04", "Ultimate Power Tesla Transceiver", 4, 16).getStackForm(1L)); @@ -627,8 +627,8 @@ public class MachineLoader implements Runnable { // =================================================================================================== // Debug Stuff // =================================================================================================== - Machine_DebugPollutor.set(new GT_MetaTileEntity_DebugPollutor(15495,"debug.tt.pollutor","Debug Pollution Generator",15).getStackForm(1)); - hatch_CreativeData.set(new GT_MetaTileEntity_Hatch_CreativeData(15496,"debug.tt.data","Debug Data Hatch",15).getStackForm(1)); + Machine_DebugPollutor.set(new GT_MetaTileEntity_DebugPollutor(15495, "debug.tt.pollutor", "Debug Pollution Generator", 15).getStackForm(1)); + hatch_CreativeData.set(new GT_MetaTileEntity_Hatch_CreativeData(15496, "debug.tt.data", "Debug Data Hatch", 15).getStackForm(1)); hatch_CreativeMaintenance.set(new GT_MetaTileEntity_Hatch_CreativeMaintenance(15497, "debug.tt.maintenance", "Debug Maintenance Hatch", 15).getStackForm(1L)); Machine_DebugGenny.set(new GT_MetaTileEntity_DebugPowerGenerator(15498, "debug.tt.genny", "Debug Power Generator", 15).getStackForm(1L)); Machine_DebugWriter.set(new GT_MetaTileEntity_DebugStructureWriter(15499, "debug.tt.writer", "Debug Structure Writer", 15).getStackForm(1L)); diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ElementalContainer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ElementalContainer.java index 066bcaa166..c96cb91f45 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ElementalContainer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ElementalContainer.java @@ -19,6 +19,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; import net.minecraftforge.fluids.FluidStack; import static com.github.technus.tectech.CommonValues.*; @@ -43,7 +44,7 @@ public abstract class GT_MetaTileEntity_Hatch_ElementalContainer extends GT_Meta protected GT_MetaTileEntity_Hatch_ElementalContainer(int aID, String aName, String aNameRegional, int aTier, String descr) { super(aID, aName, aNameRegional, aTier, 0, descr); - Util.setTier(aTier,this); + Util.setTier(aTier, this); } protected GT_MetaTileEntity_Hatch_ElementalContainer(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { @@ -104,7 +105,7 @@ public abstract class GT_MetaTileEntity_Hatch_ElementalContainer extends GT_Meta byte Tick = (byte) (aTick % 20); if (DECAY_AT == Tick) { purgeOverflow(); - content.tickContentByOneSecond(1,postEnergize);//Hatches don't life time mult things + content.tickContentByOneSecond(1, postEnergize);//Hatches don't life time mult things purgeOverflow(); } else if (OVERFLOW_AT == Tick) { if (overflowMatter <= 0) { @@ -124,8 +125,8 @@ public abstract class GT_MetaTileEntity_Hatch_ElementalContainer extends GT_Meta if (TecTech.configTecTech.BOOM_ENABLE) { tGTTileEntity.doExplosion(V[14]); } else { - TecTech.anomalyHandler.addAnomaly(aBaseMetaTileEntity,overflowMatter*32D); - TecTech.proxy.broadcast("Container1 BOOM! " +aBaseMetaTileEntity.getXCoord() + ' ' + aBaseMetaTileEntity.getYCoord() + ' ' + aBaseMetaTileEntity.getZCoord()); + TecTech.anomalyHandler.addAnomaly(aBaseMetaTileEntity, overflowMatter * 32D); + TecTech.proxy.broadcast("Container1 " + StatCollector.translateToLocal("tt.keyword.BOOM") + " " + aBaseMetaTileEntity.getXCoord() + ' ' + aBaseMetaTileEntity.getYCoord() + ' ' + aBaseMetaTileEntity.getZCoord()); } } deathDelay = 3;//needed in some cases like repetitive failures. Should be 4 since there is -- at end but meh... @@ -135,10 +136,10 @@ public abstract class GT_MetaTileEntity_Hatch_ElementalContainer extends GT_Meta if (TecTech.configTecTech.BOOM_ENABLE) { aBaseMetaTileEntity.doExplosion(V[14]); } else { - TecTech.anomalyHandler.addAnomaly(aBaseMetaTileEntity,overflowMatter*32D); - deathDelay=3; - overflowMatter=0; - TecTech.proxy.broadcast("Container0 BOOM! " + aBaseMetaTileEntity.getXCoord() + ' ' + aBaseMetaTileEntity.getYCoord() + ' ' + aBaseMetaTileEntity.getZCoord()); + TecTech.anomalyHandler.addAnomaly(aBaseMetaTileEntity, overflowMatter * 32D); + deathDelay = 3; + overflowMatter = 0; + TecTech.proxy.broadcast("Container0 " + StatCollector.translateToLocal("tt.keyword.BOOM") + " " + aBaseMetaTileEntity.getXCoord() + ' ' + aBaseMetaTileEntity.getYCoord() + ' ' + aBaseMetaTileEntity.getZCoord()); } } deathDelay--; @@ -220,33 +221,33 @@ public abstract class GT_MetaTileEntity_Hatch_ElementalContainer extends GT_Meta @Override public String[] getInfoData() { - if(TecTech.configTecTech.EASY_SCAN) { + if (TecTech.configTecTech.EASY_SCAN) { if (id > 0) { if (content == null || content.size() == 0) { - return new String[]{"ID: " + EnumChatFormatting.AQUA + id, "No Stacks"}; + return new String[]{StatCollector.translateToLocal("tt.keyword.ID") + ": " + EnumChatFormatting.AQUA + id, StatCollector.translateToLocal("tt.keyphrase.No_Stacks")}; } else { String[] lines = content.getElementalInfo(); String[] output = new String[lines.length + 1]; - output[0] = "ID: " + EnumChatFormatting.AQUA + id; + output[0] = StatCollector.translateToLocal("tt.keyword.ID") + ": " + EnumChatFormatting.AQUA + id; System.arraycopy(lines, 0, output, 1, lines.length); return output; } } if (content == null || content.size() == 0) { - return new String[]{"No Stacks"}; + return new String[]{StatCollector.translateToLocal("tt.keyphrase.No_Stacks")}; } return content.getElementalInfo(); } else { - if(id>0){ + if (id > 0) { if (content == null || content.size() == 0) { - return new String[]{"ID: " + EnumChatFormatting.AQUA + id, "No Stacks"}; + return new String[]{StatCollector.translateToLocal("tt.keyword.ID") + ": " + EnumChatFormatting.AQUA + id, StatCollector.translateToLocal("tt.keyphrase.No_Stacks")}; } - return new String[]{"ID: " + EnumChatFormatting.AQUA + id, "Contains EM"}; + return new String[]{StatCollector.translateToLocal("tt.keyword.ID") + ": " + EnumChatFormatting.AQUA + id, StatCollector.translateToLocal("tt.keyphrase.Contains_EM")}; } if (content == null || content.size() == 0) { - return new String[]{"No Stacks"}; + return new String[]{StatCollector.translateToLocal("tt.keyphrase.No_Stacks")}; } - return new String[]{"Contains EM"}; + return new String[]{StatCollector.translateToLocal("tt.keyphrase.Contains_EM")}; } } @@ -259,27 +260,27 @@ public abstract class GT_MetaTileEntity_Hatch_ElementalContainer extends GT_Meta return new String[]{ TEC_MARK_EM, mDescription, - "Max stacks amount: " + EnumChatFormatting.AQUA + getMaxStacksCount(), - "Stack capacity: " + EnumChatFormatting.AQUA + getMaxStackSize(), - "Place Overflow Hatch behind,on top or below", - "to provide overflow protection while this block", - "is not attached to multi block.", - "Transport range can be extended in straight", - "line up to 15 blocks with quantum tunnels.", - EnumChatFormatting.AQUA + "Must be painted to work" + StatCollector.translateToLocal("tt.base.emhatch.desc.0") + " " + EnumChatFormatting.AQUA + getMaxStacksCount(),//Max stacks amount: + StatCollector.translateToLocal("tt.base.emhatch.desc.1") + " " + EnumChatFormatting.AQUA + getMaxStackSize(),//Stack capacity: + StatCollector.translateToLocal("tt.base.emhatch.desc.2"),//Place Overflow Hatch behind,on top or below + StatCollector.translateToLocal("tt.base.emhatch.desc.3"),//to provide overflow protection while this block + StatCollector.translateToLocal("tt.base.emhatch.desc.4"),//is not attached to multi block. + StatCollector.translateToLocal("tt.base.emhatch.desc.5"),//Transport range can be extended in straight + StatCollector.translateToLocal("tt.base.emhatch.desc.6"),//line up to 15 blocks with quantum tunnels. + EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.base.emhatch.desc.7")//Must be painted to work }; } @Override public void onRemoval() { if (isValidMetaTileEntity(this) && getBaseMetaTileEntity().isActive()) { - TecTech.anomalyHandler.addAnomaly(getBaseMetaTileEntity(),(overflowMatter+content.getMass())*16D); - IGregTechTileEntity base=getBaseMetaTileEntity(); + TecTech.anomalyHandler.addAnomaly(getBaseMetaTileEntity(), (overflowMatter + content.getMass()) * 16D); + IGregTechTileEntity base = getBaseMetaTileEntity(); if (TecTech.configTecTech.BOOM_ENABLE) { base.doExplosion(V[15]); } else { - TecTech.proxy.broadcast("BOOM! " +base.getXCoord() + ' ' + base.getYCoord() + ' ' + base.getZCoord()); + TecTech.proxy.broadcast(StatCollector.translateToLocal("tt.keyword.BOOM") + " " + base.getXCoord() + ' ' + base.getYCoord() + ' ' + base.getZCoord()); } } } -} +} \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_InputElemental.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_InputElemental.java index 6078c6379a..466b0e64af 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_InputElemental.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_InputElemental.java @@ -4,14 +4,15 @@ import com.github.technus.tectech.Util; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; +import net.minecraft.util.StatCollector; /** * Created by danie_000 on 27.10.2016. */ public class GT_MetaTileEntity_Hatch_InputElemental extends GT_MetaTileEntity_Hatch_ElementalContainer { public GT_MetaTileEntity_Hatch_InputElemental(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, "Elemental Input for Multiblocks"); - Util.setTier(aTier,this); + super(aID, aName, aNameRegional, aTier, StatCollector.translateToLocal("gt.blockmachines.emin.desc"));//Elemental Input for Multiblocks + Util.setTier(aTier, this); } //public GT_MetaTileEntity_Hatch_InputElemental(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OutputElemental.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OutputElemental.java index adfcb1d464..8801388e84 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OutputElemental.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OutputElemental.java @@ -7,13 +7,14 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.util.GT_Utility; +import net.minecraft.util.StatCollector; /** * Created by danie_000 on 27.10.2016. */ public class GT_MetaTileEntity_Hatch_OutputElemental extends GT_MetaTileEntity_Hatch_ElementalContainer { public GT_MetaTileEntity_Hatch_OutputElemental(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, "Elemental Output for Multiblocks"); + super(aID, aName, aNameRegional, aTier, StatCollector.translateToLocal("gt.blockmachines.emout.desc"));//Elemental Output for Multiblocks Util.setTier(aTier,this); } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java index 18eb8b8c72..3e7ceec796 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java @@ -21,6 +21,7 @@ import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; import net.minecraft.world.EnumSkyBlock; import net.minecraftforge.common.util.ForgeDirection; @@ -45,11 +46,11 @@ public class GT_MetaTileEntity_Hatch_OverflowElemental extends GT_MetaTileEntity private final float overflowDisperse; public GT_MetaTileEntity_Hatch_OverflowElemental(int aID, String aName, String aNameRegional, int aTier, float max) { - super(aID, aName, aNameRegional, aTier, 0, "Disposes excess elemental Matter"); + super(aID, aName, aNameRegional, aTier, 0, StatCollector.translateToLocal("gt.blockmachines.hatch.emmuffler.desc.0"));//Disposes excess elemental Matter overflowMatter = max / 2; overflowMax = max; overflowDisperse = overflowMax / (float) (30 - aTier); - Util.setTier(aTier,this); + Util.setTier(aTier, this); } public GT_MetaTileEntity_Hatch_OverflowElemental(String aName, int aTier, float max, String aDescription, ITexture[][][] aTextures) { @@ -84,9 +85,9 @@ public class GT_MetaTileEntity_Hatch_OverflowElemental extends GT_MetaTileEntity return new String[]{ CommonValues.TEC_MARK_EM, mDescription, - "Mass capacity: " + EnumChatFormatting.AQUA + String.format(Locale.ENGLISH, "%+.2E", overflowMax) + " eV/c\u00b2", - "Disposal Speed: " + EnumChatFormatting.AQUA + String.format(Locale.ENGLISH, "%+.2E", overflowDisperse) + " (eV/c\u00b2)/s", - "DO NOT OBSTRUCT THE OUTPUT!" + StatCollector.translateToLocal("gt.blockmachines.hatch.emmuffler.desc.1") + ": " + EnumChatFormatting.AQUA + String.format(Locale.ENGLISH, "%+.2E", overflowMax) + " eV/c\u00b2", + StatCollector.translateToLocal("gt.blockmachines.hatch.emmuffler.desc.2") + ": " + EnumChatFormatting.AQUA + String.format(Locale.ENGLISH, "%+.2E", overflowDisperse) + " (eV/c\u00b2)/s", + StatCollector.translateToLocal("gt.blockmachines.hatch.emmuffler.desc.3") }; } @@ -142,10 +143,10 @@ public class GT_MetaTileEntity_Hatch_OverflowElemental extends GT_MetaTileEntity if (aBaseMetaTileEntity.isServerSide() && aTick % 20 == DISPERSE_AT) { if (aBaseMetaTileEntity.isActive()) { if (overflowMatter > overflowDisperse) { - TecTech.anomalyHandler.addAnomaly(aBaseMetaTileEntity,overflowDisperse); + TecTech.anomalyHandler.addAnomaly(aBaseMetaTileEntity, overflowDisperse); overflowMatter -= overflowDisperse; } else { - TecTech.anomalyHandler.addAnomaly(aBaseMetaTileEntity,overflowMatter); + TecTech.anomalyHandler.addAnomaly(aBaseMetaTileEntity, overflowMatter); overflowMatter = 0; aBaseMetaTileEntity.setActive(false); aBaseMetaTileEntity.setLightValue((byte) 0); @@ -166,20 +167,20 @@ public class GT_MetaTileEntity_Hatch_OverflowElemental extends GT_MetaTileEntity //DOES NOT CHECK FOR TOO MUCH, it is done only while putting stuff in (OPTIMIZATION!!!) } - private void vapePollution(IGregTechTileEntity mte){ - float xPos=mte.getXCoord()+0.5f; - float yPos=mte.getYCoord()+0.5f; - float zPos=mte.getZCoord()+0.5f; + private void vapePollution(IGregTechTileEntity mte) { + float xPos = mte.getXCoord() + 0.5f; + float yPos = mte.getYCoord() + 0.5f; + float zPos = mte.getZCoord() + 0.5f; int xDirShift = ForgeDirection.getOrientation(mte.getFrontFacing()).offsetX; int yDirShift = ForgeDirection.getOrientation(mte.getFrontFacing()).offsetY; int zDirShift = ForgeDirection.getOrientation(mte.getFrontFacing()).offsetZ; - AxisAlignedBB aabb=AxisAlignedBB.getBoundingBox(xPos-.5+xDirShift,yPos-.5+yDirShift,zPos-.5+zDirShift,xPos+.5+xDirShift,yPos+1.5+yDirShift,zPos+.5+zDirShift); + AxisAlignedBB aabb = AxisAlignedBB.getBoundingBox(xPos - .5 + xDirShift, yPos - .5 + yDirShift, zPos - .5 + zDirShift, xPos + .5 + xDirShift, yPos + 1.5 + yDirShift, zPos + .5 + zDirShift); for (Object entity : mte.getWorld().getEntitiesWithinAABB(EntityLivingBase.class, aabb)) { - float damagingFactor = (float)Math.log(overflowDisperse); - ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.confusion.id,1,(int)(damagingFactor*20))); - ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.wither.id,2,(int)(damagingFactor*15))); + float damagingFactor = (float) Math.log(overflowDisperse); + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.confusion.id, 1, (int) (damagingFactor * 20))); + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.wither.id, 2, (int) (damagingFactor * 15))); ((EntityLivingBase) entity).attackEntityFrom(elementalPollution, damagingFactor); } } @@ -192,28 +193,28 @@ public class GT_MetaTileEntity_Hatch_OverflowElemental extends GT_MetaTileEntity @Override public String[] getInfoData() { return new String[]{ - "Contained mass:", + StatCollector.translateToLocal("tt.keyphrase.Contained_mass") + ":", EnumChatFormatting.RED + Double.toString(overflowMatter) + EnumChatFormatting.RESET + " eV/c\u00b2 /", EnumChatFormatting.GREEN + Double.toString(overflowMax) + EnumChatFormatting.RESET + " eV/c\u00b2", - "Mass Disposal speed: " + EnumChatFormatting.BLUE + overflowDisperse + EnumChatFormatting.RESET + " (eV/c\u00b2)/s" + StatCollector.translateToLocal("tt.keyphrase.Mass_Disposal_speed") + ": " + EnumChatFormatting.BLUE + overflowDisperse + EnumChatFormatting.RESET + " (eV/c\u00b2)/s" }; } @Override public void onRemoval() { if (isValidMetaTileEntity(this) && getBaseMetaTileEntity().isActive()) { - TecTech.anomalyHandler.addAnomaly(getBaseMetaTileEntity(),overflowMatter*8D); + TecTech.anomalyHandler.addAnomaly(getBaseMetaTileEntity(), overflowMatter * 8D); if (TecTech.configTecTech.BOOM_ENABLE) { getBaseMetaTileEntity().doExplosion(V[15]); } else { - TecTech.proxy.broadcast("Muffler BOOM! " + getBaseMetaTileEntity().getXCoord() + ' ' + getBaseMetaTileEntity().getYCoord() + ' ' + getBaseMetaTileEntity().getZCoord()); + TecTech.proxy.broadcast(StatCollector.translateToLocal("tt.keyphrase.Muffler_BOOM") + " " + getBaseMetaTileEntity().getXCoord() + ' ' + getBaseMetaTileEntity().getYCoord() + ' ' + getBaseMetaTileEntity().getZCoord()); } } } //Return - Should Explode - public boolean addOverflowMatter(float matter){ - overflowMatter+=matter; + public boolean addOverflowMatter(float matter) { + overflowMatter += matter; return overflowMatter > overflowMax; } @@ -226,4 +227,4 @@ public class GT_MetaTileEntity_Hatch_OverflowElemental extends GT_MetaTileEntity this.overflowMatter = overflowMatter; return overflowMatter > overflowMax; } -} +} \ No newline at end of file diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index 60ac67a9a5..561a4e7ed4 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -20,8 +20,6 @@ item.tm.teslaCoilCapacitor.3.name=EV Tesla Capacitor item.tm.teslaCoilCapacitor.4.name=IV Tesla Capacitor item.tm.itemTeslaComponent.0.name=Electrum Tesla Windings item.tm.itemTeslaComponent.1.name=Superconductive Tesla Windings -tile.turretHeadEM.name=Elemental Matter Turret -tile.turretBaseEM.name=Elemental Turret Base #Death Messages death.attack.microwaving=%1$s was dehydrated by radiation. death.attack.microwaving.player=%1$s was dehydrated by radiation while fighting %2$s. @@ -29,7 +27,14 @@ death.attack.elementalPollution=%1$s was vaping from the wrong hole. death.attack.elementalPollution.player=%1$s was vaping from the wrong hole while fighting %2$s. death.attack.subspace=%1$s was N-th dimensionally displeased. death.attack.subspace.player=%1$s N-th dimensionally displeased while fighting %2$s. -#Singleblock Machines +#Machine hulls +gt.blockmachines.hull.tier.10.name=UEV Machine Hull +gt.blockmachines.hull.tier.11.name=UIV Machine Hull +gt.blockmachines.hull.tier.12.name=UMV Machine Hull +gt.blockmachines.hull.tier.13.name=UXV Machine Hull +gt.blockmachines.hull.tier.14.name=OPV Machine Hull +gt.blockmachines.hull.tier.15.name=MAX Machine Hull +#Transformers gt.blockmachines.wetransformer.tier.00.name=Ultra Low Voltage Power Transformer gt.blockmachines.wetransformer.tier.00.desc=LV -> ULV (Use Soft Mallet to invert) gt.blockmachines.wetransformer.tier.01.name=Low Voltage Power Transformer @@ -60,13 +65,6 @@ gt.blockmachines.wetransformer.tier.13.name=Extended Mega Ultimate Power Transfo gt.blockmachines.wetransformer.tier.13.desc=OPV -> UXV (Use Soft Mallet to invert) gt.blockmachines.wetransformer.tier.14.name=Overpowered Power Transformer gt.blockmachines.wetransformer.tier.14.desc=MAX -> OPV (Use Soft Mallet to invert) -#The rainbow 'You just gotta use your Imagination' bit isn't ever translated anyway -gt.blockmachines.hull.tier.10.name=UEV Machine Hull -gt.blockmachines.hull.tier.11.name=UIV Machine Hull -gt.blockmachines.hull.tier.12.name=UMV Machine Hull -gt.blockmachines.hull.tier.13.name=UXV Machine Hull -gt.blockmachines.hull.tier.14.name=OPV Machine Hull -gt.blockmachines.hull.tier.15.name=MAX Machine Hull gt.blockmachines.transformer.tier.09.name=Highly Ultimate Transformer gt.blockmachines.transformer.tier.09.desc=UEV -> UHV (Use Soft Mallet to invert) gt.blockmachines.transformer.tier.10.name=Extremely Ultimate Transformer @@ -91,7 +89,48 @@ gt.blockmachines.transformer.ha.tier.13.name=Extended Mega Ultimate Hi-Amp Trans gt.blockmachines.transformer.ha.tier.13.desc=OPV -> UXV (Use Soft Mallet to invert) gt.blockmachines.transformer.ha.tier.14.name=Overpowered Hi-Amp Transformer gt.blockmachines.transformer.ha.tier.14.desc=MAX -> OPV (Use Soft Mallet to invert) -#Multiblock Machines +#Hatches +tt.base.emhatch.desc.0=Max stacks amount: +tt.base.emhatch.desc.1=Stack capacity: +tt.base.emhatch.desc.2=Place Overflow Hatch behind,on top or below +tt.base.emhatch.desc.3=to provide overflow protection while this block +tt.base.emhatch.desc.4=is not attached to multi block. +tt.base.emhatch.desc.5=Transport range can be extended in straight +tt.base.emhatch.desc.6=line up to 15 blocks with quantum tunnels. +tt.base.emhatch.desc.7=Must be painted to work +gt.blockmachines.hatch.emmuffler.tier.08.name=UV Overflow Output Hatch +gt.blockmachines.hatch.emmuffler.tier.09.name=UHV Overflow Output Hatch +gt.blockmachines.hatch.emmuffler.tier.10.name=UEV Overflow Output Hatch +gt.blockmachines.hatch.emmuffler.tier.11.name=UIV Overflow Output Hatch +gt.blockmachines.hatch.emmuffler.tier.12.name=UMV Overflow Output Hatch +gt.blockmachines.hatch.emmuffler.tier.13.name=UXV Overflow Output Hatch +gt.blockmachines.hatch.emmuffler.desc.0=Disposes excess elemental Matter +gt.blockmachines.hatch.emmuffler.desc.1=Mass capacity +gt.blockmachines.hatch.emmuffler.desc.2=Disposal Speed +gt.blockmachines.hatch.emmuffler.desc.3=DO NOT OBSTRUCT THE OUTPUT! + +tt.keyword.BOOM=BOOM! +tt.keyword.ID=ID +tt.keyphrase.No_Stacks=No Stacks +tt.keyphrase.Contains_EM=Contains EM +tt.keyphrase.Contained_mass=Contained mass +tt.keyphrase.Mass_Disposal_speed=Mass Disposal speed +tt.keyphrase.Muffler_BOOM=Muffler BOOM! +gt.blockmachines.emin.tier.08.name=UV Elemental Input Hatch +gt.blockmachines.emin.tier.09.name=UHV Elemental Input Hatch +gt.blockmachines.emin.tier.10.name=UEV Elemental Input Hatch +gt.blockmachines.emin.tier.11.name=UIV Elemental Input Hatch +gt.blockmachines.emin.tier.12.name=UMV Elemental Input Hatch +gt.blockmachines.emin.tier.13.name=UXV Elemental Input Hatch +gt.blockmachines.emin.desc=Elemental Input for Multiblocks +gt.blockmachines.emout.tier.08.name=UV Elemental Output Hatch +gt.blockmachines.emout.tier.09.name=UHV Elemental Output Hatch +gt.blockmachines.emout.tier.10.name=UEV Elemental Output Hatch +gt.blockmachines.emout.tier.11.name=UIV Elemental Output Hatch +gt.blockmachines.emout.tier.12.name=UMV Elemental Output Hatch +gt.blockmachines.emout.tier.13.name=UXV Elemental Output Hatch +gt.blockmachines.emout.desc=Elemental Output for Multiblocks +#Multiblocks gt.blockmachines.multimachine.em.emtoessentia.name=Essentia Dequantizer gt.blockmachines.multimachine.em.emtoessentia.hint.0=1 - Classic Hatches or High Power Casing gt.blockmachines.multimachine.em.emtoessentia.hint.1=2 - Elemental Input Hatch @@ -106,7 +145,6 @@ gt.blockmachines.multimachine.em.essentiatoem.hint.2=3 - Elemental Overflow Hatc gt.blockmachines.multimachine.em.essentiatoem.hint.3=General - Some sort of Essentia Storage gt.blockmachines.multimachine.em.essentiatoem.desc.0=Conveniently convert regular stuff into quantum form. gt.blockmachines.multimachine.em.essentiatoem.desc.1=To make it more inconvenient. - #Thaumcraft compatibility tt.keyword.Hint_Details=Hint Details tt.keyword.Air=Air @@ -124,4 +162,7 @@ tt.keyword.COLORLESS=COLORLESS tt.keyword.CARRIES_COLOR=CARRIES COLOR tt.keyword.MASS=MASS tt.keyword.LIFE_TIME=LIFE TIME -tt.keyphrase.At_current_energy_level=At current energy level \ No newline at end of file +tt.keyphrase.At_current_energy_level=At current energy level +#OpenTurrets compatibility +tile.turretHeadEM.name=Elemental Matter Turret +tile.turretBaseEM.name=Elemental Turret Base \ No newline at end of file -- cgit From 29ca5bf60833827aea03eea8dcda6c40f2e1383b Mon Sep 17 00:00:00 2001 From: Bass Date: Sun, 25 Aug 2019 16:45:20 +0100 Subject: More Lang --- .../tectech/loader/thing/MachineLoader.java | 2 - .../hatch/GT_MetaTileEntity_Hatch_DynamoMulti.java | 7 +- .../GT_MetaTileEntity_Hatch_DynamoTunnel.java | 41 ++-- .../hatch/GT_MetaTileEntity_Hatch_EnergyMulti.java | 9 +- .../GT_MetaTileEntity_Hatch_EnergyTunnel.java | 15 +- .../multi/GT_MetaTileEntity_EM_transformer.java | 26 +-- src/main/resources/assets/tectech/lang/en_US.lang | 217 ++++++++++++++++++++- 7 files changed, 260 insertions(+), 57 deletions(-) (limited to 'src/main/java') 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 6f6d4865fc..ececaa70dc 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 @@ -157,7 +157,6 @@ public class MachineLoader implements Runnable { eM_energyMulti64_UXV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( 15128, "hatch.energymulti64.tier.13", "UXV 64A Energy Hatch", 13, 64).getStackForm(1L)); - // =================================================================================================== // Multi AMP Laser INPUTS // =================================================================================================== @@ -303,7 +302,6 @@ public class MachineLoader implements Runnable { // Multi AMP Power OUTPUTS // =================================================================================================== - eM_dynamoMulti4_IV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( 15200, "hatch.dynamomulti04.tier.05", "IV 4A Dynamo Hatch", 5, 4).getStackForm(1L)); eM_dynamoMulti16_IV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoMulti.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoMulti.java index 1ba4854b62..81ad00ea06 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoMulti.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoMulti.java @@ -8,6 +8,7 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.util.StatCollector; import static com.github.technus.tectech.CommonValues.V; import static com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ENERGY_IN_POWER_TT; @@ -19,9 +20,9 @@ public class GT_MetaTileEntity_Hatch_DynamoMulti extends GT_MetaTileEntity_Hatch public final int Amperes; public GT_MetaTileEntity_Hatch_DynamoMulti(int aID, String aName, String aNameRegional, int aTier, int aAmp) { - super(aID, aName, aNameRegional, aTier, 0, "Multiple Ampere Energy Extractor for Multiblocks"); + super(aID, aName, aNameRegional, aTier, 0, StatCollector.translateToLocal("gt.blockmachines.hatch.dynamomulti.desc.0"));//Multiple Ampere Energy Extractor for Multiblocks Amperes = aAmp; - Util.setTier(aTier,this); + Util.setTier(aTier, this); } public GT_MetaTileEntity_Hatch_DynamoMulti(String aName, int aTier, int aAmp, String aDescription, ITexture[][][] aTextures) { @@ -117,4 +118,4 @@ public class GT_MetaTileEntity_Hatch_DynamoMulti extends GT_MetaTileEntity_Hatch //"Amperes Out: "+ EnumChatFormatting.AQUA+Amperes+" A" }; } -} +} \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoTunnel.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoTunnel.java index 2e1a62f46d..95bb0bc60d 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoTunnel.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoTunnel.java @@ -12,6 +12,7 @@ import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; import static com.github.technus.tectech.CommonValues.TRANSFER_AT; import static com.github.technus.tectech.CommonValues.V; @@ -22,8 +23,8 @@ import static com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ */ public class GT_MetaTileEntity_Hatch_DynamoTunnel extends GT_MetaTileEntity_Hatch_DynamoMulti implements IConnectsToEnergyTunnel { public GT_MetaTileEntity_Hatch_DynamoTunnel(int aID, String aName, String aNameRegional, int aTier, int aAmp) { - super(aID, aName, aNameRegional, aTier, 0, "Energy extracting terminal for Multiblocks",aAmp); - Util.setTier(aTier,this); + super(aID, aName, aNameRegional, aTier, 0, StatCollector.translateToLocal("gt.blockmachines.hatch.dynamotunnel.desc.0"), aAmp);//Energy extracting terminal for Multiblocks + Util.setTier(aTier, this); } public GT_MetaTileEntity_Hatch_DynamoTunnel(String aName, int aTier, int aAmp, String aDescription, ITexture[][][] aTextures) { @@ -105,7 +106,7 @@ public class GT_MetaTileEntity_Hatch_DynamoTunnel extends GT_MetaTileEntity_Hatc return new String[]{ CommonValues.TEC_MARK_GENERAL, mDescription, - "Throughput: "+ EnumChatFormatting.YELLOW +(Amperes*maxEUOutput())+EnumChatFormatting.RESET+" EU/t" + StatCollector.translateToLocal("gt.blockmachines.hatch.dynamotunnel.desc.1") + ": " + EnumChatFormatting.YELLOW + (Amperes * maxEUOutput()) + EnumChatFormatting.RESET + " EU/t"//Throughput }; } @@ -114,13 +115,13 @@ public class GT_MetaTileEntity_Hatch_DynamoTunnel extends GT_MetaTileEntity_Hatc if (aBaseMetaTileEntity.isServerSide()) { byte Tick = (byte) (aTick % 20); if (TRANSFER_AT == Tick) { - if(aBaseMetaTileEntity.getStoredEU()>0){ - setEUVar(aBaseMetaTileEntity.getStoredEU()-Amperes); - if(aBaseMetaTileEntity.getStoredEU()<0){ + if (aBaseMetaTileEntity.getStoredEU() > 0) { + setEUVar(aBaseMetaTileEntity.getStoredEU() - Amperes); + if (aBaseMetaTileEntity.getStoredEU() < 0) { setEUVar(0); } } - if(aBaseMetaTileEntity.getStoredEU()>getMinimumStoredEU()){ + if (aBaseMetaTileEntity.getStoredEU() > getMinimumStoredEU()) { moveAround(aBaseMetaTileEntity); } } @@ -141,30 +142,30 @@ public class GT_MetaTileEntity_Hatch_DynamoTunnel extends GT_MetaTileEntity_Hatc if (aMetaTileEntity != null) { if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_EnergyTunnel && opposite == tGTTileEntity.getFrontFacing()) { - if(maxEUOutput()>((GT_MetaTileEntity_Hatch_EnergyTunnel) aMetaTileEntity).maxEUInput()){ + if (maxEUOutput() > ((GT_MetaTileEntity_Hatch_EnergyTunnel) aMetaTileEntity).maxEUInput()) { aMetaTileEntity.doExplosion(maxEUOutput()); - setEUVar(aBaseMetaTileEntity.getStoredEU()-maxEUOutput()); + setEUVar(aBaseMetaTileEntity.getStoredEU() - maxEUOutput()); return; - }else if(maxEUOutput()==((GT_MetaTileEntity_Hatch_EnergyTunnel) aMetaTileEntity).maxEUInput()) { - long diff=Math.min( - Amperes*20, + } else if (maxEUOutput() == ((GT_MetaTileEntity_Hatch_EnergyTunnel) aMetaTileEntity).maxEUInput()) { + long diff = Math.min( + Amperes * 20, Math.min( - ((GT_MetaTileEntity_Hatch_EnergyTunnel) aMetaTileEntity).maxEUStore()- + ((GT_MetaTileEntity_Hatch_EnergyTunnel) aMetaTileEntity).maxEUStore() - aMetaTileEntity.getBaseMetaTileEntity().getStoredEU(), - maxEUStore()-aBaseMetaTileEntity.getStoredEU() - )/maxEUOutput() - )*maxEUOutput(); + maxEUStore() - aBaseMetaTileEntity.getStoredEU() + ) / maxEUOutput() + ) * maxEUOutput(); - setEUVar(aBaseMetaTileEntity.getStoredEU()-diff); + setEUVar(aBaseMetaTileEntity.getStoredEU() - diff); ((GT_MetaTileEntity_Hatch_EnergyTunnel) aMetaTileEntity) - .setEUVar(aMetaTileEntity.getBaseMetaTileEntity().getStoredEU()+diff); + .setEUVar(aMetaTileEntity.getBaseMetaTileEntity().getStoredEU() + diff); } return; } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Pipe_Energy) { if (((GT_MetaTileEntity_Pipe_Energy) aMetaTileEntity).connectionCount < 2) { return; - }else { + } else { ((GT_MetaTileEntity_Pipe_Energy) aMetaTileEntity).markUsed(); } } else { @@ -183,4 +184,4 @@ public class GT_MetaTileEntity_Hatch_DynamoTunnel extends GT_MetaTileEntity_Hatc public boolean canConnect(byte side) { return isOutputFacing(side); } -} +} \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyMulti.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyMulti.java index 06bdd4faba..b9030d2dbe 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyMulti.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyMulti.java @@ -9,6 +9,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; import static com.github.technus.tectech.CommonValues.V; import static com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ENERGY_IN_POWER_TT; @@ -20,9 +21,9 @@ public class GT_MetaTileEntity_Hatch_EnergyMulti extends GT_MetaTileEntity_Hatch public final int Amperes; public GT_MetaTileEntity_Hatch_EnergyMulti(int aID, String aName, String aNameRegional, int aTier, int aAmp) { - super(aID, aName, aNameRegional, aTier, 0, "Multiple Ampere Energy Injector for Multiblocks"); + super(aID, aName, aNameRegional, aTier, 0, StatCollector.translateToLocal("gt.blockmachines.hatch.energymulti.desc.0"));//Multiple Ampere Energy Injector for Multiblocks Amperes = aAmp; - Util.setTier(aTier,this); + Util.setTier(aTier, this); } public GT_MetaTileEntity_Hatch_EnergyMulti(String aName, int aTier, int aAmp, String aDescription, ITexture[][][] aTextures) { @@ -30,7 +31,7 @@ public class GT_MetaTileEntity_Hatch_EnergyMulti extends GT_MetaTileEntity_Hatch Amperes = aAmp; } - public GT_MetaTileEntity_Hatch_EnergyMulti(int aID, String aName, String aNameRegional, int aTier, int i, String description,int aAmp) { + public GT_MetaTileEntity_Hatch_EnergyMulti(int aID, String aName, String aNameRegional, int aTier, int i, String description, int aAmp) { super(aID, aName, aNameRegional, aTier, 0, description); Amperes = aAmp; } @@ -115,7 +116,7 @@ public class GT_MetaTileEntity_Hatch_EnergyMulti extends GT_MetaTileEntity_Hatch return new String[]{ CommonValues.TEC_MARK_GENERAL, mDescription, - "Amperes In: " + EnumChatFormatting.AQUA + maxAmperesIn() + " A" + StatCollector.translateToLocal("gt.blockmachines.hatch.energymulti.desc.1") + ": " + EnumChatFormatting.AQUA + maxAmperesIn() + " A"//Amperes In }; } } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyTunnel.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyTunnel.java index e074f9dabb..118a659e93 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyTunnel.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyTunnel.java @@ -10,6 +10,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; import static com.github.technus.tectech.CommonValues.TRANSFER_AT; import static com.github.technus.tectech.CommonValues.V; @@ -20,8 +21,8 @@ import static com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ */ public class GT_MetaTileEntity_Hatch_EnergyTunnel extends GT_MetaTileEntity_Hatch_EnergyMulti implements IConnectsToEnergyTunnel { public GT_MetaTileEntity_Hatch_EnergyTunnel(int aID, String aName, String aNameRegional, int aTier, int aAmp) { - super(aID, aName, aNameRegional, aTier, 0, "Energy injecting terminal for Multiblocks",aAmp); - Util.setTier(aTier,this); + super(aID, aName, aNameRegional, aTier, 0, StatCollector.translateToLocal("gt.blockmachines.hatch.energytunnel.desc.0"), aAmp);//Energy injecting terminal for Multiblocks + Util.setTier(aTier, this); } public GT_MetaTileEntity_Hatch_EnergyTunnel(String aName, int aTier, int aAmp, String aDescription, ITexture[][][] aTextures) { @@ -113,7 +114,7 @@ public class GT_MetaTileEntity_Hatch_EnergyTunnel extends GT_MetaTileEntity_Hatc return new String[]{ CommonValues.TEC_MARK_GENERAL, mDescription, - "Throughput: "+ EnumChatFormatting.YELLOW +(Amperes*maxEUInput())+EnumChatFormatting.RESET+" EU/t" + StatCollector.translateToLocal("gt.blockmachines.hatch.energytunnel.desc.1") + ": " + EnumChatFormatting.YELLOW + (Amperes * maxEUInput()) + EnumChatFormatting.RESET + " EU/t"//Throughput }; } @@ -127,13 +128,13 @@ public class GT_MetaTileEntity_Hatch_EnergyTunnel extends GT_MetaTileEntity_Hatc if (aBaseMetaTileEntity.isServerSide()) { byte Tick = (byte) (aTick % 20); if (TRANSFER_AT == Tick) { - if(aBaseMetaTileEntity.getStoredEU()>0){ - setEUVar(aBaseMetaTileEntity.getStoredEU()-Amperes); - if(aBaseMetaTileEntity.getStoredEU()<0){ + if (aBaseMetaTileEntity.getStoredEU() > 0) { + setEUVar(aBaseMetaTileEntity.getStoredEU() - Amperes); + if (aBaseMetaTileEntity.getStoredEU() < 0) { setEUVar(0); } } } } } -} +} \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java index e384a8d7e2..245aa53288 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java @@ -29,12 +29,12 @@ import static gregtech.api.GregTech_API.sBlockCasings1; /** * Created by danie_000 on 17.12.2016. */ -public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable{ +public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { //region Structure private static final String[][] shape = new String[][]{ - {" "," . "," ",}, - {" "," 0 "," ",}, - {" "," "," ",}, + {" ", " . ", " ",}, + {" ", " 0 ", " ",}, + {" ", " ", " ",}, }; private static final Block[] blockType = new Block[]{sBlockCasings1}; private static final byte[] blockMeta = new byte[]{15}; @@ -43,7 +43,7 @@ public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_Multiblo private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA+"Hint Details:", + EnumChatFormatting.AQUA + "Hint Details:", "1 - Energy IO Hatches or High Power Casing", }; //endregion @@ -56,7 +56,7 @@ public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_Multiblo mHardHammer = true; mSolderingTool = true; mCrowbar = true; - eDismantleBoom=true; + eDismantleBoom = true; } public GT_MetaTileEntity_EM_transformer(String aName) { @@ -67,14 +67,14 @@ public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_Multiblo mHardHammer = true; mSolderingTool = true; mCrowbar = true; - eDismantleBoom=true; + eDismantleBoom = true; } - public final static ResourceLocation activitySound=new ResourceLocation(Reference.MODID+":fx_noise"); + public final static ResourceLocation activitySound = new ResourceLocation(Reference.MODID + ":fx_noise"); @Override @SideOnly(Side.CLIENT) - protected ResourceLocation getActivitySound(){ + protected ResourceLocation getActivitySound() { return activitySound; } @@ -90,17 +90,17 @@ public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_Multiblo @Override public void construct(int stackSize, boolean hintsOnly) { - StructureBuilderExtreme(shape, blockType, blockMeta,1, 1, 0, getBaseMetaTileEntity(),this,hintsOnly); + StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), this, hintsOnly); } @Override public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_Container_MultiMachineEM(aPlayerInventory, aBaseMetaTileEntity,true,false,false); + return new GT_Container_MultiMachineEM(aPlayerInventory, aBaseMetaTileEntity, true, false, false); } @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachineEM(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "EMDisplay.png",true,false,false); + return new GT_GUIContainer_MultiMachineEM(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "EMDisplay.png", true, false, false); } @Override @@ -156,4 +156,4 @@ public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_Multiblo public boolean doRandomMaintenanceDamage() { return true; } -} +} \ No newline at end of file diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index 561a4e7ed4..da8c6c609c 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -13,11 +13,13 @@ item.em.parametrizerMemoryCard.name=Parametrizer Memory Card item.em.EuMeterGT.name=GT EU meter item.tm.teslaCover.0.name=Tesla Coil Cover item.tm.teslaCover.1.name=Tesla Coil Cover Rich Edition + item.tm.teslaCoilCapacitor.0.name=LV Tesla Capacitor item.tm.teslaCoilCapacitor.1.name=MV Tesla Capacitor item.tm.teslaCoilCapacitor.2.name=HV Tesla Capacitor item.tm.teslaCoilCapacitor.3.name=EV Tesla Capacitor item.tm.teslaCoilCapacitor.4.name=IV Tesla Capacitor + item.tm.itemTeslaComponent.0.name=Electrum Tesla Windings item.tm.itemTeslaComponent.1.name=Superconductive Tesla Windings #Death Messages @@ -65,6 +67,7 @@ gt.blockmachines.wetransformer.tier.13.name=Extended Mega Ultimate Power Transfo gt.blockmachines.wetransformer.tier.13.desc=OPV -> UXV (Use Soft Mallet to invert) gt.blockmachines.wetransformer.tier.14.name=Overpowered Power Transformer gt.blockmachines.wetransformer.tier.14.desc=MAX -> OPV (Use Soft Mallet to invert) + gt.blockmachines.transformer.tier.09.name=Highly Ultimate Transformer gt.blockmachines.transformer.tier.09.desc=UEV -> UHV (Use Soft Mallet to invert) gt.blockmachines.transformer.tier.10.name=Extremely Ultimate Transformer @@ -77,6 +80,7 @@ gt.blockmachines.transformer.tier.13.name=Extended Mega Ultimate Transformer gt.blockmachines.transformer.tier.13.desc=OPV -> UXV (Use Soft Mallet to invert) gt.blockmachines.transformer.tier.14.name=Overpowered Transformer gt.blockmachines.transformer.tier.14.desc=MAX -> OPV (Use Soft Mallet to invert) + gt.blockmachines.transformer.ha.tier.09.name=Highly Ultimate Hi-Amp Transformer gt.blockmachines.transformer.ha.tier.09.desc=UEV -> UHV (Use Soft Mallet to invert gt.blockmachines.transformer.ha.tier.10.name=Extremely Ultimate Hi-Amp Transformer @@ -98,6 +102,7 @@ tt.base.emhatch.desc.4=is not attached to multi block. tt.base.emhatch.desc.5=Transport range can be extended in straight tt.base.emhatch.desc.6=line up to 15 blocks with quantum tunnels. tt.base.emhatch.desc.7=Must be painted to work + gt.blockmachines.hatch.emmuffler.tier.08.name=UV Overflow Output Hatch gt.blockmachines.hatch.emmuffler.tier.09.name=UHV Overflow Output Hatch gt.blockmachines.hatch.emmuffler.tier.10.name=UEV Overflow Output Hatch @@ -109,13 +114,200 @@ gt.blockmachines.hatch.emmuffler.desc.1=Mass capacity gt.blockmachines.hatch.emmuffler.desc.2=Disposal Speed gt.blockmachines.hatch.emmuffler.desc.3=DO NOT OBSTRUCT THE OUTPUT! -tt.keyword.BOOM=BOOM! -tt.keyword.ID=ID -tt.keyphrase.No_Stacks=No Stacks -tt.keyphrase.Contains_EM=Contains EM -tt.keyphrase.Contained_mass=Contained mass -tt.keyphrase.Mass_Disposal_speed=Mass Disposal speed -tt.keyphrase.Muffler_BOOM=Muffler BOOM! +gt.blockmachines.hatch.energymulti04.tier.05.name=IV 4A Energy Hatch +gt.blockmachines.hatch.energymulti16.tier.05.name=IV 16A Energy Hatch +gt.blockmachines.hatch.energymulti64.tier.05.name=IV 64A Energy Hatch +gt.blockmachines.hatch.energymulti04.tier.06.name=LuV 4A Energy Hatch +gt.blockmachines.hatch.energymulti16.tier.06.name=LuV 16A Energy Hatch +gt.blockmachines.hatch.energymulti64.tier.06.name=LuV 64A Energy Hatch +gt.blockmachines.hatch.energymulti04.tier.07.name=ZPM 4A Energy Hatch +gt.blockmachines.hatch.energymulti16.tier.07.name=ZPM 16A Energy Hatch +gt.blockmachines.hatch.energymulti64.tier.07.name=ZPM 64A Energy Hatch +gt.blockmachines.hatch.energymulti04.tier.08.name=UV 4A Energy Hatch +gt.blockmachines.hatch.energymulti16.tier.08.name=UV 16A Energy Hatch +gt.blockmachines.hatch.energymulti64.tier.08.name=UV 64A Energy Hatch +gt.blockmachines.hatch.energymulti04.tier.09.name=UHV 4A Energy Hatch +gt.blockmachines.hatch.energymulti16.tier.09.name=UHV 16A Energy Hatch +gt.blockmachines.hatch.energymulti64.tier.09.name=UHV 64A Energy Hatch +gt.blockmachines.hatch.energymulti04.tier.10.name=UEV 4A Energy Hatch +gt.blockmachines.hatch.energymulti16.tier.10.name=UEV 16A Energy Hatch +gt.blockmachines.hatch.energymulti64.tier.10.name=UEV 64A Energy Hatch +gt.blockmachines.hatch.energymulti04.tier.11.name=UIV 4A Energy Hatch +gt.blockmachines.hatch.energymulti16.tier.11.name=UIV 16A Energy Hatch +gt.blockmachines.hatch.energymulti64.tier.11.name=UIV 64A Energy Hatch +gt.blockmachines.hatch.energymulti04.tier.12.name=UMV 4A Energy Hatch +gt.blockmachines.hatch.energymulti16.tier.12.name=UMV 16A Energy Hatch +gt.blockmachines.hatch.energymulti64.tier.12.name=UMV 64A Energy Hatch +gt.blockmachines.hatch.energymulti04.tier.13.name=UXV 4A Energy Hatch +gt.blockmachines.hatch.energymulti16.tier.13.name=UXV 16A Energy Hatch +gt.blockmachines.hatch.energymulti64.tier.13.name=UXV 64A Energy Hatch +gt.blockmachines.hatch.energymulti.desc.0=Multiple Ampere Energy Injector for Multiblocks +gt.blockmachines.hatch.energymulti.desc.1=Amperes In + +gt.blockmachines.hatch.energytunnel1.tier.05.name=IV 256/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel2.tier.05.name=IV 1024/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel3.tier.05.name=IV 4096/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel4.tier.05.name=IV 16384/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel5.tier.05.name=IV 65536/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel6.tier.05.name=IV 262144/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel7.tier.05.name=IV 1048576/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel1.tier.06.name=LuV 256/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel2.tier.06.name=LuV 1024/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel3.tier.06.name=LuV 4096/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel4.tier.06.name=LuV 16384/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel5.tier.06.name=LuV 65536/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel6.tier.06.name=LuV 262144/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel7.tier.06.name=LuV 1048576/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel1.tier.07.name=ZPM 256/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel2.tier.07.name=ZPM 1024/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel3.tier.07.name=ZPM 4096/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel4.tier.07.name=ZPM 16384/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel5.tier.07.name=ZPM 65536/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel6.tier.07.name=ZPM 262144/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel7.tier.07.name=ZPM 1048576/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel1.tier.08.name=UV 256/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel2.tier.08.name=UV 1024/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel3.tier.08.name=UV 4096/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel4.tier.08.name=UV 16384/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel5.tier.08.name=UV 65536/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel6.tier.08.name=UV 262144/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel7.tier.08.name=UV 1048576/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel1.tier.09.name=UHV 256/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel2.tier.09.name=UHV 1024/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel3.tier.09.name=UHV 4096/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel4.tier.09.name=UHV 16384/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel5.tier.09.name=UHV 65536/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel6.tier.09.name=UHV 262144/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel7.tier.09.name=UHV 1048576/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel1.tier.10.name=UEV 256/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel2.tier.10.name=UEV 1024/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel3.tier.10.name=UEV 4096/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel4.tier.10.name=UEV 16384/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel5.tier.10.name=UEV 65536/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel6.tier.10.name=UEV 262144/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel7.tier.10.name=UEV 1048576/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel1.tier.11.name=UIV 256/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel2.tier.11.name=UIV 1024/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel3.tier.11.name=UIV 4096/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel4.tier.11.name=UIV 16384/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel5.tier.11.name=UIV 65536/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel6.tier.11.name=UIV 262144/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel7.tier.11.name=UIV 1048576/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel1.tier.12.name=UMV 256/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel2.tier.12.name=UMV 1024/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel3.tier.12.name=UMV 4096/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel4.tier.12.name=UMV 16384/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel5.tier.12.name=UMV 65536/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel6.tier.12.name=UMV 262144/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel7.tier.12.name=UMV 1048576/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel1.tier.13.name=UXV 256/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel2.tier.13.name=UXV 1024/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel3.tier.13.name=UXV 4096/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel4.tier.13.name=UXV 16384/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel5.tier.13.name=UXV 65536/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel6.tier.13.name=UXV 262144/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel7.tier.13.name=UXV 1048576/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel.tier.14.name=Legendary Laser Target Hatch +gt.blockmachines.hatch.energytunnel.desc.0=Energy injecting terminal for Multiblocks +gt.blockmachines.hatch.energytunnel.desc.1=Throughput + +gt.blockmachines.hatch.dynamomulti04.tier.05.name=IV 4A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti16.tier.05.name=IV 16A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti64.tier.05.name=IV 64A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti04.tier.06.name=LuV 4A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti16.tier.06.name=LuV 16A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti64.tier.06.name=LuV 64A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti04.tier.07.name=ZPM 4A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti16.tier.07.name=ZPM 16A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti64.tier.07.name=ZPM 64A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti04.tier.08.name=UV 4A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti16.tier.08.name=UV 16A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti64.tier.08.name=UV 64A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti04.tier.09.name=UHV 4A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti16.tier.09.name=UHV 16A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti64.tier.09.name=UHV 64A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti04.tier.10.name=UEV 4A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti16.tier.10.name=UEV 16A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti64.tier.10.name=UEV 64A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti04.tier.11.name=UIV 4A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti16.tier.11.name=UIV 16A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti64.tier.11.name=UIV 64A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti04.tier.12.name=UMV 4A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti16.tier.12.name=UMV 16A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti64.tier.12.name=UMV 64A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti04.tier.13.name=IV 4A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti16.tier.13.name=IV 16A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti64.tier.13.name=IV 64A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti.desc.0=Multiple Ampere Energy Extractor for Multiblocks +gt.blockmachines.hatch.dynamomulti.desc.1=Amperes Out + +gt.blockmachines.hatch.dynamotunnel1.tier.05=IV 256/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel2.tier.05=IV 1024/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel3.tier.05=IV 4096/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel4.tier.05=IV 16384/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel5.tier.05=IV 65536/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel6.tier.05=IV 262144/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel7.tier.05=IV 1048576/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel1.tier.06=LuV 256/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel2.tier.06=LuV 1024/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel3.tier.06=LuV 4096/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel4.tier.06=LuV 16384/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel5.tier.06=LuV 65536/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel6.tier.06=LuV 262144/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel7.tier.06=LuV 1048576/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel1.tier.07=ZPM 256/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel2.tier.07=ZPM 1024/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel3.tier.07=ZPM 4096/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel4.tier.07=ZPM 16384/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel5.tier.07=ZPM 65536/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel6.tier.07=ZPM 262144/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel7.tier.07=ZPM 1048576/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel1.tier.08=UV 256/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel2.tier.08=UV 1024/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel3.tier.08=UV 4096/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel4.tier.08=UV 16384/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel5.tier.08=UV 65536/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel6.tier.08=UV 262144/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel7.tier.08=UV 1048576/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel1.tier.09=UHV 256/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel2.tier.09=UHV 1024/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel3.tier.09=UHV 4096/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel4.tier.09=UHV 16384/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel5.tier.09=UHV 65536/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel6.tier.09=UHV 262144/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel7.tier.09=UHV 1048576/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel1.tier.10=UEV 256/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel2.tier.10=UEV 1024/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel3.tier.10=UEV 4096/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel4.tier.10=UEV 16384/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel5.tier.10=UEV 65536/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel6.tier.10=UEV 262144/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel7.tier.10=UEV 1048576/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel1.tier.11=UIV 256/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel2.tier.11=UIV 1024/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel3.tier.11=UIV 4096/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel4.tier.11=UIV 16384/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel5.tier.11=UIV 65536/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel6.tier.11=UIV 262144/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel7.tier.11=UIV 1048576/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel1.tier.12=UMV 256/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel2.tier.12=UMV 1024/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel3.tier.12=UMV 4096/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel4.tier.12=UMV 16384/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel5.tier.12=UMV 65536/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel6.tier.12=UMV 262144/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel7.tier.12=UMV 1048576/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel1.tier.13=UXV 256/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel2.tier.13=UXV 1024/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel3.tier.13=UXV 4096/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel4.tier.13=UXV 16384/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel5.tier.13=UXV 65536/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel6.tier.13=UXV 262144/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel7.tier.13=UXV 1048576/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel.tier.14=Legendary Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel.desc.0=Energy extracting terminal for Multiblocks +gt.blockmachines.hatch.dynamotunnel.desc.1=Throughput + gt.blockmachines.emin.tier.08.name=UV Elemental Input Hatch gt.blockmachines.emin.tier.09.name=UHV Elemental Input Hatch gt.blockmachines.emin.tier.10.name=UEV Elemental Input Hatch @@ -123,6 +315,7 @@ gt.blockmachines.emin.tier.11.name=UIV Elemental Input Hatch gt.blockmachines.emin.tier.12.name=UMV Elemental Input Hatch gt.blockmachines.emin.tier.13.name=UXV Elemental Input Hatch gt.blockmachines.emin.desc=Elemental Input for Multiblocks + gt.blockmachines.emout.tier.08.name=UV Elemental Output Hatch gt.blockmachines.emout.tier.09.name=UHV Elemental Output Hatch gt.blockmachines.emout.tier.10.name=UEV Elemental Output Hatch @@ -138,6 +331,7 @@ gt.blockmachines.multimachine.em.emtoessentia.hint.2=3 - Elemental Overflow Hatc gt.blockmachines.multimachine.em.emtoessentia.hint.3=General - Some sort of Essentia Storage gt.blockmachines.multimachine.em.emtoessentia.desc.0=Transform quantum form back to... gt.blockmachines.multimachine.em.emtoessentia.desc.1=regular one, but why? + gt.blockmachines.multimachine.em.essentiatoem.name=Essentia Quantizer gt.blockmachines.multimachine.em.essentiatoem.hint.0=1 - Classic Hatches or High Power Casing gt.blockmachines.multimachine.em.essentiatoem.hint.1=2 - Elemental Output Hatch @@ -145,7 +339,7 @@ gt.blockmachines.multimachine.em.essentiatoem.hint.2=3 - Elemental Overflow Hatc gt.blockmachines.multimachine.em.essentiatoem.hint.3=General - Some sort of Essentia Storage gt.blockmachines.multimachine.em.essentiatoem.desc.0=Conveniently convert regular stuff into quantum form. gt.blockmachines.multimachine.em.essentiatoem.desc.1=To make it more inconvenient. -#Thaumcraft compatibility +#Keywords and phrases tt.keyword.Hint_Details=Hint Details tt.keyword.Air=Air tt.keyword.Earth=Earth @@ -162,7 +356,14 @@ tt.keyword.COLORLESS=COLORLESS tt.keyword.CARRIES_COLOR=CARRIES COLOR tt.keyword.MASS=MASS tt.keyword.LIFE_TIME=LIFE TIME +tt.keyword.BOOM=BOOM! +tt.keyword.ID=ID tt.keyphrase.At_current_energy_level=At current energy level +tt.keyphrase.No_Stacks=No Stacks +tt.keyphrase.Contains_EM=Contains EM +tt.keyphrase.Contained_mass=Contained mass +tt.keyphrase.Mass_Disposal_speed=Mass Disposal speed +tt.keyphrase.Muffler_BOOM=Muffler BOOM! #OpenTurrets compatibility tile.turretHeadEM.name=Elemental Matter Turret tile.turretBaseEM.name=Elemental Turret Base \ No newline at end of file -- cgit From 6e1c2fb0bd2b3062cfa35e8c14d678549ee9c1a6 Mon Sep 17 00:00:00 2001 From: Bass Date: Sun, 25 Aug 2019 20:03:07 +0100 Subject: Tesla Network Code Streamline --- .../technus/tectech/loader/NetworkDispatcher.java | 1 - .../tectech/loader/thing/MachineLoader.java | 4 +- .../technus/tectech/loader/thing/ThingsLoader.java | 1 + .../tectech/mechanics/data/RendererMessage.java | 18 -------- .../technus/tectech/thing/CustomItemList.java | 2 +- .../technus/tectech/thing/item/EuMeterGT.java | 30 ++++++------- .../technus/tectech/thing/item/TeslaStaff.java | 50 +++++++++++++++++++++ .../multi/GT_MetaTileEntity_EM_transformer.java | 11 ++--- .../multi/GT_MetaTileEntity_TM_microwave.java | 3 +- src/main/resources/assets/tectech/lang/en_US.lang | 30 +++++++++++++ .../tectech/textures/items/itemTeslaStaff.png | Bin 0 -> 433 bytes 11 files changed, 107 insertions(+), 43 deletions(-) create mode 100644 src/main/java/com/github/technus/tectech/thing/item/TeslaStaff.java create mode 100644 src/main/resources/assets/tectech/textures/items/itemTeslaStaff.png (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/loader/NetworkDispatcher.java b/src/main/java/com/github/technus/tectech/loader/NetworkDispatcher.java index 72d1a23b05..7c8b7d66b7 100644 --- a/src/main/java/com/github/technus/tectech/loader/NetworkDispatcher.java +++ b/src/main/java/com/github/technus/tectech/loader/NetworkDispatcher.java @@ -27,7 +27,6 @@ public class NetworkDispatcher extends eu.usrv.yamcore.network.PacketDispatcher registerMessage(ChunkDataMessage.ClientHandler.class, ChunkDataMessage.ChunkDataData.class); registerMessage(PlayerDataMessage.ServerHandler.class, PlayerDataMessage.PlayerDataQuery.class); registerMessage(PlayerDataMessage.ClientHandler.class, PlayerDataMessage.PlayerDataData.class); - registerMessage(RendererMessage.ServerHandler.class, RendererMessage.RendererQuery.class); registerMessage(RendererMessage.ClientHandler.class, RendererMessage.RendererData.class); } } 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 ececaa70dc..59e9f99a14 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 @@ -511,12 +511,12 @@ public class MachineLoader implements Runnable { // =================================================================================================== Machine_Multi_Transformer.set(new GT_MetaTileEntity_EM_transformer(15300, "multimachine.em.transformer", "Active Transformer").getStackForm(1L)); + Machine_Multi_Microwave.set(new GT_MetaTileEntity_TM_microwave(15312, "multimachine.tm.microwave", "Microwave Grinder").getStackForm(1L)); + Machine_Multi_TeslaCoil.set(new GT_MetaTileEntity_TM_teslaCoil(15314, "multimachine.tm.teslaCoil", "Tesla Tower").getStackForm(1L)); Machine_Multi_Switch.set(new GT_MetaTileEntity_EM_switch(15310, "multimachine.em.switch", "Network Switch With QoS").getStackForm(1L)); Machine_Multi_Computer.set(new GT_MetaTileEntity_EM_computer(15311, "multimachine.em.computer", "Quantum Computer").getStackForm(1L)); - Machine_Multi_Microwave.set(new GT_MetaTileEntity_TM_microwave(15312, "multimachine.tm.microwave", "Microwave Grinder").getStackForm(1L)); Machine_Multi_DataBank.set(new GT_MetaTileEntity_EM_dataBank(15313, "multimachine.em.databank", "Data Bank").getStackForm(1L)); - Machine_Multi_TeslaCoil.set(new GT_MetaTileEntity_TM_teslaCoil(15314, "multimachine.tm.teslaCoil", "Tesla Tower").getStackForm(1L)); Machine_Multi_EMjunction.set(new GT_MetaTileEntity_EM_junction(15320, "multimachine.em.junction", "Matter Junction").getStackForm(1L)); Machine_Multi_MatterToEM.set(new GT_MetaTileEntity_EM_quantizer(15321, "multimachine.em.mattertoem", "Matter Quantizer").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 6aa238df49..4596e8a2c8 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 @@ -57,6 +57,7 @@ public class ThingsLoader implements Runnable { ParametrizerMemoryCard.run(); ElementalDefinitionScanStorage_EM.run(); EuMeterGT.run(); + TeslaStaff.run(); TeslaCoilCover.run(); TeslaCoilCapacitor.run(); TecTech.LOGGER.info("Useful Items registered"); diff --git a/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java b/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java index 796e6ec40a..a4e5bb318e 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java +++ b/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java @@ -5,7 +5,6 @@ import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.network.simpleimpl.IMessage; import cpw.mods.fml.common.network.simpleimpl.MessageContext; import eu.usrv.yamcore.network.client.AbstractClientMessageHandler; -import eu.usrv.yamcore.network.server.AbstractServerMessageHandler; import io.netty.buffer.ByteBuf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; @@ -49,20 +48,10 @@ public class RendererMessage implements IMessage { } } - - public static class RendererQuery extends RendererMessage { - public RendererQuery() { - } - } - public static class RendererData extends RendererMessage { public RendererData() { } - public RendererData(RendererQuery query) { - sparkList = query.sparkList; - } - public RendererData(HashSet eSparkList) { sparkList = eSparkList; } @@ -80,13 +69,6 @@ public class RendererMessage implements IMessage { } } - public static class ServerHandler extends AbstractServerMessageHandler { - @Override - public IMessage handleServerMessage(EntityPlayer pPlayer, RendererQuery pMessage, MessageContext pCtx) { - return new RendererData(pMessage); - } - } - private static void thaumLightning(int tX, int tY, int tZ, int tXN, int tYN, int tZN, int wID) { if (Loader.isModLoaded("Thaumcraft")) { World world = DimensionManager.getWorld(wID); 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 1f83706aad..ba3f98fe6a 100644 --- a/src/main/java/com/github/technus/tectech/thing/CustomItemList.java +++ b/src/main/java/com/github/technus/tectech/thing/CustomItemList.java @@ -92,7 +92,7 @@ public enum CustomItemList implements IItemContainer { Machine_Multi_BHG, hint_0,hint_1,hint_2,hint_3,hint_4,hint_5,hint_6,hint_7,hint_8,hint_9,hint_10,hint_11, hint_general,hint_air,hint_noAir,hint_error, - scanContainer,parametrizerMemory,teslaCapacitor,teslaCover,teslaComponent, + scanContainer,parametrizerMemory,teslaCapacitor,teslaCover,teslaComponent,teslaStaff, Machine_TeslaCoil_1by1_LV, Machine_TeslaCoil_1by1_MV, Machine_TeslaCoil_1by1_HV, Machine_TeslaCoil_1by1_EV, Machine_TeslaCoil_1by1_IV, Machine_TeslaCoil_2by2_LV, Machine_TeslaCoil_2by2_MV, Machine_TeslaCoil_2by2_HV, Machine_TeslaCoil_2by2_EV, Machine_TeslaCoil_2by2_IV, diff --git a/src/main/java/com/github/technus/tectech/thing/item/EuMeterGT.java b/src/main/java/com/github/technus/tectech/thing/item/EuMeterGT.java index 8edcd32bdb..3f9562f23a 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/EuMeterGT.java +++ b/src/main/java/com/github/technus/tectech/thing/item/EuMeterGT.java @@ -34,33 +34,33 @@ public class EuMeterGT extends Item { @Override public boolean onItemUseFirst(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if(tTileEntity==null || aPlayer instanceof FakePlayer) { + if (tTileEntity == null || aPlayer instanceof FakePlayer) { return aPlayer instanceof EntityPlayerMP; } if (aPlayer instanceof EntityPlayerMP && !aPlayer.isSneaking() && tTileEntity instanceof IGregTechTileEntity) { if (tTileEntity instanceof BaseMetaTileEntity) { - GT_Utility.sendChatToPlayer(aPlayer, EnumChatFormatting.AQUA+"----- X:"+aX+" Y:"+aY+" Z:"+aZ+" D:"+aWorld.provider.dimensionId+" S:"+aSide + " -----"); - GT_Utility.sendChatToPlayer(aPlayer, "Stored energy: "+EnumChatFormatting.YELLOW+(((BaseMetaTileEntity) tTileEntity).getUniversalEnergyStored())+EnumChatFormatting.RESET+'/'+EnumChatFormatting.GREEN+(((BaseMetaTileEntity) tTileEntity).getUniversalEnergyCapacity())); - GT_Utility.sendChatToPlayer(aPlayer, "Stored EU: "+EnumChatFormatting.YELLOW+(((BaseMetaTileEntity) tTileEntity).getStoredEU())+EnumChatFormatting.RESET+'/'+EnumChatFormatting.GREEN+(((BaseMetaTileEntity) tTileEntity).getEUCapacity())); - GT_Utility.sendChatToPlayer(aPlayer, "Average I/O: "+EnumChatFormatting.YELLOW+(((BaseMetaTileEntity) tTileEntity).getAverageElectricInput())+EnumChatFormatting.RESET+'/'+EnumChatFormatting.YELLOW+(((BaseMetaTileEntity) tTileEntity).getAverageElectricOutput())); - GT_Utility.sendChatToPlayer(aPlayer, "Voltage I/O (max): "+EnumChatFormatting.GOLD+(((BaseMetaTileEntity) tTileEntity).getInputVoltage())+EnumChatFormatting.RESET+'/'+EnumChatFormatting.GOLD+(((BaseMetaTileEntity) tTileEntity).getOutputVoltage())); - GT_Utility.sendChatToPlayer(aPlayer, "Voltage I/O max: "+EnumChatFormatting.RED+(((BaseMetaTileEntity) tTileEntity).getMaxSafeInput())+EnumChatFormatting.RESET+'/'+EnumChatFormatting.RED+(((BaseMetaTileEntity) tTileEntity).getMaxEnergyOutput())); - GT_Utility.sendChatToPlayer(aPlayer, "Amperage I/O (max): "+EnumChatFormatting.GOLD+(((BaseMetaTileEntity) tTileEntity).getInputAmperage())+EnumChatFormatting.RESET+'/'+EnumChatFormatting.GOLD+(((BaseMetaTileEntity) tTileEntity).getOutputAmperage())); - GT_Utility.sendChatToPlayer(aPlayer, "Side capabilities: "+(((BaseMetaTileEntity) tTileEntity).inputEnergyFrom((byte) aSide)?"input ":"")+(((BaseMetaTileEntity) tTileEntity).outputsEnergyTo((byte) aSide)?"output ":"")); + GT_Utility.sendChatToPlayer(aPlayer, EnumChatFormatting.AQUA + "----- X:" + aX + " Y:" + aY + " Z:" + aZ + " D:" + aWorld.provider.dimensionId + " S:" + aSide + " -----"); + GT_Utility.sendChatToPlayer(aPlayer, "Stored energy: " + EnumChatFormatting.YELLOW + (((BaseMetaTileEntity) tTileEntity).getUniversalEnergyStored()) + EnumChatFormatting.RESET + '/' + EnumChatFormatting.GREEN + (((BaseMetaTileEntity) tTileEntity).getUniversalEnergyCapacity())); + GT_Utility.sendChatToPlayer(aPlayer, "Stored EU: " + EnumChatFormatting.YELLOW + (((BaseMetaTileEntity) tTileEntity).getStoredEU()) + EnumChatFormatting.RESET + '/' + EnumChatFormatting.GREEN + (((BaseMetaTileEntity) tTileEntity).getEUCapacity())); + GT_Utility.sendChatToPlayer(aPlayer, "Average I/O: " + EnumChatFormatting.YELLOW + (((BaseMetaTileEntity) tTileEntity).getAverageElectricInput()) + EnumChatFormatting.RESET + '/' + EnumChatFormatting.YELLOW + (((BaseMetaTileEntity) tTileEntity).getAverageElectricOutput())); + GT_Utility.sendChatToPlayer(aPlayer, "Voltage I/O (max): " + EnumChatFormatting.GOLD + (((BaseMetaTileEntity) tTileEntity).getInputVoltage()) + EnumChatFormatting.RESET + '/' + EnumChatFormatting.GOLD + (((BaseMetaTileEntity) tTileEntity).getOutputVoltage())); + GT_Utility.sendChatToPlayer(aPlayer, "Voltage I/O max: " + EnumChatFormatting.RED + (((BaseMetaTileEntity) tTileEntity).getMaxSafeInput()) + EnumChatFormatting.RESET + '/' + EnumChatFormatting.RED + (((BaseMetaTileEntity) tTileEntity).getMaxEnergyOutput())); + GT_Utility.sendChatToPlayer(aPlayer, "Amperage I/O (max): " + EnumChatFormatting.GOLD + (((BaseMetaTileEntity) tTileEntity).getInputAmperage()) + EnumChatFormatting.RESET + '/' + EnumChatFormatting.GOLD + (((BaseMetaTileEntity) tTileEntity).getOutputAmperage())); + GT_Utility.sendChatToPlayer(aPlayer, "Side capabilities: " + (((BaseMetaTileEntity) tTileEntity).inputEnergyFrom((byte) aSide) ? "input " : "") + (((BaseMetaTileEntity) tTileEntity).outputsEnergyTo((byte) aSide) ? "output " : "")); return true; } else if (tTileEntity instanceof BaseMetaPipeEntity) { - if(((BaseMetaPipeEntity) tTileEntity).getMetaTileEntity() instanceof GT_MetaPipeEntity_Cable){ + if (((BaseMetaPipeEntity) tTileEntity).getMetaTileEntity() instanceof GT_MetaPipeEntity_Cable) { ArrayList tList = new ArrayList<>(); GT_Utility.getCoordinateScan(tList, aPlayer, aWorld, 1, aX, aY, aZ, aSide, hitX, hitY, hitZ); - for(String str:tList){ - GT_Utility.sendChatToPlayer(aPlayer,str); + for (String str : tList) { + GT_Utility.sendChatToPlayer(aPlayer, str); } } return true; } } - if(!(aPlayer instanceof EntityPlayerMP)){ - GT_Utility.doSoundAtClient(Reference.MODID+":fx_scan", 1, 1.0F, (double)aX, (double)aY, (double)aZ); + if (!(aPlayer instanceof EntityPlayerMP)) { + GT_Utility.doSoundAtClient(Reference.MODID + ":fx_scan", 1, 1.0F, (double) aX, (double) aY, (double) aZ); } return false; } @@ -76,4 +76,4 @@ public class EuMeterGT extends Item { INSTANCE = new EuMeterGT(); GameRegistry.registerItem(INSTANCE, INSTANCE.getUnlocalizedName()); } -} +} \ No newline at end of file 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 new file mode 100644 index 0000000000..0102d367c3 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/item/TeslaStaff.java @@ -0,0 +1,50 @@ +package com.github.technus.tectech.thing.item; + +import com.github.technus.tectech.CommonValues; +import com.github.technus.tectech.Reference; +import cpw.mods.fml.common.registry.GameRegistry; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +import java.util.List; + +import static com.github.technus.tectech.Reference.MODID; +import static com.github.technus.tectech.thing.CustomItemList.teslaStaff; + + +public final class TeslaStaff extends Item { + public static TeslaStaff INSTANCE; + + private TeslaStaff() { + setUnlocalizedName("tm.teslaStaff"); + setTextureName(MODID + ":itemTeslaStaff"); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) { + aList.add(CommonValues.BASS_MARK); + aList.add("Power of the gods, at the whim of a mortal!"); + } + + @Override + public boolean onLeftClickEntity(ItemStack stack, EntityPlayer aPlayer, Entity entity) { + GT_Utility.sendChatToPlayer(aPlayer, "Zapperoni!"); + if (!(aPlayer instanceof EntityPlayerMP)) { + double aX = aPlayer.posX; + double aY = aPlayer.posY; + double aZ = aPlayer.posZ; + GT_Utility.doSoundAtClient(Reference.MODID + ":fx_scan", 1, 1.0F, aX, aY, aZ); + } + return false; + } + + public static void run() { + INSTANCE = new TeslaStaff(); + GameRegistry.registerItem(INSTANCE, INSTANCE.getUnlocalizedName()); + teslaStaff.set(INSTANCE); + } +} \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java index 245aa53288..26d447cf69 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java @@ -19,6 +19,7 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; import static com.github.technus.tectech.Util.StructureBuilderExtreme; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; @@ -43,8 +44,8 @@ public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_Multiblo private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA + "Hint Details:", - "1 - Energy IO Hatches or High Power Casing", + EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyword.Hint_Details") + ":", + StatCollector.translateToLocal("gt.blockmachines.multimachine.em.transformer.hint"),//1 - Energy IO Hatches or High Power Casing }; //endregion @@ -120,9 +121,9 @@ public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_Multiblo public String[] getDescription() { return new String[]{ CommonValues.TEC_MARK_GENERAL, - "Power substation", - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "All the transformation!", - EnumChatFormatting.BLUE + "Only 0.78125% power loss, HAYO!", + StatCollector.translateToLocal("gt.blockmachines.multimachine.em.transformer.desc.0"),//Power substation + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + StatCollector.translateToLocal("gt.blockmachines.multimachine.em.transformer.desc.1"),//All the transformation! + EnumChatFormatting.BLUE + StatCollector.translateToLocal("gt.blockmachines.multimachine.em.transformer.desc.2"),//Only 0.78125% power loss, HAYO! }; } 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 228d549258..cae6cb1628 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 @@ -19,6 +19,7 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; import java.util.ArrayList; import java.util.HashSet; @@ -52,7 +53,7 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock private static final Block[] blockTypeFallback = new Block[]{sBlockCasings4}; private static final byte[] blockMetaFallback = new byte[]{1}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA+"Hint Details:", + EnumChatFormatting.AQUA+ StatCollector.translateToLocal("tt.keyword.Hint_Details") + ":", "1 - Classic Hatches or Clean Stainless Steel Casing", "Also acts like a hopper so give it an Output Bus", }; diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index da8c6c609c..ad7426f44c 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -324,6 +324,22 @@ gt.blockmachines.emout.tier.12.name=UMV Elemental Output Hatch gt.blockmachines.emout.tier.13.name=UXV Elemental Output Hatch gt.blockmachines.emout.desc=Elemental Output for Multiblocks #Multiblocks +gt.blockmachines.multimachine.em.transformer.name=Active Transformer +gt.blockmachines.multimachine.em.transformer.hint=1 - Energy IO Hatches or High Power Casing +gt.blockmachines.multimachine.em.transformer.desc.0=Power substation +gt.blockmachines.multimachine.em.transformer.desc.1=All the transformation! +gt.blockmachines.multimachine.em.transformer.desc.2=Only 0.78125% power loss, HAYO! + +gt.blockmachines.multimachine.tm.microwave.name=Microwave Grinder + +gt.blockmachines.multimachine.tm.teslaCoil.name=Tesla Tower +gt.blockmachines.multimachine.em.switch.name=Network Switch With QoS +gt.blockmachines.multimachine.em.computer.name=Quantum Computer +gt.blockmachines.multimachine.em.databank.name=Data Bank +gt.blockmachines.multimachine.em.junction.name=Matter Junction +gt.blockmachines.multimachine.em.mattertoem.name=Matter Quantizer +gt.blockmachines.multimachine.em.emtomatter.name=Matter Dequantizer + gt.blockmachines.multimachine.em.emtoessentia.name=Essentia Dequantizer gt.blockmachines.multimachine.em.emtoessentia.hint.0=1 - Classic Hatches or High Power Casing gt.blockmachines.multimachine.em.emtoessentia.hint.1=2 - Elemental Input Hatch @@ -339,6 +355,19 @@ gt.blockmachines.multimachine.em.essentiatoem.hint.2=3 - Elemental Overflow Hatc gt.blockmachines.multimachine.em.essentiatoem.hint.3=General - Some sort of Essentia Storage gt.blockmachines.multimachine.em.essentiatoem.desc.0=Conveniently convert regular stuff into quantum form. gt.blockmachines.multimachine.em.essentiatoem.desc.1=To make it more inconvenient. + +gt.blockmachines.multimachine.em.scanner.name=Elemental Scanner +gt.blockmachines.multimachine.em.research.name=Research station +gt.blockmachines.multimachine.em.collider.name=Matter Collider +gt.blockmachines.multimachine.em.infuser.name=Energy Infuser +gt.blockmachines.multimachine.em.processing.name=Quantum Processing Machine +gt.blockmachines.multimachine.em.crafter.name=Matter Assembler +gt.blockmachines.multimachine.em.stabilizer.name=Elemental Stabilizer +gt.blockmachines.multimachine.em.wormhole.name=Wormhole +gt.blockmachines.multimachine.em.decay.name=Decay Generator +gt.blockmachines.multimachine.em.annihilation.name=Annihilation Generator +gt.blockmachines.multimachine.em.blackholegenerator.name=Black Hole Generator + #Keywords and phrases tt.keyword.Hint_Details=Hint Details tt.keyword.Air=Air @@ -358,6 +387,7 @@ tt.keyword.MASS=MASS tt.keyword.LIFE_TIME=LIFE TIME tt.keyword.BOOM=BOOM! tt.keyword.ID=ID + tt.keyphrase.At_current_energy_level=At current energy level tt.keyphrase.No_Stacks=No Stacks tt.keyphrase.Contains_EM=Contains EM diff --git a/src/main/resources/assets/tectech/textures/items/itemTeslaStaff.png b/src/main/resources/assets/tectech/textures/items/itemTeslaStaff.png new file mode 100644 index 0000000000..db124817cc Binary files /dev/null and b/src/main/resources/assets/tectech/textures/items/itemTeslaStaff.png differ -- cgit From 524a875bffa79e1d749379953cfd54e11e6ed61f Mon Sep 17 00:00:00 2001 From: Bass Date: Mon, 26 Aug 2019 21:24:07 +0100 Subject: Lang continued! --- .../multi/GT_MetaTileEntity_TM_microwave.java | 130 +++++++++++---------- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 53 ++++----- src/main/resources/assets/tectech/lang/en_US.lang | 35 ++++++ 3 files changed, 128 insertions(+), 90 deletions(-) (limited to 'src/main/java') 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 cae6cb1628..25a74a8a9b 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 @@ -34,7 +34,7 @@ import static gregtech.api.GregTech_API.sBlockCasings4; * Created by danie_000 on 17.12.2016. */ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { - private boolean hasBeenPausedThisCycle=false; + private boolean hasBeenPausedThisCycle = false; //region Structure //use multi A energy inputs, use less power the longer it runs @@ -53,27 +53,28 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock private static final Block[] blockTypeFallback = new Block[]{sBlockCasings4}; private static final byte[] blockMetaFallback = new byte[]{1}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA+ StatCollector.translateToLocal("tt.keyword.Hint_Details") + ":", - "1 - Classic Hatches or Clean Stainless Steel Casing", - "Also acts like a hopper so give it an Output Bus", + EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyword.Hint_Details") + ":", + StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.microwave.hint.0"),//1 - Classic Hatches or Clean Stainless Steel Casing + StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.microwave.hint.1"),//Also acts like a hopper so give it an Output Bus }; //endregion //region parameters - protected Parameters.Group.ParameterIn powerSetting,timerSetting; - protected Parameters.Group.ParameterOut timerValue,remainingTime; - private static final INameFunction POWER_SETTING_NAME = (base, p)-> "Power setting"; - private static final INameFunction TIMER_SETTING_NAME = (base, p)-> "Timer setting"; - private static final INameFunction TIMER_REMAINING_NAME = (base, p)-> "Timer remaining"; - private static final INameFunction TIMER_VALUE_NAME = (base, p)-> "Timer value"; - private static final IStatusFunction POWER_STATUS= - (base,p)-> LedStatus.fromLimitsInclusiveOuterBoundary(p.get(),300,1000,1000,Double.POSITIVE_INFINITY); - private static final IStatusFunction TIMER_STATUS=(base, p)->{ - double value=p.get(); - if(Double.isNaN(value)) return STATUS_WRONG; - value=(int)value; - if(value<=0) return STATUS_TOO_LOW; - if(value>3000) return STATUS_TOO_HIGH; + protected Parameters.Group.ParameterIn powerSetting, timerSetting; + protected Parameters.Group.ParameterOut timerValue, remainingTime; + private static final INameFunction POWER_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.microwave.cfgi.0");//Power setting + private static final INameFunction TIMER_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.microwave.cfgi.1");//Timer setting + + private static final INameFunction TIMER_VALUE_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.microwave.cfgo.0");//Timer value + private static final INameFunction TIMER_REMAINING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.microwave.cfgo.1");//Timer remaining + private static final IStatusFunction POWER_STATUS = + (base, p) -> LedStatus.fromLimitsInclusiveOuterBoundary(p.get(), 300, 1000, 1000, Double.POSITIVE_INFINITY); + private static final IStatusFunction TIMER_STATUS = (base, p) -> { + double value = p.get(); + if (Double.isNaN(value)) return STATUS_WRONG; + value = (int) value; + if (value <= 0) return STATUS_TOO_LOW; + if (value > 3000) return STATUS_TOO_HIGH; return STATUS_OK; }; //endregion @@ -88,11 +89,12 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock @Override protected void parametersInstantiation_EM() { - Parameters.Group hatch_0=parametrization.getGroup(0, true); - powerSetting=hatch_0.makeInParameter(0,1000, POWER_SETTING_NAME,POWER_STATUS); - timerSetting=hatch_0.makeInParameter(1,360, TIMER_SETTING_NAME,TIMER_STATUS); - timerValue=hatch_0.makeOutParameter(0,0,TIMER_VALUE_NAME,TIMER_STATUS); - remainingTime=hatch_0.makeOutParameter(1,360,TIMER_REMAINING_NAME,TIMER_STATUS); + Parameters.Group hatch_0 = parametrization.getGroup(0, true); + powerSetting = hatch_0.makeInParameter(0, 1000, POWER_SETTING_NAME, POWER_STATUS); + timerSetting = hatch_0.makeInParameter(1, 360, TIMER_SETTING_NAME, TIMER_STATUS); + + timerValue = hatch_0.makeOutParameter(0, 0, TIMER_VALUE_NAME, TIMER_STATUS); + remainingTime = hatch_0.makeOutParameter(1, 360, TIMER_REMAINING_NAME, TIMER_STATUS); } @Override @@ -104,7 +106,7 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { if (aSide == aFacing) { return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[49], new TT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE)}; - }else if(aSide == GT_Utility.getOppositeSide(aFacing)) { + } else if (aSide == GT_Utility.getOppositeSide(aFacing)) { return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[49], aActive ? Textures.BlockIcons.CASING_BLOCKS[52] : Textures.BlockIcons.CASING_BLOCKS[53]}; } return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[49]}; @@ -127,7 +129,7 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock @Override public void construct(int stackSize, boolean hintsOnly) { - StructureBuilderExtreme(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(),this, hintsOnly); + StructureBuilderExtreme(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), this, hintsOnly); } @Override @@ -139,23 +141,23 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock public String[] getDescription() { return new String[]{ CommonValues.BASS_MARK, - "High Frequency Oven", - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "From live to done in seconds!", - EnumChatFormatting.BLUE + "I said nuke the... I meant microwave supper!", + StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.microwave.desc.0"),//High Frequency Oven + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.microwave.desc.1"),//From live to done in seconds! + EnumChatFormatting.BLUE + StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.microwave.desc.2"),//I said nuke the... I meant microwave supper! }; } @Override public boolean checkRecipe_EM(ItemStack itemStack) { - hasBeenPausedThisCycle =false; - if((int)powerSetting.get()<300 || timerSetting.get()<=0 || timerSetting.get()>3000) { + hasBeenPausedThisCycle = false; + if ((int) powerSetting.get() < 300 || timerSetting.get() <= 0 || timerSetting.get() > 3000) { return false; } if (remainingTime.get() <= 0) { remainingTime.set(timerSetting.get()); timerValue.set(0); } - mEUt = -((int)powerSetting.get() >> 1); + mEUt = -((int) powerSetting.get() >> 1); eAmpereFlow = 1; mMaxProgresstime = 20; mEfficiencyIncrease = 10000; @@ -164,37 +166,37 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock @Override public void outputAfterRecipe_EM() { - if(hasBeenPausedThisCycle) { + if (hasBeenPausedThisCycle) { return;//skip timer and actions if paused } - timerValue.set(timerValue.get()+1); - remainingTime.set(timerSetting.get()-timerValue.get()); - IGregTechTileEntity mte=getBaseMetaTileEntity(); - int[] xyzOffsets= getTranslatedOffsets(0,-1,2); - double xPos=mte.getXCoord()+0.5f+xyzOffsets[0]; - double yPos=mte.getYCoord()+0.5f+xyzOffsets[1]; - double zPos=mte.getZCoord()+0.5f+xyzOffsets[2]; - AxisAlignedBB aabb=getBoundingBox(-2,-2,-2,2,2,2).offset(xPos,yPos,zPos); - xyzOffsets= getTranslatedOffsets(0,-4,0); - double[] xyzExpansion= getTranslatedOffsets(1.5,0,1.5); - for(int i=0;i<3;i++){//gets ABS from translated to get expansion values - if(xyzExpansion[i]<0)xyzExpansion[i]=-xyzExpansion[i]; + timerValue.set(timerValue.get() + 1); + remainingTime.set(timerSetting.get() - timerValue.get()); + IGregTechTileEntity mte = getBaseMetaTileEntity(); + int[] xyzOffsets = getTranslatedOffsets(0, -1, 2); + double xPos = mte.getXCoord() + 0.5f + xyzOffsets[0]; + double yPos = mte.getYCoord() + 0.5f + xyzOffsets[1]; + double zPos = mte.getZCoord() + 0.5f + xyzOffsets[2]; + AxisAlignedBB aabb = getBoundingBox(-2, -2, -2, 2, 2, 2).offset(xPos, yPos, zPos); + xyzOffsets = getTranslatedOffsets(0, -4, 0); + double[] xyzExpansion = getTranslatedOffsets(1.5, 0, 1.5); + for (int i = 0; i < 3; i++) {//gets ABS from translated to get expansion values + if (xyzExpansion[i] < 0) xyzExpansion[i] = -xyzExpansion[i]; } - int power=(int)powerSetting.get(); + int power = (int) powerSetting.get(); int damagingFactor = - Math.min(power >> 6,8)+ - Math.min(power >> 8,24)+ - Math.min(power >> 12,48)+ + Math.min(power >> 6, 8) + + Math.min(power >> 8, 24) + + Math.min(power >> 12, 48) + (power >> 18); - ArrayList itemsToOutput=new ArrayList<>(); - HashSet tickedStuff=new HashSet<>(); + ArrayList itemsToOutput = new ArrayList<>(); + HashSet tickedStuff = new HashSet<>(); - boolean inside=true; + boolean inside = true; do { for (Object entity : mte.getWorld().getEntitiesWithinAABBExcludingEntity(null, aabb)) { if (entity instanceof Entity) { - if(tickedStuff.add((Entity)entity)) { + if (tickedStuff.add((Entity) entity)) { if (inside && entity instanceof EntityItem) { GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMicrowaveRecipes.findRecipe( mte, null, true, 128, null, null, new ItemStack[]{((EntityItem) entity).getEntityItem()}); @@ -205,33 +207,33 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock newStuff.stackSize = ((EntityItem) entity).getEntityItem().stackSize; itemsToOutput.add(newStuff); } - ((EntityItem) entity).delayBeforeCanPickup=2; + ((EntityItem) entity).delayBeforeCanPickup = 2; ((EntityItem) entity).setDead(); } else if (entity instanceof EntityLivingBase) { - if(!GT_Utility.isWearingFullElectroHazmat((EntityLivingBase) entity)) { + if (!GT_Utility.isWearingFullElectroHazmat((EntityLivingBase) entity)) { ((EntityLivingBase) entity).attackEntityFrom(microwaving, damagingFactor); } } } } } - aabb.offset(xyzOffsets[0],xyzOffsets[1],xyzOffsets[2]); - aabb=aabb.expand(xyzExpansion[0],xyzExpansion[1],xyzExpansion[2]); - inside=false; - damagingFactor>>=1; - } while(damagingFactor>0); + aabb.offset(xyzOffsets[0], xyzOffsets[1], xyzOffsets[2]); + aabb = aabb.expand(xyzExpansion[0], xyzExpansion[1], xyzExpansion[2]); + inside = false; + damagingFactor >>= 1; + } while (damagingFactor > 0); - mOutputItems= itemsToOutput.toArray(nullItem); + mOutputItems = itemsToOutput.toArray(nullItem); - if(remainingTime.get() <=0) { - mte.getWorld().playSoundEffect(xPos,yPos,zPos, Reference.MODID+":microwave_ding", 1, 1); + if (remainingTime.get() <= 0) { + mte.getWorld().playSoundEffect(xPos, yPos, zPos, Reference.MODID + ":microwave_ding", 1, 1); stopMachine(); } } @Override public boolean onRunningTick(ItemStack aStack) { - if(eSafeVoid) { + if (eSafeVoid) { hasBeenPausedThisCycle = true; } return hasBeenPausedThisCycle || super.onRunningTick(aStack);//consume eu and other resources if not paused @@ -248,4 +250,4 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock public byte getTileEntityBaseType() { return 1; } -} +} \ No newline at end of file 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 df8f44b133..880e3be483 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 @@ -27,6 +27,7 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; import java.util.ArrayList; import java.util.HashMap; @@ -97,9 +98,9 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsBA0, null}; private static final byte[] blockMetaFallback = new byte[]{6, 0}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA + "Hint Details:", - "1 - Classic Hatches, Capacitor Hatches or Tesla Base Casing", - "2 - Titanium Frames", + EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyword.Hint_Details") + ":", + StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.hint.0"),//1 - Classic Hatches, Capacitor Hatches or Tesla Base Casing + StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.hint.1"),//2 - Titanium Frames }; //endregion @@ -107,26 +108,26 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock protected Parameters.Group.ParameterIn popogaSetting, histLowSetting, histHighSetting, transferRadiusTowerSetting, transferRadiusTransceiverSetting, transferRadiusCoverUltimateSetting, outputVoltageSetting, outputCurrentSetting, scanTimeMinSetting, overDriveSetting; protected Parameters.Group.ParameterOut popogaDisplay, transferRadiusTowerDisplay, transferRadiusTransceiverDisplay, transferRadiusCoverUltimateDisplay, outputVoltageDisplay, outputCurrentDisplay, energyCapacityDisplay, energyStoredDisplay, energyFractionDisplay, scanTimeDisplay; - private static final INameFunction HYSTERESIS_LOW_SETTING_NAME = (base, p) -> "Hysteresis low setting"; - private static final INameFunction HYSTERESIS_HIGH_SETTING_NAME = (base, p) -> "Hysteresis high setting"; - private static final INameFunction TRANSFER_RADIUS_TOWER_SETTING_NAME = (base, p) -> "Tesla Towers transfer radius setting"; - private static final INameFunction TRANSFER_RADIUS_TRANSCEIVER_SETTING_NAME = (base, p) -> "Tesla Transceiver transfer radius setting"; - private static final INameFunction TRANSFER_RADIUS_COVER_ULTIMATE_SETTING_NAME = (base, p) -> "Tesla Ultimate Cover transfer radius setting"; - private static final INameFunction OUTPUT_VOLTAGE_SETTING_NAME = (base, p) -> "Output voltage setting"; - private static final INameFunction OUTPUT_CURRENT_SETTING_NAME = (base, p) -> "Output current setting"; - private static final INameFunction SCAN_TIME_MIN_SETTING_NAME = (base, p) -> "Scan time Min setting"; - private static final INameFunction OVERDRIVE_SETTING_NAME = (base, p) -> "Overdrive setting"; - private static final INameFunction POPOGA_NAME = (base, p) -> "Unused"; - - private static final INameFunction TRANSFER_RADIUS_TOWER_DISPLAY_NAME = (base, p) -> "Tesla Towers transfer radius display"; - private static final INameFunction TRANSFER_RADIUS_TRANSCEIVER_DISPLAY_NAME = (base, p) -> "Tesla Transceiver transfer radius display"; - private static final INameFunction TRANSFER_RADIUS_COVER_ULTIMATE_DISPLAY_NAME = (base, p) -> "Tesla Ultimate Cover transfer radius display"; - private static final INameFunction OUTPUT_VOLTAGE_DISPLAY_NAME = (base, p) -> "Output voltage display"; - private static final INameFunction OUTPUT_CURRENT_DISPLAY_NAME = (base, p) -> "Output current display"; - private static final INameFunction ENERGY_CAPACITY_DISPLAY_NAME = (base, p) -> "Energy Capacity display"; - private static final INameFunction ENERGY_STORED_DISPLAY_NAME = (base, p) -> "Energy Stored display"; - private static final INameFunction ENERGY_FRACTION_DISPLAY_NAME = (base, p) -> "Energy Fraction display"; - private static final INameFunction SCAN_TIME_DISPLAY_NAME = (base, p) -> "Scan time display"; + private static final INameFunction HYSTERESIS_LOW_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.0");//Hysteresis low setting + private static final INameFunction HYSTERESIS_HIGH_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.1");//Hysteresis high setting + private static final INameFunction TRANSFER_RADIUS_TOWER_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.2");//Tesla Towers transfer radius setting + private static final INameFunction TRANSFER_RADIUS_TRANSCEIVER_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.3)";//Tesla Transceiver transfer radius setting + private static final INameFunction TRANSFER_RADIUS_COVER_ULTIMATE_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.4)";//Tesla Ultimate Cover transfer radius setting + private static final INameFunction OUTPUT_VOLTAGE_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.5");//Output voltage setting + private static final INameFunction OUTPUT_CURRENT_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.6");//Output current setting + private static final INameFunction SCAN_TIME_MIN_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.7");//Scan time Min setting + private static final INameFunction OVERDRIVE_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.8");//Overdrive setting + private static final INameFunction POPOGA_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.9");//Unused + + private static final INameFunction TRANSFER_RADIUS_TOWER_DISPLAY_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgo.0");//Tesla Towers transfer radius display + private static final INameFunction TRANSFER_RADIUS_TRANSCEIVER_DISPLAY_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgo.1");//Tesla Transceiver transfer radius display + private static final INameFunction TRANSFER_RADIUS_COVER_ULTIMATE_DISPLAY_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgo.2");//Tesla Ultimate Cover transfer radius display + private static final INameFunction OUTPUT_VOLTAGE_DISPLAY_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgo.3");//Output voltage display + private static final INameFunction OUTPUT_CURRENT_DISPLAY_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgo.4");//Output current display + private static final INameFunction ENERGY_CAPACITY_DISPLAY_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgo.5");//Energy Capacity display + private static final INameFunction ENERGY_STORED_DISPLAY_NAME = (base, p) ->StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgo.6");//Energy Stored display + private static final INameFunction ENERGY_FRACTION_DISPLAY_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgo.7");//Energy Fraction display + private static final INameFunction SCAN_TIME_DISPLAY_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgo.8");//Scan time display private static final IStatusFunction HYSTERESIS_LOW_STATUS = (base, p) -> { double value = p.get(); @@ -432,9 +433,9 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock public String[] getDescription() { return new String[]{ CommonValues.BASS_MARK, - "Tower of Wireless Power", - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Fewer pesky cables!", - EnumChatFormatting.BLUE + "Survival chances might be affected", + StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.desc.0"),//Tower of Wireless Power + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.desc.1"),//Fewer pesky cables! + EnumChatFormatting.BLUE + StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.desc.2"),//Survival chances might be affected }; } diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index ad7426f44c..18dd12b722 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -331,8 +331,42 @@ gt.blockmachines.multimachine.em.transformer.desc.1=All the transformation! gt.blockmachines.multimachine.em.transformer.desc.2=Only 0.78125% power loss, HAYO! gt.blockmachines.multimachine.tm.microwave.name=Microwave Grinder +gt.blockmachines.multimachine.tm.microwave.hint.0=1 - Classic Hatches or Clean Stainless Steel Casing +gt.blockmachines.multimachine.tm.microwave.hint.1=Also acts like a hopper so give it an Output Bus +gt.blockmachines.multimachine.tm.microwave.desc.0=High Frequency Oven +gt.blockmachines.multimachine.tm.microwave.desc.1=From live to done in seconds! +gt.blockmachines.multimachine.tm.microwave.desc.3=I said nuke the... I meant microwave supper! +gt.blockmachines.multimachine.tm.microwave.cfgi.0=Power setting +gt.blockmachines.multimachine.tm.microwave.cfgi.1=Timer setting +gt.blockmachines.multimachine.tm.microwave.cfgo.0=Timer value +gt.blockmachines.multimachine.tm.microwave.cfgo.1=Timer remaining gt.blockmachines.multimachine.tm.teslaCoil.name=Tesla Tower +gt.blockmachines.multimachine.tm.teslaCoil.hint.0=1 - Classic Hatches, Capacitor Hatches or Tesla Base Casing +gt.blockmachines.multimachine.tm.teslaCoil.hint.1=2 - Titanium Frames +gt.blockmachines.multimachine.tm.teslaCoil.desc.0=Tower of Wireless Power +gt.blockmachines.multimachine.tm.teslaCoil.desc.1=Fewer pesky cables! +gt.blockmachines.multimachine.tm.teslaCoil.desc.2=Survival chances might be affected +gt.blockmachines.multimachine.tm.teslaCoil.cfgi.0=Hysteresis low setting +gt.blockmachines.multimachine.tm.teslaCoil.cfgi.1=Hysteresis high setting +gt.blockmachines.multimachine.tm.teslaCoil.cfgi.2=Tesla Towers transfer radius setting +gt.blockmachines.multimachine.tm.teslaCoil.cfgi.3=Tesla Transceiver transfer radius setting +gt.blockmachines.multimachine.tm.teslaCoil.cfgi.4=Tesla Ultimate Cover transfer radius setting +gt.blockmachines.multimachine.tm.teslaCoil.cfgi.5=Output voltage setting +gt.blockmachines.multimachine.tm.teslaCoil.cfgi.6=Output current setting +gt.blockmachines.multimachine.tm.teslaCoil.cfgi.7=Scan time Min setting +gt.blockmachines.multimachine.tm.teslaCoil.cfgi.8=Overdrive setting +gt.blockmachines.multimachine.tm.teslaCoil.cfgi.9=Unused +gt.blockmachines.multimachine.tm.teslaCoil.cfgo.0=Tesla Towers transfer radius display +gt.blockmachines.multimachine.tm.teslaCoil.cfgo.1=Tesla Transceiver transfer radius display +gt.blockmachines.multimachine.tm.teslaCoil.cfgo.2=Tesla Ultimate Cover transfer radius display +gt.blockmachines.multimachine.tm.teslaCoil.cfgo.3=Output voltage display +gt.blockmachines.multimachine.tm.teslaCoil.cfgo.4=Output current display +gt.blockmachines.multimachine.tm.teslaCoil.cfgo.5=Energy Capacity display +gt.blockmachines.multimachine.tm.teslaCoil.cfgo.6=Energy Stored display +gt.blockmachines.multimachine.tm.teslaCoil.cfgo.7=Energy Fraction display +gt.blockmachines.multimachine.tm.teslaCoil.cfgo.8=Scan time display + gt.blockmachines.multimachine.em.switch.name=Network Switch With QoS gt.blockmachines.multimachine.em.computer.name=Quantum Computer gt.blockmachines.multimachine.em.databank.name=Data Bank @@ -369,6 +403,7 @@ gt.blockmachines.multimachine.em.annihilation.name=Annihilation Generator gt.blockmachines.multimachine.em.blackholegenerator.name=Black Hole Generator #Keywords and phrases +#SOME ARE PHRASES!!! tt.keyword.Hint_Details=Hint Details tt.keyword.Air=Air tt.keyword.Earth=Earth -- cgit From 3003aba2b51ec32c543d69665465203d46e8c057 Mon Sep 17 00:00:00 2001 From: Bass Date: Mon, 26 Aug 2019 21:27:51 +0100 Subject: I am bad at git E --- .../thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java') 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 880e3be483..87a480fd36 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 @@ -111,8 +111,8 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private static final INameFunction HYSTERESIS_LOW_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.0");//Hysteresis low setting private static final INameFunction HYSTERESIS_HIGH_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.1");//Hysteresis high setting private static final INameFunction TRANSFER_RADIUS_TOWER_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.2");//Tesla Towers transfer radius setting - private static final INameFunction TRANSFER_RADIUS_TRANSCEIVER_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.3)";//Tesla Transceiver transfer radius setting - private static final INameFunction TRANSFER_RADIUS_COVER_ULTIMATE_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.4)";//Tesla Ultimate Cover transfer radius setting + private static final INameFunction TRANSFER_RADIUS_TRANSCEIVER_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.3");//Tesla Transceiver transfer radius setting + private static final INameFunction TRANSFER_RADIUS_COVER_ULTIMATE_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.4");//Tesla Ultimate Cover transfer radius setting private static final INameFunction OUTPUT_VOLTAGE_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.5");//Output voltage setting private static final INameFunction OUTPUT_CURRENT_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.6");//Output current setting private static final INameFunction SCAN_TIME_MIN_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.7");//Scan time Min setting -- cgit From 79a21009350940d758fcf0eda9fb284662c80fb2 Mon Sep 17 00:00:00 2001 From: Bass Date: Tue, 27 Aug 2019 00:18:52 +0100 Subject: Reformatted a file that has been bugging me --- .../technus/tectech/thing/CustomItemList.java | 74 +++++++++++----------- 1 file changed, 37 insertions(+), 37 deletions(-) (limited to 'src/main/java') 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 ba3f98fe6a..01773fb42d 100644 --- a/src/main/java/com/github/technus/tectech/thing/CustomItemList.java +++ b/src/main/java/com/github/technus/tectech/thing/CustomItemList.java @@ -11,24 +11,24 @@ import net.minecraft.item.ItemStack; import static gregtech.api.enums.GT_Values.W; public enum CustomItemList implements IItemContainer { - Casing_UEV,Casing_UIV,Casing_UMV,Casing_UXV,Casing_OPV,Casing_MAXV, - Hull_UEV,Hull_UIV,Hull_UMV,Hull_UXV,Hull_OPV,Hull_MAXV, - Transformer_UEV_UHV,Transformer_UIV_UEV,Transformer_UMV_UIV, - Transformer_UXV_UMV,Transformer_OPV_UXV,Transformer_MAXV_OPV, - WetTransformer_LV_ULV,WetTransformer_MV_LV,WetTransformer_HV_MV,WetTransformer_EV_HV, - WetTransformer_IV_EV,WetTransformer_LuV_IV,WetTransformer_ZPM_LuV,WetTransformer_UV_ZPM, - WetTransformer_UHV_UV,WetTransformer_UEV_UHV,WetTransformer_UIV_UEV,WetTransformer_UMV_UIV, - WetTransformer_UXV_UMV,WetTransformer_OPV_UXV,WetTransformer_MAXV_OPV, + Casing_UEV, Casing_UIV, Casing_UMV, Casing_UXV, Casing_OPV, Casing_MAXV, + Hull_UEV, Hull_UIV, Hull_UMV, Hull_UXV, Hull_OPV, Hull_MAXV, + Transformer_UEV_UHV, Transformer_UIV_UEV, Transformer_UMV_UIV, + Transformer_UXV_UMV, Transformer_OPV_UXV, Transformer_MAXV_OPV, + WetTransformer_LV_ULV, WetTransformer_MV_LV, WetTransformer_HV_MV, WetTransformer_EV_HV, + WetTransformer_IV_EV, WetTransformer_LuV_IV, WetTransformer_ZPM_LuV, WetTransformer_UV_ZPM, + WetTransformer_UHV_UV, WetTransformer_UEV_UHV, WetTransformer_UIV_UEV, WetTransformer_UMV_UIV, + WetTransformer_UXV_UMV, WetTransformer_OPV_UXV, WetTransformer_MAXV_OPV, - Transformer_HA_UEV_UHV,Transformer_HA_UIV_UEV,Transformer_HA_UMV_UIV,Transformer_HA_UXV_UMV, - Transformer_HA_OPV_UXV,Transformer_HA_MAXV_OPV, + Transformer_HA_UEV_UHV, Transformer_HA_UIV_UEV, Transformer_HA_UMV_UIV, Transformer_HA_UXV_UMV, + Transformer_HA_OPV_UXV, Transformer_HA_MAXV_OPV, - hatch_CreativeMaintenance,hatch_CreativeData, - Machine_OwnerDetector,Machine_DataReader, - Machine_BuckConverter_IV,Machine_BuckConverter_LuV,Machine_BuckConverter_ZPM, - Machine_BuckConverter_UV,Machine_BuckConverter_UHV,Machine_BuckConverter_UEV, - Machine_BuckConverter_UIV,Machine_BuckConverter_UMV, Machine_BuckConverter_UXV, - Machine_DebugWriter,Machine_DebugGenny,UnusedStuff, Machine_DebugPollutor, + hatch_CreativeMaintenance, hatch_CreativeData, + Machine_OwnerDetector, Machine_DataReader, + Machine_BuckConverter_IV, Machine_BuckConverter_LuV, Machine_BuckConverter_ZPM, + Machine_BuckConverter_UV, Machine_BuckConverter_UHV, Machine_BuckConverter_UEV, + Machine_BuckConverter_UIV, Machine_BuckConverter_UMV, Machine_BuckConverter_UXV, + Machine_DebugWriter, Machine_DebugGenny, UnusedStuff, Machine_DebugPollutor, EMpipe, DATApipe, LASERpipe, rack_Hatch, holder_Hatch, capacitor_Hatch, eM_dynamoMulti4_IV, eM_dynamoMulti16_IV, eM_dynamoMulti64_IV, @@ -40,15 +40,15 @@ public enum CustomItemList implements IItemContainer { eM_dynamoMulti4_UIV, eM_dynamoMulti16_UIV, eM_dynamoMulti64_UIV, eM_dynamoMulti4_UMV, eM_dynamoMulti16_UMV, eM_dynamoMulti64_UMV, eM_dynamoMulti4_UXV, eM_dynamoMulti16_UXV, eM_dynamoMulti64_UXV, - eM_dynamoTunnel1_IV,eM_dynamoTunnel2_IV,eM_dynamoTunnel3_IV,eM_dynamoTunnel4_IV,eM_dynamoTunnel5_IV,eM_dynamoTunnel6_IV,eM_dynamoTunnel7_IV, - eM_dynamoTunnel1_LuV,eM_dynamoTunnel2_LuV,eM_dynamoTunnel3_LuV,eM_dynamoTunnel4_LuV,eM_dynamoTunnel5_LuV,eM_dynamoTunnel6_LuV,eM_dynamoTunnel7_LuV, - eM_dynamoTunnel1_ZPM,eM_dynamoTunnel2_ZPM,eM_dynamoTunnel3_ZPM,eM_dynamoTunnel4_ZPM,eM_dynamoTunnel5_ZPM,eM_dynamoTunnel6_ZPM,eM_dynamoTunnel7_ZPM, - eM_dynamoTunnel1_UV,eM_dynamoTunnel2_UV,eM_dynamoTunnel3_UV,eM_dynamoTunnel4_UV,eM_dynamoTunnel5_UV,eM_dynamoTunnel6_UV,eM_dynamoTunnel7_UV, - eM_dynamoTunnel1_UHV,eM_dynamoTunnel2_UHV,eM_dynamoTunnel3_UHV,eM_dynamoTunnel4_UHV,eM_dynamoTunnel5_UHV,eM_dynamoTunnel6_UHV,eM_dynamoTunnel7_UHV, - eM_dynamoTunnel1_UEV,eM_dynamoTunnel2_UEV,eM_dynamoTunnel3_UEV,eM_dynamoTunnel4_UEV,eM_dynamoTunnel5_UEV,eM_dynamoTunnel6_UEV,eM_dynamoTunnel7_UEV, - eM_dynamoTunnel1_UIV,eM_dynamoTunnel2_UIV,eM_dynamoTunnel3_UIV,eM_dynamoTunnel4_UIV,eM_dynamoTunnel5_UIV,eM_dynamoTunnel6_UIV,eM_dynamoTunnel7_UIV, - eM_dynamoTunnel1_UMV,eM_dynamoTunnel2_UMV,eM_dynamoTunnel3_UMV,eM_dynamoTunnel4_UMV,eM_dynamoTunnel5_UMV,eM_dynamoTunnel6_UMV,eM_dynamoTunnel7_UMV, - eM_dynamoTunnel1_UXV,eM_dynamoTunnel2_UXV,eM_dynamoTunnel3_UXV,eM_dynamoTunnel4_UXV,eM_dynamoTunnel5_UXV,eM_dynamoTunnel6_UXV,eM_dynamoTunnel7_UXV, + eM_dynamoTunnel1_IV, eM_dynamoTunnel2_IV, eM_dynamoTunnel3_IV, eM_dynamoTunnel4_IV, eM_dynamoTunnel5_IV, eM_dynamoTunnel6_IV, eM_dynamoTunnel7_IV, + eM_dynamoTunnel1_LuV, eM_dynamoTunnel2_LuV, eM_dynamoTunnel3_LuV, eM_dynamoTunnel4_LuV, eM_dynamoTunnel5_LuV, eM_dynamoTunnel6_LuV, eM_dynamoTunnel7_LuV, + eM_dynamoTunnel1_ZPM, eM_dynamoTunnel2_ZPM, eM_dynamoTunnel3_ZPM, eM_dynamoTunnel4_ZPM, eM_dynamoTunnel5_ZPM, eM_dynamoTunnel6_ZPM, eM_dynamoTunnel7_ZPM, + eM_dynamoTunnel1_UV, eM_dynamoTunnel2_UV, eM_dynamoTunnel3_UV, eM_dynamoTunnel4_UV, eM_dynamoTunnel5_UV, eM_dynamoTunnel6_UV, eM_dynamoTunnel7_UV, + eM_dynamoTunnel1_UHV, eM_dynamoTunnel2_UHV, eM_dynamoTunnel3_UHV, eM_dynamoTunnel4_UHV, eM_dynamoTunnel5_UHV, eM_dynamoTunnel6_UHV, eM_dynamoTunnel7_UHV, + eM_dynamoTunnel1_UEV, eM_dynamoTunnel2_UEV, eM_dynamoTunnel3_UEV, eM_dynamoTunnel4_UEV, eM_dynamoTunnel5_UEV, eM_dynamoTunnel6_UEV, eM_dynamoTunnel7_UEV, + eM_dynamoTunnel1_UIV, eM_dynamoTunnel2_UIV, eM_dynamoTunnel3_UIV, eM_dynamoTunnel4_UIV, eM_dynamoTunnel5_UIV, eM_dynamoTunnel6_UIV, eM_dynamoTunnel7_UIV, + eM_dynamoTunnel1_UMV, eM_dynamoTunnel2_UMV, eM_dynamoTunnel3_UMV, eM_dynamoTunnel4_UMV, eM_dynamoTunnel5_UMV, eM_dynamoTunnel6_UMV, eM_dynamoTunnel7_UMV, + eM_dynamoTunnel1_UXV, eM_dynamoTunnel2_UXV, eM_dynamoTunnel3_UXV, eM_dynamoTunnel4_UXV, eM_dynamoTunnel5_UXV, eM_dynamoTunnel6_UXV, eM_dynamoTunnel7_UXV, eM_dynamoTunnel9001, eM_energyMulti4_IV, eM_energyMulti16_IV, eM_energyMulti64_IV, @@ -60,15 +60,15 @@ public enum CustomItemList implements IItemContainer { eM_energyMulti4_UIV, eM_energyMulti16_UIV, eM_energyMulti64_UIV, eM_energyMulti4_UMV, eM_energyMulti16_UMV, eM_energyMulti64_UMV, eM_energyMulti4_UXV, eM_energyMulti16_UXV, eM_energyMulti64_UXV, - eM_energyTunnel1_IV,eM_energyTunnel2_IV,eM_energyTunnel3_IV,eM_energyTunnel4_IV,eM_energyTunnel5_IV,eM_energyTunnel6_IV,eM_energyTunnel7_IV, - eM_energyTunnel1_LuV,eM_energyTunnel2_LuV,eM_energyTunnel3_LuV,eM_energyTunnel4_LuV,eM_energyTunnel5_LuV,eM_energyTunnel6_LuV,eM_energyTunnel7_LuV, - eM_energyTunnel1_ZPM,eM_energyTunnel2_ZPM,eM_energyTunnel3_ZPM,eM_energyTunnel4_ZPM,eM_energyTunnel5_ZPM,eM_energyTunnel6_ZPM,eM_energyTunnel7_ZPM, - eM_energyTunnel1_UV,eM_energyTunnel2_UV,eM_energyTunnel3_UV,eM_energyTunnel4_UV,eM_energyTunnel5_UV,eM_energyTunnel6_UV,eM_energyTunnel7_UV, - eM_energyTunnel1_UHV,eM_energyTunnel2_UHV,eM_energyTunnel3_UHV,eM_energyTunnel4_UHV,eM_energyTunnel5_UHV,eM_energyTunnel6_UHV,eM_energyTunnel7_UHV, - eM_energyTunnel1_UEV,eM_energyTunnel2_UEV,eM_energyTunnel3_UEV,eM_energyTunnel4_UEV,eM_energyTunnel5_UEV,eM_energyTunnel6_UEV,eM_energyTunnel7_UEV, - eM_energyTunnel1_UIV,eM_energyTunnel2_UIV,eM_energyTunnel3_UIV,eM_energyTunnel4_UIV,eM_energyTunnel5_UIV,eM_energyTunnel6_UIV,eM_energyTunnel7_UIV, - eM_energyTunnel1_UMV,eM_energyTunnel2_UMV,eM_energyTunnel3_UMV,eM_energyTunnel4_UMV,eM_energyTunnel5_UMV,eM_energyTunnel6_UMV,eM_energyTunnel7_UMV, - eM_energyTunnel1_UXV,eM_energyTunnel2_UXV,eM_energyTunnel3_UXV,eM_energyTunnel4_UXV,eM_energyTunnel5_UXV,eM_energyTunnel6_UXV,eM_energyTunnel7_UXV, + eM_energyTunnel1_IV, eM_energyTunnel2_IV, eM_energyTunnel3_IV, eM_energyTunnel4_IV, eM_energyTunnel5_IV, eM_energyTunnel6_IV, eM_energyTunnel7_IV, + eM_energyTunnel1_LuV, eM_energyTunnel2_LuV, eM_energyTunnel3_LuV, eM_energyTunnel4_LuV, eM_energyTunnel5_LuV, eM_energyTunnel6_LuV, eM_energyTunnel7_LuV, + eM_energyTunnel1_ZPM, eM_energyTunnel2_ZPM, eM_energyTunnel3_ZPM, eM_energyTunnel4_ZPM, eM_energyTunnel5_ZPM, eM_energyTunnel6_ZPM, eM_energyTunnel7_ZPM, + eM_energyTunnel1_UV, eM_energyTunnel2_UV, eM_energyTunnel3_UV, eM_energyTunnel4_UV, eM_energyTunnel5_UV, eM_energyTunnel6_UV, eM_energyTunnel7_UV, + eM_energyTunnel1_UHV, eM_energyTunnel2_UHV, eM_energyTunnel3_UHV, eM_energyTunnel4_UHV, eM_energyTunnel5_UHV, eM_energyTunnel6_UHV, eM_energyTunnel7_UHV, + eM_energyTunnel1_UEV, eM_energyTunnel2_UEV, eM_energyTunnel3_UEV, eM_energyTunnel4_UEV, eM_energyTunnel5_UEV, eM_energyTunnel6_UEV, eM_energyTunnel7_UEV, + eM_energyTunnel1_UIV, eM_energyTunnel2_UIV, eM_energyTunnel3_UIV, eM_energyTunnel4_UIV, eM_energyTunnel5_UIV, eM_energyTunnel6_UIV, eM_energyTunnel7_UIV, + eM_energyTunnel1_UMV, eM_energyTunnel2_UMV, eM_energyTunnel3_UMV, eM_energyTunnel4_UMV, eM_energyTunnel5_UMV, eM_energyTunnel6_UMV, eM_energyTunnel7_UMV, + eM_energyTunnel1_UXV, eM_energyTunnel2_UXV, eM_energyTunnel3_UXV, eM_energyTunnel4_UXV, eM_energyTunnel5_UXV, eM_energyTunnel6_UXV, eM_energyTunnel7_UXV, eM_energyTunnel9001, eM_in_UV, eM_in_UHV, eM_in_UEV, eM_in_UIV, eM_in_UMV, eM_in_UXV, @@ -90,9 +90,9 @@ public enum CustomItemList implements IItemContainer { Machine_Multi_Stabilizer, Machine_Multi_EMCrafter, Machine_Multi_Wormhole, Machine_Multi_Annihilation, Machine_Multi_BHG, - hint_0,hint_1,hint_2,hint_3,hint_4,hint_5,hint_6,hint_7,hint_8,hint_9,hint_10,hint_11, hint_general,hint_air,hint_noAir,hint_error, + hint_0, hint_1, hint_2, hint_3, hint_4, hint_5, hint_6, hint_7, hint_8, hint_9, hint_10, hint_11, hint_general, hint_air, hint_noAir, hint_error, - scanContainer,parametrizerMemory,teslaCapacitor,teslaCover,teslaComponent,teslaStaff, + scanContainer, parametrizerMemory, teslaCapacitor, teslaCover, teslaComponent, teslaStaff, Machine_TeslaCoil_1by1_LV, Machine_TeslaCoil_1by1_MV, Machine_TeslaCoil_1by1_HV, Machine_TeslaCoil_1by1_EV, Machine_TeslaCoil_1by1_IV, Machine_TeslaCoil_2by2_LV, Machine_TeslaCoil_2by2_MV, Machine_TeslaCoil_2by2_HV, Machine_TeslaCoil_2by2_EV, Machine_TeslaCoil_2by2_IV, @@ -255,4 +255,4 @@ public enum CustomItemList implements IItemContainer { } return this; } -} +} \ No newline at end of file -- cgit From a560a97a4376e8ac198cd686b633f6f7b06c31e7 Mon Sep 17 00:00:00 2001 From: Bass Date: Tue, 27 Aug 2019 18:45:11 +0100 Subject: Lang Extra Extra? --- .../definitions/dComplexAspectDefinition.java | 4 +- .../GT_MetaTileEntity_EM_essentiaDequantizer.java | 2 +- .../GT_MetaTileEntity_EM_essentiaQuantizer.java | 2 +- .../multi/GT_MetaTileEntity_EM_computer.java | 122 +++++++++++---------- .../multi/GT_MetaTileEntity_EM_switch.java | 69 ++++++------ .../multi/GT_MetaTileEntity_EM_transformer.java | 2 +- .../multi/GT_MetaTileEntity_TM_microwave.java | 2 +- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 2 +- src/main/resources/assets/tectech/lang/en_US.lang | 21 +++- 9 files changed, 121 insertions(+), 105 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/dComplexAspectDefinition.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/dComplexAspectDefinition.java index d6c4553ed5..3d01ec7fb9 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/dComplexAspectDefinition.java +++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/dComplexAspectDefinition.java @@ -306,13 +306,13 @@ public final class dComplexAspectDefinition extends cElementalDefinition impleme lines.add(StatCollector.translateToLocal("tt.keyword.CHARGE") + " = " + getCharge() / 3f + " e"); } if (Util.areBitsSet(SCAN_GET_COLOR, capabilities)) { - lines.add(getColor() < 0 ? StatCollector.translateToLocal("tt.keyword.COLORLESS") : StatCollector.translateToLocal("tt.keyword.CARRIES_COLOR")); + lines.add(getColor() < 0 ? StatCollector.translateToLocal("tt.keyword.COLORLESS") : StatCollector.translateToLocal("tt.keyphrase.CARRIES_COLOR")); } if (Util.areBitsSet(SCAN_GET_MASS, capabilities)) { lines.add(StatCollector.translateToLocal("tt.keyword.MASS") + " = " + getMass() + " eV/c\u00b2"); } if (Util.areBitsSet(SCAN_GET_TIMESPAN_INFO, capabilities)) { - lines.add(StatCollector.translateToLocal("tt.keyword.LIFE_TIME") + " = " + getRawTimeSpan(energyLevel) + " s"); + lines.add(StatCollector.translateToLocal("tt.keyphrase.LIFE_TIME") + " = " + getRawTimeSpan(energyLevel) + " s"); lines.add(" " + StatCollector.translateToLocal("tt.keyphrase.At_current_energy_level")); } } diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java index afaa9052cd..31a81726c4 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java +++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java @@ -55,7 +55,7 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_ private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0, 4, 4}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyword.Hint_Details") + ":", + EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyphrase.Hint_Details") + ":", StatCollector.translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.0"),//1 - Classic Hatches or High Power Casing StatCollector.translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.1"),//2 - Elemental Input Hatch StatCollector.translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.2"),//3 - Elemental Overflow Hatches or Elemental Casing diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java index d7570f7889..4425a97f64 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java +++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java @@ -55,7 +55,7 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0, 4, 4}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyword.Hint_Details") + ":", + EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyphrase.Hint_Details") + ":", StatCollector.translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.0"),//1 - Classic Hatches or High Power Casing StatCollector.translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.1"),//2 - Elemental Output Hatch StatCollector.translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.2"),//3 - Elemental Overflow Hatches or Elemental Casing diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java index c39e9e0661..2f3bca7c16 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java @@ -30,6 +30,7 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; import java.util.ArrayList; @@ -44,35 +45,11 @@ import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStat * Created by danie_000 on 17.12.2016. */ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { + private final ArrayList eRacks = new ArrayList<>(); + private static Textures.BlockIcons.CustomIcon ScreenOFF; private static Textures.BlockIcons.CustomIcon ScreenON; - //region parameters - protected Parameters.Group.ParameterIn overclock,overvolt; - protected Parameters.Group.ParameterOut maxCurrentTemp,availableData; - private static final INameFunction OC_NAME = (base, p)-> "Overclock ratio"; - private static final INameFunction OV_NAME = (base, p)-> "Overvoltage ratio"; - private static final INameFunction MAX_TEMP_NAME = (base, p)-> "Current max. heat"; - private static final INameFunction COMPUTE_NAME = (base, p)-> "Produced computation"; - private static final IStatusFunction OC_STATUS= - (base,p)->LedStatus.fromLimitsInclusiveOuterBoundary(p.get(),0,1,1,3); - private static final IStatusFunction OV_STATUS= - (base,p)->LedStatus.fromLimitsInclusiveOuterBoundary(p.get(),.7,.8,1.2,2); - private static final IStatusFunction MAX_TEMP_STATUS= - (base,p)->LedStatus.fromLimitsInclusiveOuterBoundary(p.get(),-10000,0,0,5000); - private static final IStatusFunction COMPUTE_STATUS=(base, p)->{ - if(base.eAvailableData<0){ - return STATUS_TOO_LOW; - } - if(base.eAvailableData==0){ - return STATUS_NEUTRAL; - } - return STATUS_OK; - }; - //endregion - - private final ArrayList eRacks = new ArrayList<>(); - //region Structure private static final String[][] front = new String[][]{{"A ", "A ", "A. ", "A ",},}; private static final String[][] terminator = new String[][]{{"A ", "A ", "A ", "A ",},}; @@ -85,9 +62,34 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{1, 3}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA+"Hint Details:", - "1 - Classic/Data Hatches or Computer casing", - "2 - Rack Hatches or Advanced computer casing", + EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyphrase.Hint_Details") + ":", + StatCollector.translateToLocal("gt.blockmachines.multimachine.em.computer.hint.0"),//1 - Classic/Data Hatches or Computer casing + StatCollector.translateToLocal("gt.blockmachines.multimachine.em.computer.hint.1"),//2 - Rack Hatches or Advanced computer casing + }; + //endregion + + //region parameters + protected Parameters.Group.ParameterIn overclock, overvolt; + protected Parameters.Group.ParameterOut maxCurrentTemp, availableData; + + private static final INameFunction OC_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.em.computer.cfgi.0");//Overclock ratio + private static final INameFunction OV_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.em.computer.cfgi.1");//Overvoltage ratio + private static final INameFunction MAX_TEMP_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.em.computer.cfgo.0");//Current max. heat + private static final INameFunction COMPUTE_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.em.computer.cfgo.1");//Produced computation + private static final IStatusFunction OC_STATUS = + (base, p) -> LedStatus.fromLimitsInclusiveOuterBoundary(p.get(), 0, 1, 1, 3); + private static final IStatusFunction OV_STATUS = + (base, p) -> LedStatus.fromLimitsInclusiveOuterBoundary(p.get(), .7, .8, 1.2, 2); + private static final IStatusFunction MAX_TEMP_STATUS = + (base, p) -> LedStatus.fromLimitsInclusiveOuterBoundary(p.get(), -10000, 0, 0, 5000); + private static final IStatusFunction COMPUTE_STATUS = (base, p) -> { + if (base.eAvailableData < 0) { + return STATUS_TOO_LOW; + } + if (base.eAvailableData == 0) { + return STATUS_NEUTRAL; + } + return STATUS_OK; }; //endregion @@ -105,16 +107,16 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB @Override protected void parametersInstantiation_EM() { - Parameters.Group hatch_0=parametrization.getGroup(0); - overclock=hatch_0.makeInParameter(0,1,OC_NAME,OC_STATUS); - overvolt=hatch_0.makeInParameter(1,1,OV_NAME,OV_STATUS); - maxCurrentTemp=hatch_0.makeOutParameter(0,0,MAX_TEMP_NAME,MAX_TEMP_STATUS); - availableData=hatch_0.makeOutParameter(1,0,COMPUTE_NAME,COMPUTE_STATUS); + Parameters.Group hatch_0 = parametrization.getGroup(0); + overclock = hatch_0.makeInParameter(0, 1, OC_NAME, OC_STATUS); + overvolt = hatch_0.makeInParameter(1, 1, OV_NAME, OV_STATUS); + maxCurrentTemp = hatch_0.makeOutParameter(0, 0, MAX_TEMP_NAME, MAX_TEMP_STATUS); + availableData = hatch_0.makeOutParameter(1, 0, COMPUTE_NAME, COMPUTE_STATUS); } @Override @SideOnly(Side.CLIENT) - protected ResourceLocation getActivitySound(){ + protected ResourceLocation getActivitySound() { return GT_MetaTileEntity_EM_switch.activitySound; } @@ -141,20 +143,20 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB @Override public boolean checkRecipe_EM(ItemStack itemStack) { - parametrization.setToDefaults(false,true); + parametrization.setToDefaults(false, true); eAvailableData = 0; - double maxTemp=0; - double overClockRatio= overclock.get(); - double overVoltageRatio= overvolt.get(); - if(Double.isNaN(overClockRatio) || Double.isNaN(overVoltageRatio)) { + double maxTemp = 0; + double overClockRatio = overclock.get(); + double overVoltageRatio = overvolt.get(); + if (Double.isNaN(overClockRatio) || Double.isNaN(overVoltageRatio)) { return false; } - if(overclock.getStatus(true).isOk && overvolt.getStatus(true).isOk){ - float eut=V[8] * (float)overVoltageRatio * (float)overClockRatio; - if(eut maxTemp) { - maxTemp=rack.heat; + maxTemp = rack.heat; } rackComputation = rack.tickComponents((float) overClockRatio, (float) overVoltageRatio); if (rackComputation > 0) { @@ -191,8 +193,8 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB availableData.set(eAvailableData); return true; } else { - eAvailableData=0; - mEUt = -(int)V[8]; + eAvailableData = 0; + mEUt = -(int) V[8]; eAmpereFlow = 1; mMaxProgresstime = 20; mEfficiencyIncrease = 10000; @@ -209,7 +211,7 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB if (!eOutputData.isEmpty()) { Vec3pos pos = new Vec3pos(getBaseMetaTileEntity()); QuantumDataPacket pack = new QuantumDataPacket(eAvailableData / eOutputData.size()).unifyTraceWith(pos); - if(pack==null){ + if (pack == null) { return; } for (GT_MetaTileEntity_Hatch_InputData hatch : eInputData) { @@ -256,7 +258,7 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB @Override public void stopMachine() { super.stopMachine(); - eAvailableData=0; + eAvailableData = 0; for (GT_MetaTileEntity_Hatch_Rack rack : eRacks) { if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(rack)) { rack.getBaseMetaTileEntity().setActive(false); @@ -306,17 +308,17 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB @Override public void construct(int stackSize, boolean hintsOnly) { - IGregTechTileEntity igt=getBaseMetaTileEntity(); - StructureBuilderExtreme(front, blockType, blockMeta, 1, 2, 0, igt,this,hintsOnly); - StructureBuilderExtreme(cap, blockType, blockMeta, 1, 2, -1, igt,this,hintsOnly); + IGregTechTileEntity igt = getBaseMetaTileEntity(); + StructureBuilderExtreme(front, blockType, blockMeta, 1, 2, 0, igt, this, hintsOnly); + StructureBuilderExtreme(cap, blockType, blockMeta, 1, 2, -1, igt, this, hintsOnly); - byte offset=-2; - for (int rackSlices = stackSize >12?12: stackSize; rackSlices>0 ; rackSlices--) { - StructureBuilderExtreme(slice, blockType, blockMeta, 1, 2, offset--, igt,this,hintsOnly); + byte offset = -2; + for (int rackSlices = stackSize > 12 ? 12 : stackSize; rackSlices > 0; rackSlices--) { + StructureBuilderExtreme(slice, blockType, blockMeta, 1, 2, offset--, igt, this, hintsOnly); } - StructureBuilderExtreme(cap, blockType, blockMeta, 1, 2, offset--, igt,this,hintsOnly); - StructureBuilderExtreme(terminator, blockType, blockMeta, 1, 2, offset,igt,this,hintsOnly); + StructureBuilderExtreme(cap, blockType, blockMeta, 1, 2, offset--, igt, this, hintsOnly); + StructureBuilderExtreme(terminator, blockType, blockMeta, 1, 2, offset, igt, this, hintsOnly); } @Override @@ -336,7 +338,7 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB return new String[]{ CommonValues.TEC_MARK_EM, Util.intBitsToString(TecTech.RANDOM.nextInt()), - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "You need it to process the number above" + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + StatCollector.translateToLocal("gt.blockmachines.multimachine.em.computer.desc")//You need it to process the number above }; } @@ -355,4 +357,4 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB } return false; } -} +} \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java index 1c5d1bccdd..be244e6820 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java @@ -23,6 +23,7 @@ import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; import static com.github.technus.tectech.CommonValues.V; import static com.github.technus.tectech.Util.StructureBuilderExtreme; @@ -34,40 +35,40 @@ import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStat /** * Created by danie_000 on 17.12.2016. */ -public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable{ +public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { //region Structure private static final String[][] shape = new String[][]{ - {" "," . "," ",}, - {" "," 0 "," ",}, - {" "," "," ",}, + {" ", " . ", " ",}, + {" ", " 0 ", " ",}, + {" ", " ", " ",}, }; private static final Block[] blockType = new Block[]{sBlockCasingsTT}; private static final byte[] blockMeta = new byte[]{3}; private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addClassicToMachineList}; - private static final short[] casingTextures = new short[]{textureOffset+1}; + private static final short[] casingTextures = new short[]{textureOffset + 1}; private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{1}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA+"Hint Details:", - "1 - Classic/Data Hatches or Computer casing", + EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyphrase.Hint_Details") + ":", + "1 - Classic/Data Hatches or Computer casing",//1 - Classic/Data Hatches or Computer casing }; //endregion //region parameters - private static final INameFunction ROUTE_NAME= - (base,p)->(p.parameterId()==0?"Destination ":"Weight ")+p.hatchId(); + private static final INameFunction ROUTE_NAME = + (base, p) -> (p.parameterId() == 0 ? StatCollector.translateToLocal("tt.keyword.Destination") + " " : StatCollector.translateToLocal("tt.keyword.Weight") + " ") + p.hatchId(); private static final IStatusFunction WEI_STATUS = - (base,p)-> { - double v=p.get(); + (base, p) -> { + double v = p.get(); if (Double.isNaN(v)) return STATUS_WRONG; - if(v<0) return STATUS_TOO_LOW; - if(v==0) return STATUS_LOW; - if(Double.isInfinite(v)) return STATUS_HIGH; + if (v < 0) return STATUS_TOO_LOW; + if (v == 0) return STATUS_LOW; + if (Double.isInfinite(v)) return STATUS_HIGH; return STATUS_OK; }; private static final IStatusFunction DST_STATUS = - (base,p)->{ - if(base.weight[p.hatchId()].getStatus(false).isOk) { + (base, p) -> { + if (base.weight[p.hatchId()].getStatus(false).isOk) { double v = p.get(); if (Double.isNaN(v)) return STATUS_WRONG; v = (int) v; @@ -91,20 +92,20 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas @Override protected void parametersInstantiation_EM() { - dst=new Parameters.Group.ParameterIn[10]; - weight =new Parameters.Group.ParameterIn[10]; + dst = new Parameters.Group.ParameterIn[10]; + weight = new Parameters.Group.ParameterIn[10]; for (int i = 0; i < 10; i++) { Parameters.Group hatch = parametrization.getGroup(i); dst[i] = hatch.makeInParameter(0, i, ROUTE_NAME, DST_STATUS); - weight[i] = hatch.makeInParameter(1,0, ROUTE_NAME, WEI_STATUS); + weight[i] = hatch.makeInParameter(1, 0, ROUTE_NAME, WEI_STATUS); } } - public final static ResourceLocation activitySound=new ResourceLocation(Reference.MODID+":fx_hi_freq"); + public final static ResourceLocation activitySound = new ResourceLocation(Reference.MODID + ":fx_hi_freq"); @Override @SideOnly(Side.CLIENT) - protected ResourceLocation getActivitySound(){ + protected ResourceLocation getActivitySound() { return activitySound; } @@ -128,7 +129,7 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas @Override public void construct(int stackSize, boolean hintsOnly) { - StructureBuilderExtreme(shape, blockType, blockMeta,1, 1, 0, getBaseMetaTileEntity(),this,hintsOnly); + StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), this, hintsOnly); } @Override @@ -162,7 +163,7 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas double total = 0; double weight; for (int i = 0; i < 10; i++) {//each param pair - weight= this.weight[i].get(); + weight = this.weight[i].get(); if (weight > 0 && dst[i].get() >= 0) { total += weight;//Total weighted div } @@ -170,7 +171,7 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas Vec3pos pos = new Vec3pos(getBaseMetaTileEntity()); QuantumDataPacket pack = new QuantumDataPacket(0L).unifyTraceWith(pos); - if(pack==null) { + if (pack == null) { return; } for (GT_MetaTileEntity_Hatch_InputData hatch : eInputData) { @@ -187,27 +188,27 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas double dest; for (int i = 0; i < 10; i++) { - dest= dst[i].get(); - weight= this.weight[i].get(); + dest = dst[i].get(); + weight = this.weight[i].get(); if (weight > 0 && dest >= 0) { - int outIndex = (int)dest - 1; + int outIndex = (int) dest - 1; if (outIndex < 0 || outIndex >= eOutputData.size()) { continue; } GT_MetaTileEntity_Hatch_OutputData out = eOutputData.get(outIndex); - if(Double.isInfinite(total)){ - if(Double.isInfinite(weight)){ + if (Double.isInfinite(total)) { + if (Double.isInfinite(weight)) { out.q = new QuantumDataPacket(remaining).unifyTraceWith(pack); break; } - }else{ + } else { long part = (long) Math.floor(pack.getContent() * weight / total); if (part > 0) { remaining -= part; if (remaining > 0) { out.q = new QuantumDataPacket(part).unifyTraceWith(pack); } else if (part + remaining > 0) { - out.q = new QuantumDataPacket( part + remaining).unifyTraceWith(pack); + out.q = new QuantumDataPacket(part + remaining).unifyTraceWith(pack); break; } else { break; @@ -223,8 +224,8 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas public String[] getDescription() { return new String[]{ CommonValues.TEC_MARK_EM, - "User controlled computation power routing", - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Quality of service is a must" + StatCollector.translateToLocal("gt.blockmachines.multimachine.em.switch.desc.0"),//User controlled computation power routing + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + StatCollector.translateToLocal("gt.blockmachines.multimachine.em.switch.desc.1")//Quality of service is a must }; } -} +} \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java index 26d447cf69..76ee59977c 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java @@ -44,7 +44,7 @@ public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_Multiblo private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyword.Hint_Details") + ":", + EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyphrase.Hint_Details") + ":", StatCollector.translateToLocal("gt.blockmachines.multimachine.em.transformer.hint"),//1 - Energy IO Hatches or High Power Casing }; //endregion 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 25a74a8a9b..f0feb4a635 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 @@ -53,7 +53,7 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock private static final Block[] blockTypeFallback = new Block[]{sBlockCasings4}; private static final byte[] blockMetaFallback = new byte[]{1}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyword.Hint_Details") + ":", + EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyphrase.Hint_Details") + ":", StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.microwave.hint.0"),//1 - Classic Hatches or Clean Stainless Steel Casing StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.microwave.hint.1"),//Also acts like a hopper so give it an Output Bus }; 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 87a480fd36..40ea3084c8 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 @@ -98,7 +98,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsBA0, null}; private static final byte[] blockMetaFallback = new byte[]{6, 0}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyword.Hint_Details") + ":", + EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyphrase.Hint_Details") + ":", StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.hint.0"),//1 - Classic Hatches, Capacitor Hatches or Tesla Base Casing StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.hint.1"),//2 - Titanium Frames }; diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index 18dd12b722..8d14c74dbe 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -368,7 +368,19 @@ gt.blockmachines.multimachine.tm.teslaCoil.cfgo.7=Energy Fraction display gt.blockmachines.multimachine.tm.teslaCoil.cfgo.8=Scan time display gt.blockmachines.multimachine.em.switch.name=Network Switch With QoS +gt.blockmachines.multimachine.em.switch.hint=1 - Classic/Data Hatches or Computer casing +gt.blockmachines.multimachine.em.switch.desc.0=User controlled computation power routing +gt.blockmachines.multimachine.em.switch.desc.1=Quality of service is a must + gt.blockmachines.multimachine.em.computer.name=Quantum Computer +gt.blockmachines.multimachine.em.computer.hint.0=1 - Classic/Data Hatches or Computer casing +gt.blockmachines.multimachine.em.computer.hint.1=2 - Rack Hatches or Advanced computer casing +gt.blockmachines.multimachine.em.computer.desc=You need it to process the number above +gt.blockmachines.multimachine.em.computer.cfgi.0=Overclock ratio +gt.blockmachines.multimachine.em.computer.cfgi.1=Overvoltage ratio +gt.blockmachines.multimachine.em.computer.cfgo.0=Current max. heat +gt.blockmachines.multimachine.em.computer.cfgo.1=Produced computation + gt.blockmachines.multimachine.em.databank.name=Data Bank gt.blockmachines.multimachine.em.junction.name=Matter Junction gt.blockmachines.multimachine.em.mattertoem.name=Matter Quantizer @@ -403,8 +415,6 @@ gt.blockmachines.multimachine.em.annihilation.name=Annihilation Generator gt.blockmachines.multimachine.em.blackholegenerator.name=Black Hole Generator #Keywords and phrases -#SOME ARE PHRASES!!! -tt.keyword.Hint_Details=Hint Details tt.keyword.Air=Air tt.keyword.Earth=Earth tt.keyword.Fire=Fire @@ -417,12 +427,15 @@ tt.keyword.CLASS=CLASS tt.keyword.NAME=NAME tt.keyword.CHARGE=CHARGE tt.keyword.COLORLESS=COLORLESS -tt.keyword.CARRIES_COLOR=CARRIES COLOR tt.keyword.MASS=MASS -tt.keyword.LIFE_TIME=LIFE TIME tt.keyword.BOOM=BOOM! tt.keyword.ID=ID +tt.keyword.Destination=Destination +tt.keyword.Weight=Weight +tt.keyphrase.LIFE_TIME=LIFE TIME +tt.keyphrase.CARRIES_COLOR=CARRIES COLOR +tt.keyphrase.Hint_Details=Hint Details tt.keyphrase.At_current_energy_level=At current energy level tt.keyphrase.No_Stacks=No Stacks tt.keyphrase.Contains_EM=Contains EM -- cgit From 3bb13de2fcff5e2c142f424204d74eefbc581eeb Mon Sep 17 00:00:00 2001 From: Tec Date: Tue, 27 Aug 2019 22:03:20 +0200 Subject: Push so i dont lose it --- .../java/com/github/technus/tectech/Converter.java | 59 +++++ .../openComputers/AvrArchitecture.java | 267 +++++++++++++++++++++ .../technus/tectech/thing/item/AvrProgrammer.java | 7 +- 3 files changed, 329 insertions(+), 4 deletions(-) create mode 100644 src/main/java/com/github/technus/tectech/Converter.java create mode 100644 src/main/java/com/github/technus/tectech/compatibility/openComputers/AvrArchitecture.java (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/Converter.java b/src/main/java/com/github/technus/tectech/Converter.java new file mode 100644 index 0000000000..5d1f5c802e --- /dev/null +++ b/src/main/java/com/github/technus/tectech/Converter.java @@ -0,0 +1,59 @@ +package com.github.technus.tectech; + +import java.io.*; + +public final class Converter { + private Converter() {} + + public static void writeInts(int [] array,ByteArrayOutputStream byteArrayOutputStream) { + try { + DataOutputStream dataOutputStream = new DataOutputStream(byteArrayOutputStream); + for (int i = 0; i < array.length; i++) { + dataOutputStream.writeInt(array[i]); + } + dataOutputStream.flush(); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + public static void readInts(ByteArrayInputStream byteArrayInputStream,int[] array) { + try { + DataInputStream dataInputStream = new DataInputStream(byteArrayInputStream); + for (int i = 0; i < array.length; i++) { + array[i] = dataInputStream.readInt(); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + public static byte[] writeInts(int[] array) { + try { + ByteArrayOutputStream bos = new ByteArrayOutputStream(array.length * 4); + DataOutputStream dos = new DataOutputStream(bos); + for (int i = 0; i < array.length; i++) { + dos.writeInt(array[i]); + } + + return bos.toByteArray(); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + public static int[] readInts(byte[] array) { + try { + ByteArrayInputStream bis = new ByteArrayInputStream(array); + DataInputStream dataInputStream = new DataInputStream(bis); + int size = array.length / Integer.BYTES; + int[] res = new int[size]; + for (int i = 0; i < size; i++) { + res[i] = dataInputStream.readInt(); + } + return res; + } catch (IOException e) { + throw new RuntimeException(e); + } + } +} diff --git a/src/main/java/com/github/technus/tectech/compatibility/openComputers/AvrArchitecture.java b/src/main/java/com/github/technus/tectech/compatibility/openComputers/AvrArchitecture.java new file mode 100644 index 0000000000..fcbb65d609 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/compatibility/openComputers/AvrArchitecture.java @@ -0,0 +1,267 @@ +package com.github.technus.tectech.compatibility.openComputers; + +import com.github.technus.avrClone.AvrCore; +import com.github.technus.avrClone.instructions.ExecutionEvent; +import com.github.technus.avrClone.instructions.InstructionRegistry; +import com.github.technus.avrClone.instructions.exceptions.DebugEvent; +import com.github.technus.avrClone.instructions.exceptions.DelayEvent; +import com.github.technus.avrClone.memory.EepromMemory; +import com.github.technus.avrClone.memory.RemovableMemory; +import com.github.technus.avrClone.memory.program.ProgramMemory; +import com.github.technus.tectech.Converter; +import com.github.technus.tectech.TecTech; +import li.cil.oc.Settings; +import li.cil.oc.api.Driver; +import li.cil.oc.api.driver.Item; +import li.cil.oc.api.driver.item.Memory; +import li.cil.oc.api.machine.Architecture; +import li.cil.oc.api.machine.ExecutionResult; +import li.cil.oc.api.machine.Machine; +import li.cil.oc.api.machine.Signal; +import li.cil.oc.common.SaveHandler; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import org.apache.commons.io.IOUtils; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.util.zip.GZIPInputStream; +import java.util.zip.GZIPOutputStream; + +@Architecture.Name("AVR 32Bit Clone") +@Architecture.NoMemoryRequirements +public class AvrArchitecture implements Architecture { + private final Machine machine; + private AvrCore core; + private boolean debugRun; + private int delay; + private int[] tempData; + private int memSize; + + public AvrArchitecture(Machine machine) { + this.machine = machine; + } + + @Override + public boolean isInitialized() { + return core!=null && core.checkValid(); + } + + @Override + public boolean recomputeMemory(Iterable components) { + computeMemory(components); + return true; + } + + private void computeMemory(Iterable components) { + int memory = 0; + for (ItemStack component : components) { + Item driver = Driver.driverFor(component); + if (driver instanceof Memory) { + Memory memoryDriver = (Memory) driver; + memory += memoryDriver.amount(component) * 256;//in integers + }// else if (driver instanceof DriverEEPROM$) { + + //} + } + memory = Math.min(Math.max(memory, 0), Settings.get().maxTotalRam()); + if(memory!=memSize){ + + } + } + + @Override + public boolean initialize() { + core=new AvrCore(); + + computeMemory(this.machine.host().internalComponents()); + + if(isInitialized()) { + machine.beep("."); + return true; + } + return false; + } + + @Override + public void close() { + core=null; + tempData=null; + delay=0; + } + + @Override + public void runSynchronized() { + core.cycle(); + } + + @Override + public ExecutionResult runThreaded(boolean isSynchronizedReturn) { + if (core.awoken) { + delay=0; + for (int load=0; load < 512;) { + load+=core.getInstruction().getCost(core); + ExecutionEvent executionEvent = core.cpuCycleForce(); + if (executionEvent != null) { + if (executionEvent.throwable instanceof DelayEvent) { + delay = executionEvent.data[0]; + break; + } else if (executionEvent.throwable instanceof DebugEvent) { + if(debugRun) { + //aBaseMetaTileEntity.setActive(false); + break; + } + } + } + } + }else if(delay>0){ + delay--; + if(delay==0){ + core.awoken=true; + } + } + return null; + } + + @Override + public void onSignal() { + Signal signal=machine.popSignal(); + + core.interruptsHandle(); + } + + @Override + public void onConnect() { + //init network components, in case init was called from load logic (pre first tick?) + } + + @Override + public void load(NBTTagCompound avr) { + debugRun = avr.getBoolean("debugRun"); + delay = avr.getInteger("delay"); + core.active = avr.getBoolean("active"); + core.awoken = (avr.getBoolean("awoken")); + core.programCounter = avr.getInteger("programCounter"); + InstructionRegistry registry = + InstructionRegistry.REGISTRIES. + get(avr.getString("instructionRegistry")); + if (registry != null) { + byte[] instructions = SaveHandler.load(avr, this.machine.node().address() + "_instructionsMemory"); + byte[] param0 = SaveHandler.load(avr, this.machine.node().address() + "_param0Memory"); + byte[] param1 = SaveHandler.load(avr, this.machine.node().address() + "_param1Memory"); + if (instructions != null && param0 != null && param1 != null && + instructions.length > 0 && param0.length > 0 && param1.length > 0) { + int[] instr = null, par0 = null, par1 = null; + try { + GZIPInputStream gzis = new GZIPInputStream(new ByteArrayInputStream(instructions)); + instr = Converter.readInts(IOUtils.toByteArray(gzis)); + IOUtils.closeQuietly(gzis); + } catch (IOException e) { + TecTech.LOGGER.error("Failed to decompress instructions memory from disk."); + e.printStackTrace(); + } + try { + GZIPInputStream gzis = new GZIPInputStream(new ByteArrayInputStream(param0)); + par0 = Converter.readInts(IOUtils.toByteArray(gzis)); + IOUtils.closeQuietly(gzis); + } catch (IOException e) { + TecTech.LOGGER.error("Failed to decompress param0 memory from disk."); + e.printStackTrace(); + } + try { + GZIPInputStream gzis = new GZIPInputStream(new ByteArrayInputStream(param1)); + par1 = Converter.readInts(IOUtils.toByteArray(gzis)); + IOUtils.closeQuietly(gzis); + } catch (IOException e) { + TecTech.LOGGER.error("Failed to decompress param1 memory from disk."); + e.printStackTrace(); + } + if (instr != null && par0 != null && par1 != null && + instr.length==par0.length && instr.length==par1.length) { + core.setProgramMemory(new ProgramMemory( + registry, + avr.getBoolean("immersive"), + instr, + par0, + par1)); + } + } + } + if(avr.hasKey("eepromSize")){ + core.restoreEepromDefinition(EepromMemory.make(avr.getInteger("eepromSize"))); + } + byte[] data = SaveHandler.load(avr, this.machine.node().address() + "_dataMemory"); + if(data!=null && data.length > 0) { + try { + GZIPInputStream gzis = new GZIPInputStream(new ByteArrayInputStream(data)); + tempData = Converter.readInts(IOUtils.toByteArray(gzis)); + IOUtils.closeQuietly(gzis); + } catch (IOException e) { + TecTech.LOGGER.error("Failed to decompress data memory from disk."); + e.printStackTrace(); + } + } + core.checkValid(); + } + + @Override + public void save(NBTTagCompound avr) { + avr.setBoolean("debugRun",debugRun); + avr.setInteger("delay",delay); + avr.setBoolean("active",core.active); + avr.setBoolean("awoken",core.awoken); + avr.setInteger("programCounter",core.programCounter); + ProgramMemory programMemory=core.getProgramMemory(); + if(programMemory!=null){ + try { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + GZIPOutputStream gzos = new GZIPOutputStream(baos); + gzos.write(Converter.writeInts(programMemory.instructions)); + gzos.close(); + SaveHandler.scheduleSave(machine.host(), avr, machine.node().address() + "_instructionsMemory", baos.toByteArray()); + } catch (IOException e) { + TecTech.LOGGER.error("Failed to compress instructions memory to disk"); + e.printStackTrace(); + } + try { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + GZIPOutputStream gzos = new GZIPOutputStream(baos); + gzos.write(Converter.writeInts(programMemory.param0)); + gzos.close(); + SaveHandler.scheduleSave(machine.host(), avr, machine.node().address() + "_param0Memory", baos.toByteArray()); + } catch (IOException e) { + TecTech.LOGGER.error("Failed to compress param0 memory to disk"); + e.printStackTrace(); + } + try { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + GZIPOutputStream gzos = new GZIPOutputStream(baos); + gzos.write(Converter.writeInts(programMemory.param1)); + gzos.close(); + SaveHandler.scheduleSave(machine.host(), avr, machine.node().address() + "_param1Memory", baos.toByteArray()); + } catch (IOException e) { + TecTech.LOGGER.error("Failed to compress param1 memory to disk"); + e.printStackTrace(); + } + avr.setBoolean("immersive",programMemory.immersiveOperands); + avr.setString("instructionRegistry",programMemory.registry.toString()); + } + RemovableMemory eeprom=core.getEepromMemory(); + if(eeprom!=null){ + avr.setInteger("eepromSize",eeprom.getDefinition().getSize()); + } + if(core.dataMemory!=null) { + try { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + GZIPOutputStream gzos = new GZIPOutputStream(baos); + gzos.write(Converter.writeInts(core.dataMemory)); + gzos.close(); + SaveHandler.scheduleSave(machine.host(), avr, machine.node().address() + "_dataMemory", baos.toByteArray()); + } catch (IOException e) { + TecTech.LOGGER.error("Failed to compress data memory to disk"); + e.printStackTrace(); + } + } + } +} diff --git a/src/main/java/com/github/technus/tectech/thing/item/AvrProgrammer.java b/src/main/java/com/github/technus/tectech/thing/item/AvrProgrammer.java index 1d61d0744c..277c2de355 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/AvrProgrammer.java +++ b/src/main/java/com/github/technus/tectech/thing/item/AvrProgrammer.java @@ -12,7 +12,6 @@ import dan200.computercraft.api.filesystem.IWritableMount; import dan200.computercraft.api.media.IMedia; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import li.cil.oc.api.fs.FileSystem; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; @@ -32,9 +31,9 @@ import static com.github.technus.tectech.Reference.MODID; import static com.github.technus.tectech.loader.gui.CreativeTabTecTech.creativeTabTecTech; @Optional.InterfaceList( - @Optional.Interface(iface="dan200.computercraft.api.media.IMedia",modid = "ComputerCraft"), - @Optional.Interface(iface="li.cil.oc.api.fs.FileSystem",modid="OpenComputers")) -public class AvrProgrammer extends Item implements IMedia,FileSystem { + {@Optional.Interface(iface="dan200.computercraft.api.media.IMedia",modid = "ComputerCraft"), + @Optional.Interface(iface="li.cil.oc.api.fs.FileSystem",modid="OpenComputers")}) +public class AvrProgrammer extends Item implements IMedia { public static AvrProgrammer INSTANCE=new AvrProgrammer(); private AvrProgrammer(){ -- cgit From 2edad307e1648142d52808590c102a0a9161769e Mon Sep 17 00:00:00 2001 From: Tec Date: Tue, 27 Aug 2019 22:33:22 +0200 Subject: GENERICS --- .../thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java') 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 41d32bdcf2..c4ea1d91df 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 @@ -33,13 +33,13 @@ import static java.lang.Math.round; public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryBuffer { - private final static HashSet sparkList = new HashSet(); + private final static HashSet sparkList = new HashSet<>(); private byte sparkCount = 0; private int maxTier = 4; //Max tier of transceiver private int minTier = 0; //Min tier of transceiver - public Map eTeslaMap = new HashMap();//Tesla Map to map them tesla bois! + public Map eTeslaMap = new HashMap<>();//Tesla Map to map them tesla bois! private int transferRadiusMax = 20; private int transferRadiusMin = 4; -- cgit From 2928aac711dea97c93441a1886816a0954623da7 Mon Sep 17 00:00:00 2001 From: Bass Date: Wed, 28 Aug 2019 13:11:51 +0100 Subject: Minor refactors to please the gods --- src/main/java/com/github/technus/tectech/Util.java | 49 -------------------- .../tectech/mechanics/data/RendererMessage.java | 9 ++-- .../technus/tectech/mechanics/data/thaumSpark.java | 53 ++++++++++++++++++++++ .../GT_MetaTileEntity_Hatch_InputElemental.java | 2 +- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 6 +-- .../single/GT_MetaTileEntity_TeslaCoil.java | 5 +- 6 files changed, 64 insertions(+), 60 deletions(-) create mode 100644 src/main/java/com/github/technus/tectech/mechanics/data/thaumSpark.java (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/Util.java b/src/main/java/com/github/technus/tectech/Util.java index 70e3a4562c..f73bb30c52 100644 --- a/src/main/java/com/github/technus/tectech/Util.java +++ b/src/main/java/com/github/technus/tectech/Util.java @@ -161,55 +161,6 @@ public final class Util { return result.toString(); } - public static class thaumSpark implements Serializable { - private static final long serialVersionUID = -7037856938316679566L; - public int x, y, z, wID; - public byte xR, yR, zR; - - public thaumSpark(){ - this.x = 0; - this.z = 0; - this.y = 0; - - this.xR = 0; - this.yR = 0; - this.zR = 0; - - this.wID = 0; - } - - public thaumSpark(int x, int y, int z, byte xR, byte yR, byte zR, int wID) { - this.x = x; - this.z = z; - this.y = y; - - this.xR = xR; - this.yR = yR; - this.zR = zR; - - this.wID = wID; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - thaumSpark that = (thaumSpark) o; - return x == that.x && - y == that.y && - z == that.z && - wID == that.wID && - xR == that.xR && - yR == that.yR && - zR == that.zR; - } - - @Override - public int hashCode() { - return Objects.hash(x, y, z, wID, xR, yR, zR); - } - } - public static float map(float x, float in_min, float in_max, float out_min, float out_max) { return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; } diff --git a/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java b/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java index a4e5bb318e..792255cd4d 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java +++ b/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java @@ -1,6 +1,5 @@ package com.github.technus.tectech.mechanics.data; -import com.github.technus.tectech.Util; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.network.simpleimpl.IMessage; import cpw.mods.fml.common.network.simpleimpl.MessageContext; @@ -16,7 +15,7 @@ import java.util.Arrays; import java.util.HashSet; public class RendererMessage implements IMessage { - HashSet sparkList = new HashSet(); + HashSet sparkList = new HashSet(); public RendererMessage() { } @@ -30,7 +29,7 @@ public class RendererMessage implements IMessage { InputStream is = new ByteArrayInputStream(boop); ObjectInputStream ois = new ObjectInputStream(is); Object data = ois.readObject(); - sparkList = (HashSet) data; + sparkList = (HashSet) data; } catch (IOException | ClassNotFoundException ex) { } } @@ -52,7 +51,7 @@ public class RendererMessage implements IMessage { public RendererData() { } - public RendererData(HashSet eSparkList) { + public RendererData(HashSet eSparkList) { sparkList = eSparkList; } } @@ -61,7 +60,7 @@ public class RendererMessage implements IMessage { public static class ClientHandler extends AbstractClientMessageHandler { @Override public IMessage handleClientMessage(EntityPlayer pPlayer, RendererData pMessage, MessageContext pCtx) { - for (Util.thaumSpark sp : pMessage.sparkList) { + for (thaumSpark sp : pMessage.sparkList) { thaumLightning(sp.x, sp.y, sp.z, sp.xR, sp.yR, sp.zR, sp.wID); } pMessage.sparkList.clear(); diff --git a/src/main/java/com/github/technus/tectech/mechanics/data/thaumSpark.java b/src/main/java/com/github/technus/tectech/mechanics/data/thaumSpark.java new file mode 100644 index 0000000000..df578e7849 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/mechanics/data/thaumSpark.java @@ -0,0 +1,53 @@ +package com.github.technus.tectech.mechanics.data; + +import java.io.Serializable; +import java.util.Objects; + +public class thaumSpark implements Serializable { + private static final long serialVersionUID = -7037856938316679566L; + public int x, y, z, wID; + public byte xR, yR, zR; + + public thaumSpark(){ + this.x = 0; + this.z = 0; + this.y = 0; + + this.xR = 0; + this.yR = 0; + this.zR = 0; + + this.wID = 0; + } + + public thaumSpark(int x, int y, int z, byte xR, byte yR, byte zR, int wID) { + this.x = x; + this.z = z; + this.y = y; + + this.xR = xR; + this.yR = yR; + this.zR = zR; + + this.wID = wID; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + thaumSpark that = (thaumSpark) o; + return x == that.x && + y == that.y && + z == that.z && + wID == that.wID && + xR == that.xR && + yR == that.yR && + zR == that.zR; + } + + @Override + public int hashCode() { + return Objects.hash(x, y, z, wID, xR, yR, zR); + } +} diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_InputElemental.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_InputElemental.java index 466b0e64af..2b2c54526f 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_InputElemental.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_InputElemental.java @@ -47,4 +47,4 @@ public class GT_MetaTileEntity_Hatch_InputElemental extends GT_MetaTileEntity_Ha public boolean canConnect(byte side) { return isInputFacing(side); } -} +} \ No newline at end of file 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 40ea3084c8..08050ad40c 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 @@ -2,9 +2,9 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.CommonValues; import com.github.technus.tectech.TecTech; -import com.github.technus.tectech.Util; import com.github.technus.tectech.loader.NetworkDispatcher; import com.github.technus.tectech.mechanics.data.RendererMessage; +import com.github.technus.tectech.mechanics.data.thaumSpark; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil_Ultimate; import com.github.technus.tectech.thing.metaTileEntity.IConstructable; @@ -42,7 +42,7 @@ import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStat import static gregtech.api.enums.GT_Values.E; public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { - private final static HashSet sparkList = new HashSet(); + private final static HashSet sparkList = new HashSet<>(); private static Textures.BlockIcons.CustomIcon ScreenOFF; private static Textures.BlockIcons.CustomIcon ScreenON; @@ -537,7 +537,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock int wID = mte.getWorld().provider.dimensionId; - sparkList.add(new Util.thaumSpark(posTop[0], posTop[1], posTop[2], xR, yR, zR, wID)); + sparkList.add(new thaumSpark(posTop[0], posTop[1], posTop[2], xR, yR, zR, wID)); } @Override 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 c4ea1d91df..802fa8fb21 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 @@ -5,6 +5,7 @@ import com.github.technus.tectech.TecTech; import com.github.technus.tectech.Util; import com.github.technus.tectech.loader.NetworkDispatcher; import com.github.technus.tectech.mechanics.data.RendererMessage; +import com.github.technus.tectech.mechanics.data.thaumSpark; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil_Ultimate; import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_TM_teslaCoil; @@ -33,7 +34,7 @@ import static java.lang.Math.round; public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryBuffer { - private final static HashSet sparkList = new HashSet<>(); + private final static HashSet sparkList = new HashSet<>(); private byte sparkCount = 0; private int maxTier = 4; //Max tier of transceiver @@ -213,7 +214,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB int wID = mte.getWorld().provider.dimensionId; - sparkList.add(new Util.thaumSpark(x, y, z, xR, yR, zR, wID)); + sparkList.add(new thaumSpark(x, y, z, xR, yR, zR, wID)); } private long getEnergyEfficiency(long voltage, int distance, boolean overDriveToggle) { -- cgit From a977ef0b2795af0c846889d86b3f8108c4d88d74 Mon Sep 17 00:00:00 2001 From: Bass Date: Thu, 29 Aug 2019 01:25:58 +0100 Subject: Further sacrifices --- .../dreamcraft/NoDreamCraftMachineLoader.java | 101 ++++++--------------- .../tectech/mechanics/data/RendererMessage.java | 8 +- .../technus/tectech/mechanics/data/thaumSpark.java | 8 +- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 6 +- .../single/GT_MetaTileEntity_TT_Transformer.java | 54 +++++++++++ .../single/GT_MetaTileEntity_TeslaCoil.java | 6 +- .../single/GT_MetaTileEntity_WetTransformer.java | 39 ++------ src/main/resources/assets/tectech/lang/en_US.lang | 25 ++--- 8 files changed, 117 insertions(+), 130 deletions(-) create mode 100644 src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TT_Transformer.java (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/NoDreamCraftMachineLoader.java b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/NoDreamCraftMachineLoader.java index 0570299f4e..7807dd921e 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/NoDreamCraftMachineLoader.java +++ b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/NoDreamCraftMachineLoader.java @@ -4,6 +4,7 @@ import com.github.technus.tectech.Reference; import com.github.technus.tectech.TecTech; import com.github.technus.tectech.Util; import com.github.technus.tectech.thing.CustomItemList; +import com.github.technus.tectech.thing.metaTileEntity.single.GT_MetaTileEntity_TT_Transformer; import com.github.technus.tectech.thing.metaTileEntity.single.GT_MetaTileEntity_WetTransformer; import cpw.mods.fml.common.Loader; import gregtech.api.enums.GT_Values; @@ -11,7 +12,6 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Transformer; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; @@ -41,9 +41,7 @@ public class NoDreamCraftMachineLoader implements Runnable { public void run() { try { CustomItemList.WetTransformer_LV_ULV.set(new GT_MetaTileEntity_WetTransformer( - 12000, "wettransformer.tier.00", "Ultra Low Voltage Power Transformer", 0, - //LV -> ULV (Use Soft Mallet to invert) - StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.00.desc")).getStackForm(1L)); + 12000, "wettransformer.tier.00", "Ultra Low Voltage Power Transformer", 0).getStackForm(1L));//LV -> ULV (Use Soft Mallet to invert) } catch (IllegalArgumentException e) { System.out.println(METATILEENTITIES[12000].getClass().getCanonicalName()); TecTech.LOGGER.error(e); @@ -52,74 +50,46 @@ public class NoDreamCraftMachineLoader implements Runnable { } CustomItemList.WetTransformer_MV_LV.set(new GT_MetaTileEntity_WetTransformer( - 12001, "wetransformer.tier.01", "Low Voltage Power Transformer", 1, - //MV -> LV (Use Soft Mallet to invert) - StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.01.desc")).getStackForm(1L)); + 12001, "wetransformer.tier.01", "Low Voltage Power Transformer", 1).getStackForm(1L));//MV -> LV (Use Soft Mallet to invert) CustomItemList.WetTransformer_HV_MV.set(new GT_MetaTileEntity_WetTransformer( - 12002, "wettransformer.tier.02", "Medium Voltage Power Transformer", 2, - //HV -> MV (Use Soft Mallet to invert) - StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.02.desc")).getStackForm(1L)); + 12002, "wettransformer.tier.02", "Medium Voltage Power Transformer", 2).getStackForm(1L));//HV -> MV (Use Soft Mallet to invert) CustomItemList.WetTransformer_EV_HV.set(new GT_MetaTileEntity_WetTransformer( - 12003, "wettransformer.tier.03", "High Voltage Power Transformer", 3, - //EV -> HV (Use Soft Mallet to invert) - StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.03.desc")).getStackForm(1L)); + 12003, "wettransformer.tier.03", "High Voltage Power Transformer", 3).getStackForm(1L));//EV -> HV (Use Soft Mallet to invert) CustomItemList.WetTransformer_IV_EV.set(new GT_MetaTileEntity_WetTransformer( - 12004, "wettransformer.tier.04", "Extreme Power Transformer", 4, - //IV -> EV (Use Soft Mallet to invert) - StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.04.desc")).getStackForm(1L)); + 12004, "wettransformer.tier.04", "Extreme Power Transformer", 4).getStackForm(1L));//IV -> EV (Use Soft Mallet to invert) CustomItemList.WetTransformer_LuV_IV.set(new GT_MetaTileEntity_WetTransformer( - 12005, "wettransformer.tier.05", "Insane Power Transformer", 5, - //LuV -> IV (Use Soft Mallet to invert) - StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.05.desc")).getStackForm(1L)); + 12005, "wettransformer.tier.05", "Insane Power Transformer", 5).getStackForm(1L));//LuV -> IV (Use Soft Mallet to invert) CustomItemList.WetTransformer_ZPM_LuV.set(new GT_MetaTileEntity_WetTransformer( - 12006, "wettransformer.tier.06", "Ludicrous Power Transformer", 6, - //ZPM -> LuV (Use Soft Mallet to invert) - StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.06.desc")).getStackForm(1L)); + 12006, "wettransformer.tier.06", "Ludicrous Power Transformer", 6).getStackForm(1L));//ZPM -> LuV (Use Soft Mallet to invert) CustomItemList.WetTransformer_UV_ZPM.set(new GT_MetaTileEntity_WetTransformer( - 12007, "wettransformer.tier.07", "ZPM Voltage Power Transformer", 7, - //UV -> ZPM (Use Soft Mallet to invert) - StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.07.desc")).getStackForm(1L)); + 12007, "wettransformer.tier.07", "ZPM Voltage Power Transformer", 7).getStackForm(1L));//UV -> ZPM (Use Soft Mallet to invert) CustomItemList.WetTransformer_UHV_UV.set(new GT_MetaTileEntity_WetTransformer( - 12008, "wettransformer.tier.08", "Ultimate Power Transformer", 8, - //UHV -> UV (Use Soft Mallet to invert) - StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.08.desc")).getStackForm(1L)); + 12008, "wettransformer.tier.08", "Ultimate Power Transformer", 8).getStackForm(1L));//UHV -> UV (Use Soft Mallet to invert) CustomItemList.WetTransformer_UEV_UHV.set(new GT_MetaTileEntity_WetTransformer( - 12009, "wettransformer.tier.09", "Highly Ultimate Power Transformer", 9, - //UEV -> UHV (Use Soft Mallet to invert) - StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.09.desc")).getStackForm(1L)); + 12009, "wettransformer.tier.09", "Highly Ultimate Power Transformer", 9).getStackForm(1L));//UEV -> UHV (Use Soft Mallet to invert) CustomItemList.WetTransformer_UIV_UEV.set(new GT_MetaTileEntity_WetTransformer( - 12010, "wettransformer.tier.10", "Extremely Ultimate Power Transformer", 10, - //UIV -> UEV (Use Soft Mallet to invert) - StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.10.desc")).getStackForm(1L)); + 12010, "wettransformer.tier.10", "Extremely Ultimate Power Transformer", 10).getStackForm(1L));//UIV -> UEV (Use Soft Mallet to invert) CustomItemList.WetTransformer_UMV_UIV.set(new GT_MetaTileEntity_WetTransformer( - 12011, "wettransformer.tier.11", "Insanely Ultimate Power Transformer", 11, - //UMV -> UIV (Use Soft Mallet to invert) - StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.11.desc")).getStackForm(1L)); + 12011, "wettransformer.tier.11", "Insanely Ultimate Power Transformer", 11).getStackForm(1L));//UMV -> UIV (Use Soft Mallet to invert) CustomItemList.WetTransformer_UXV_UMV.set(new GT_MetaTileEntity_WetTransformer( - 12012, "wettransformer.tier.12", "Mega Ultimate Power Transformer", 12, - //UXV -> UMV (Use Soft Mallet to invert) - StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.12.desc")).getStackForm(1L)); + 12012, "wettransformer.tier.12", "Mega Ultimate Power Transformer", 12).getStackForm(1L));//UXV -> UMV (Use Soft Mallet to invert) CustomItemList.WetTransformer_OPV_UXV.set(new GT_MetaTileEntity_WetTransformer( - 12013, "wettransformer.tier.13", "Extended Mega Ultimate Power Transformer", 13, - //OPV -> UXV (Use Soft Mallet to invert) - StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.13.desc")).getStackForm(1L)); + 12013, "wettransformer.tier.13", "Extended Mega Ultimate Power Transformer", 13).getStackForm(1L));//OPV -> UXV (Use Soft Mallet to invert) CustomItemList.WetTransformer_MAXV_OPV.set(new GT_MetaTileEntity_WetTransformer( - 12014, "wettransformer.tier.14", "Overpowered Power Transformer", 14, - //MAX -> OPV (Use Soft Mallet to invert) - StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier.14.desc")).getStackForm(1L)); + 12014, "wettransformer.tier.14", "Overpowered Power Transformer", 14).getStackForm(1L));//MAX -> OPV (Use Soft Mallet to invert) try { MetaTileEntity temp; @@ -186,57 +156,44 @@ public class NoDreamCraftMachineLoader implements Runnable { } CustomItemList.Hull_MAXV.set(temp.getStackForm(1L)); - - temp = new GT_MetaTileEntity_Transformer( - 11220, "transformer.tier.09", "Highly Ultimate Transformer", 9, - //UEV -> UHV (Use Soft Mallet to invert) - StatCollector.translateToLocal("gt.blockmachines.transformer.tier.09.desc")); + temp = new GT_MetaTileEntity_TT_Transformer( + 11220, "tt.transformer.tier.09", "Highly Ultimate Transformer", 9);//UEV -> UHV (Use Soft Mallet to invert) CustomItemList.Transformer_UEV_UHV.set(temp.getStackForm(1L)); - temp = new GT_MetaTileEntity_Transformer( - 11221, "transformer.tier.10", "Extremely Ultimate Transformer", 10, - //UIV -> UEV (Use Soft Mallet to invert) - StatCollector.translateToLocal("gt.blockmachines.transformer.tier.10.desc")); + temp = new GT_MetaTileEntity_TT_Transformer( + 11221, "tt.transformer.tier.10", "Extremely Ultimate Transformer", 10);//UIV -> UEV (Use Soft Mallet to invert) Util.setTier(10, temp); if (GT_Values.GT.isClientSide()) { field.set(temp, method.invoke(temp, iTexture)); } CustomItemList.Transformer_UIV_UEV.set(temp.getStackForm(1L)); - temp = new GT_MetaTileEntity_Transformer( - 11222, "transformer.tier.11", "Insanely Ultimate Transformer", 11, - //UMV -> UIV (Use Soft Mallet to invert) - StatCollector.translateToLocal("gt.blockmachines.transformer.tier.11.desc")); + temp = new GT_MetaTileEntity_TT_Transformer( + 11222, "tt.transformer.tier.11", "Insanely Ultimate Transformer", 11);//UMV -> UIV (Use Soft Mallet to invert) Util.setTier(11, temp); if (GT_Values.GT.isClientSide()) { field.set(temp, method.invoke(temp, iTexture)); } CustomItemList.Transformer_UMV_UIV.set(temp.getStackForm(1L)); - temp = new GT_MetaTileEntity_Transformer( - 11223, "transformer.tier.12", "Mega Ultimate Transformer", 12, - //UXV -> UMV (Use Soft Mallet to invert) - StatCollector.translateToLocal("gt.blockmachines.transformer.tier.12.desc")); + temp = new GT_MetaTileEntity_TT_Transformer( + 11223, "tt.transformer.tier.12", "Mega Ultimate Transformer", 12);//UXV -> UMV (Use Soft Mallet to invert) Util.setTier(12, temp); if (GT_Values.GT.isClientSide()) { field.set(temp, method.invoke(temp, iTexture)); } CustomItemList.Transformer_UXV_UMV.set(temp.getStackForm(1L)); - temp = new GT_MetaTileEntity_Transformer( - 11224, "transformer.tier.13", "Extended Mega Ultimate Transformer", 13, - //OPV -> UXV (Use Soft Mallet to invert) - StatCollector.translateToLocal("gt.blockmachines.transformer.tier.13.desc")); + temp = new GT_MetaTileEntity_TT_Transformer( + 11224, "tt.transformer.tier.13", "Extended Mega Ultimate Transformer", 13);//OPV -> UXV (Use Soft Mallet to invert) Util.setTier(13, temp); if (GT_Values.GT.isClientSide()) { field.set(temp, method.invoke(temp, iTexture)); } CustomItemList.Transformer_OPV_UXV.set(temp.getStackForm(1L)); - temp = new GT_MetaTileEntity_Transformer( - 11225, "transformer.tier.14", "Overpowered Transformer", 14, - //MAX -> OPV (Use Soft Mallet to invert) - StatCollector.translateToLocal("gt.blockmachines.transformer.tier.14.desc")); + temp = new GT_MetaTileEntity_TT_Transformer( + 11225, "tt.transformer.tier.14", "Overpowered Transformer", 14);//MAX -> OPV (Use Soft Mallet to invert) Util.setTier(14, temp); if (GT_Values.GT.isClientSide()) { field.set(temp, method.invoke(temp, iTexture)); @@ -308,4 +265,4 @@ public class NoDreamCraftMachineLoader implements Runnable { e.printStackTrace(); } } -} +} \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java b/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java index 792255cd4d..449b68a846 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java +++ b/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java @@ -15,7 +15,7 @@ import java.util.Arrays; import java.util.HashSet; public class RendererMessage implements IMessage { - HashSet sparkList = new HashSet(); + HashSet sparkList = new HashSet(); public RendererMessage() { } @@ -29,7 +29,7 @@ public class RendererMessage implements IMessage { InputStream is = new ByteArrayInputStream(boop); ObjectInputStream ois = new ObjectInputStream(is); Object data = ois.readObject(); - sparkList = (HashSet) data; + sparkList = (HashSet) data; } catch (IOException | ClassNotFoundException ex) { } } @@ -51,7 +51,7 @@ public class RendererMessage implements IMessage { public RendererData() { } - public RendererData(HashSet eSparkList) { + public RendererData(HashSet eSparkList) { sparkList = eSparkList; } } @@ -60,7 +60,7 @@ public class RendererMessage implements IMessage { public static class ClientHandler extends AbstractClientMessageHandler { @Override public IMessage handleClientMessage(EntityPlayer pPlayer, RendererData pMessage, MessageContext pCtx) { - for (thaumSpark sp : pMessage.sparkList) { + for (ThaumSpark sp : pMessage.sparkList) { thaumLightning(sp.x, sp.y, sp.z, sp.xR, sp.yR, sp.zR, sp.wID); } pMessage.sparkList.clear(); diff --git a/src/main/java/com/github/technus/tectech/mechanics/data/thaumSpark.java b/src/main/java/com/github/technus/tectech/mechanics/data/thaumSpark.java index df578e7849..59462679de 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/data/thaumSpark.java +++ b/src/main/java/com/github/technus/tectech/mechanics/data/thaumSpark.java @@ -3,12 +3,12 @@ package com.github.technus.tectech.mechanics.data; import java.io.Serializable; import java.util.Objects; -public class thaumSpark implements Serializable { +public class ThaumSpark implements Serializable { private static final long serialVersionUID = -7037856938316679566L; public int x, y, z, wID; public byte xR, yR, zR; - public thaumSpark(){ + public ThaumSpark(){ this.x = 0; this.z = 0; this.y = 0; @@ -20,7 +20,7 @@ public class thaumSpark implements Serializable { this.wID = 0; } - public thaumSpark(int x, int y, int z, byte xR, byte yR, byte zR, int wID) { + public ThaumSpark(int x, int y, int z, byte xR, byte yR, byte zR, int wID) { this.x = x; this.z = z; this.y = y; @@ -36,7 +36,7 @@ public class thaumSpark implements Serializable { public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; - thaumSpark that = (thaumSpark) o; + ThaumSpark that = (ThaumSpark) o; return x == that.x && y == that.y && z == that.z && 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 08050ad40c..a82bf9be99 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 @@ -4,7 +4,7 @@ import com.github.technus.tectech.CommonValues; import com.github.technus.tectech.TecTech; import com.github.technus.tectech.loader.NetworkDispatcher; import com.github.technus.tectech.mechanics.data.RendererMessage; -import com.github.technus.tectech.mechanics.data.thaumSpark; +import com.github.technus.tectech.mechanics.data.ThaumSpark; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil_Ultimate; import com.github.technus.tectech.thing.metaTileEntity.IConstructable; @@ -42,7 +42,7 @@ import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStat import static gregtech.api.enums.GT_Values.E; public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { - private final static HashSet sparkList = new HashSet<>(); + private final static HashSet sparkList = new HashSet<>(); private static Textures.BlockIcons.CustomIcon ScreenOFF; private static Textures.BlockIcons.CustomIcon ScreenON; @@ -537,7 +537,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock int wID = mte.getWorld().provider.dimensionId; - sparkList.add(new thaumSpark(posTop[0], posTop[1], posTop[2], xR, yR, zR, wID)); + sparkList.add(new ThaumSpark(posTop[0], posTop[1], posTop[2], xR, yR, zR, wID)); } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TT_Transformer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TT_Transformer.java new file mode 100644 index 0000000000..325fe4906b --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TT_Transformer.java @@ -0,0 +1,54 @@ +package com.github.technus.tectech.thing.metaTileEntity.single; + +import com.github.technus.tectech.CommonValues; +import com.github.technus.tectech.Util; +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.metatileentity.implementations.GT_MetaTileEntity_Transformer; +import net.minecraft.util.StatCollector; + +import static com.github.technus.tectech.thing.metaTileEntity.Textures.*; + +public class GT_MetaTileEntity_TT_Transformer extends GT_MetaTileEntity_Transformer { + public GT_MetaTileEntity_TT_Transformer(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, ""); + Util.setTier(aTier, this); + } + + public GT_MetaTileEntity_TT_Transformer(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + Util.setTier(aTier, this); + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_TT_Transformer(mName, mTier, mDescription, mTextures); + } + + @Override + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + ITexture[][][] rTextures = new ITexture[12][17][]; + for (byte b = -1; b < 16; b++) { + rTextures[0][b + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][b + 1], OVERLAYS_ENERGY_OUT_MULTI_TT[mTier]}; + rTextures[1][b + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][b + 1], OVERLAYS_ENERGY_OUT_MULTI_TT[mTier]}; + rTextures[2][b + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][b + 1], OVERLAYS_ENERGY_OUT_MULTI_TT[mTier]}; + rTextures[3][b + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][b + 1], OVERLAYS_ENERGY_IN_POWER_TT[mTier + 1]}; + rTextures[4][b + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][b + 1], OVERLAYS_ENERGY_IN_POWER_TT[mTier + 1]}; + rTextures[5][b + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][b + 1], OVERLAYS_ENERGY_IN_POWER_TT[mTier + 1]}; + rTextures[6][b + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][b + 1], OVERLAYS_ENERGY_IN_MULTI_TT[mTier]}; + rTextures[7][b + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][b + 1], OVERLAYS_ENERGY_IN_MULTI_TT[mTier]}; + rTextures[8][b + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][b + 1], OVERLAYS_ENERGY_IN_MULTI_TT[mTier]}; + rTextures[9][b + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][b + 1], OVERLAYS_ENERGY_OUT_POWER_TT[mTier + 1]}; + rTextures[10][b + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][b + 1], OVERLAYS_ENERGY_OUT_POWER_TT[mTier + 1]}; + rTextures[11][b + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][b + 1], OVERLAYS_ENERGY_OUT_POWER_TT[mTier + 1]}; + } + return rTextures; + } + + @Override + public String[] getDescription() { + return new String[]{StatCollector.translateToLocal("gt.blockmachines.tt.transformer.tier." + (mTier > 9 ? "" : "0") + mTier + ".desc"), CommonValues.TEC_MARK_GENERAL}; + } +} \ No newline at end of file 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 802fa8fb21..efa85a6ea5 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 @@ -5,7 +5,7 @@ import com.github.technus.tectech.TecTech; import com.github.technus.tectech.Util; import com.github.technus.tectech.loader.NetworkDispatcher; import com.github.technus.tectech.mechanics.data.RendererMessage; -import com.github.technus.tectech.mechanics.data.thaumSpark; +import com.github.technus.tectech.mechanics.data.ThaumSpark; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil_Ultimate; import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_TM_teslaCoil; @@ -34,7 +34,7 @@ import static java.lang.Math.round; public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryBuffer { - private final static HashSet sparkList = new HashSet<>(); + private final static HashSet sparkList = new HashSet<>(); private byte sparkCount = 0; private int maxTier = 4; //Max tier of transceiver @@ -214,7 +214,7 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB int wID = mte.getWorld().provider.dimensionId; - sparkList.add(new thaumSpark(x, y, z, xR, yR, zR, wID)); + sparkList.add(new ThaumSpark(x, y, z, xR, yR, zR, wID)); } private long getEnergyEfficiency(long voltage, int distance, boolean overDriveToggle) { diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_WetTransformer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_WetTransformer.java index 375e8ba655..d104ef0141 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_WetTransformer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_WetTransformer.java @@ -1,25 +1,20 @@ package com.github.technus.tectech.thing.metaTileEntity.single; import com.github.technus.tectech.CommonValues; -import com.github.technus.tectech.Util; -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.metatileentity.implementations.GT_MetaTileEntity_Transformer; +import net.minecraft.util.StatCollector; import static com.github.technus.tectech.CommonValues.V; -import static com.github.technus.tectech.thing.metaTileEntity.Textures.*; -public class GT_MetaTileEntity_WetTransformer extends GT_MetaTileEntity_Transformer { - public GT_MetaTileEntity_WetTransformer(int aID, String aName, String aNameRegional, int aTier, String aDescription) { - super(aID,aName,aNameRegional,aTier,aDescription); - Util.setTier(aTier,this); +public class GT_MetaTileEntity_WetTransformer extends GT_MetaTileEntity_TT_Transformer { + public GT_MetaTileEntity_WetTransformer(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier); } public GT_MetaTileEntity_WetTransformer(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { - super(aName,aTier,aDescription,aTextures); - Util.setTier(aTier,this); + super(aName, aTier, aDescription, aTextures); } @Override @@ -27,29 +22,9 @@ public class GT_MetaTileEntity_WetTransformer extends GT_MetaTileEntity_Transfor return new GT_MetaTileEntity_WetTransformer(mName, mTier, mDescription, mTextures); } - @Override - public ITexture[][][] getTextureSet(ITexture[] aTextures) { - ITexture[][][] rTextures = new ITexture[12][17][]; - for (byte b = -1; b < 16; b++) { - rTextures[0][b + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][b + 1], OVERLAYS_ENERGY_OUT_MULTI_TT[mTier]}; - rTextures[1][b + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][b + 1], OVERLAYS_ENERGY_OUT_MULTI_TT[mTier]}; - rTextures[2][b + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][b + 1], OVERLAYS_ENERGY_OUT_MULTI_TT[mTier]}; - rTextures[3][b + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][b + 1], OVERLAYS_ENERGY_IN_POWER_TT[mTier + 1]}; - rTextures[4][b + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][b + 1], OVERLAYS_ENERGY_IN_POWER_TT[mTier + 1]}; - rTextures[5][b + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][b + 1], OVERLAYS_ENERGY_IN_POWER_TT[mTier + 1]}; - rTextures[6][b + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][b + 1], OVERLAYS_ENERGY_IN_MULTI_TT[mTier]}; - rTextures[7][b + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][b + 1], OVERLAYS_ENERGY_IN_MULTI_TT[mTier]}; - rTextures[8][b + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][b + 1], OVERLAYS_ENERGY_IN_MULTI_TT[mTier]}; - rTextures[9][b + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][b + 1], OVERLAYS_ENERGY_OUT_POWER_TT[mTier + 1]}; - rTextures[10][b + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][b + 1], OVERLAYS_ENERGY_OUT_POWER_TT[mTier + 1]}; - rTextures[11][b + 1] = new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][b + 1], OVERLAYS_ENERGY_OUT_POWER_TT[mTier + 1]}; - } - return rTextures; - } - @Override public String[] getDescription() { - return new String[]{mDescription, "Accepts 16A and outputs 64A", CommonValues.TEC_MARK_GENERAL}; + return new String[]{StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier." + (mTier > 9 ? "" : "0") + mTier + ".desc"), "Accepts 16A and outputs 64A", CommonValues.TEC_MARK_GENERAL}; } @Override @@ -72,4 +47,4 @@ public class GT_MetaTileEntity_WetTransformer extends GT_MetaTileEntity_Transfor public long maxAmperesIn() { return getBaseMetaTileEntity().isAllowedToWork() ? 16 : 64; } -} +} \ No newline at end of file diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index 8d14c74dbe..755022d6a3 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -13,6 +13,7 @@ item.em.parametrizerMemoryCard.name=Parametrizer Memory Card item.em.EuMeterGT.name=GT EU meter item.tm.teslaCover.0.name=Tesla Coil Cover item.tm.teslaCover.1.name=Tesla Coil Cover Rich Edition +item.tm.teslaStaff.name=Tesla Staff item.tm.teslaCoilCapacitor.0.name=LV Tesla Capacitor item.tm.teslaCoilCapacitor.1.name=MV Tesla Capacitor @@ -68,18 +69,18 @@ gt.blockmachines.wetransformer.tier.13.desc=OPV -> UXV (Use Soft Mallet to inver gt.blockmachines.wetransformer.tier.14.name=Overpowered Power Transformer gt.blockmachines.wetransformer.tier.14.desc=MAX -> OPV (Use Soft Mallet to invert) -gt.blockmachines.transformer.tier.09.name=Highly Ultimate Transformer -gt.blockmachines.transformer.tier.09.desc=UEV -> UHV (Use Soft Mallet to invert) -gt.blockmachines.transformer.tier.10.name=Extremely Ultimate Transformer -gt.blockmachines.transformer.tier.10.desc=UIV -> UEV (Use Soft Mallet to invert) -gt.blockmachines.transformer.tier.11.name=Insanely Ultimate Transformer -gt.blockmachines.transformer.tier.11.desc=UMV -> UIV (Use Soft Mallet to invert) -gt.blockmachines.transformer.tier.12.name=Mega Ultimate Transformer -gt.blockmachines.transformer.tier.12.desc=UXV -> UMV (Use Soft Mallet to invert) -gt.blockmachines.transformer.tier.13.name=Extended Mega Ultimate Transformer -gt.blockmachines.transformer.tier.13.desc=OPV -> UXV (Use Soft Mallet to invert) -gt.blockmachines.transformer.tier.14.name=Overpowered Transformer -gt.blockmachines.transformer.tier.14.desc=MAX -> OPV (Use Soft Mallet to invert) +gt.blockmachines.tt.transformer.tier.09.name=Highly Ultimate Transformer +gt.blockmachines.tt.transformer.tier.09.desc=UEV -> UHV (Use Soft Mallet to invert) +gt.blockmachines.tt.transformer.tier.10.name=Extremely Ultimate Transformer +gt.blockmachines.tt.transformer.tier.10.desc=UIV -> UEV (Use Soft Mallet to invert) +gt.blockmachines.tt.transformer.tier.11.name=Insanely Ultimate Transformer +gt.blockmachines.tt.transformer.tier.11.desc=UMV -> UIV (Use Soft Mallet to invert) +gt.blockmachines.tt.transformer.tier.12.name=Mega Ultimate Transformer +gt.blockmachines.tt.transformer.tier.12.desc=UXV -> UMV (Use Soft Mallet to invert) +gt.blockmachines.tt.transformer.tier.13.name=Extended Mega Ultimate Transformer +gt.blockmachines.tt.transformer.tier.13.desc=OPV -> UXV (Use Soft Mallet to invert) +gt.blockmachines.tt.transformer.tier.14.name=Overpowered Transformer +gt.blockmachines.tt.transformer.tier.14.desc=MAX -> OPV (Use Soft Mallet to invert) gt.blockmachines.transformer.ha.tier.09.name=Highly Ultimate Hi-Amp Transformer gt.blockmachines.transformer.ha.tier.09.desc=UEV -> UHV (Use Soft Mallet to invert -- cgit From 0bfb4bdda5c233838d9c2c6a4dcab39d61dbe08e Mon Sep 17 00:00:00 2001 From: Bass Date: Thu, 29 Aug 2019 03:19:26 +0100 Subject: E --- .../tectech/mechanics/commands/ThaumSpark.java | 53 ++++++++++++++++++++++ .../tectech/mechanics/data/RendererMessage.java | 1 + .../technus/tectech/mechanics/data/thaumSpark.java | 53 ---------------------- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 2 +- .../single/GT_MetaTileEntity_TeslaCoil.java | 2 +- 5 files changed, 56 insertions(+), 55 deletions(-) create mode 100644 src/main/java/com/github/technus/tectech/mechanics/commands/ThaumSpark.java delete mode 100644 src/main/java/com/github/technus/tectech/mechanics/data/thaumSpark.java (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/mechanics/commands/ThaumSpark.java b/src/main/java/com/github/technus/tectech/mechanics/commands/ThaumSpark.java new file mode 100644 index 0000000000..e26d9855f4 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/mechanics/commands/ThaumSpark.java @@ -0,0 +1,53 @@ +package com.github.technus.tectech.mechanics.commands; + +import java.io.Serializable; +import java.util.Objects; + +public class ThaumSpark implements Serializable { + private static final long serialVersionUID = -7037856938316679566L; + public int x, y, z, wID; + public byte xR, yR, zR; + + public ThaumSpark(){ + this.x = 0; + this.z = 0; + this.y = 0; + + this.xR = 0; + this.yR = 0; + this.zR = 0; + + this.wID = 0; + } + + public ThaumSpark(int x, int y, int z, byte xR, byte yR, byte zR, int wID) { + this.x = x; + this.z = z; + this.y = y; + + this.xR = xR; + this.yR = yR; + this.zR = zR; + + this.wID = wID; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ThaumSpark that = (ThaumSpark) o; + return x == that.x && + y == that.y && + z == that.z && + wID == that.wID && + xR == that.xR && + yR == that.yR && + zR == that.zR; + } + + @Override + public int hashCode() { + return Objects.hash(x, y, z, wID, xR, yR, zR); + } +} diff --git a/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java b/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java index 449b68a846..9eed417718 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java +++ b/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java @@ -1,5 +1,6 @@ package com.github.technus.tectech.mechanics.data; +import com.github.technus.tectech.mechanics.commands.ThaumSpark; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.network.simpleimpl.IMessage; import cpw.mods.fml.common.network.simpleimpl.MessageContext; diff --git a/src/main/java/com/github/technus/tectech/mechanics/data/thaumSpark.java b/src/main/java/com/github/technus/tectech/mechanics/data/thaumSpark.java deleted file mode 100644 index 59462679de..0000000000 --- a/src/main/java/com/github/technus/tectech/mechanics/data/thaumSpark.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.github.technus.tectech.mechanics.data; - -import java.io.Serializable; -import java.util.Objects; - -public class ThaumSpark implements Serializable { - private static final long serialVersionUID = -7037856938316679566L; - public int x, y, z, wID; - public byte xR, yR, zR; - - public ThaumSpark(){ - this.x = 0; - this.z = 0; - this.y = 0; - - this.xR = 0; - this.yR = 0; - this.zR = 0; - - this.wID = 0; - } - - public ThaumSpark(int x, int y, int z, byte xR, byte yR, byte zR, int wID) { - this.x = x; - this.z = z; - this.y = y; - - this.xR = xR; - this.yR = yR; - this.zR = zR; - - this.wID = wID; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - ThaumSpark that = (ThaumSpark) o; - return x == that.x && - y == that.y && - z == that.z && - wID == that.wID && - xR == that.xR && - yR == that.yR && - zR == that.zR; - } - - @Override - public int hashCode() { - return Objects.hash(x, y, z, wID, xR, yR, zR); - } -} 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 a82bf9be99..fe36f730bb 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 @@ -4,7 +4,7 @@ import com.github.technus.tectech.CommonValues; import com.github.technus.tectech.TecTech; import com.github.technus.tectech.loader.NetworkDispatcher; import com.github.technus.tectech.mechanics.data.RendererMessage; -import com.github.technus.tectech.mechanics.data.ThaumSpark; +import com.github.technus.tectech.mechanics.commands.ThaumSpark; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil_Ultimate; import com.github.technus.tectech.thing.metaTileEntity.IConstructable; 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 efa85a6ea5..ac115388ba 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 @@ -5,7 +5,7 @@ import com.github.technus.tectech.TecTech; import com.github.technus.tectech.Util; import com.github.technus.tectech.loader.NetworkDispatcher; import com.github.technus.tectech.mechanics.data.RendererMessage; -import com.github.technus.tectech.mechanics.data.ThaumSpark; +import com.github.technus.tectech.mechanics.commands.ThaumSpark; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil_Ultimate; import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_TM_teslaCoil; -- cgit From 9c0b78d8016f735dd0dd2716de3312d9ad50dc6c Mon Sep 17 00:00:00 2001 From: Bass Date: Thu, 29 Aug 2019 03:19:48 +0100 Subject: A --- .../tectech/mechanics/commands/ThaumSpark.java | 53 ---------------------- .../tectech/mechanics/data/RendererMessage.java | 1 - .../technus/tectech/mechanics/data/ThaumSpark.java | 53 ++++++++++++++++++++++ .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 2 +- .../single/GT_MetaTileEntity_TeslaCoil.java | 2 +- 5 files changed, 55 insertions(+), 56 deletions(-) delete mode 100644 src/main/java/com/github/technus/tectech/mechanics/commands/ThaumSpark.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/data/ThaumSpark.java (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/mechanics/commands/ThaumSpark.java b/src/main/java/com/github/technus/tectech/mechanics/commands/ThaumSpark.java deleted file mode 100644 index e26d9855f4..0000000000 --- a/src/main/java/com/github/technus/tectech/mechanics/commands/ThaumSpark.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.github.technus.tectech.mechanics.commands; - -import java.io.Serializable; -import java.util.Objects; - -public class ThaumSpark implements Serializable { - private static final long serialVersionUID = -7037856938316679566L; - public int x, y, z, wID; - public byte xR, yR, zR; - - public ThaumSpark(){ - this.x = 0; - this.z = 0; - this.y = 0; - - this.xR = 0; - this.yR = 0; - this.zR = 0; - - this.wID = 0; - } - - public ThaumSpark(int x, int y, int z, byte xR, byte yR, byte zR, int wID) { - this.x = x; - this.z = z; - this.y = y; - - this.xR = xR; - this.yR = yR; - this.zR = zR; - - this.wID = wID; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - ThaumSpark that = (ThaumSpark) o; - return x == that.x && - y == that.y && - z == that.z && - wID == that.wID && - xR == that.xR && - yR == that.yR && - zR == that.zR; - } - - @Override - public int hashCode() { - return Objects.hash(x, y, z, wID, xR, yR, zR); - } -} diff --git a/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java b/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java index 9eed417718..449b68a846 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java +++ b/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java @@ -1,6 +1,5 @@ package com.github.technus.tectech.mechanics.data; -import com.github.technus.tectech.mechanics.commands.ThaumSpark; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.network.simpleimpl.IMessage; import cpw.mods.fml.common.network.simpleimpl.MessageContext; diff --git a/src/main/java/com/github/technus/tectech/mechanics/data/ThaumSpark.java b/src/main/java/com/github/technus/tectech/mechanics/data/ThaumSpark.java new file mode 100644 index 0000000000..59462679de --- /dev/null +++ b/src/main/java/com/github/technus/tectech/mechanics/data/ThaumSpark.java @@ -0,0 +1,53 @@ +package com.github.technus.tectech.mechanics.data; + +import java.io.Serializable; +import java.util.Objects; + +public class ThaumSpark implements Serializable { + private static final long serialVersionUID = -7037856938316679566L; + public int x, y, z, wID; + public byte xR, yR, zR; + + public ThaumSpark(){ + this.x = 0; + this.z = 0; + this.y = 0; + + this.xR = 0; + this.yR = 0; + this.zR = 0; + + this.wID = 0; + } + + public ThaumSpark(int x, int y, int z, byte xR, byte yR, byte zR, int wID) { + this.x = x; + this.z = z; + this.y = y; + + this.xR = xR; + this.yR = yR; + this.zR = zR; + + this.wID = wID; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ThaumSpark that = (ThaumSpark) o; + return x == that.x && + y == that.y && + z == that.z && + wID == that.wID && + xR == that.xR && + yR == that.yR && + zR == that.zR; + } + + @Override + public int hashCode() { + return Objects.hash(x, y, z, wID, xR, yR, zR); + } +} 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 fe36f730bb..a82bf9be99 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 @@ -4,7 +4,7 @@ import com.github.technus.tectech.CommonValues; import com.github.technus.tectech.TecTech; import com.github.technus.tectech.loader.NetworkDispatcher; import com.github.technus.tectech.mechanics.data.RendererMessage; -import com.github.technus.tectech.mechanics.commands.ThaumSpark; +import com.github.technus.tectech.mechanics.data.ThaumSpark; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil_Ultimate; import com.github.technus.tectech.thing.metaTileEntity.IConstructable; 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 ac115388ba..efa85a6ea5 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 @@ -5,7 +5,7 @@ import com.github.technus.tectech.TecTech; import com.github.technus.tectech.Util; import com.github.technus.tectech.loader.NetworkDispatcher; import com.github.technus.tectech.mechanics.data.RendererMessage; -import com.github.technus.tectech.mechanics.commands.ThaumSpark; +import com.github.technus.tectech.mechanics.data.ThaumSpark; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil_Ultimate; import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_TM_teslaCoil; -- cgit From 6e7457be9ad03722cd431a2d946173824a275dcd Mon Sep 17 00:00:00 2001 From: Bass Date: Thu, 29 Aug 2019 04:30:29 +0100 Subject: This is only a test --- .../tectech/mechanics/data/RendererMessage.java | 3 +- .../technus/tectech/mechanics/data/ThaumSpark.java | 1 + ...GT_MetaTileEntity_Hatch_ElementalContainer.java | 57 +-- src/main/resources/assets/tectech/lang/ru_RU.lang | 448 +++++++++++++++++++++ 4 files changed, 480 insertions(+), 29 deletions(-) create mode 100644 src/main/resources/assets/tectech/lang/ru_RU.lang (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java b/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java index 449b68a846..514b8b88ad 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java +++ b/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java @@ -69,6 +69,7 @@ public class RendererMessage implements IMessage { } private static void thaumLightning(int tX, int tY, int tZ, int tXN, int tYN, int tZN, int wID) { + //This is enough to check for thaum, since it only ever matters for client side effects (Tested not to crash) if (Loader.isModLoaded("Thaumcraft")) { World world = DimensionManager.getWorld(wID); FXLightningBolt bolt = new FXLightningBolt(world, tX + 0.5F, tY + 0.5F, tZ + 0.5F, tX + tXN + 0.5F, tY + tYN + 0.5F, tZ + tZN + 0.5F, world.rand.nextLong(), 6, 0.5F, 8); @@ -78,4 +79,4 @@ public class RendererMessage implements IMessage { bolt.finalizeBolt(); } } -} +} \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/mechanics/data/ThaumSpark.java b/src/main/java/com/github/technus/tectech/mechanics/data/ThaumSpark.java index 59462679de..99f3696aa9 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/data/ThaumSpark.java +++ b/src/main/java/com/github/technus/tectech/mechanics/data/ThaumSpark.java @@ -4,6 +4,7 @@ import java.io.Serializable; import java.util.Objects; public class ThaumSpark implements Serializable { + //This works regardless of if TC is loaded private static final long serialVersionUID = -7037856938316679566L; public int x, y, z, wID; public byte xR, yR, zR; diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ElementalContainer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ElementalContainer.java index c96cb91f45..d2ff8555a4 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ElementalContainer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ElementalContainer.java @@ -221,34 +221,35 @@ public abstract class GT_MetaTileEntity_Hatch_ElementalContainer extends GT_Meta @Override public String[] getInfoData() { - if (TecTech.configTecTech.EASY_SCAN) { - if (id > 0) { - if (content == null || content.size() == 0) { - return new String[]{StatCollector.translateToLocal("tt.keyword.ID") + ": " + EnumChatFormatting.AQUA + id, StatCollector.translateToLocal("tt.keyphrase.No_Stacks")}; - } else { - String[] lines = content.getElementalInfo(); - String[] output = new String[lines.length + 1]; - output[0] = StatCollector.translateToLocal("tt.keyword.ID") + ": " + EnumChatFormatting.AQUA + id; - System.arraycopy(lines, 0, output, 1, lines.length); - return output; - } - } - if (content == null || content.size() == 0) { - return new String[]{StatCollector.translateToLocal("tt.keyphrase.No_Stacks")}; - } - return content.getElementalInfo(); - } else { - if (id > 0) { - if (content == null || content.size() == 0) { - return new String[]{StatCollector.translateToLocal("tt.keyword.ID") + ": " + EnumChatFormatting.AQUA + id, StatCollector.translateToLocal("tt.keyphrase.No_Stacks")}; - } - return new String[]{StatCollector.translateToLocal("tt.keyword.ID") + ": " + EnumChatFormatting.AQUA + id, StatCollector.translateToLocal("tt.keyphrase.Contains_EM")}; - } - if (content == null || content.size() == 0) { - return new String[]{StatCollector.translateToLocal("tt.keyphrase.No_Stacks")}; - } - return new String[]{StatCollector.translateToLocal("tt.keyphrase.Contains_EM")}; - } + return new String[]{StatCollector.translateToLocal("tt.keyword.ID")}; + //if (TecTech.configTecTech.EASY_SCAN) { + // if (id > 0) { + // if (content == null || content.size() == 0) { + // return new String[]{StatCollector.translateToLocal("tt.keyword.ID") + ": " + EnumChatFormatting.AQUA + id, StatCollector.translateToLocal("tt.keyphrase.No_Stacks")}; + // } else { + // String[] lines = content.getElementalInfo(); + // String[] output = new String[lines.length + 1]; + // output[0] = StatCollector.translateToLocal("tt.keyword.ID") + ": " + EnumChatFormatting.AQUA + id; + // System.arraycopy(lines, 0, output, 1, lines.length); + // return output; + // } + // } + // if (content == null || content.size() == 0) { + // return new String[]{StatCollector.translateToLocal("tt.keyphrase.No_Stacks")}; + // } + // return content.getElementalInfo(); + //} else { + // if (id > 0) { + // if (content == null || content.size() == 0) { + // return new String[]{StatCollector.translateToLocal("tt.keyword.ID") + ": " + EnumChatFormatting.AQUA + id, StatCollector.translateToLocal("tt.keyphrase.No_Stacks")}; + // } + // return new String[]{StatCollector.translateToLocal("tt.keyword.ID") + ": " + EnumChatFormatting.AQUA + id, StatCollector.translateToLocal("tt.keyphrase.Contains_EM")}; + // } + // if (content == null || content.size() == 0) { + // return new String[]{StatCollector.translateToLocal("tt.keyphrase.No_Stacks")}; + // } + // return new String[]{StatCollector.translateToLocal("tt.keyphrase.Contains_EM")}; + //} } public void updateSlots() { diff --git a/src/main/resources/assets/tectech/lang/ru_RU.lang b/src/main/resources/assets/tectech/lang/ru_RU.lang new file mode 100644 index 0000000000..1d78cd54bf --- /dev/null +++ b/src/main/resources/assets/tectech/lang/ru_RU.lang @@ -0,0 +1,448 @@ +#Creative Tab Name +itemGroup.TecTech=TecTech Interdimensional +#Blocks +tile.quantumGlass.name=Quantum Glass +tile.quantumStuff.name=Quantum Stuff +#Items +item.em.debugContainer.name=Debug EM Container +item.em.definitionContainer.name=EM Recipe Hint +item.em.definitionScanStorage.name=EM Scan Storage +item.em.constructable.name=Multiblock Machine Blueprint +item.em.frontRotate.name=Front Rotation Scrench +item.em.parametrizerMemoryCard.name=Parametrizer Memory Card +item.em.EuMeterGT.name=GT EU meter +item.tm.teslaCover.0.name=Tesla Coil Cover +item.tm.teslaCover.1.name=Tesla Coil Cover Rich Edition +item.tm.teslaStaff.name=Tesla Staff + +item.tm.teslaCoilCapacitor.0.name=LV Tesla Capacitor +item.tm.teslaCoilCapacitor.1.name=MV Tesla Capacitor +item.tm.teslaCoilCapacitor.2.name=HV Tesla Capacitor +item.tm.teslaCoilCapacitor.3.name=EV Tesla Capacitor +item.tm.teslaCoilCapacitor.4.name=IV Tesla Capacitor + +item.tm.itemTeslaComponent.0.name=Electrum Tesla Windings +item.tm.itemTeslaComponent.1.name=Superconductive Tesla Windings +#Death Messages +death.attack.microwaving=%1$s was dehydrated by radiation. +death.attack.microwaving.player=%1$s was dehydrated by radiation while fighting %2$s. +death.attack.elementalPollution=%1$s was vaping from the wrong hole. +death.attack.elementalPollution.player=%1$s was vaping from the wrong hole while fighting %2$s. +death.attack.subspace=%1$s was N-th dimensionally displeased. +death.attack.subspace.player=%1$s N-th dimensionally displeased while fighting %2$s. +#Machine hulls +gt.blockmachines.hull.tier.10.name=UEV Machine Hull +gt.blockmachines.hull.tier.11.name=UIV Machine Hull +gt.blockmachines.hull.tier.12.name=UMV Machine Hull +gt.blockmachines.hull.tier.13.name=UXV Machine Hull +gt.blockmachines.hull.tier.14.name=OPV Machine Hull +gt.blockmachines.hull.tier.15.name=MAX Machine Hull +#Transformers +gt.blockmachines.wetransformer.tier.00.name=Ultra Low Voltage Power Transformer +gt.blockmachines.wetransformer.tier.00.desc=LV -> ULV (Use Soft Mallet to invert) +gt.blockmachines.wetransformer.tier.01.name=Low Voltage Power Transformer +gt.blockmachines.wetransformer.tier.01.desc=MV -> LV (Use Soft Mallet to invert) +gt.blockmachines.wetransformer.tier.02.name=Medium Voltage Power Transformer +gt.blockmachines.wetransformer.tier.02.desc=HV -> MV (Use Soft Mallet to invert) +gt.blockmachines.wetransformer.tier.03.name=High Voltage Power Transformer +gt.blockmachines.wetransformer.tier.03.desc=EV -> HV (Use Soft Mallet to invert) +gt.blockmachines.wetransformer.tier.04.name=Extreme Power Transformer +gt.blockmachines.wetransformer.tier.04.desc=IV -> EV (Use Soft Mallet to invert) +gt.blockmachines.wetransformer.tier.05.name=Insane Power Transformer +gt.blockmachines.wetransformer.tier.05.desc=LuV -> IV (Use Soft Mallet to invert) +gt.blockmachines.wetransformer.tier.06.name=Ludicrous Power Transformer +gt.blockmachines.wetransformer.tier.06.desc=ZPM -> LuV (Use Soft Mallet to invert) +gt.blockmachines.wetransformer.tier.07.name=ZPM Voltage Power Transformer +gt.blockmachines.wetransformer.tier.07.desc=UV -> ZPM (Use Soft Mallet to invert) +gt.blockmachines.wetransformer.tier.08.name=Ultimate Power Transformer +gt.blockmachines.wetransformer.tier.08.desc=UHV -> UV (Use Soft Mallet to invert) +gt.blockmachines.wetransformer.tier.09.name=Highly Ultimate Power Transformer +gt.blockmachines.wetransformer.tier.09.desc=UEV -> UHV (Use Soft Mallet to invert) +gt.blockmachines.wetransformer.tier.10.name=Extremely Ultimate Power Transformer +gt.blockmachines.wetransformer.tier.10.desc=UIV -> UEV (Use Soft Mallet to invert) +gt.blockmachines.wetransformer.tier.11.name=Insanely Ultimate Power Transformer +gt.blockmachines.wetransformer.tier.11.desc=UMV -> UIV (Use Soft Mallet to invert) +gt.blockmachines.wetransformer.tier.12.name=Mega Ultimate Power Transformer +gt.blockmachines.wetransformer.tier.12.desc=UXV -> UMV (Use Soft Mallet to invert) +gt.blockmachines.wetransformer.tier.13.name=Extended Mega Ultimate Power Transformer +gt.blockmachines.wetransformer.tier.13.desc=OPV -> UXV (Use Soft Mallet to invert) +gt.blockmachines.wetransformer.tier.14.name=Overpowered Power Transformer +gt.blockmachines.wetransformer.tier.14.desc=MAX -> OPV (Use Soft Mallet to invert) + +gt.blockmachines.tt.transformer.tier.09.name=Highly Ultimate Transformer +gt.blockmachines.tt.transformer.tier.09.desc=UEV -> UHV (Use Soft Mallet to invert) +gt.blockmachines.tt.transformer.tier.10.name=Extremely Ultimate Transformer +gt.blockmachines.tt.transformer.tier.10.desc=UIV -> UEV (Use Soft Mallet to invert) +gt.blockmachines.tt.transformer.tier.11.name=Insanely Ultimate Transformer +gt.blockmachines.tt.transformer.tier.11.desc=UMV -> UIV (Use Soft Mallet to invert) +gt.blockmachines.tt.transformer.tier.12.name=Mega Ultimate Transformer +gt.blockmachines.tt.transformer.tier.12.desc=UXV -> UMV (Use Soft Mallet to invert) +gt.blockmachines.tt.transformer.tier.13.name=Extended Mega Ultimate Transformer +gt.blockmachines.tt.transformer.tier.13.desc=OPV -> UXV (Use Soft Mallet to invert) +gt.blockmachines.tt.transformer.tier.14.name=Overpowered Transformer +gt.blockmachines.tt.transformer.tier.14.desc=MAX -> OPV (Use Soft Mallet to invert) + +gt.blockmachines.transformer.ha.tier.09.name=Highly Ultimate Hi-Amp Transformer +gt.blockmachines.transformer.ha.tier.09.desc=UEV -> UHV (Use Soft Mallet to invert +gt.blockmachines.transformer.ha.tier.10.name=Extremely Ultimate Hi-Amp Transformer +gt.blockmachines.transformer.ha.tier.10.desc=UIV -> UEV (Use Soft Mallet to invert) +gt.blockmachines.transformer.ha.tier.11.name=Insanely Ultimate Hi-Amp Transformer +gt.blockmachines.transformer.ha.tier.11.desc=UMV -> UIV (Use Soft Mallet to invert) +gt.blockmachines.transformer.ha.tier.12.name=Mega Ultimate Hi-Amp Transformer +gt.blockmachines.transformer.ha.tier.12.desc=UXV -> UMV (Use Soft Mallet to invert) +gt.blockmachines.transformer.ha.tier.13.name=Extended Mega Ultimate Hi-Amp Transformer +gt.blockmachines.transformer.ha.tier.13.desc=OPV -> UXV (Use Soft Mallet to invert) +gt.blockmachines.transformer.ha.tier.14.name=Overpowered Hi-Amp Transformer +gt.blockmachines.transformer.ha.tier.14.desc=MAX -> OPV (Use Soft Mallet to invert) +#Hatches +tt.base.emhatch.desc.0=Max stacks amount: +tt.base.emhatch.desc.1=Stack capacity: +tt.base.emhatch.desc.2=Place Overflow Hatch behind,on top or below +tt.base.emhatch.desc.3=to provide overflow protection while this block +tt.base.emhatch.desc.4=is not attached to multi block. +tt.base.emhatch.desc.5=Transport range can be extended in straight +tt.base.emhatch.desc.6=line up to 15 blocks with quantum tunnels. +tt.base.emhatch.desc.7=Must be painted to work + +gt.blockmachines.hatch.emmuffler.tier.08.name=UV Overflow Output Hatch +gt.blockmachines.hatch.emmuffler.tier.09.name=UHV Overflow Output Hatch +gt.blockmachines.hatch.emmuffler.tier.10.name=UEV Overflow Output Hatch +gt.blockmachines.hatch.emmuffler.tier.11.name=UIV Overflow Output Hatch +gt.blockmachines.hatch.emmuffler.tier.12.name=UMV Overflow Output Hatch +gt.blockmachines.hatch.emmuffler.tier.13.name=UXV Overflow Output Hatch +gt.blockmachines.hatch.emmuffler.desc.0=Disposes excess elemental Matter +gt.blockmachines.hatch.emmuffler.desc.1=Mass capacity +gt.blockmachines.hatch.emmuffler.desc.2=Disposal Speed +gt.blockmachines.hatch.emmuffler.desc.3=DO NOT OBSTRUCT THE OUTPUT! + +gt.blockmachines.hatch.energymulti04.tier.05.name=IV 4A Energy Hatch +gt.blockmachines.hatch.energymulti16.tier.05.name=IV 16A Energy Hatch +gt.blockmachines.hatch.energymulti64.tier.05.name=IV 64A Energy Hatch +gt.blockmachines.hatch.energymulti04.tier.06.name=LuV 4A Energy Hatch +gt.blockmachines.hatch.energymulti16.tier.06.name=LuV 16A Energy Hatch +gt.blockmachines.hatch.energymulti64.tier.06.name=LuV 64A Energy Hatch +gt.blockmachines.hatch.energymulti04.tier.07.name=ZPM 4A Energy Hatch +gt.blockmachines.hatch.energymulti16.tier.07.name=ZPM 16A Energy Hatch +gt.blockmachines.hatch.energymulti64.tier.07.name=ZPM 64A Energy Hatch +gt.blockmachines.hatch.energymulti04.tier.08.name=UV 4A Energy Hatch +gt.blockmachines.hatch.energymulti16.tier.08.name=UV 16A Energy Hatch +gt.blockmachines.hatch.energymulti64.tier.08.name=UV 64A Energy Hatch +gt.blockmachines.hatch.energymulti04.tier.09.name=UHV 4A Energy Hatch +gt.blockmachines.hatch.energymulti16.tier.09.name=UHV 16A Energy Hatch +gt.blockmachines.hatch.energymulti64.tier.09.name=UHV 64A Energy Hatch +gt.blockmachines.hatch.energymulti04.tier.10.name=UEV 4A Energy Hatch +gt.blockmachines.hatch.energymulti16.tier.10.name=UEV 16A Energy Hatch +gt.blockmachines.hatch.energymulti64.tier.10.name=UEV 64A Energy Hatch +gt.blockmachines.hatch.energymulti04.tier.11.name=UIV 4A Energy Hatch +gt.blockmachines.hatch.energymulti16.tier.11.name=UIV 16A Energy Hatch +gt.blockmachines.hatch.energymulti64.tier.11.name=UIV 64A Energy Hatch +gt.blockmachines.hatch.energymulti04.tier.12.name=UMV 4A Energy Hatch +gt.blockmachines.hatch.energymulti16.tier.12.name=UMV 16A Energy Hatch +gt.blockmachines.hatch.energymulti64.tier.12.name=UMV 64A Energy Hatch +gt.blockmachines.hatch.energymulti04.tier.13.name=UXV 4A Energy Hatch +gt.blockmachines.hatch.energymulti16.tier.13.name=UXV 16A Energy Hatch +gt.blockmachines.hatch.energymulti64.tier.13.name=UXV 64A Energy Hatch +gt.blockmachines.hatch.energymulti.desc.0=Multiple Ampere Energy Injector for Multiblocks +gt.blockmachines.hatch.energymulti.desc.1=Amperes In + +gt.blockmachines.hatch.energytunnel1.tier.05.name=IV 256/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel2.tier.05.name=IV 1024/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel3.tier.05.name=IV 4096/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel4.tier.05.name=IV 16384/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel5.tier.05.name=IV 65536/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel6.tier.05.name=IV 262144/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel7.tier.05.name=IV 1048576/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel1.tier.06.name=LuV 256/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel2.tier.06.name=LuV 1024/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel3.tier.06.name=LuV 4096/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel4.tier.06.name=LuV 16384/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel5.tier.06.name=LuV 65536/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel6.tier.06.name=LuV 262144/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel7.tier.06.name=LuV 1048576/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel1.tier.07.name=ZPM 256/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel2.tier.07.name=ZPM 1024/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel3.tier.07.name=ZPM 4096/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel4.tier.07.name=ZPM 16384/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel5.tier.07.name=ZPM 65536/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel6.tier.07.name=ZPM 262144/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel7.tier.07.name=ZPM 1048576/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel1.tier.08.name=UV 256/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel2.tier.08.name=UV 1024/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel3.tier.08.name=UV 4096/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel4.tier.08.name=UV 16384/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel5.tier.08.name=UV 65536/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel6.tier.08.name=UV 262144/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel7.tier.08.name=UV 1048576/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel1.tier.09.name=UHV 256/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel2.tier.09.name=UHV 1024/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel3.tier.09.name=UHV 4096/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel4.tier.09.name=UHV 16384/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel5.tier.09.name=UHV 65536/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel6.tier.09.name=UHV 262144/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel7.tier.09.name=UHV 1048576/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel1.tier.10.name=UEV 256/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel2.tier.10.name=UEV 1024/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel3.tier.10.name=UEV 4096/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel4.tier.10.name=UEV 16384/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel5.tier.10.name=UEV 65536/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel6.tier.10.name=UEV 262144/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel7.tier.10.name=UEV 1048576/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel1.tier.11.name=UIV 256/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel2.tier.11.name=UIV 1024/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel3.tier.11.name=UIV 4096/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel4.tier.11.name=UIV 16384/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel5.tier.11.name=UIV 65536/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel6.tier.11.name=UIV 262144/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel7.tier.11.name=UIV 1048576/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel1.tier.12.name=UMV 256/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel2.tier.12.name=UMV 1024/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel3.tier.12.name=UMV 4096/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel4.tier.12.name=UMV 16384/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel5.tier.12.name=UMV 65536/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel6.tier.12.name=UMV 262144/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel7.tier.12.name=UMV 1048576/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel1.tier.13.name=UXV 256/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel2.tier.13.name=UXV 1024/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel3.tier.13.name=UXV 4096/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel4.tier.13.name=UXV 16384/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel5.tier.13.name=UXV 65536/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel6.tier.13.name=UXV 262144/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel7.tier.13.name=UXV 1048576/t Laser Target Hatch +gt.blockmachines.hatch.energytunnel.tier.14.name=Legendary Laser Target Hatch +gt.blockmachines.hatch.energytunnel.desc.0=Energy injecting terminal for Multiblocks +gt.blockmachines.hatch.energytunnel.desc.1=Throughput + +gt.blockmachines.hatch.dynamomulti04.tier.05.name=IV 4A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti16.tier.05.name=IV 16A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti64.tier.05.name=IV 64A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti04.tier.06.name=LuV 4A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti16.tier.06.name=LuV 16A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti64.tier.06.name=LuV 64A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti04.tier.07.name=ZPM 4A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti16.tier.07.name=ZPM 16A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti64.tier.07.name=ZPM 64A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti04.tier.08.name=UV 4A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti16.tier.08.name=UV 16A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti64.tier.08.name=UV 64A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti04.tier.09.name=UHV 4A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti16.tier.09.name=UHV 16A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti64.tier.09.name=UHV 64A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti04.tier.10.name=UEV 4A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti16.tier.10.name=UEV 16A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti64.tier.10.name=UEV 64A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti04.tier.11.name=UIV 4A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti16.tier.11.name=UIV 16A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti64.tier.11.name=UIV 64A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti04.tier.12.name=UMV 4A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti16.tier.12.name=UMV 16A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti64.tier.12.name=UMV 64A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti04.tier.13.name=IV 4A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti16.tier.13.name=IV 16A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti64.tier.13.name=IV 64A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti.desc.0=Multiple Ampere Energy Extractor for Multiblocks +gt.blockmachines.hatch.dynamomulti.desc.1=Amperes Out + +gt.blockmachines.hatch.dynamotunnel1.tier.05=IV 256/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel2.tier.05=IV 1024/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel3.tier.05=IV 4096/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel4.tier.05=IV 16384/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel5.tier.05=IV 65536/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel6.tier.05=IV 262144/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel7.tier.05=IV 1048576/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel1.tier.06=LuV 256/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel2.tier.06=LuV 1024/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel3.tier.06=LuV 4096/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel4.tier.06=LuV 16384/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel5.tier.06=LuV 65536/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel6.tier.06=LuV 262144/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel7.tier.06=LuV 1048576/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel1.tier.07=ZPM 256/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel2.tier.07=ZPM 1024/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel3.tier.07=ZPM 4096/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel4.tier.07=ZPM 16384/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel5.tier.07=ZPM 65536/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel6.tier.07=ZPM 262144/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel7.tier.07=ZPM 1048576/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel1.tier.08=UV 256/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel2.tier.08=UV 1024/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel3.tier.08=UV 4096/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel4.tier.08=UV 16384/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel5.tier.08=UV 65536/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel6.tier.08=UV 262144/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel7.tier.08=UV 1048576/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel1.tier.09=UHV 256/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel2.tier.09=UHV 1024/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel3.tier.09=UHV 4096/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel4.tier.09=UHV 16384/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel5.tier.09=UHV 65536/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel6.tier.09=UHV 262144/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel7.tier.09=UHV 1048576/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel1.tier.10=UEV 256/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel2.tier.10=UEV 1024/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel3.tier.10=UEV 4096/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel4.tier.10=UEV 16384/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel5.tier.10=UEV 65536/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel6.tier.10=UEV 262144/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel7.tier.10=UEV 1048576/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel1.tier.11=UIV 256/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel2.tier.11=UIV 1024/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel3.tier.11=UIV 4096/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel4.tier.11=UIV 16384/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel5.tier.11=UIV 65536/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel6.tier.11=UIV 262144/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel7.tier.11=UIV 1048576/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel1.tier.12=UMV 256/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel2.tier.12=UMV 1024/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel3.tier.12=UMV 4096/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel4.tier.12=UMV 16384/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel5.tier.12=UMV 65536/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel6.tier.12=UMV 262144/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel7.tier.12=UMV 1048576/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel1.tier.13=UXV 256/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel2.tier.13=UXV 1024/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel3.tier.13=UXV 4096/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel4.tier.13=UXV 16384/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel5.tier.13=UXV 65536/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel6.tier.13=UXV 262144/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel7.tier.13=UXV 1048576/t Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel.tier.14=Legendary Laser Source Hatch +gt.blockmachines.hatch.dynamotunnel.desc.0=Energy extracting terminal for Multiblocks +gt.blockmachines.hatch.dynamotunnel.desc.1=Throughput + +gt.blockmachines.emin.tier.08.name=UV Elemental Input Hatch +gt.blockmachines.emin.tier.09.name=UHV Elemental Input Hatch +gt.blockmachines.emin.tier.10.name=UEV Elemental Input Hatch +gt.blockmachines.emin.tier.11.name=UIV Elemental Input Hatch +gt.blockmachines.emin.tier.12.name=UMV Elemental Input Hatch +gt.blockmachines.emin.tier.13.name=UXV Elemental Input Hatch +gt.blockmachines.emin.desc=Elemental Input for Multiblocks + +gt.blockmachines.emout.tier.08.name=UV Elemental Output Hatch +gt.blockmachines.emout.tier.09.name=UHV Elemental Output Hatch +gt.blockmachines.emout.tier.10.name=UEV Elemental Output Hatch +gt.blockmachines.emout.tier.11.name=UIV Elemental Output Hatch +gt.blockmachines.emout.tier.12.name=UMV Elemental Output Hatch +gt.blockmachines.emout.tier.13.name=UXV Elemental Output Hatch +gt.blockmachines.emout.desc=Elemental Output for Multiblocks +#Multiblocks +gt.blockmachines.multimachine.em.transformer.name=Active Transformer +gt.blockmachines.multimachine.em.transformer.hint=1 - Energy IO Hatches or High Power Casing +gt.blockmachines.multimachine.em.transformer.desc.0=Power substation +gt.blockmachines.multimachine.em.transformer.desc.1=All the transformation! +gt.blockmachines.multimachine.em.transformer.desc.2=Only 0.78125% power loss, HAYO! + +gt.blockmachines.multimachine.tm.microwave.name=Microwave Grinder +gt.blockmachines.multimachine.tm.microwave.hint.0=1 - Classic Hatches or Clean Stainless Steel Casing +gt.blockmachines.multimachine.tm.microwave.hint.1=Also acts like a hopper so give it an Output Bus +gt.blockmachines.multimachine.tm.microwave.desc.0=High Frequency Oven +gt.blockmachines.multimachine.tm.microwave.desc.1=From live to done in seconds! +gt.blockmachines.multimachine.tm.microwave.desc.3=I said nuke the... I meant microwave supper! +gt.blockmachines.multimachine.tm.microwave.cfgi.0=Power setting +gt.blockmachines.multimachine.tm.microwave.cfgi.1=Timer setting +gt.blockmachines.multimachine.tm.microwave.cfgo.0=Timer value +gt.blockmachines.multimachine.tm.microwave.cfgo.1=Timer remaining + +gt.blockmachines.multimachine.tm.teslaCoil.name=Tesla Tower +gt.blockmachines.multimachine.tm.teslaCoil.hint.0=1 - Classic Hatches, Capacitor Hatches or Tesla Base Casing +gt.blockmachines.multimachine.tm.teslaCoil.hint.1=2 - Titanium Frames +gt.blockmachines.multimachine.tm.teslaCoil.desc.0=Tower of Wireless Power +gt.blockmachines.multimachine.tm.teslaCoil.desc.1=Fewer pesky cables! +gt.blockmachines.multimachine.tm.teslaCoil.desc.2=Survival chances might be affected +gt.blockmachines.multimachine.tm.teslaCoil.cfgi.0=Hysteresis low setting +gt.blockmachines.multimachine.tm.teslaCoil.cfgi.1=Hysteresis high setting +gt.blockmachines.multimachine.tm.teslaCoil.cfgi.2=Tesla Towers transfer radius setting +gt.blockmachines.multimachine.tm.teslaCoil.cfgi.3=Tesla Transceiver transfer radius setting +gt.blockmachines.multimachine.tm.teslaCoil.cfgi.4=Tesla Ultimate Cover transfer radius setting +gt.blockmachines.multimachine.tm.teslaCoil.cfgi.5=Output voltage setting +gt.blockmachines.multimachine.tm.teslaCoil.cfgi.6=Output current setting +gt.blockmachines.multimachine.tm.teslaCoil.cfgi.7=Scan time Min setting +gt.blockmachines.multimachine.tm.teslaCoil.cfgi.8=Overdrive setting +gt.blockmachines.multimachine.tm.teslaCoil.cfgi.9=Unused +gt.blockmachines.multimachine.tm.teslaCoil.cfgo.0=Tesla Towers transfer radius display +gt.blockmachines.multimachine.tm.teslaCoil.cfgo.1=Tesla Transceiver transfer radius display +gt.blockmachines.multimachine.tm.teslaCoil.cfgo.2=Tesla Ultimate Cover transfer radius display +gt.blockmachines.multimachine.tm.teslaCoil.cfgo.3=Output voltage display +gt.blockmachines.multimachine.tm.teslaCoil.cfgo.4=Output current display +gt.blockmachines.multimachine.tm.teslaCoil.cfgo.5=Energy Capacity display +gt.blockmachines.multimachine.tm.teslaCoil.cfgo.6=Energy Stored display +gt.blockmachines.multimachine.tm.teslaCoil.cfgo.7=Energy Fraction display +gt.blockmachines.multimachine.tm.teslaCoil.cfgo.8=Scan time display + +gt.blockmachines.multimachine.em.switch.name=Network Switch With QoS +gt.blockmachines.multimachine.em.switch.hint=1 - Classic/Data Hatches or Computer casing +gt.blockmachines.multimachine.em.switch.desc.0=User controlled computation power routing +gt.blockmachines.multimachine.em.switch.desc.1=Quality of service is a must + +gt.blockmachines.multimachine.em.computer.name=Quantum Computer +gt.blockmachines.multimachine.em.computer.hint.0=1 - Classic/Data Hatches or Computer casing +gt.blockmachines.multimachine.em.computer.hint.1=2 - Rack Hatches or Advanced computer casing +gt.blockmachines.multimachine.em.computer.desc=You need it to process the number above +gt.blockmachines.multimachine.em.computer.cfgi.0=Overclock ratio +gt.blockmachines.multimachine.em.computer.cfgi.1=Overvoltage ratio +gt.blockmachines.multimachine.em.computer.cfgo.0=Current max. heat +gt.blockmachines.multimachine.em.computer.cfgo.1=Produced computation + +gt.blockmachines.multimachine.em.databank.name=Data Bank +gt.blockmachines.multimachine.em.junction.name=Matter Junction +gt.blockmachines.multimachine.em.mattertoem.name=Matter Quantizer +gt.blockmachines.multimachine.em.emtomatter.name=Matter Dequantizer + +gt.blockmachines.multimachine.em.emtoessentia.name=Essentia Dequantizer +gt.blockmachines.multimachine.em.emtoessentia.hint.0=1 - Classic Hatches or High Power Casing +gt.blockmachines.multimachine.em.emtoessentia.hint.1=2 - Elemental Input Hatch +gt.blockmachines.multimachine.em.emtoessentia.hint.2=3 - Elemental Overflow Hatches or Elemental Casing +gt.blockmachines.multimachine.em.emtoessentia.hint.3=General - Some sort of Essentia Storage +gt.blockmachines.multimachine.em.emtoessentia.desc.0=Transform quantum form back to... +gt.blockmachines.multimachine.em.emtoessentia.desc.1=regular one, but why? + +gt.blockmachines.multimachine.em.essentiatoem.name=Essentia Quantizer +gt.blockmachines.multimachine.em.essentiatoem.hint.0=1 - Classic Hatches or High Power Casing +gt.blockmachines.multimachine.em.essentiatoem.hint.1=2 - Elemental Output Hatch +gt.blockmachines.multimachine.em.essentiatoem.hint.2=3 - Elemental Overflow Hatches or Elemental Casing +gt.blockmachines.multimachine.em.essentiatoem.hint.3=General - Some sort of Essentia Storage +gt.blockmachines.multimachine.em.essentiatoem.desc.0=Conveniently convert regular stuff into quantum form. +gt.blockmachines.multimachine.em.essentiatoem.desc.1=To make it more inconvenient. + +gt.blockmachines.multimachine.em.scanner.name=Elemental Scanner +gt.blockmachines.multimachine.em.research.name=Research station +gt.blockmachines.multimachine.em.collider.name=Matter Collider +gt.blockmachines.multimachine.em.infuser.name=Energy Infuser +gt.blockmachines.multimachine.em.processing.name=Quantum Processing Machine +gt.blockmachines.multimachine.em.crafter.name=Matter Assembler +gt.blockmachines.multimachine.em.stabilizer.name=Elemental Stabilizer +gt.blockmachines.multimachine.em.wormhole.name=Wormhole +gt.blockmachines.multimachine.em.decay.name=Decay Generator +gt.blockmachines.multimachine.em.annihilation.name=Annihilation Generator +gt.blockmachines.multimachine.em.blackholegenerator.name=Black Hole Generator + +#Keywords and phrases +tt.keyword.Air=Air +tt.keyword.Earth=Earth +tt.keyword.Fire=Fire +tt.keyword.Water=Water +tt.keyword.Order=Order +tt.keyword.Entropy=Entropy +tt.keyword.Primal=Primal +tt.keyword.Aspect=Aspect +tt.keyword.CLASS=CLASS +tt.keyword.NAME=NAME +tt.keyword.CHARGE=CHARGE +tt.keyword.COLORLESS=COLORLESS +tt.keyword.MASS=MASS +tt.keyword.BOOM=BOOM! +tt.keyword.ID=BLYADD +tt.keyword.Destination=Destination +tt.keyword.Weight=Weight + +tt.keyphrase.LIFE_TIME=LIFE TIME +tt.keyphrase.CARRIES_COLOR=CARRIES COLOR +tt.keyphrase.Hint_Details=Hint Details +tt.keyphrase.At_current_energy_level=At current energy level +tt.keyphrase.No_Stacks=No Stacks +tt.keyphrase.Contains_EM=Contains EM +tt.keyphrase.Contained_mass=Contained mass +tt.keyphrase.Mass_Disposal_speed=Mass Disposal speed +tt.keyphrase.Muffler_BOOM=Muffler BOOM! +#OpenTurrets compatibility +tile.turretHeadEM.name=Elemental Matter Turret +tile.turretBaseEM.name=Elemental Turret Base \ No newline at end of file -- cgit From 80ebd40e232b7844d6fc28774a7acc6aae457429 Mon Sep 17 00:00:00 2001 From: Bass Date: Thu, 29 Aug 2019 06:27:40 +0100 Subject: Reflecc --- ...GT_MetaTileEntity_Hatch_ElementalContainer.java | 27 ++++++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ElementalContainer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ElementalContainer.java index d2ff8555a4..0d0d98007d 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ElementalContainer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ElementalContainer.java @@ -16,16 +16,19 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.objects.GT_RenderedTexture; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; import net.minecraftforge.fluids.FluidStack; +import org.apache.commons.lang3.reflect.FieldUtils; import static com.github.technus.tectech.CommonValues.*; import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; import static gregtech.api.enums.Dyes.MACHINE_METAL; import static gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity; +import static net.minecraft.util.StatCollector.translateToLocalFormatted; /** * Created by danie_000 on 11.12.2016. @@ -35,6 +38,8 @@ public abstract class GT_MetaTileEntity_Hatch_ElementalContainer extends GT_Meta private static Textures.BlockIcons.CustomIcon EM_T_ACTIVE; private static Textures.BlockIcons.CustomIcon EM_T_CONN; + private String clientLocale = "en_US"; + protected cElementalInstanceStackMap content = new cElementalInstanceStackMap(); //float lifeTimeMult=1f; public int postEnergize = 0; @@ -161,10 +166,6 @@ public abstract class GT_MetaTileEntity_Hatch_ElementalContainer extends GT_Meta return content; } - @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - return true; - } @Override public boolean isFacingValid(byte aFacing) { @@ -214,6 +215,22 @@ public abstract class GT_MetaTileEntity_Hatch_ElementalContainer extends GT_Meta overflowMatter += content.removeOverflow(getMaxStacksCount(), getMaxStackSize()); } + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + if (!aBaseMetaTileEntity.isClientSide() && aPlayer instanceof EntityPlayerMP) { + try { + EntityPlayerMP player = (EntityPlayerMP) aPlayer; + clientLocale = (String) FieldUtils.readField(player,"translator",true); + } catch (Exception e) { + clientLocale = "en_US"; + } + } else { + return true; + } + System.out.println(clientLocale); + return true; + } + @Override public boolean isGivingInformation() { return true; @@ -221,7 +238,7 @@ public abstract class GT_MetaTileEntity_Hatch_ElementalContainer extends GT_Meta @Override public String[] getInfoData() { - return new String[]{StatCollector.translateToLocal("tt.keyword.ID")}; + return new String[]{translateToLocalFormatted("tt.keyword.ID", clientLocale)}; //if (TecTech.configTecTech.EASY_SCAN) { // if (id > 0) { // if (content == null || content.size() == 0) { -- cgit From fbffaa5e96ea62e82fcc266f393865931f40485a Mon Sep 17 00:00:00 2001 From: Bass Date: Thu, 29 Aug 2019 06:59:31 +0100 Subject: Lang streamline --- .../dreamcraft/NoDreamCraftMachineLoader.java | 14 ++-- .../blocks/turretbases/TurretBaseItemEM.java | 18 ++--- .../blocks/turretheads/TurretHeadItemEM.java | 26 +++---- .../definitions/dComplexAspectDefinition.java | 18 ++--- .../definitions/ePrimalAspectDefinition.java | 16 ++--- .../GT_MetaTileEntity_EM_essentiaDequantizer.java | 18 ++--- .../GT_MetaTileEntity_EM_essentiaQuantizer.java | 18 ++--- .../hatch/GT_MetaTileEntity_Hatch_DynamoMulti.java | 4 +- .../GT_MetaTileEntity_Hatch_DynamoTunnel.java | 8 +-- ...GT_MetaTileEntity_Hatch_ElementalContainer.java | 83 +++++++++++----------- .../hatch/GT_MetaTileEntity_Hatch_EnergyMulti.java | 8 +-- .../GT_MetaTileEntity_Hatch_EnergyTunnel.java | 6 +- .../GT_MetaTileEntity_Hatch_InputElemental.java | 5 +- .../GT_MetaTileEntity_Hatch_OutputElemental.java | 13 ++-- .../GT_MetaTileEntity_Hatch_OverflowElemental.java | 16 ++--- .../multi/GT_MetaTileEntity_EM_computer.java | 25 +++---- .../multi/GT_MetaTileEntity_EM_switch.java | 16 ++--- .../multi/GT_MetaTileEntity_EM_transformer.java | 12 ++-- .../multi/GT_MetaTileEntity_TM_microwave.java | 22 +++--- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 54 +++++++------- .../single/GT_MetaTileEntity_TT_Transformer.java | 4 +- .../single/GT_MetaTileEntity_TeslaCoil.java | 2 - .../single/GT_MetaTileEntity_WetTransformer.java | 4 +- 23 files changed, 201 insertions(+), 209 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/NoDreamCraftMachineLoader.java b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/NoDreamCraftMachineLoader.java index 7807dd921e..adf5d37876 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/NoDreamCraftMachineLoader.java +++ b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/NoDreamCraftMachineLoader.java @@ -13,13 +13,13 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.Method; import static gregtech.api.GregTech_API.METATILEENTITIES; +import static net.minecraft.util.StatCollector.translateToLocal; public class NoDreamCraftMachineLoader implements Runnable { public final static String imagination = EnumChatFormatting.RESET + @@ -208,13 +208,13 @@ public class NoDreamCraftMachineLoader implements Runnable { temp = constructor.newInstance( 11989, "transformer.ha.tier.09", "Highly Ultimate Hi-Amp Transformer", 9, //UEV -> UHV (Use Soft Mallet to invert - StatCollector.translateToLocal("gt.blockmachines.transformer.ha.tier.09.desc")); + translateToLocal("gt.blockmachines.transformer.ha.tier.09.desc")); CustomItemList.Transformer_HA_UEV_UHV.set(temp.getStackForm(1)); temp = constructor.newInstance( 11910, "transformer.ha.tier.10", "Extremely Ultimate Hi-Amp Transformer", 10, //UIV -> UEV (Use Soft Mallet to invert) - StatCollector.translateToLocal("gt.blockmachines.transformer.ha.tier.10.desc")); + translateToLocal("gt.blockmachines.transformer.ha.tier.10.desc")); Util.setTier(10, temp); if (GT_Values.GT.isClientSide()) { field.set(temp, method.invoke(temp, iTexture)); @@ -224,7 +224,7 @@ public class NoDreamCraftMachineLoader implements Runnable { temp = constructor.newInstance( 11911, "transformer.ha.tier.11", "Insanely Ultimate Hi-Amp Transformer", 11, //UMV -> UIV (Use Soft Mallet to invert) - StatCollector.translateToLocal("gt.blockmachines.transformer.ha.tier.11.desc")); + translateToLocal("gt.blockmachines.transformer.ha.tier.11.desc")); Util.setTier(11, temp); if (GT_Values.GT.isClientSide()) { field.set(temp, method.invoke(temp, iTexture)); @@ -234,7 +234,7 @@ public class NoDreamCraftMachineLoader implements Runnable { temp = constructor.newInstance( 11912, "transformer.ha.tier.12", "Mega Ultimate Hi-Amp Transformer", 12, //UXV -> UMV (Use Soft Mallet to invert) - StatCollector.translateToLocal("gt.blockmachines.transformer.ha.tier.12.desc")); + translateToLocal("gt.blockmachines.transformer.ha.tier.12.desc")); Util.setTier(12, temp); if (GT_Values.GT.isClientSide()) { field.set(temp, method.invoke(temp, iTexture)); @@ -244,7 +244,7 @@ public class NoDreamCraftMachineLoader implements Runnable { temp = constructor.newInstance( 11913, "transformer.ha.tier.13", "Extended Mega Ultimate Hi-Amp Transformer", 13, //OPV -> UXV (Use Soft Mallet to invert) - StatCollector.translateToLocal("gt.blockmachines.transformer.ha.tier.13.desc")); + translateToLocal("gt.blockmachines.transformer.ha.tier.13.desc")); Util.setTier(13, temp); if (GT_Values.GT.isClientSide()) { field.set(temp, method.invoke(temp, iTexture)); @@ -254,7 +254,7 @@ public class NoDreamCraftMachineLoader implements Runnable { temp = constructor.newInstance( 11914, "transformer.ha.tier.14", "Overpowered Hi-Amp Transformer", 14, //MAX -> OPV (Use Soft Mallet to invert) - StatCollector.translateToLocal("gt.blockmachines.transformer.ha.tier.14.desc")); + translateToLocal("gt.blockmachines.transformer.ha.tier.14.desc")); Util.setTier(14, temp); if (GT_Values.GT.isClientSide()) { field.set(temp, method.invoke(temp, iTexture)); diff --git a/src/main/java/com/github/technus/tectech/compatibility/openmodularturrets/blocks/turretbases/TurretBaseItemEM.java b/src/main/java/com/github/technus/tectech/compatibility/openmodularturrets/blocks/turretbases/TurretBaseItemEM.java index af0be0e1f5..97fc8132a2 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/openmodularturrets/blocks/turretbases/TurretBaseItemEM.java +++ b/src/main/java/com/github/technus/tectech/compatibility/openmodularturrets/blocks/turretbases/TurretBaseItemEM.java @@ -6,10 +6,11 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; import java.util.List; +import static net.minecraft.util.StatCollector.translateToLocal; + /** * Created by Tec on 28/07/2017. */ @@ -22,13 +23,14 @@ public class TurretBaseItemEM extends ItemBlock { public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List list, boolean p_77624_4_) { list.add(CommonValues.TEC_MARK_EM); list.add(""); - list.add(EnumChatFormatting.AQUA + "--" + StatCollector.translateToLocal("tooptip.energy.label") + "--"); - list.add(StatCollector.translateToLocal("tooltip.rf.max") + ": " + EnumChatFormatting.WHITE + 1000000000); - list.add(StatCollector.translateToLocal("tooltip.rf.io") + ": " + EnumChatFormatting.WHITE + 50000); + list.add(EnumChatFormatting.AQUA + "--" + translateToLocal("tooptip.energy.label") + "--"); + list.add(translateToLocal("tooltip.rf.max") + ": " + EnumChatFormatting.WHITE + 1000000000); + list.add(translateToLocal("tooltip.rf.io") + ": " + EnumChatFormatting.WHITE + 50000); list.add(""); - list.add(EnumChatFormatting.GREEN + "--" + StatCollector.translateToLocal("tooltip.extras.label") + "--"); - list.add(StatCollector.translateToLocal("tooltip.extras.addons.0")); + list.add(EnumChatFormatting.GREEN + "--" + translateToLocal("tooltip.extras.label") + "--"); + list.add(translateToLocal("tooltip.extras.addons.2")); + list.add(translateToLocal("tooltip.extras.upgrade.2")); list.add(""); - list.add(EnumChatFormatting.DARK_GRAY + StatCollector.translateToLocal("flavour.base.0")); + list.add(EnumChatFormatting.DARK_GRAY + translateToLocal("flavour.base.0")); } -} +} \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/compatibility/openmodularturrets/blocks/turretheads/TurretHeadItemEM.java b/src/main/java/com/github/technus/tectech/compatibility/openmodularturrets/blocks/turretheads/TurretHeadItemEM.java index 8aa598c440..422b931df5 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/openmodularturrets/blocks/turretheads/TurretHeadItemEM.java +++ b/src/main/java/com/github/technus/tectech/compatibility/openmodularturrets/blocks/turretheads/TurretHeadItemEM.java @@ -5,13 +5,13 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; import openmodularturrets.handler.ConfigHandler; import java.text.DecimalFormat; import java.util.List; import static com.github.technus.tectech.CommonValues.TEC_MARK_EM; +import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by Tec on 28/07/2017. @@ -27,19 +27,19 @@ public class TurretHeadItemEM extends ItemBlock { public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List list, boolean p_77624_4_) { list.add(TEC_MARK_EM); list.add(""); - list.add(EnumChatFormatting.GOLD + "--" + StatCollector.translateToLocal("tooltip.info") + "--"); - list.add(StatCollector.translateToLocal("tooltip.tier") + ": " + EnumChatFormatting.WHITE + '5'); - list.add(StatCollector.translateToLocal("tooltip.range") + ": " + EnumChatFormatting.WHITE + ConfigHandler.getLaserTurretSettings().getRange()); - list.add(StatCollector.translateToLocal("tooltip.accuracy") + ": " + EnumChatFormatting.WHITE + StatCollector.translateToLocal("turret.accuracy.high")); - list.add(StatCollector.translateToLocal("tooltip.ammo") + ": " + EnumChatFormatting.WHITE + StatCollector.translateToLocal("turret.ammo.4")); - list.add(StatCollector.translateToLocal("tooltip.tierRequired") + ": " + EnumChatFormatting.WHITE + StatCollector.translateToLocal("base.tier.5")); + list.add(EnumChatFormatting.GOLD + "--" + translateToLocal("tooltip.info") + "--"); + list.add(translateToLocal("tooltip.tier") + ": " + EnumChatFormatting.WHITE + '5'); + list.add(translateToLocal("tooltip.range") + ": " + EnumChatFormatting.WHITE + ConfigHandler.getLaserTurretSettings().getRange()); + list.add(translateToLocal("tooltip.accuracy") + ": " + EnumChatFormatting.WHITE + translateToLocal("turret.accuracy.high")); + list.add(translateToLocal("tooltip.ammo") + ": " + EnumChatFormatting.WHITE + translateToLocal("turret.ammo.4")); + list.add(translateToLocal("tooltip.tierRequired") + ": " + EnumChatFormatting.WHITE + translateToLocal("base.tier.5")); list.add(""); - list.add(EnumChatFormatting.DARK_PURPLE + "--" + StatCollector.translateToLocal("tooltip.damage.label") + "--"); - list.add(StatCollector.translateToLocal("tooltip.damage.stat") + ": " + EnumChatFormatting.WHITE + (float)ConfigHandler.getLaserTurretSettings().getDamage() / 2.0F + ' ' + StatCollector.translateToLocal("tooltip.health")); - list.add(StatCollector.translateToLocal("tooltip.aoe") + ": " + EnumChatFormatting.WHITE + '0'); - list.add(StatCollector.translateToLocal("tooltip.firerate") + ": " + EnumChatFormatting.WHITE + df.format((double)(20.0F / (float)ConfigHandler.getLaserTurretSettings().getFireRate()))); - list.add(StatCollector.translateToLocal("tooltip.energy.stat") + ": " + EnumChatFormatting.WHITE + ConfigHandler.getLaserTurretSettings().getPowerUsage() + " RF"); + list.add(EnumChatFormatting.DARK_PURPLE + "--" + translateToLocal("tooltip.damage.label") + "--"); + list.add(translateToLocal("tooltip.damage.stat") + ": " + EnumChatFormatting.WHITE + (float)ConfigHandler.getLaserTurretSettings().getDamage() / 2.0F + ' ' + translateToLocal("tooltip.health")); + list.add(translateToLocal("tooltip.aoe") + ": " + EnumChatFormatting.WHITE + '0'); + list.add(translateToLocal("tooltip.firerate") + ": " + EnumChatFormatting.WHITE + df.format((double)(20.0F / (float)ConfigHandler.getLaserTurretSettings().getFireRate()))); + list.add(translateToLocal("tooltip.energy.stat") + ": " + EnumChatFormatting.WHITE + ConfigHandler.getLaserTurretSettings().getPowerUsage() + " RF"); list.add(""); - list.add(EnumChatFormatting.DARK_GRAY + StatCollector.translateToLocal("flavour.turret.4")); + list.add(EnumChatFormatting.DARK_GRAY + translateToLocal("flavour.turret.4")); } } diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/dComplexAspectDefinition.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/dComplexAspectDefinition.java index 3d01ec7fb9..8961215354 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/dComplexAspectDefinition.java +++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/dComplexAspectDefinition.java @@ -13,13 +13,13 @@ import com.github.technus.tectech.mechanics.elementalMatter.core.transformations import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.aOredictDequantizationInfo; import com.github.technus.tectech.mechanics.elementalMatter.definitions.primitive.eBosonDefinition; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.StatCollector; import java.util.ArrayList; import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; import static com.github.technus.tectech.mechanics.elementalMatter.core.cElementalDecay.noDecay; import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_scanner.*; +import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by Tec on 06.05.2017. @@ -87,7 +87,7 @@ public final class dComplexAspectDefinition extends cElementalDefinition impleme } else { name = getSymbol(); } - return StatCollector.translateToLocal("tt.keyword.Aspect") + ": " + name; + return translateToLocal("tt.keyword.Aspect") + ": " + name; } @Override @@ -296,24 +296,24 @@ public final class dComplexAspectDefinition extends cElementalDefinition impleme @Override public void addScanResults(ArrayList lines, int capabilities, long energyLevel) { if (Util.areBitsSet(SCAN_GET_CLASS_TYPE, capabilities)) { - lines.add(StatCollector.translateToLocal("tt.keyword.CLASS") + " = " + nbtType + ' ' + getClassType()); + lines.add(translateToLocal("tt.keyword.CLASS") + " = " + nbtType + ' ' + getClassType()); } if (Util.areBitsSet(SCAN_GET_NOMENCLATURE | SCAN_GET_CHARGE | SCAN_GET_MASS, capabilities)) { - lines.add(StatCollector.translateToLocal("tt.keyword.NAME") + " = " + getName()); + lines.add(translateToLocal("tt.keyword.NAME") + " = " + getName()); //lines.add("SYMBOL = "+getSymbol()); } if (Util.areBitsSet(SCAN_GET_CHARGE, capabilities)) { - lines.add(StatCollector.translateToLocal("tt.keyword.CHARGE") + " = " + getCharge() / 3f + " e"); + lines.add(translateToLocal("tt.keyword.CHARGE") + " = " + getCharge() / 3f + " e"); } if (Util.areBitsSet(SCAN_GET_COLOR, capabilities)) { - lines.add(getColor() < 0 ? StatCollector.translateToLocal("tt.keyword.COLORLESS") : StatCollector.translateToLocal("tt.keyphrase.CARRIES_COLOR")); + lines.add(getColor() < 0 ? translateToLocal("tt.keyword.COLORLESS") : translateToLocal("tt.keyphrase.CARRIES_COLOR")); } if (Util.areBitsSet(SCAN_GET_MASS, capabilities)) { - lines.add(StatCollector.translateToLocal("tt.keyword.MASS") + " = " + getMass() + " eV/c\u00b2"); + lines.add(translateToLocal("tt.keyword.MASS") + " = " + getMass() + " eV/c\u00b2"); } if (Util.areBitsSet(SCAN_GET_TIMESPAN_INFO, capabilities)) { - lines.add(StatCollector.translateToLocal("tt.keyphrase.LIFE_TIME") + " = " + getRawTimeSpan(energyLevel) + " s"); - lines.add(" " + StatCollector.translateToLocal("tt.keyphrase.At_current_energy_level")); + lines.add(translateToLocal("tt.keyphrase.LIFE_TIME") + " = " + getRawTimeSpan(energyLevel) + " s"); + lines.add(" " + translateToLocal("tt.keyphrase.At_current_energy_level")); } } } diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/ePrimalAspectDefinition.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/ePrimalAspectDefinition.java index b31e7460c8..bcb6e3f6fc 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/ePrimalAspectDefinition.java +++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/ePrimalAspectDefinition.java @@ -1,21 +1,21 @@ package com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.definitions; import com.github.technus.tectech.mechanics.elementalMatter.core.templates.cElementalPrimitive; -import net.minecraft.util.StatCollector; import static com.github.technus.tectech.mechanics.elementalMatter.core.cElementalDecay.noDecay; +import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by Tec on 06.05.2017. */ public final class ePrimalAspectDefinition extends cElementalPrimitive implements iElementalAspect { public static final ePrimalAspectDefinition - magic_air = new ePrimalAspectDefinition(StatCollector.translateToLocal("tt.keyword.Air"), "a`", 1e1F, 35), - magic_earth = new ePrimalAspectDefinition(StatCollector.translateToLocal("tt.keyword.Earth"), "e`", 1e9F, 34), - magic_fire = new ePrimalAspectDefinition(StatCollector.translateToLocal("tt.keyword.Fire"), "f`", 1e3F, 33), - magic_water = new ePrimalAspectDefinition(StatCollector.translateToLocal("tt.keyword.Water"), "w`", 1e7F, 32), - magic_order = new ePrimalAspectDefinition(StatCollector.translateToLocal("tt.keyword.Order"), "o`", 1e5F, 30), - magic_entropy = new ePrimalAspectDefinition(StatCollector.translateToLocal("tt.keyword.Entropy"), "e`", 1e5F, 31); + magic_air = new ePrimalAspectDefinition(translateToLocal("tt.keyword.Air"), "a`", 1e1F, 35), + magic_earth = new ePrimalAspectDefinition(translateToLocal("tt.keyword.Earth"), "e`", 1e9F, 34), + magic_fire = new ePrimalAspectDefinition(translateToLocal("tt.keyword.Fire"), "f`", 1e3F, 33), + magic_water = new ePrimalAspectDefinition(translateToLocal("tt.keyword.Water"), "w`", 1e7F, 32), + magic_order = new ePrimalAspectDefinition(translateToLocal("tt.keyword.Order"), "o`", 1e5F, 30), + magic_entropy = new ePrimalAspectDefinition(translateToLocal("tt.keyword.Entropy"), "e`", 1e5F, 31); private ePrimalAspectDefinition(String name, String symbol, float mass, int ID) { super(name, symbol, 0, mass, 0, -1, ID); @@ -32,7 +32,7 @@ public final class ePrimalAspectDefinition extends cElementalPrimitive implement @Override public String getName() { - return StatCollector.translateToLocal("tt.keyword.Primal")+": " + name; + return translateToLocal("tt.keyword.Primal") + ": " + name; } @Override diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java index 31a81726c4..d3a8138686 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java +++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java @@ -21,7 +21,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; import static com.github.technus.tectech.CommonValues.V; @@ -30,6 +29,7 @@ import static com.github.technus.tectech.compatibility.thaumcraft.thing.metaTile import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static gregtech.api.enums.GT_Values.E; +import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by danie_000 on 17.12.2016. @@ -55,11 +55,11 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_ private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0, 4, 4}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyphrase.Hint_Details") + ":", - StatCollector.translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.0"),//1 - Classic Hatches or High Power Casing - StatCollector.translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.1"),//2 - Elemental Input Hatch - StatCollector.translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.2"),//3 - Elemental Overflow Hatches or Elemental Casing - StatCollector.translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.3"),//General - Some sort of Essentia Storage + EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", + translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.0"),//1 - Classic Hatches or High Power Casing + translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.1"),//2 - Elemental Input Hatch + translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.2"),//3 - Elemental Overflow Hatches or Elemental Casing + translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.3"),//General - Some sort of Essentia Storage }; //endregion @@ -143,8 +143,8 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_ public String[] getDescription() { return new String[]{ CommonValues.TEC_MARK_EM, - StatCollector.translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.desc.0"),//Transform quantum form back to... - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + StatCollector.translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.desc.1")//regular one, but why? + translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.desc.0"),//Transform quantum form back to... + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.desc.1")//regular one, but why? }; } -} +} \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java index 4425a97f64..696242adff 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java +++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java @@ -21,7 +21,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; import static com.github.technus.tectech.CommonValues.V; @@ -30,6 +29,7 @@ import static com.github.technus.tectech.compatibility.thaumcraft.thing.metaTile import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static gregtech.api.enums.GT_Values.E; +import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by danie_000 on 17.12.2016. @@ -55,11 +55,11 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0, 4, 4}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyphrase.Hint_Details") + ":", - StatCollector.translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.0"),//1 - Classic Hatches or High Power Casing - StatCollector.translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.1"),//2 - Elemental Output Hatch - StatCollector.translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.2"),//3 - Elemental Overflow Hatches or Elemental Casing - StatCollector.translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.3"),//General - Some sort of Essentia Storage + EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", + translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.0"),//1 - Classic Hatches or High Power Casing + translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.1"),//2 - Elemental Output Hatch + translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.2"),//3 - Elemental Overflow Hatches or Elemental Casing + translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.3"),//General - Some sort of Essentia Storage }; //endregion @@ -116,8 +116,8 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu public String[] getDescription() { return new String[]{ CommonValues.TEC_MARK_EM, - StatCollector.translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.desc.0"),//Conveniently convert regular stuff into quantum form. - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + StatCollector.translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.desc.1")//To make it more inconvenient. + translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.desc.0"),//Conveniently convert regular stuff into quantum form. + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.desc.1")//To make it more inconvenient. }; } @@ -151,4 +151,4 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu eOutputHatches.get(0).getContainerHandler().putUnifyAll(outputEM[0]); outputEM = null; } -} +} \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoMulti.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoMulti.java index 81ad00ea06..aeaa54d241 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoMulti.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoMulti.java @@ -8,10 +8,10 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import net.minecraft.util.StatCollector; import static com.github.technus.tectech.CommonValues.V; import static com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ENERGY_IN_POWER_TT; +import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by danie_000 on 16.12.2016. @@ -20,7 +20,7 @@ public class GT_MetaTileEntity_Hatch_DynamoMulti extends GT_MetaTileEntity_Hatch public final int Amperes; public GT_MetaTileEntity_Hatch_DynamoMulti(int aID, String aName, String aNameRegional, int aTier, int aAmp) { - super(aID, aName, aNameRegional, aTier, 0, StatCollector.translateToLocal("gt.blockmachines.hatch.dynamomulti.desc.0"));//Multiple Ampere Energy Extractor for Multiblocks + super(aID, aName, aNameRegional, aTier, 0, translateToLocal("gt.blockmachines.hatch.dynamomulti.desc.0"));//Multiple Ampere Energy Extractor for Multiblocks Amperes = aAmp; Util.setTier(aTier, this); } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoTunnel.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoTunnel.java index 95bb0bc60d..60a663e0c7 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoTunnel.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoTunnel.java @@ -12,18 +12,18 @@ import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; import static com.github.technus.tectech.CommonValues.TRANSFER_AT; import static com.github.technus.tectech.CommonValues.V; import static com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ENERGY_OUT_LASER_TT; +import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by danie_000 on 16.12.2016. */ public class GT_MetaTileEntity_Hatch_DynamoTunnel extends GT_MetaTileEntity_Hatch_DynamoMulti implements IConnectsToEnergyTunnel { public GT_MetaTileEntity_Hatch_DynamoTunnel(int aID, String aName, String aNameRegional, int aTier, int aAmp) { - super(aID, aName, aNameRegional, aTier, 0, StatCollector.translateToLocal("gt.blockmachines.hatch.dynamotunnel.desc.0"), aAmp);//Energy extracting terminal for Multiblocks + super(aID, aName, aNameRegional, aTier, 0, translateToLocal("gt.blockmachines.hatch.dynamotunnel.desc.0"), aAmp);//Energy extracting terminal for Multiblocks Util.setTier(aTier, this); } @@ -105,8 +105,8 @@ public class GT_MetaTileEntity_Hatch_DynamoTunnel extends GT_MetaTileEntity_Hatc public String[] getDescription() { return new String[]{ CommonValues.TEC_MARK_GENERAL, - mDescription, - StatCollector.translateToLocal("gt.blockmachines.hatch.dynamotunnel.desc.1") + ": " + EnumChatFormatting.YELLOW + (Amperes * maxEUOutput()) + EnumChatFormatting.RESET + " EU/t"//Throughput + mDescription,//TODO NOT PASS DESCRIPTION + translateToLocal("gt.blockmachines.hatch.dynamotunnel.desc.1") + ": " + EnumChatFormatting.YELLOW + (Amperes * maxEUOutput()) + EnumChatFormatting.RESET + " EU/t"//Throughput }; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ElementalContainer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ElementalContainer.java index 0d0d98007d..5439e3f6d6 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ElementalContainer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ElementalContainer.java @@ -20,7 +20,6 @@ import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; import net.minecraftforge.fluids.FluidStack; import org.apache.commons.lang3.reflect.FieldUtils; @@ -28,6 +27,7 @@ import static com.github.technus.tectech.CommonValues.*; import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; import static gregtech.api.enums.Dyes.MACHINE_METAL; import static gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity; +import static net.minecraft.util.StatCollector.translateToLocal; import static net.minecraft.util.StatCollector.translateToLocalFormatted; /** @@ -131,7 +131,7 @@ public abstract class GT_MetaTileEntity_Hatch_ElementalContainer extends GT_Meta tGTTileEntity.doExplosion(V[14]); } else { TecTech.anomalyHandler.addAnomaly(aBaseMetaTileEntity, overflowMatter * 32D); - TecTech.proxy.broadcast("Container1 " + StatCollector.translateToLocal("tt.keyword.BOOM") + " " + aBaseMetaTileEntity.getXCoord() + ' ' + aBaseMetaTileEntity.getYCoord() + ' ' + aBaseMetaTileEntity.getZCoord()); + TecTech.proxy.broadcast("Container1 " + translateToLocal("tt.keyword.BOOM") + " " + aBaseMetaTileEntity.getXCoord() + ' ' + aBaseMetaTileEntity.getYCoord() + ' ' + aBaseMetaTileEntity.getZCoord()); } } deathDelay = 3;//needed in some cases like repetitive failures. Should be 4 since there is -- at end but meh... @@ -144,7 +144,7 @@ public abstract class GT_MetaTileEntity_Hatch_ElementalContainer extends GT_Meta TecTech.anomalyHandler.addAnomaly(aBaseMetaTileEntity, overflowMatter * 32D); deathDelay = 3; overflowMatter = 0; - TecTech.proxy.broadcast("Container0 " + StatCollector.translateToLocal("tt.keyword.BOOM") + " " + aBaseMetaTileEntity.getXCoord() + ' ' + aBaseMetaTileEntity.getYCoord() + ' ' + aBaseMetaTileEntity.getZCoord()); + TecTech.proxy.broadcast("Container0 " + translateToLocal("tt.keyword.BOOM") + " " + aBaseMetaTileEntity.getXCoord() + ' ' + aBaseMetaTileEntity.getYCoord() + ' ' + aBaseMetaTileEntity.getZCoord()); } } deathDelay--; @@ -220,7 +220,7 @@ public abstract class GT_MetaTileEntity_Hatch_ElementalContainer extends GT_Meta if (!aBaseMetaTileEntity.isClientSide() && aPlayer instanceof EntityPlayerMP) { try { EntityPlayerMP player = (EntityPlayerMP) aPlayer; - clientLocale = (String) FieldUtils.readField(player,"translator",true); + clientLocale = (String) FieldUtils.readField(player, "translator", true); } catch (Exception e) { clientLocale = "en_US"; } @@ -238,35 +238,34 @@ public abstract class GT_MetaTileEntity_Hatch_ElementalContainer extends GT_Meta @Override public String[] getInfoData() { - return new String[]{translateToLocalFormatted("tt.keyword.ID", clientLocale)}; - //if (TecTech.configTecTech.EASY_SCAN) { - // if (id > 0) { - // if (content == null || content.size() == 0) { - // return new String[]{StatCollector.translateToLocal("tt.keyword.ID") + ": " + EnumChatFormatting.AQUA + id, StatCollector.translateToLocal("tt.keyphrase.No_Stacks")}; - // } else { - // String[] lines = content.getElementalInfo(); - // String[] output = new String[lines.length + 1]; - // output[0] = StatCollector.translateToLocal("tt.keyword.ID") + ": " + EnumChatFormatting.AQUA + id; - // System.arraycopy(lines, 0, output, 1, lines.length); - // return output; - // } - // } - // if (content == null || content.size() == 0) { - // return new String[]{StatCollector.translateToLocal("tt.keyphrase.No_Stacks")}; - // } - // return content.getElementalInfo(); - //} else { - // if (id > 0) { - // if (content == null || content.size() == 0) { - // return new String[]{StatCollector.translateToLocal("tt.keyword.ID") + ": " + EnumChatFormatting.AQUA + id, StatCollector.translateToLocal("tt.keyphrase.No_Stacks")}; - // } - // return new String[]{StatCollector.translateToLocal("tt.keyword.ID") + ": " + EnumChatFormatting.AQUA + id, StatCollector.translateToLocal("tt.keyphrase.Contains_EM")}; - // } - // if (content == null || content.size() == 0) { - // return new String[]{StatCollector.translateToLocal("tt.keyphrase.No_Stacks")}; - // } - // return new String[]{StatCollector.translateToLocal("tt.keyphrase.Contains_EM")}; - //} + if (TecTech.configTecTech.EASY_SCAN) { + if (id > 0) { + if (content == null || content.size() == 0) { + return new String[]{translateToLocalFormatted("tt.keyword.ID", clientLocale) + ": " + EnumChatFormatting.AQUA + id, translateToLocalFormatted("tt.keyphrase.No_Stacks", clientLocale)}; + } else { + String[] lines = content.getElementalInfo(); + String[] output = new String[lines.length + 1]; + output[0] = translateToLocalFormatted("tt.keyword.ID", clientLocale) + ": " + EnumChatFormatting.AQUA + id; + System.arraycopy(lines, 0, output, 1, lines.length); + return output; + } + } + if (content == null || content.size() == 0) { + return new String[]{translateToLocalFormatted("tt.keyphrase.No_Stacks", clientLocale)}; + } + return content.getElementalInfo(); + } else { + if (id > 0) { + if (content == null || content.size() == 0) { + return new String[]{translateToLocalFormatted("tt.keyword.ID", clientLocale) + ": " + EnumChatFormatting.AQUA + id, translateToLocalFormatted("tt.keyphrase.No_Stacks", clientLocale)}; + } + return new String[]{translateToLocalFormatted("tt.keyword.ID", clientLocale) + ": " + EnumChatFormatting.AQUA + id, translateToLocalFormatted("tt.keyphrase.Contains_EM", clientLocale)}; + } + if (content == null || content.size() == 0) { + return new String[]{translateToLocalFormatted("tt.keyphrase.No_Stacks", clientLocale)}; + } + return new String[]{translateToLocalFormatted("tt.keyphrase.Contains_EM", clientLocale)}; + } } public void updateSlots() { @@ -278,14 +277,14 @@ public abstract class GT_MetaTileEntity_Hatch_ElementalContainer extends GT_Meta return new String[]{ TEC_MARK_EM, mDescription, - StatCollector.translateToLocal("tt.base.emhatch.desc.0") + " " + EnumChatFormatting.AQUA + getMaxStacksCount(),//Max stacks amount: - StatCollector.translateToLocal("tt.base.emhatch.desc.1") + " " + EnumChatFormatting.AQUA + getMaxStackSize(),//Stack capacity: - StatCollector.translateToLocal("tt.base.emhatch.desc.2"),//Place Overflow Hatch behind,on top or below - StatCollector.translateToLocal("tt.base.emhatch.desc.3"),//to provide overflow protection while this block - StatCollector.translateToLocal("tt.base.emhatch.desc.4"),//is not attached to multi block. - StatCollector.translateToLocal("tt.base.emhatch.desc.5"),//Transport range can be extended in straight - StatCollector.translateToLocal("tt.base.emhatch.desc.6"),//line up to 15 blocks with quantum tunnels. - EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.base.emhatch.desc.7")//Must be painted to work + translateToLocal("tt.base.emhatch.desc.0") + " " + EnumChatFormatting.AQUA + getMaxStacksCount(),//Max stacks amount: + translateToLocal("tt.base.emhatch.desc.1") + " " + EnumChatFormatting.AQUA + getMaxStackSize(),//Stack capacity: + translateToLocal("tt.base.emhatch.desc.2"),//Place Overflow Hatch behind,on top or below + translateToLocal("tt.base.emhatch.desc.3"),//to provide overflow protection while this block + translateToLocal("tt.base.emhatch.desc.4"),//is not attached to multi block. + translateToLocal("tt.base.emhatch.desc.5"),//Transport range can be extended in straight + translateToLocal("tt.base.emhatch.desc.6"),//line up to 15 blocks with quantum tunnels. + EnumChatFormatting.AQUA + translateToLocal("tt.base.emhatch.desc.7")//Must be painted to work }; } @@ -297,7 +296,7 @@ public abstract class GT_MetaTileEntity_Hatch_ElementalContainer extends GT_Meta if (TecTech.configTecTech.BOOM_ENABLE) { base.doExplosion(V[15]); } else { - TecTech.proxy.broadcast(StatCollector.translateToLocal("tt.keyword.BOOM") + " " + base.getXCoord() + ' ' + base.getYCoord() + ' ' + base.getZCoord()); + TecTech.proxy.broadcast(translateToLocal("tt.keyword.BOOM") + " " + base.getXCoord() + ' ' + base.getYCoord() + ' ' + base.getZCoord()); } } } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyMulti.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyMulti.java index b9030d2dbe..9a16aa1339 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyMulti.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyMulti.java @@ -9,10 +9,10 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; import static com.github.technus.tectech.CommonValues.V; import static com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ENERGY_IN_POWER_TT; +import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by danie_000 on 16.12.2016. @@ -21,7 +21,7 @@ public class GT_MetaTileEntity_Hatch_EnergyMulti extends GT_MetaTileEntity_Hatch public final int Amperes; public GT_MetaTileEntity_Hatch_EnergyMulti(int aID, String aName, String aNameRegional, int aTier, int aAmp) { - super(aID, aName, aNameRegional, aTier, 0, StatCollector.translateToLocal("gt.blockmachines.hatch.energymulti.desc.0"));//Multiple Ampere Energy Injector for Multiblocks + super(aID, aName, aNameRegional, aTier, 0, translateToLocal("gt.blockmachines.hatch.energymulti.desc.0"));//Multiple Ampere Energy Injector for Multiblocks Amperes = aAmp; Util.setTier(aTier, this); } @@ -116,7 +116,7 @@ public class GT_MetaTileEntity_Hatch_EnergyMulti extends GT_MetaTileEntity_Hatch return new String[]{ CommonValues.TEC_MARK_GENERAL, mDescription, - StatCollector.translateToLocal("gt.blockmachines.hatch.energymulti.desc.1") + ": " + EnumChatFormatting.AQUA + maxAmperesIn() + " A"//Amperes In + translateToLocal("gt.blockmachines.hatch.energymulti.desc.1") + ": " + EnumChatFormatting.AQUA + maxAmperesIn() + " A"//Amperes In }; } -} +} \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyTunnel.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyTunnel.java index 118a659e93..6034e51a98 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyTunnel.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyTunnel.java @@ -10,18 +10,18 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; import static com.github.technus.tectech.CommonValues.TRANSFER_AT; import static com.github.technus.tectech.CommonValues.V; import static com.github.technus.tectech.thing.metaTileEntity.Textures.OVERLAYS_ENERGY_IN_LASER_TT; +import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by danie_000 on 16.12.2016. */ public class GT_MetaTileEntity_Hatch_EnergyTunnel extends GT_MetaTileEntity_Hatch_EnergyMulti implements IConnectsToEnergyTunnel { public GT_MetaTileEntity_Hatch_EnergyTunnel(int aID, String aName, String aNameRegional, int aTier, int aAmp) { - super(aID, aName, aNameRegional, aTier, 0, StatCollector.translateToLocal("gt.blockmachines.hatch.energytunnel.desc.0"), aAmp);//Energy injecting terminal for Multiblocks + super(aID, aName, aNameRegional, aTier, 0, translateToLocal("gt.blockmachines.hatch.energytunnel.desc.0"), aAmp);//Energy injecting terminal for Multiblocks Util.setTier(aTier, this); } @@ -114,7 +114,7 @@ public class GT_MetaTileEntity_Hatch_EnergyTunnel extends GT_MetaTileEntity_Hatc return new String[]{ CommonValues.TEC_MARK_GENERAL, mDescription, - StatCollector.translateToLocal("gt.blockmachines.hatch.energytunnel.desc.1") + ": " + EnumChatFormatting.YELLOW + (Amperes * maxEUInput()) + EnumChatFormatting.RESET + " EU/t"//Throughput + translateToLocal("gt.blockmachines.hatch.energytunnel.desc.1") + ": " + EnumChatFormatting.YELLOW + (Amperes * maxEUInput()) + EnumChatFormatting.RESET + " EU/t"//Throughput }; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_InputElemental.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_InputElemental.java index 2b2c54526f..cfa15b4cf3 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_InputElemental.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_InputElemental.java @@ -4,14 +4,15 @@ import com.github.technus.tectech.Util; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import net.minecraft.util.StatCollector; + +import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by danie_000 on 27.10.2016. */ public class GT_MetaTileEntity_Hatch_InputElemental extends GT_MetaTileEntity_Hatch_ElementalContainer { public GT_MetaTileEntity_Hatch_InputElemental(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, StatCollector.translateToLocal("gt.blockmachines.emin.desc"));//Elemental Input for Multiblocks + super(aID, aName, aNameRegional, aTier, translateToLocal("gt.blockmachines.emin.desc"));//Elemental Input for Multiblocks Util.setTier(aTier, this); } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OutputElemental.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OutputElemental.java index 8801388e84..d826daf355 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OutputElemental.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OutputElemental.java @@ -7,15 +7,16 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.util.GT_Utility; -import net.minecraft.util.StatCollector; + +import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by danie_000 on 27.10.2016. */ public class GT_MetaTileEntity_Hatch_OutputElemental extends GT_MetaTileEntity_Hatch_ElementalContainer { public GT_MetaTileEntity_Hatch_OutputElemental(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, StatCollector.translateToLocal("gt.blockmachines.emout.desc"));//Elemental Output for Multiblocks - Util.setTier(aTier,this); + super(aID, aName, aNameRegional, aTier, translateToLocal("gt.blockmachines.emout.desc"));//Elemental Output for Multiblocks + Util.setTier(aTier, this); } //public GT_MetaTileEntity_Hatch_OutputElemental(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { @@ -28,7 +29,7 @@ public class GT_MetaTileEntity_Hatch_OutputElemental extends GT_MetaTileEntity_H @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Hatch_OutputElemental(mName, mTier, mDescription, mTextures); + return new GT_MetaTileEntity_Hatch_OutputElemental(mName, mTier, mDescription, mTextures); } @Override @@ -68,7 +69,7 @@ public class GT_MetaTileEntity_Hatch_OutputElemental extends GT_MetaTileEntity_H } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Pipe_EM) { if (((GT_MetaTileEntity_Pipe_EM) aMetaTileEntity).connectionCount != 2) { return; - }else { + } else { ((GT_MetaTileEntity_Pipe_EM) aMetaTileEntity).markUsed(); } } else { @@ -87,4 +88,4 @@ public class GT_MetaTileEntity_Hatch_OutputElemental extends GT_MetaTileEntity_H public boolean canConnect(byte side) { return isOutputFacing(side); } -} +} \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java index 3e7ceec796..ba64f1635e 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java @@ -21,7 +21,6 @@ import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; import net.minecraft.world.EnumSkyBlock; import net.minecraftforge.common.util.ForgeDirection; @@ -32,6 +31,7 @@ import static com.github.technus.tectech.CommonValues.V; import static com.github.technus.tectech.loader.MainLoader.elementalPollution; import static gregtech.api.enums.Dyes.MACHINE_METAL; import static gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity; +import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by danie_000 on 12.12.2016. @@ -46,7 +46,7 @@ public class GT_MetaTileEntity_Hatch_OverflowElemental extends GT_MetaTileEntity private final float overflowDisperse; public GT_MetaTileEntity_Hatch_OverflowElemental(int aID, String aName, String aNameRegional, int aTier, float max) { - super(aID, aName, aNameRegional, aTier, 0, StatCollector.translateToLocal("gt.blockmachines.hatch.emmuffler.desc.0"));//Disposes excess elemental Matter + super(aID, aName, aNameRegional, aTier, 0, translateToLocal("gt.blockmachines.hatch.emmuffler.desc.0"));//Disposes excess elemental Matter overflowMatter = max / 2; overflowMax = max; overflowDisperse = overflowMax / (float) (30 - aTier); @@ -85,9 +85,9 @@ public class GT_MetaTileEntity_Hatch_OverflowElemental extends GT_MetaTileEntity return new String[]{ CommonValues.TEC_MARK_EM, mDescription, - StatCollector.translateToLocal("gt.blockmachines.hatch.emmuffler.desc.1") + ": " + EnumChatFormatting.AQUA + String.format(Locale.ENGLISH, "%+.2E", overflowMax) + " eV/c\u00b2", - StatCollector.translateToLocal("gt.blockmachines.hatch.emmuffler.desc.2") + ": " + EnumChatFormatting.AQUA + String.format(Locale.ENGLISH, "%+.2E", overflowDisperse) + " (eV/c\u00b2)/s", - StatCollector.translateToLocal("gt.blockmachines.hatch.emmuffler.desc.3") + translateToLocal("gt.blockmachines.hatch.emmuffler.desc.1") + ": " + EnumChatFormatting.AQUA + String.format(Locale.ENGLISH, "%+.2E", overflowMax) + " eV/c\u00b2", + translateToLocal("gt.blockmachines.hatch.emmuffler.desc.2") + ": " + EnumChatFormatting.AQUA + String.format(Locale.ENGLISH, "%+.2E", overflowDisperse) + " (eV/c\u00b2)/s", + translateToLocal("gt.blockmachines.hatch.emmuffler.desc.3") }; } @@ -193,10 +193,10 @@ public class GT_MetaTileEntity_Hatch_OverflowElemental extends GT_MetaTileEntity @Override public String[] getInfoData() { return new String[]{ - StatCollector.translateToLocal("tt.keyphrase.Contained_mass") + ":", + translateToLocal("tt.keyphrase.Contained_mass") + ":", EnumChatFormatting.RED + Double.toString(overflowMatter) + EnumChatFormatting.RESET + " eV/c\u00b2 /", EnumChatFormatting.GREEN + Double.toString(overflowMax) + EnumChatFormatting.RESET + " eV/c\u00b2", - StatCollector.translateToLocal("tt.keyphrase.Mass_Disposal_speed") + ": " + EnumChatFormatting.BLUE + overflowDisperse + EnumChatFormatting.RESET + " (eV/c\u00b2)/s" + translateToLocal("tt.keyphrase.Mass_Disposal_speed") + ": " + EnumChatFormatting.BLUE + overflowDisperse + EnumChatFormatting.RESET + " (eV/c\u00b2)/s" }; } @@ -207,7 +207,7 @@ public class GT_MetaTileEntity_Hatch_OverflowElemental extends GT_MetaTileEntity if (TecTech.configTecTech.BOOM_ENABLE) { getBaseMetaTileEntity().doExplosion(V[15]); } else { - TecTech.proxy.broadcast(StatCollector.translateToLocal("tt.keyphrase.Muffler_BOOM") + " " + getBaseMetaTileEntity().getXCoord() + ' ' + getBaseMetaTileEntity().getYCoord() + ' ' + getBaseMetaTileEntity().getZCoord()); + TecTech.proxy.broadcast(translateToLocal("tt.keyphrase.Muffler_BOOM") + " " + getBaseMetaTileEntity().getXCoord() + ' ' + getBaseMetaTileEntity().getYCoord() + ' ' + getBaseMetaTileEntity().getZCoord()); } } } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java index 2f3bca7c16..1aa2420773 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java @@ -9,12 +9,7 @@ import com.github.technus.tectech.thing.metaTileEntity.IConstructable; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputData; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_OutputData; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Rack; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.IHatchAdder; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.INameFunction; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.IStatusFunction; +import com.github.technus.tectech.thing.metaTileEntity.multi.base.*; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedTexture; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -30,7 +25,6 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; import java.util.ArrayList; @@ -40,6 +34,7 @@ import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texture 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.base.LedStatus.*; +import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by danie_000 on 17.12.2016. @@ -62,9 +57,9 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{1, 3}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyphrase.Hint_Details") + ":", - StatCollector.translateToLocal("gt.blockmachines.multimachine.em.computer.hint.0"),//1 - Classic/Data Hatches or Computer casing - StatCollector.translateToLocal("gt.blockmachines.multimachine.em.computer.hint.1"),//2 - Rack Hatches or Advanced computer casing + EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", + translateToLocal("gt.blockmachines.multimachine.em.computer.hint.0"),//1 - Classic/Data Hatches or Computer casing + translateToLocal("gt.blockmachines.multimachine.em.computer.hint.1"),//2 - Rack Hatches or Advanced computer casing }; //endregion @@ -72,10 +67,10 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB protected Parameters.Group.ParameterIn overclock, overvolt; protected Parameters.Group.ParameterOut maxCurrentTemp, availableData; - private static final INameFunction OC_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.em.computer.cfgi.0");//Overclock ratio - private static final INameFunction OV_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.em.computer.cfgi.1");//Overvoltage ratio - private static final INameFunction MAX_TEMP_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.em.computer.cfgo.0");//Current max. heat - private static final INameFunction COMPUTE_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.em.computer.cfgo.1");//Produced computation + private static final INameFunction OC_NAME = (base, p) -> translateToLocal("gt.blockmachines.multimachine.em.computer.cfgi.0");//Overclock ratio + private static final INameFunction OV_NAME = (base, p) -> translateToLocal("gt.blockmachines.multimachine.em.computer.cfgi.1");//Overvoltage ratio + private static final INameFunction MAX_TEMP_NAME = (base, p) -> translateToLocal("gt.blockmachines.multimachine.em.computer.cfgo.0");//Current max. heat + private static final INameFunction COMPUTE_NAME = (base, p) -> translateToLocal("gt.blockmachines.multimachine.em.computer.cfgo.1");//Produced computation private static final IStatusFunction OC_STATUS = (base, p) -> LedStatus.fromLimitsInclusiveOuterBoundary(p.get(), 0, 1, 1, 3); private static final IStatusFunction OV_STATUS = @@ -338,7 +333,7 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB return new String[]{ CommonValues.TEC_MARK_EM, Util.intBitsToString(TecTech.RANDOM.nextInt()), - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + StatCollector.translateToLocal("gt.blockmachines.multimachine.em.computer.desc")//You need it to process the number above + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.computer.desc")//You need it to process the number above }; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java index be244e6820..933e266781 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java @@ -7,11 +7,7 @@ import com.github.technus.tectech.mechanics.dataTransport.QuantumDataPacket; import com.github.technus.tectech.thing.metaTileEntity.IConstructable; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputData; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_OutputData; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.IHatchAdder; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.INameFunction; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.IStatusFunction; +import com.github.technus.tectech.thing.metaTileEntity.multi.base.*; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedTexture; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -23,7 +19,6 @@ import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; import static com.github.technus.tectech.CommonValues.V; import static com.github.technus.tectech.Util.StructureBuilderExtreme; @@ -31,6 +26,7 @@ import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texture 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.base.LedStatus.*; +import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by danie_000 on 17.12.2016. @@ -49,14 +45,14 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{1}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyphrase.Hint_Details") + ":", + EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", "1 - Classic/Data Hatches or Computer casing",//1 - Classic/Data Hatches or Computer casing }; //endregion //region parameters private static final INameFunction ROUTE_NAME = - (base, p) -> (p.parameterId() == 0 ? StatCollector.translateToLocal("tt.keyword.Destination") + " " : StatCollector.translateToLocal("tt.keyword.Weight") + " ") + p.hatchId(); + (base, p) -> (p.parameterId() == 0 ? translateToLocal("tt.keyword.Destination") + " " : translateToLocal("tt.keyword.Weight") + " ") + p.hatchId(); private static final IStatusFunction WEI_STATUS = (base, p) -> { double v = p.get(); @@ -224,8 +220,8 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas public String[] getDescription() { return new String[]{ CommonValues.TEC_MARK_EM, - StatCollector.translateToLocal("gt.blockmachines.multimachine.em.switch.desc.0"),//User controlled computation power routing - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + StatCollector.translateToLocal("gt.blockmachines.multimachine.em.switch.desc.1")//Quality of service is a must + translateToLocal("gt.blockmachines.multimachine.em.switch.desc.0"),//User controlled computation power routing + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.switch.desc.1")//Quality of service is a must }; } } \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java index 76ee59977c..f02b41d9ce 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java @@ -19,13 +19,13 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; import static com.github.technus.tectech.Util.StructureBuilderExtreme; 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 gregtech.api.GregTech_API.sBlockCasings1; +import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by danie_000 on 17.12.2016. @@ -44,8 +44,8 @@ public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_Multiblo private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyphrase.Hint_Details") + ":", - StatCollector.translateToLocal("gt.blockmachines.multimachine.em.transformer.hint"),//1 - Energy IO Hatches or High Power Casing + EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", + translateToLocal("gt.blockmachines.multimachine.em.transformer.hint"),//1 - Energy IO Hatches or High Power Casing }; //endregion @@ -121,9 +121,9 @@ public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_Multiblo public String[] getDescription() { return new String[]{ CommonValues.TEC_MARK_GENERAL, - StatCollector.translateToLocal("gt.blockmachines.multimachine.em.transformer.desc.0"),//Power substation - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + StatCollector.translateToLocal("gt.blockmachines.multimachine.em.transformer.desc.1"),//All the transformation! - EnumChatFormatting.BLUE + StatCollector.translateToLocal("gt.blockmachines.multimachine.em.transformer.desc.2"),//Only 0.78125% power loss, HAYO! + translateToLocal("gt.blockmachines.multimachine.em.transformer.desc.0"),//Power substation + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.transformer.desc.1"),//All the transformation! + EnumChatFormatting.BLUE + translateToLocal("gt.blockmachines.multimachine.em.transformer.desc.2"),//Only 0.78125% power loss, HAYO! }; } 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 f0feb4a635..6d9691ba10 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 @@ -19,7 +19,6 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; import java.util.ArrayList; import java.util.HashSet; @@ -29,6 +28,7 @@ import static com.github.technus.tectech.loader.MainLoader.microwaving; import static com.github.technus.tectech.recipe.TT_recipeAdder.nullItem; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; import static gregtech.api.GregTech_API.sBlockCasings4; +import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by danie_000 on 17.12.2016. @@ -53,20 +53,20 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock private static final Block[] blockTypeFallback = new Block[]{sBlockCasings4}; private static final byte[] blockMetaFallback = new byte[]{1}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyphrase.Hint_Details") + ":", - StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.microwave.hint.0"),//1 - Classic Hatches or Clean Stainless Steel Casing - StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.microwave.hint.1"),//Also acts like a hopper so give it an Output Bus + EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", + translateToLocal("gt.blockmachines.multimachine.tm.microwave.hint.0"),//1 - Classic Hatches or Clean Stainless Steel Casing + translateToLocal("gt.blockmachines.multimachine.tm.microwave.hint.1"),//Also acts like a hopper so give it an Output Bus }; //endregion //region parameters protected Parameters.Group.ParameterIn powerSetting, timerSetting; protected Parameters.Group.ParameterOut timerValue, remainingTime; - private static final INameFunction POWER_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.microwave.cfgi.0");//Power setting - private static final INameFunction TIMER_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.microwave.cfgi.1");//Timer setting + private static final INameFunction POWER_SETTING_NAME = (base, p) -> translateToLocal("gt.blockmachines.multimachine.tm.microwave.cfgi.0");//Power setting + private static final INameFunction TIMER_SETTING_NAME = (base, p) -> translateToLocal("gt.blockmachines.multimachine.tm.microwave.cfgi.1");//Timer setting - private static final INameFunction TIMER_VALUE_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.microwave.cfgo.0");//Timer value - private static final INameFunction TIMER_REMAINING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.microwave.cfgo.1");//Timer remaining + private static final INameFunction TIMER_VALUE_NAME = (base, p) -> translateToLocal("gt.blockmachines.multimachine.tm.microwave.cfgo.0");//Timer value + private static final INameFunction TIMER_REMAINING_NAME = (base, p) -> translateToLocal("gt.blockmachines.multimachine.tm.microwave.cfgo.1");//Timer remaining private static final IStatusFunction POWER_STATUS = (base, p) -> LedStatus.fromLimitsInclusiveOuterBoundary(p.get(), 300, 1000, 1000, Double.POSITIVE_INFINITY); private static final IStatusFunction TIMER_STATUS = (base, p) -> { @@ -141,9 +141,9 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock public String[] getDescription() { return new String[]{ CommonValues.BASS_MARK, - StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.microwave.desc.0"),//High Frequency Oven - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.microwave.desc.1"),//From live to done in seconds! - EnumChatFormatting.BLUE + StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.microwave.desc.2"),//I said nuke the... I meant microwave supper! + translateToLocal("gt.blockmachines.multimachine.tm.microwave.desc.0"),//High Frequency Oven + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.tm.microwave.desc.1"),//From live to done in seconds! + EnumChatFormatting.BLUE + translateToLocal("gt.blockmachines.multimachine.tm.microwave.desc.2"),//I said nuke the... I meant microwave supper! }; } 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 a82bf9be99..dc1a54a119 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 @@ -27,7 +27,6 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; import java.util.ArrayList; import java.util.HashMap; @@ -40,6 +39,7 @@ import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texture import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsBA0; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; import static gregtech.api.enums.GT_Values.E; +import static net.minecraft.util.StatCollector.translateToLocal; public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { private final static HashSet sparkList = new HashSet<>(); @@ -98,9 +98,9 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsBA0, null}; private static final byte[] blockMetaFallback = new byte[]{6, 0}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyphrase.Hint_Details") + ":", - StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.hint.0"),//1 - Classic Hatches, Capacitor Hatches or Tesla Base Casing - StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.hint.1"),//2 - Titanium Frames + EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", + translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.hint.0"),//1 - Classic Hatches, Capacitor Hatches or Tesla Base Casing + translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.hint.1"),//2 - Titanium Frames }; //endregion @@ -108,26 +108,26 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock protected Parameters.Group.ParameterIn popogaSetting, histLowSetting, histHighSetting, transferRadiusTowerSetting, transferRadiusTransceiverSetting, transferRadiusCoverUltimateSetting, outputVoltageSetting, outputCurrentSetting, scanTimeMinSetting, overDriveSetting; protected Parameters.Group.ParameterOut popogaDisplay, transferRadiusTowerDisplay, transferRadiusTransceiverDisplay, transferRadiusCoverUltimateDisplay, outputVoltageDisplay, outputCurrentDisplay, energyCapacityDisplay, energyStoredDisplay, energyFractionDisplay, scanTimeDisplay; - private static final INameFunction HYSTERESIS_LOW_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.0");//Hysteresis low setting - private static final INameFunction HYSTERESIS_HIGH_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.1");//Hysteresis high setting - private static final INameFunction TRANSFER_RADIUS_TOWER_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.2");//Tesla Towers transfer radius setting - private static final INameFunction TRANSFER_RADIUS_TRANSCEIVER_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.3");//Tesla Transceiver transfer radius setting - private static final INameFunction TRANSFER_RADIUS_COVER_ULTIMATE_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.4");//Tesla Ultimate Cover transfer radius setting - private static final INameFunction OUTPUT_VOLTAGE_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.5");//Output voltage setting - private static final INameFunction OUTPUT_CURRENT_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.6");//Output current setting - private static final INameFunction SCAN_TIME_MIN_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.7");//Scan time Min setting - private static final INameFunction OVERDRIVE_SETTING_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.8");//Overdrive setting - private static final INameFunction POPOGA_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.9");//Unused - - private static final INameFunction TRANSFER_RADIUS_TOWER_DISPLAY_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgo.0");//Tesla Towers transfer radius display - private static final INameFunction TRANSFER_RADIUS_TRANSCEIVER_DISPLAY_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgo.1");//Tesla Transceiver transfer radius display - private static final INameFunction TRANSFER_RADIUS_COVER_ULTIMATE_DISPLAY_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgo.2");//Tesla Ultimate Cover transfer radius display - private static final INameFunction OUTPUT_VOLTAGE_DISPLAY_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgo.3");//Output voltage display - private static final INameFunction OUTPUT_CURRENT_DISPLAY_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgo.4");//Output current display - private static final INameFunction ENERGY_CAPACITY_DISPLAY_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgo.5");//Energy Capacity display - private static final INameFunction ENERGY_STORED_DISPLAY_NAME = (base, p) ->StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgo.6");//Energy Stored display - private static final INameFunction ENERGY_FRACTION_DISPLAY_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgo.7");//Energy Fraction display - private static final INameFunction SCAN_TIME_DISPLAY_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgo.8");//Scan time display + private static final INameFunction HYSTERESIS_LOW_SETTING_NAME = (base, p) -> translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.0");//Hysteresis low setting + private static final INameFunction HYSTERESIS_HIGH_SETTING_NAME = (base, p) -> translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.1");//Hysteresis high setting + private static final INameFunction TRANSFER_RADIUS_TOWER_SETTING_NAME = (base, p) -> translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.2");//Tesla Towers transfer radius setting + private static final INameFunction TRANSFER_RADIUS_TRANSCEIVER_SETTING_NAME = (base, p) -> translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.3");//Tesla Transceiver transfer radius setting + private static final INameFunction TRANSFER_RADIUS_COVER_ULTIMATE_SETTING_NAME = (base, p) -> translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.4");//Tesla Ultimate Cover transfer radius setting + private static final INameFunction OUTPUT_VOLTAGE_SETTING_NAME = (base, p) -> translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.5");//Output voltage setting + private static final INameFunction OUTPUT_CURRENT_SETTING_NAME = (base, p) -> translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.6");//Output current setting + private static final INameFunction SCAN_TIME_MIN_SETTING_NAME = (base, p) -> translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.7");//Scan time Min setting + private static final INameFunction OVERDRIVE_SETTING_NAME = (base, p) -> translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.8");//Overdrive setting + private static final INameFunction POPOGA_NAME = (base, p) -> translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgi.9");//Unused + + private static final INameFunction TRANSFER_RADIUS_TOWER_DISPLAY_NAME = (base, p) -> translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgo.0");//Tesla Towers transfer radius display + private static final INameFunction TRANSFER_RADIUS_TRANSCEIVER_DISPLAY_NAME = (base, p) -> translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgo.1");//Tesla Transceiver transfer radius display + private static final INameFunction TRANSFER_RADIUS_COVER_ULTIMATE_DISPLAY_NAME = (base, p) -> translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgo.2");//Tesla Ultimate Cover transfer radius display + private static final INameFunction OUTPUT_VOLTAGE_DISPLAY_NAME = (base, p) -> translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgo.3");//Output voltage display + private static final INameFunction OUTPUT_CURRENT_DISPLAY_NAME = (base, p) -> translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgo.4");//Output current display + private static final INameFunction ENERGY_CAPACITY_DISPLAY_NAME = (base, p) -> translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgo.5");//Energy Capacity display + private static final INameFunction ENERGY_STORED_DISPLAY_NAME = (base, p) -> translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgo.6");//Energy Stored display + private static final INameFunction ENERGY_FRACTION_DISPLAY_NAME = (base, p) -> translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgo.7");//Energy Fraction display + private static final INameFunction SCAN_TIME_DISPLAY_NAME = (base, p) -> translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.cfgo.8");//Scan time display private static final IStatusFunction HYSTERESIS_LOW_STATUS = (base, p) -> { double value = p.get(); @@ -433,9 +433,9 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock public String[] getDescription() { return new String[]{ CommonValues.BASS_MARK, - StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.desc.0"),//Tower of Wireless Power - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.desc.1"),//Fewer pesky cables! - EnumChatFormatting.BLUE + StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.desc.2"),//Survival chances might be affected + translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.desc.0"),//Tower of Wireless Power + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.desc.1"),//Fewer pesky cables! + EnumChatFormatting.BLUE + translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.desc.2"),//Survival chances might be affected }; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TT_Transformer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TT_Transformer.java index 325fe4906b..09ab5fe508 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TT_Transformer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TT_Transformer.java @@ -7,9 +7,9 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Transformer; -import net.minecraft.util.StatCollector; import static com.github.technus.tectech.thing.metaTileEntity.Textures.*; +import static net.minecraft.util.StatCollector.translateToLocal; public class GT_MetaTileEntity_TT_Transformer extends GT_MetaTileEntity_Transformer { public GT_MetaTileEntity_TT_Transformer(int aID, String aName, String aNameRegional, int aTier) { @@ -49,6 +49,6 @@ public class GT_MetaTileEntity_TT_Transformer extends GT_MetaTileEntity_Transfor @Override public String[] getDescription() { - return new String[]{StatCollector.translateToLocal("gt.blockmachines.tt.transformer.tier." + (mTier > 9 ? "" : "0") + mTier + ".desc"), CommonValues.TEC_MARK_GENERAL}; + return new String[]{translateToLocal("gt.blockmachines.tt.transformer.tier." + (mTier > 9 ? "" : "0") + mTier + ".desc"), CommonValues.TEC_MARK_GENERAL}; } } \ No newline at end of file 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 efa85a6ea5..7abb46b47a 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 @@ -18,7 +18,6 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicBatteryBuffer; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; import org.apache.commons.lang3.ArrayUtils; import java.util.Arrays; @@ -81,7 +80,6 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB String[] jargon = new String[3]; jargon[0] = CommonValues.BASS_MARK; jargon[1] = "Your Tesla I/O machine of choice"; - jargon[1] = StatCollector.translateToLocal("desc.test"); jargon[2] = EnumChatFormatting.AQUA + "Lightning stoves for the rich"; String[] sDesc = super.getDescription(); sDesc = Arrays.copyOfRange(sDesc, 1, sDesc.length); diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_WetTransformer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_WetTransformer.java index d104ef0141..02f84bd7c3 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_WetTransformer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_WetTransformer.java @@ -4,9 +4,9 @@ import com.github.technus.tectech.CommonValues; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import net.minecraft.util.StatCollector; import static com.github.technus.tectech.CommonValues.V; +import static net.minecraft.util.StatCollector.translateToLocal; public class GT_MetaTileEntity_WetTransformer extends GT_MetaTileEntity_TT_Transformer { public GT_MetaTileEntity_WetTransformer(int aID, String aName, String aNameRegional, int aTier) { @@ -24,7 +24,7 @@ public class GT_MetaTileEntity_WetTransformer extends GT_MetaTileEntity_TT_Trans @Override public String[] getDescription() { - return new String[]{StatCollector.translateToLocal("gt.blockmachines.wetransformer.tier." + (mTier > 9 ? "" : "0") + mTier + ".desc"), "Accepts 16A and outputs 64A", CommonValues.TEC_MARK_GENERAL}; + return new String[]{translateToLocal("gt.blockmachines.wetransformer.tier." + (mTier > 9 ? "" : "0") + mTier + ".desc"), "Accepts 16A and outputs 64A", CommonValues.TEC_MARK_GENERAL}; } @Override -- cgit From f1b31fe92aecf49c727c24a4bcd29475a9707ac7 Mon Sep 17 00:00:00 2001 From: Bass Date: Thu, 29 Aug 2019 07:07:08 +0100 Subject: Last one before bed --- .../GT_MetaTileEntity_Hatch_OverflowElemental.java | 27 +++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java index ba64f1635e..6af2285e32 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java @@ -15,6 +15,7 @@ import gregtech.api.objects.GT_RenderedTexture; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; @@ -23,6 +24,7 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.EnumSkyBlock; import net.minecraftforge.common.util.ForgeDirection; +import org.apache.commons.lang3.reflect.FieldUtils; import java.util.Locale; @@ -32,6 +34,7 @@ import static com.github.technus.tectech.loader.MainLoader.elementalPollution; import static gregtech.api.enums.Dyes.MACHINE_METAL; import static gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity; import static net.minecraft.util.StatCollector.translateToLocal; +import static net.minecraft.util.StatCollector.translateToLocalFormatted; /** * Created by danie_000 on 12.12.2016. @@ -45,6 +48,8 @@ public class GT_MetaTileEntity_Hatch_OverflowElemental extends GT_MetaTileEntity public final float overflowMax; private final float overflowDisperse; + private String clientLocale = "en_US"; + public GT_MetaTileEntity_Hatch_OverflowElemental(int aID, String aName, String aNameRegional, int aTier, float max) { super(aID, aName, aNameRegional, aTier, 0, translateToLocal("gt.blockmachines.hatch.emmuffler.desc.0"));//Disposes excess elemental Matter overflowMatter = max / 2; @@ -185,6 +190,22 @@ public class GT_MetaTileEntity_Hatch_OverflowElemental extends GT_MetaTileEntity } } + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + if (!aBaseMetaTileEntity.isClientSide() && aPlayer instanceof EntityPlayerMP) { + try { + EntityPlayerMP player = (EntityPlayerMP) aPlayer; + clientLocale = (String) FieldUtils.readField(player, "translator", true); + } catch (Exception e) { + clientLocale = "en_US"; + } + } else { + return true; + } + System.out.println(clientLocale); + return true; + } + @Override public boolean isGivingInformation() { return true; @@ -193,10 +214,10 @@ public class GT_MetaTileEntity_Hatch_OverflowElemental extends GT_MetaTileEntity @Override public String[] getInfoData() { return new String[]{ - translateToLocal("tt.keyphrase.Contained_mass") + ":", + translateToLocalFormatted("tt.keyphrase.Contained_mass", clientLocale) + ":", EnumChatFormatting.RED + Double.toString(overflowMatter) + EnumChatFormatting.RESET + " eV/c\u00b2 /", EnumChatFormatting.GREEN + Double.toString(overflowMax) + EnumChatFormatting.RESET + " eV/c\u00b2", - translateToLocal("tt.keyphrase.Mass_Disposal_speed") + ": " + EnumChatFormatting.BLUE + overflowDisperse + EnumChatFormatting.RESET + " (eV/c\u00b2)/s" + translateToLocalFormatted("tt.keyphrase.Mass_Disposal_speed", clientLocale) + ": " + EnumChatFormatting.BLUE + overflowDisperse + EnumChatFormatting.RESET + " (eV/c\u00b2)/s" }; } @@ -207,7 +228,7 @@ public class GT_MetaTileEntity_Hatch_OverflowElemental extends GT_MetaTileEntity if (TecTech.configTecTech.BOOM_ENABLE) { getBaseMetaTileEntity().doExplosion(V[15]); } else { - TecTech.proxy.broadcast(translateToLocal("tt.keyphrase.Muffler_BOOM") + " " + getBaseMetaTileEntity().getXCoord() + ' ' + getBaseMetaTileEntity().getYCoord() + ' ' + getBaseMetaTileEntity().getZCoord()); + TecTech.proxy.broadcast(translateToLocalFormatted("tt.keyphrase.Muffler_BOOM", clientLocale) + " " + getBaseMetaTileEntity().getXCoord() + ' ' + getBaseMetaTileEntity().getYCoord() + ' ' + getBaseMetaTileEntity().getZCoord()); } } } -- cgit From cec23e300f5dbfc443d6daa624015b6baa359737 Mon Sep 17 00:00:00 2001 From: Bass Date: Thu, 29 Aug 2019 18:46:53 +0100 Subject: more lang --- .../multi/GT_MetaTileEntity_EM_collider.java | 358 ++++++++-------- .../multi/GT_MetaTileEntity_EM_dataBank.java | 69 ++-- .../multi/GT_MetaTileEntity_EM_dequantizer.java | 25 +- .../multi/GT_MetaTileEntity_EM_junction.java | 55 +-- .../multi/GT_MetaTileEntity_EM_quantizer.java | 21 +- .../multi/GT_MetaTileEntity_EM_research.java | 3 +- .../multi/GT_MetaTileEntity_EM_scanner.java | 269 +++++++------ src/main/resources/assets/tectech/lang/en_US.lang | 39 ++ src/main/resources/assets/tectech/lang/ru_RU.lang | 448 --------------------- 9 files changed, 444 insertions(+), 843 deletions(-) delete mode 100644 src/main/resources/assets/tectech/lang/ru_RU.lang (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java index 1dc80606d9..5d3a700153 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java @@ -42,6 +42,7 @@ import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texture 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.base.LedStatus.*; +import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by danie_000 on 17.12.2016. @@ -52,44 +53,47 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB private static Textures.BlockIcons.CustomIcon ScreenON_Slave; private static Textures.BlockIcons.CustomIcon ScreenOFF_Slave; - protected static final byte FUSE_MODE=0, COLLIDE_MODE =1; + protected static final byte FUSE_MODE = 0, COLLIDE_MODE = 1; private static double MASS_TO_EU_INSTANT; - private static int STARTUP_COST,KEEPUP_COST; + private static int STARTUP_COST, KEEPUP_COST; - public static void setValues(int heliumPlasmaValue){ + public static void setValues(int heliumPlasmaValue) { double MASS_TO_EU_PARTIAL = heliumPlasmaValue / 1.75893000478707E07;//mass diff MASS_TO_EU_INSTANT = MASS_TO_EU_PARTIAL * 20; - STARTUP_COST=-heliumPlasmaValue*10000; - KEEPUP_COST=-heliumPlasmaValue; + STARTUP_COST = -heliumPlasmaValue * 10000; + KEEPUP_COST = -heliumPlasmaValue; } //region collision handlers - public static final HashMap FUSE_HANDLERS =new HashMap<>(); - public static final HashMap PRIMITIVE_FUSE_HANDLERS =new HashMap<>(); + public static final HashMap FUSE_HANDLERS = new HashMap<>(); + public static final HashMap PRIMITIVE_FUSE_HANDLERS = new HashMap<>(); + public interface IPrimitiveColliderHandler { void collide(cElementalInstanceStack in1, cElementalInstanceStack in2, cElementalInstanceStackMap out); } + public interface IColliderHandler extends IPrimitiveColliderHandler { byte getRequiredTier(); } + static { FUSE_HANDLERS.put((dAtomDefinition.getClassTypeStatic() << 16) | dAtomDefinition.getClassTypeStatic(), new IColliderHandler() { @Override public void collide(cElementalInstanceStack in1, cElementalInstanceStack in2, cElementalInstanceStackMap out) { try { - cElementalMutableDefinitionStackMap defs=new cElementalMutableDefinitionStackMap(); + cElementalMutableDefinitionStackMap defs = new cElementalMutableDefinitionStackMap(); defs.putUnifyAll(in1.definition.getSubParticles()); defs.putUnifyAll(in2.definition.getSubParticles()); dAtomDefinition atom = new dAtomDefinition(defs.toImmutable_optimized_unsafeLeavesExposedElementalTree()); - out.putUnify(new cElementalInstanceStack(atom,Math.min(in1.amount,in2.amount))); - }catch (Exception e){ - out.putUnifyAll(in1,in2); + out.putUnify(new cElementalInstanceStack(atom, Math.min(in1.amount, in2.amount))); + } catch (Exception e) { + out.putUnifyAll(in1, in2); return; } - if(in1.amount>in2.amount){ - out.putUnify(new cElementalInstanceStack(in1.definition,in1.amount-in2.amount)); - }else if (in2.amount>in1.amount){ - out.putUnify(new cElementalInstanceStack(in2.definition,in2.amount-in1.amount)); + if (in1.amount > in2.amount) { + out.putUnify(new cElementalInstanceStack(in1.definition, in1.amount - in2.amount)); + } else if (in2.amount > in1.amount) { + out.putUnify(new cElementalInstanceStack(in2.definition, in2.amount - in1.amount)); } } @@ -106,19 +110,19 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB @Override public void collide(cElementalInstanceStack in1, cElementalInstanceStack in2, cElementalInstanceStackMap out) { try { - cElementalMutableDefinitionStackMap defs=new cElementalMutableDefinitionStackMap(); + cElementalMutableDefinitionStackMap defs = new cElementalMutableDefinitionStackMap(); defs.putUnifyAll(in1.definition.getSubParticles()); defs.putUnifyAll(in2.definition.getSubParticles()); dHadronDefinition hadron = new dHadronDefinition(defs.toImmutable_optimized_unsafeLeavesExposedElementalTree()); - out.putUnify(new cElementalInstanceStack(hadron,Math.min(in1.amount,in2.amount))); - }catch (Exception e){ - out.putUnifyAll(in1,in2); + out.putUnify(new cElementalInstanceStack(hadron, Math.min(in1.amount, in2.amount))); + } catch (Exception e) { + out.putUnifyAll(in1, in2); return; } - if(in1.amount>in2.amount){ - out.putUnify(new cElementalInstanceStack(in1.definition,in1.amount-in2.amount)); - }else if (in2.amount>in1.amount){ - out.putUnify(new cElementalInstanceStack(in2.definition,in2.amount-in1.amount)); + if (in1.amount > in2.amount) { + out.putUnify(new cElementalInstanceStack(in1.definition, in1.amount - in2.amount)); + } else if (in2.amount > in1.amount) { + out.putUnify(new cElementalInstanceStack(in2.definition, in2.amount - in1.amount)); } } @@ -131,19 +135,19 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB @Override public void collide(cElementalInstanceStack in1, cElementalInstanceStack in2, cElementalInstanceStackMap out) { try { - cElementalMutableDefinitionStackMap defs=new cElementalMutableDefinitionStackMap(); + cElementalMutableDefinitionStackMap defs = new cElementalMutableDefinitionStackMap(); defs.putUnifyAll(in1.definition.getSubParticles()); defs.putUnify(in2.definition.getStackForm(1)); dHadronDefinition hadron = new dHadronDefinition(defs.toImmutable_optimized_unsafeLeavesExposedElementalTree()); - out.putUnify(new cElementalInstanceStack(hadron,Math.min(in1.amount,in2.amount))); - }catch (Exception e){ - out.putUnifyAll(in1,in2); + out.putUnify(new cElementalInstanceStack(hadron, Math.min(in1.amount, in2.amount))); + } catch (Exception e) { + out.putUnifyAll(in1, in2); return; } - if(in1.amount>in2.amount){ - out.putUnify(new cElementalInstanceStack(in1.definition,in1.amount-in2.amount)); - }else if (in2.amount>in1.amount){ - out.putUnify(new cElementalInstanceStack(in2.definition,in2.amount-in1.amount)); + if (in1.amount > in2.amount) { + out.putUnify(new cElementalInstanceStack(in1.definition, in1.amount - in2.amount)); + } else if (in2.amount > in1.amount) { + out.putUnify(new cElementalInstanceStack(in2.definition, in2.amount - in1.amount)); } } @@ -159,11 +163,11 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB FUSE_HANDLERS.put((cElementalPrimitive.getClassTypeStatic() << 16) | cElementalPrimitive.getClassTypeStatic(), new IColliderHandler() { @Override public void collide(cElementalInstanceStack in1, cElementalInstanceStack in2, cElementalInstanceStackMap out) { - IPrimitiveColliderHandler collisionHandler= PRIMITIVE_FUSE_HANDLERS.get(in1.definition.getClass().getName()+'\0'+in2.definition.getClass().getName()); + IPrimitiveColliderHandler collisionHandler = PRIMITIVE_FUSE_HANDLERS.get(in1.definition.getClass().getName() + '\0' + in2.definition.getClass().getName()); if (collisionHandler != null) { collisionHandler.collide(in2, in1, out); } else { - out.putUnifyAll(in1,in2); + out.putUnifyAll(in1, in2); } } @@ -175,40 +179,40 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB PRIMITIVE_FUSE_HANDLERS.put(eQuarkDefinition.class.getName() + '\0' + eQuarkDefinition.class.getName(), (in1, in2, out) -> { try { - cElementalMutableDefinitionStackMap defs=new cElementalMutableDefinitionStackMap(); + cElementalMutableDefinitionStackMap defs = new cElementalMutableDefinitionStackMap(); defs.putUnify(in1.definition.getStackForm(1)); defs.putUnify(in2.definition.getStackForm(1)); dHadronDefinition hadron = new dHadronDefinition(defs.toImmutable_optimized_unsafeLeavesExposedElementalTree()); - out.putUnify(new cElementalInstanceStack(hadron,Math.min(in1.amount,in2.amount))); - }catch (Exception e){ - out.putUnifyAll(in1,in2); + out.putUnify(new cElementalInstanceStack(hadron, Math.min(in1.amount, in2.amount))); + } catch (Exception e) { + out.putUnifyAll(in1, in2); return; } - if(in1.amount>in2.amount){ - out.putUnify(new cElementalInstanceStack(in1.definition,in1.amount-in2.amount)); - }else if (in2.amount>in1.amount){ - out.putUnify(new cElementalInstanceStack(in2.definition,in2.amount-in1.amount)); + if (in1.amount > in2.amount) { + out.putUnify(new cElementalInstanceStack(in1.definition, in1.amount - in2.amount)); + } else if (in2.amount > in1.amount) { + out.putUnify(new cElementalInstanceStack(in2.definition, in2.amount - in1.amount)); } }); PRIMITIVE_FUSE_HANDLERS.put(ePrimalAspectDefinition.class.getName() + '\0' + ePrimalAspectDefinition.class.getName(), (in1, in2, out) -> { if (fuseAspects(in1, in2, out)) return; - if(in1.amount>in2.amount){ - out.putUnify(new cElementalInstanceStack(in1.definition,in1.amount-in2.amount)); - }else if (in2.amount>in1.amount){ - out.putUnify(new cElementalInstanceStack(in2.definition,in2.amount-in1.amount)); + if (in1.amount > in2.amount) { + out.putUnify(new cElementalInstanceStack(in1.definition, in1.amount - in2.amount)); + } else if (in2.amount > in1.amount) { + out.putUnify(new cElementalInstanceStack(in2.definition, in2.amount - in1.amount)); } }); } private static boolean fuseAspects(cElementalInstanceStack in1, cElementalInstanceStack in2, cElementalInstanceStackMap out) { try { - cElementalMutableDefinitionStackMap defs=new cElementalMutableDefinitionStackMap(); + cElementalMutableDefinitionStackMap defs = new cElementalMutableDefinitionStackMap(); defs.putUnify(in1.definition.getStackForm(1)); defs.putUnify(in2.definition.getStackForm(1)); dComplexAspectDefinition aspect = new dComplexAspectDefinition(defs.toImmutable_optimized_unsafeLeavesExposedElementalTree()); - out.putUnify(new cElementalInstanceStack(aspect,Math.min(in1.amount,in2.amount))); - }catch (Exception e){ - out.putUnifyAll(in1,in2); + out.putUnify(new cElementalInstanceStack(aspect, Math.min(in1.amount, in2.amount))); + } catch (Exception e) { + out.putUnifyAll(in1, in2); return true; } return false; @@ -219,10 +223,10 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB @Override public void collide(cElementalInstanceStack in1, cElementalInstanceStack in2, cElementalInstanceStackMap out) { if (fuseAspects(in1, in2, out)) return; - if(in1.amount>in2.amount){ - out.putUnify(new cElementalInstanceStack(in1.definition,in1.amount-in2.amount)); - }else if (in2.amount>in1.amount){ - out.putUnify(new cElementalInstanceStack(in2.definition,in2.amount-in1.amount)); + if (in1.amount > in2.amount) { + out.putUnify(new cElementalInstanceStack(in1.definition, in1.amount - in2.amount)); + } else if (in2.amount > in1.amount) { + out.putUnify(new cElementalInstanceStack(in2.definition, in2.amount - in1.amount)); } } @@ -238,19 +242,19 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB @Override public void collide(cElementalInstanceStack in1, cElementalInstanceStack in2, cElementalInstanceStackMap out) { try { - cElementalMutableDefinitionStackMap defs=new cElementalMutableDefinitionStackMap(); + cElementalMutableDefinitionStackMap defs = new cElementalMutableDefinitionStackMap(); defs.putUnifyAll(in1.definition.getSubParticles()); defs.putUnify(in2.definition.getStackForm(1)); dAtomDefinition atom = new dAtomDefinition(defs.toImmutable_optimized_unsafeLeavesExposedElementalTree()); - out.putUnify(new cElementalInstanceStack(atom,Math.min(in1.amount,in2.amount))); - }catch (Exception e){ - out.putUnifyAll(in1,in2); + out.putUnify(new cElementalInstanceStack(atom, Math.min(in1.amount, in2.amount))); + } catch (Exception e) { + out.putUnifyAll(in1, in2); return; } - if(in1.amount>in2.amount){ - out.putUnify(new cElementalInstanceStack(in1.definition,in1.amount-in2.amount)); - }else if (in2.amount>in1.amount){ - out.putUnify(new cElementalInstanceStack(in2.definition,in2.amount-in1.amount)); + if (in1.amount > in2.amount) { + out.putUnify(new cElementalInstanceStack(in1.definition, in1.amount - in2.amount)); + } else if (in2.amount > in1.amount) { + out.putUnify(new cElementalInstanceStack(in2.definition, in2.amount - in1.amount)); } } @@ -268,9 +272,9 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB //region parameters protected Parameters.Group.ParameterIn mode; - private static final IStatusFunction MODE_STATUS = (base_EM, p)->{ - if(base_EM.isMaster()){ - double mode=p.get(); + private static final IStatusFunction MODE_STATUS = (base_EM, p) -> { + if (base_EM.isMaster()) { + double mode = p.get(); if (mode == FUSE_MODE || mode == COLLIDE_MODE) { return STATUS_OK; } else if (mode > 1) { @@ -282,12 +286,12 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB } return STATUS_UNUSED; }; - private static final INameFunction MODE_NAME = (base_EM, p)->{ - if(base_EM.isMaster()){ - double mode=p.get(); - if(mode==FUSE_MODE){ + private static final INameFunction MODE_NAME = (base_EM, p) -> { + if (base_EM.isMaster()) { + double mode = p.get(); + if (mode == FUSE_MODE) { return "Mode: Fuse"; - }else if(mode==COLLIDE_MODE){ + } else if (mode == COLLIDE_MODE) { return "Mode: Collide"; } return "Mode: Undefined"; @@ -296,32 +300,32 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB }; //endregion - protected boolean started=false; + protected boolean started = false; //region Structure //use multi A energy inputs, use less power the longer it runs private static final String[][] shape = new String[][]{ - {"I0A0A0","I00000","I0A0A0",}, - {"H0000000","G001111100","H0000000",}, - {"F22223332222","F41155555114","F22223332222",}, - {"E2000000000002","E4155111115514","E2000000000002",}, - {"D20000E00002","D41511E11514","D20000E00002",}, - {"C2000I0002","C4151I1514","C2000I0002",}, - {"B2000K0002","B4151K1514","B2000K0002",}, - {"B200M002","A0151M1510","B200M002",}, - {"A0200M0020","A0151M1510","A0200M0020",}, - {"0020O0200","0151O1510","0020O0200",}, - {"A030O030","0151O1510","A030O030",}, - {"0030O0300","0151O1510","0030O0300",}, - {"A030O030","0151O1510","A030O030",}, - {"0020O0200","0151O1510","0020O0200",}, - {"A0200M0020","A0151M1510","A0200M0020",}, - {"B200M002","A0151M1510","B200M002",}, - {"B2000K0002","B4151K1514","B2000K0002",}, - {"C2000I0002","C4151I1514","C2000I0002",}, - {"D200002 200002","D415112 . 211514","D200002 200002",}, - {"E20!!22222!!02","E4155111115514","E20!!22222!!02",}, - {"F2222#\"#2222","F41155555114","F2222#\"#2222",}, + {"I0A0A0", "I00000", "I0A0A0",}, + {"H0000000", "G001111100", "H0000000",}, + {"F22223332222", "F41155555114", "F22223332222",}, + {"E2000000000002", "E4155111115514", "E2000000000002",}, + {"D20000E00002", "D41511E11514", "D20000E00002",}, + {"C2000I0002", "C4151I1514", "C2000I0002",}, + {"B2000K0002", "B4151K1514", "B2000K0002",}, + {"B200M002", "A0151M1510", "B200M002",}, + {"A0200M0020", "A0151M1510", "A0200M0020",}, + {"0020O0200", "0151O1510", "0020O0200",}, + {"A030O030", "0151O1510", "A030O030",}, + {"0030O0300", "0151O1510", "0030O0300",}, + {"A030O030", "0151O1510", "A030O030",}, + {"0020O0200", "0151O1510", "0020O0200",}, + {"A0200M0020", "A0151M1510", "A0200M0020",}, + {"B200M002", "A0151M1510", "B200M002",}, + {"B2000K0002", "B4151K1514", "B2000K0002",}, + {"C2000I0002", "C4151I1514", "C2000I0002",}, + {"D200002 200002", "D415112 . 211514", "D200002 200002",}, + {"E20!!22222!!02", "E4155111115514", "E20!!22222!!02",}, + {"F2222#\"#2222", "F41155555114", "F2222#\"#2222",}, }; private static final Block[] blockType = new Block[]{ sBlockCasingsTT, @@ -342,7 +346,7 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0, 4, 4, 4}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA+"Hint Details:", + EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", "1 - Classic Hatches or High Power Casing", "2 - Elemental Input Hatches or Molecular Casing", "3 - Elemental Output Hatches or Molecular Casing", @@ -361,8 +365,8 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB @Override protected void parametersInstantiation_EM() { - Parameters.Group hatch_0=parametrization.getGroup(0); - mode=hatch_0.makeInParameter(0,FUSE_MODE, MODE_NAME, MODE_STATUS); + Parameters.Group hatch_0 = parametrization.getGroup(0); + mode = hatch_0.makeInParameter(0, FUSE_MODE, MODE_NAME, MODE_STATUS); } @Override @@ -383,9 +387,9 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { if (aSide == aFacing) { - if(aFacing%2==0){ + if (aFacing % 2 == 0) { return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][4], new TT_RenderedTexture(aActive ? ScreenON : ScreenOFF)}; - }else{ + } else { return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][4], new TT_RenderedTexture(aActive ? ScreenON_Slave : ScreenOFF_Slave)}; } } @@ -396,28 +400,28 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); aNBT.setByte("eTier", eTier);//collider tier - aNBT.setBoolean("eStarted",started); - if(stack!=null) { + aNBT.setBoolean("eStarted", started); + if (stack != null) { aNBT.setTag("eStack", stack.toNBT()); } - aNBT.setLong("ePlasmaEnergy",plasmaEnergy); + aNBT.setLong("ePlasmaEnergy", plasmaEnergy); } @Override public void loadNBTData(NBTTagCompound aNBT) { super.loadNBTData(aNBT); eTier = aNBT.getByte("eTier");//collider tier - started=aNBT.getBoolean("eStarted"); - if(aNBT.hasKey("eStack")){ - stack=cElementalInstanceStack.fromNBT(aNBT.getCompoundTag("eStack")); + started = aNBT.getBoolean("eStarted"); + if (aNBT.hasKey("eStack")) { + stack = cElementalInstanceStack.fromNBT(aNBT.getCompoundTag("eStack")); } - plasmaEnergy=aNBT.getLong("ePlasmaEnergy"); + plasmaEnergy = aNBT.getLong("ePlasmaEnergy"); } @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - int xDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetX*2; - int zDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetZ*2; + int xDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetX * 2; + int zDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetZ * 2; if (iGregTechTileEntity.getBlockOffset(xDir, 0, zDir) != sBlockCasingsTT) { eTier = 0; return false; @@ -453,51 +457,51 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB @Override public void construct(int stackSize, boolean hintsOnly) { - IGregTechTileEntity iGregTechTileEntity=getBaseMetaTileEntity(); - int xDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetX*4; - int yDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetY*4; - int zDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetZ*4; - if(hintsOnly){ + IGregTechTileEntity iGregTechTileEntity = getBaseMetaTileEntity(); + int xDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetX * 4; + int yDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetY * 4; + int zDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetZ * 4; + if (hintsOnly) { TecTech.proxy.hint_particle(iGregTechTileEntity.getWorld(), - iGregTechTileEntity.getXCoord()+xDir, - iGregTechTileEntity.getYCoord()+yDir, - iGregTechTileEntity.getZCoord()+zDir, - TT_Container_Casings.sHintCasingsTT,12); - } else{ - if(iGregTechTileEntity.getBlockOffset(xDir,0,zDir).getMaterial() == Material.air) { - iGregTechTileEntity.getWorld().setBlock(iGregTechTileEntity.getXCoord() + xDir, iGregTechTileEntity.getYCoord()+yDir, iGregTechTileEntity.getZCoord() + zDir, TT_Container_Casings.sHintCasingsTT, 12, 2); + iGregTechTileEntity.getXCoord() + xDir, + iGregTechTileEntity.getYCoord() + yDir, + iGregTechTileEntity.getZCoord() + zDir, + TT_Container_Casings.sHintCasingsTT, 12); + } else { + if (iGregTechTileEntity.getBlockOffset(xDir, 0, zDir).getMaterial() == Material.air) { + iGregTechTileEntity.getWorld().setBlock(iGregTechTileEntity.getXCoord() + xDir, iGregTechTileEntity.getYCoord() + yDir, iGregTechTileEntity.getZCoord() + zDir, TT_Container_Casings.sHintCasingsTT, 12, 2); } } if ((stackSize & 1) == 1) { - StructureBuilderExtreme(shape, blockType, blockMeta1, 11, 1, 18, iGregTechTileEntity,this, hintsOnly); + StructureBuilderExtreme(shape, blockType, blockMeta1, 11, 1, 18, iGregTechTileEntity, this, hintsOnly); } else { - StructureBuilderExtreme(shape, blockType, blockMeta2, 11, 1, 18, iGregTechTileEntity,this, hintsOnly); + StructureBuilderExtreme(shape, blockType, blockMeta2, 11, 1, 18, iGregTechTileEntity, this, hintsOnly); } } @Override public void parametersStatusesWrite_EM(boolean machineBusy) { - if(isMaster()) { + if (isMaster()) { super.parametersStatusesWrite_EM(machineBusy); } } @Override public boolean checkRecipe_EM(ItemStack itemStack) { - GT_MetaTileEntity_EM_collider partner=getPartner(); - if(partner==null){ + GT_MetaTileEntity_EM_collider partner = getPartner(); + if (partner == null) { return false; } - mEfficiencyIncrease=10000; - if(started) { - if(stack==null) { + mEfficiencyIncrease = 10000; + if (started) { + if (stack == null) { for (GT_MetaTileEntity_Hatch_InputElemental inputElemental : eInputHatches) { cElementalInstanceStackMap container = inputElemental.getContainerHandler(); if (container.isEmpty()) { continue; } stack = container.remove(container.getFirst().definition); - long eut = KEEPUP_COST+(long)(KEEPUP_COST * Math.abs(stack.getMass() / dAtomDefinition.getSomethingHeavy().getMass()))/2; + long eut = KEEPUP_COST + (long) (KEEPUP_COST * Math.abs(stack.getMass() / dAtomDefinition.getSomethingHeavy().getMass())) / 2; if (eut < Integer.MIN_VALUE + 7) { return false; } @@ -515,18 +519,18 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB mEUt = KEEPUP_COST; eAmpereFlow = 2; return true; - }else{ - started=true; - mMaxProgresstime=20; - mEUt=STARTUP_COST; - eAmpereFlow=10; + } else { + started = true; + mMaxProgresstime = 20; + mEUt = STARTUP_COST; + eAmpereFlow = 10; return true; } } - protected double fuse(GT_MetaTileEntity_EM_collider partner){ - if(partner.stack!=null && stack!=null) {//todo add single event mode as an option - boolean check=stack.definition.fusionMakesEnergy(stack.getEnergy()) && + protected double fuse(GT_MetaTileEntity_EM_collider partner) { + if (partner.stack != null && stack != null) {//todo add single event mode as an option + boolean check = stack.definition.fusionMakesEnergy(stack.getEnergy()) && partner.stack.definition.fusionMakesEnergy(partner.stack.getEnergy()); cElementalInstanceStack stack2 = partner.stack; @@ -558,11 +562,11 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB } private boolean handleRecipe(cElementalInstanceStack stack2, cElementalInstanceStackMap map, IColliderHandler colliderHandler) { - if (colliderHandler != null && eTier>= colliderHandler.getRequiredTier()) { + if (colliderHandler != null && eTier >= colliderHandler.getRequiredTier()) { colliderHandler.collide(stack2, stack, map); } else { - map.putUnifyAll(stack,stack2); - outputEM=new cElementalInstanceStackMap[]{map}; + map.putUnifyAll(stack, stack2); + outputEM = new cElementalInstanceStackMap[]{map}; return true; } return false; @@ -570,10 +574,10 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB @Override protected void afterRecipeCheckFailed() { - started=false; - if(stack!=null){ + started = false; + if (stack != null) { cleanMassEM_EM(stack.getMass()); - stack=null; + stack = null; } getBaseMetaTileEntity().disableWorking(); super.afterRecipeCheckFailed(); @@ -581,29 +585,29 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB @Override public void stopMachine() { - started=false; - if(stack!=null){ + started = false; + if (stack != null) { cleanMassEM_EM(stack.getMass()); - stack=null; + stack = null; } super.stopMachine(); } @Override public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if(!aBaseMetaTileEntity.isAllowedToWork()){ - started=false; + if (!aBaseMetaTileEntity.isAllowedToWork()) { + started = false; } super.onPreTick(aBaseMetaTileEntity, aTick); } - protected GT_MetaTileEntity_EM_collider getPartner(){ - IGregTechTileEntity iGregTechTileEntity=getBaseMetaTileEntity(); - int xDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetX*4; - int yDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetY*4; - int zDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetZ*4; - IGregTechTileEntity gregTechBaseTileEntity=iGregTechTileEntity.getIGregTechTileEntityOffset(xDir, yDir, zDir); - if(gregTechBaseTileEntity!=null) { + protected GT_MetaTileEntity_EM_collider getPartner() { + IGregTechTileEntity iGregTechTileEntity = getBaseMetaTileEntity(); + int xDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetX * 4; + int yDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetY * 4; + int zDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetZ * 4; + IGregTechTileEntity gregTechBaseTileEntity = iGregTechTileEntity.getIGregTechTileEntityOffset(xDir, yDir, zDir); + if (gregTechBaseTileEntity != null) { IMetaTileEntity gregTechMetaTileEntity = gregTechBaseTileEntity.getMetaTileEntity(); return gregTechMetaTileEntity instanceof GT_MetaTileEntity_EM_collider && ((GT_MetaTileEntity_EM_collider) gregTechMetaTileEntity).mMachine && @@ -613,22 +617,22 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB return null; } - protected final boolean isMaster(){ - return getBaseMetaTileEntity().getFrontFacing()%2==0; + protected final boolean isMaster() { + return getBaseMetaTileEntity().getFrontFacing() % 2 == 0; } @Override - public void outputAfterRecipe_EM(){ - GT_MetaTileEntity_EM_collider partner=getPartner(); - if(partner==null){ - if(stack!=null){ + public void outputAfterRecipe_EM() { + GT_MetaTileEntity_EM_collider partner = getPartner(); + if (partner == null) { + if (stack != null) { cleanMassEM_EM(stack.getMass()); - stack=null; + stack = null; } return; } if (isMaster()) { - switch ((int)mode.get()){ + switch ((int) mode.get()) { case FUSE_MODE: makeEU(fuse(partner)); break; @@ -636,43 +640,43 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB //collide(partner);//todo break; default: { - outputEM=new cElementalInstanceStackMap[2]; - outputEM[1]=tickStack(); - if(outputEM[1]==null){ - outputEM[1]=partner.tickStack(); - }else { - cElementalInstanceStackMap map=partner.tickStack(); - if(map!=null){ + outputEM = new cElementalInstanceStackMap[2]; + outputEM[1] = tickStack(); + if (outputEM[1] == null) { + outputEM[1] = partner.tickStack(); + } else { + cElementalInstanceStackMap map = partner.tickStack(); + if (map != null) { outputEM[1].putUnifyAll(map); } } } } - if(outputEM!=null) { - for(int i=0,lim=Math.min(outputEM.length,eOutputHatches.size());i eStacksDataOutputs = new ArrayList<>(); @@ -40,20 +41,20 @@ public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockB //region Structure private static final String[][] shape = new String[][]{ - {"0 0","0 . 0","0 0",}, - {"0!!!0","01110","0!!!0",}, - {"0!!!0","0!!!0","0!!!0",}, + {"0 0", "0 . 0", "0 0",}, + {"0!!!0", "01110", "0!!!0",}, + {"0!!!0", "0!!!0", "0!!!0",}, }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT,sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{2,1}; - private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addClassicToMachineList,this::addDataBankHatchToMachineList}; - private static final short[] casingTextures = new short[]{textureOffset,textureOffset+1}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT,sBlockCasingsTT}; - private static final byte[] blockMetaFallback = new byte[]{0,1}; + private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; + private static final byte[] blockMeta = new byte[]{2, 1}; + private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addClassicToMachineList, this::addDataBankHatchToMachineList}; + private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 1}; + private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; + private static final byte[] blockMetaFallback = new byte[]{0, 1}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA+"Hint Details:", - "1 - Classic Hatches or high power casing", - "2 - Data Access/Data Bank Master Hatches or computer casing", + EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", + translateToLocal("gt.blockmachines.multimachine.em.databank.hint.0"),//1 - Classic Hatches or high power casing + translateToLocal("gt.blockmachines.multimachine.em.databank.hint.1"),//2 - Data Access/Data Bank Master Hatches or computer casing }; //endregion @@ -65,11 +66,11 @@ public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockB super(aName); } - public final static ResourceLocation activitySound=new ResourceLocation(Reference.MODID+":fx_hi_freq"); + public final static ResourceLocation activitySound = new ResourceLocation(Reference.MODID + ":fx_hi_freq"); @Override @SideOnly(Side.CLIENT) - protected ResourceLocation getActivitySound(){ + protected ResourceLocation getActivitySound() { return activitySound; } @@ -105,7 +106,7 @@ public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockB @Override public void construct(int stackSize, boolean hintsOnly) { - StructureBuilderExtreme(shape, blockType, blockMeta,2, 1, 0, getBaseMetaTileEntity(),this,hintsOnly); + StructureBuilderExtreme(shape, blockType, blockMeta, 2, 1, 0, getBaseMetaTileEntity(), this, hintsOnly); } @Override @@ -116,8 +117,8 @@ public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockB @Override public boolean checkRecipe_EM(ItemStack itemStack) { if (eDataAccessHatches.size() > 0 && eStacksDataOutputs.size() > 0) { - mEUt = -(int)V[4]; - eAmpereFlow = 1 + eStacksDataOutputs.size()*eDataAccessHatches.size(); + mEUt = -(int) V[4]; + eAmpereFlow = 1 + eStacksDataOutputs.size() * eDataAccessHatches.size(); mMaxProgresstime = 20; mEfficiencyIncrease = 10000; return true; @@ -127,24 +128,24 @@ public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockB @Override public void outputAfterRecipe_EM() { - ArrayList stacks=new ArrayList<>(); - for(GT_MetaTileEntity_Hatch_DataAccess dataAccess:eDataAccessHatches){ - int count=dataAccess.getSizeInventory(); - for(int i=0;i stacks = new ArrayList<>(); + for (GT_MetaTileEntity_Hatch_DataAccess dataAccess : eDataAccessHatches) { + int count = dataAccess.getSizeInventory(); + for (int i = 0; i < count; i++) { + ItemStack stack = dataAccess.getStackInSlot(i); + if (stack != null) { stacks.add(stack); } } } - if(stacks.size()>0){ - ItemStack[] arr=stacks.toArray(nullItem); - for(GT_MetaTileEntity_Hatch_OutputDataItems hatch:eStacksDataOutputs){ - hatch.q=new InventoryDataPacket(arr); + if (stacks.size() > 0) { + ItemStack[] arr = stacks.toArray(nullItem); + for (GT_MetaTileEntity_Hatch_OutputDataItems hatch : eStacksDataOutputs) { + hatch.q = new InventoryDataPacket(arr); } - }else{ - for(GT_MetaTileEntity_Hatch_OutputDataItems hatch:eStacksDataOutputs){ - hatch.q=null; + } else { + for (GT_MetaTileEntity_Hatch_OutputDataItems hatch : eStacksDataOutputs) { + hatch.q = null; } } } @@ -153,8 +154,8 @@ public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockB public String[] getDescription() { return new String[]{ CommonValues.TEC_MARK_EM, - "Remote assembly data delivery", - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Apply directly to the forehead" + translateToLocal("gt.blockmachines.multimachine.em.databank.desc.0"),//Remote assembly data delivery + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.databank.desc.1")//Apply directly to the forehead }; } @@ -170,10 +171,10 @@ public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockB if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputDataItems) { ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); return eStacksDataOutputs.add((GT_MetaTileEntity_Hatch_OutputDataItems) aMetaTileEntity); - }else if(aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_DataAccess && !(aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputDataItems)){ + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_DataAccess && !(aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputDataItems)) { ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); return eDataAccessHatches.add((GT_MetaTileEntity_Hatch_DataAccess) aMetaTileEntity); } return false; } -} +} \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java index 011105356a..e682c77702 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java @@ -31,6 +31,7 @@ import static com.github.technus.tectech.mechanics.elementalMatter.definitions.c import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition.refUnstableMass; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; +import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by danie_000 on 17.12.2016. @@ -55,10 +56,10 @@ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_Multiblo private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0, 4, 4}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA + "Hint Details:", - "1 - Classic Hatches or High Power Casing", - "2 - Elemental Input Hatch", - "3 - Elemental Overflow Hatches or Molecular Casing", + EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", + translateToLocal("gt.blockmachines.multimachine.em.emtomatter.hint.0"),//1 - Classic Hatches or High Power Casing" + translateToLocal("gt.blockmachines.multimachine.em.emtomatter.hint.1"),//2 - Elemental Input Hatch + translateToLocal("gt.blockmachines.multimachine.em.emtomatter.hint.2"),//3 - Elemental Overflow Hatches or Molecular Casing }; //endregion @@ -72,7 +73,7 @@ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_Multiblo @Override @SideOnly(Side.CLIENT) - protected ResourceLocation getActivitySound(){ + protected ResourceLocation getActivitySound() { return GT_MetaTileEntity_EM_quantizer.activitySound; } @@ -88,7 +89,7 @@ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_Multiblo @Override public void construct(int stackSize, boolean hintsOnly) { - StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(),this, hintsOnly); + StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), this, hintsOnly); } @Override @@ -105,7 +106,7 @@ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_Multiblo if (info != null) { if (map.removeAllAmounts(false, (iHasElementalDefinition) info.input())) { mOutputFluids = new FluidStack[]{(FluidStack) info.output()}; - startRecipe((iHasElementalDefinition) info.input(),stack.getEnergy()); + startRecipe((iHasElementalDefinition) info.input(), stack.getEnergy()); return true; } } @@ -114,7 +115,7 @@ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_Multiblo if (info != null) { if (map.removeAllAmounts(false, (iHasElementalDefinition) info.input())) { mOutputItems = new ItemStack[]{(ItemStack) info.output()}; - startRecipe((iHasElementalDefinition) info.input(),stack.getEnergy()); + startRecipe((iHasElementalDefinition) info.input(), stack.getEnergy()); return true; } } @@ -125,7 +126,7 @@ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_Multiblo ArrayList items = OreDictionary.getOres(((aOredictDequantizationInfo) info).out); if (items != null && !items.isEmpty()) { mOutputItems = new ItemStack[]{items.get(0)}; - startRecipe((iHasElementalDefinition) info.input(),stack.getEnergy()); + startRecipe((iHasElementalDefinition) info.input(), stack.getEnergy()); return true; } } @@ -152,8 +153,8 @@ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_Multiblo public String[] getDescription() { return new String[]{ CommonValues.TEC_MARK_EM, - "Transform quantum form back to...", - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "regular one, but why?" + translateToLocal("gt.blockmachines.multimachine.em.emtomatter.desc.0"),//Transform quantum form back to... + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.emtomatter.desc.1")//regular one, but why? }; } -} +} \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java index 337afd4f32..9d431e3bc3 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java @@ -22,6 +22,7 @@ import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texture import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; import static gregtech.api.enums.GT_Values.E; +import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by danie_000 on 17.12.2016. @@ -42,38 +43,38 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB {"A!!!", "!000!", "!000!", "!000!", "A!!!",}, {"A!!!", "!!!!!", "!!!!!", "!!!!!", "A!!!",}, }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT,sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{4,5}; + private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; + private static final byte[] blockMeta = new byte[]{4, 5}; private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addClassicToMachineList, this::addElementalToMachineList}; private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0, 4}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA+"Hint Details:", - "1 - Classic Hatches or High Power Casing", - "2 - Elemental Hatches or Molecular Casing", + EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", + translateToLocal("gt.blockmachines.multimachine.em.junction.hint.0"),//1 - Classic Hatches or High Power Casing + translateToLocal("gt.blockmachines.multimachine.em.junction.hint.1"),//2 - Elemental Hatches or Molecular Casing }; //endregion //region parameters - private static final INameFunction ROUTE_NAME= - (base,p)->(p.parameterId()==0?"Source ":"Destination ")+p.hatchId(); + private static final INameFunction ROUTE_NAME = + (base, p) -> (p.parameterId() == 0 ? translateToLocal("tt.keyword.Source") + " " : translateToLocal("tt.keyword.Destination") + " ") + p.hatchId(); private static final IStatusFunction SRC_STATUS = - (base,p)-> { + (base, p) -> { double v = p.get(); if (Double.isNaN(v)) return STATUS_WRONG; - v=(int)v; + v = (int) v; if (v < 0) return STATUS_TOO_LOW; if (v == 0) return STATUS_NEUTRAL; if (v >= base.eInputHatches.size()) return STATUS_TOO_HIGH; return STATUS_OK; }; private static final IStatusFunction DST_STATUS = - (base,p)->{ - if(base.src[p.hatchId()].getStatus(false)== STATUS_OK){ + (base, p) -> { + if (base.src[p.hatchId()].getStatus(false) == STATUS_OK) { double v = p.get(); if (Double.isNaN(v)) return STATUS_WRONG; - v=(int)v; + v = (int) v; if (v < 0) return STATUS_TOO_LOW; if (v == 0) return STATUS_LOW; if (v >= base.eInputHatches.size()) return STATUS_TOO_HIGH; @@ -95,8 +96,8 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB @Override protected void parametersInstantiation_EM() { - src=new Parameters.Group.ParameterIn[10]; - dst=new Parameters.Group.ParameterIn[10]; + src = new Parameters.Group.ParameterIn[10]; + dst = new Parameters.Group.ParameterIn[10]; for (int i = 0; i < 10; i++) { Parameters.Group hatch = parametrization.getGroup(i); src[i] = hatch.makeInParameter(0, i, ROUTE_NAME, SRC_STATUS); @@ -111,10 +112,10 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - int meta=iGregTechTileEntity.getMetaIDAtSide(GT_Utility.getOppositeSide(iGregTechTileEntity.getFrontFacing())); - if(meta==4){ + int meta = iGregTechTileEntity.getMetaIDAtSide(GT_Utility.getOppositeSide(iGregTechTileEntity.getFrontFacing())); + if (meta == 4) { return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); - }else if(meta==5){ + } else if (meta == 5) { return structureCheck_EM(shapeBig, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0); } return false; @@ -122,7 +123,7 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB @Override public void construct(int stackSize, boolean hintsOnly) { - StructureBuilderExtreme(shape, blockType, blockMeta,1, 1, 0, getBaseMetaTileEntity(),this,hintsOnly); + StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), this, hintsOnly); } @Override @@ -134,8 +135,8 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB public String[] getDescription() { return new String[]{ CommonValues.TEC_MARK_EM, - "Reroutes Matter", - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Axis aligned movement!" + translateToLocal("gt.blockmachines.multimachine.em.junction.desc.0"),//Reroutes Matter + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.junction.desc.1")//Axis aligned movement! }; } @@ -155,18 +156,18 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB @Override public void outputAfterRecipe_EM() { - double src,dst; + double src, dst; for (int i = 0; i < 10; i++) { - src= this.src[i].get(); - dst= this.dst[i].get(); - if(Double.isNaN(src) || Double.isNaN(dst)) { + src = this.src[i].get(); + dst = this.dst[i].get(); + if (Double.isNaN(src) || Double.isNaN(dst)) { continue; } - int inIndex = (int)src - 1; + int inIndex = (int) src - 1; if (inIndex < 0 || inIndex >= eInputHatches.size()) { continue; } - int outIndex = (int)dst - 1; + int outIndex = (int) dst - 1; GT_MetaTileEntity_Hatch_InputElemental in = eInputHatches.get(inIndex); if (outIndex == -1) {//param==0 -> null the content cleanHatchContentEM_EM(in); @@ -180,4 +181,4 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB } } } -} +} \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java index 7f983b798c..ee327bed51 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java @@ -40,6 +40,7 @@ import static com.github.technus.tectech.recipe.TT_recipeAdder.nullFluid; import static com.github.technus.tectech.recipe.TT_recipeAdder.nullItem; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; +import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by danie_000 on 17.12.2016. @@ -63,10 +64,10 @@ public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_Multiblock private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0, 4, 4}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA+"Hint Details:", - "1 - Classic Hatches or High Power Casing", - "2 - Elemental Output Hatch", - "3 - Elemental Overflow Hatches or Molecular Casing", + EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", + translateToLocal("gt.blockmachines.multimachine.em.mattertoem.hint.0"),//1 - Classic Hatches or High Power Casing + translateToLocal("gt.blockmachines.multimachine.em.mattertoem.hint.1"),//2 - Elemental Output Hatch + translateToLocal("gt.blockmachines.multimachine.em.mattertoem.hint.2"),//3 - Elemental Overflow Hatches or Molecular Casing }; //endregion @@ -78,11 +79,11 @@ public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_Multiblock super(aName); } - public final static ResourceLocation activitySound=new ResourceLocation(Reference.MODID+":fx_mid_freq"); + public final static ResourceLocation activitySound = new ResourceLocation(Reference.MODID + ":fx_mid_freq"); @Override @SideOnly(Side.CLIENT) - protected ResourceLocation getActivitySound(){ + protected ResourceLocation getActivitySound() { return activitySound; } @@ -98,7 +99,7 @@ public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_Multiblock @Override public void construct(int stackSize, boolean hintsOnly) { - StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(),this,hintsOnly); + StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), this, hintsOnly); } @Override @@ -110,8 +111,8 @@ public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_Multiblock public String[] getDescription() { return new String[]{ CommonValues.TEC_MARK_EM, - "Conveniently convert regular stuff into quantum form.", - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "To make it more inconvenient." + translateToLocal("gt.blockmachines.multimachine.em.mattertoem.desc.0"),//Conveniently convert regular stuff into quantum form. + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.mattertoem.desc.1")//To make it more inconvenient. }; } @@ -204,4 +205,4 @@ public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_Multiblock eOutputHatches.get(0).getContainerHandler().putUnifyAll(outputEM[0]); outputEM = null; } -} +} \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java index 11be32f9a5..0a2e06ac7d 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java @@ -42,6 +42,7 @@ import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBloc import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_crafting.crafter; import static com.github.technus.tectech.thing.metaTileEntity.multi.em_machine.GT_MetaTileEntity_EM_machine.machine; import static gregtech.api.enums.GT_Values.E; +import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by danie_000 on 17.12.2016. @@ -71,7 +72,7 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, Blocks.air}; private static final byte[] blockMetaFallback = new byte[]{1, 0}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA+"Hint Details:", + EnumChatFormatting.AQUA+translateToLocal("tt.keyphrase.Hint_Details") + ":", "1 - Classic/Data Hatches or Computer casing", "2 - Holder Hatch", }; diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java index 96132a889e..a7f4c84f41 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java @@ -45,15 +45,16 @@ import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texture import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_crafting.crafter; import static com.github.technus.tectech.thing.metaTileEntity.multi.em_machine.GT_MetaTileEntity_EM_machine.machine; +import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by danie_000 on 17.12.2016. */ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { - public static final int SCAN_DO_NOTHING=0, - SCAN_GET_NOMENCLATURE=1,SCAN_GET_DEPTH_LEVEL=2,SCAN_GET_AMOUNT=4,SCAN_GET_CHARGE=8, - SCAN_GET_MASS=16,SCAN_GET_ENERGY_LEVEL=32,SCAN_GET_TIMESPAN_INFO=64,SCAN_GET_ENERGY_STATES=128, - SCAN_GET_COLOR=256,SCAN_GET_AGE=512,SCAN_GET_TIMESPAN_MULT=1024,SCAN_GET_CLASS_TYPE=2048; + public static final int SCAN_DO_NOTHING = 0, + SCAN_GET_NOMENCLATURE = 1, SCAN_GET_DEPTH_LEVEL = 2, SCAN_GET_AMOUNT = 4, SCAN_GET_CHARGE = 8, + SCAN_GET_MASS = 16, SCAN_GET_ENERGY_LEVEL = 32, SCAN_GET_TIMESPAN_INFO = 64, SCAN_GET_ENERGY_STATES = 128, + SCAN_GET_COLOR = 256, SCAN_GET_AGE = 512, SCAN_GET_TIMESPAN_MULT = 1024, SCAN_GET_CLASS_TYPE = 2048; private TT_recipe.TT_EMRecipe.TT_EMRecipe eRecipe; private cElementalDefinitionStack objectResearched; @@ -63,18 +64,18 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa private int[] scanComplexity; //region parameters - private static final INameFunction CONFIG_NAME= - (base,p)->"Config at Depth: "+(p.hatchId()*2+p.parameterId()); - private static final IStatusFunction CONFIG_STATUS= - (base,p)->{ - double v=p.get(); - if(Double.isNaN(v)){ + private static final INameFunction CONFIG_NAME = + (base, p) -> "Config at Depth: " + (p.hatchId() * 2 + p.parameterId()); + private static final IStatusFunction CONFIG_STATUS = + (base, p) -> { + double v = p.get(); + if (Double.isNaN(v)) { return LedStatus.STATUS_WRONG; } - v=(int)v; - if(v==0) return LedStatus.STATUS_NEUTRAL; - if(v>=SCAN_GET_CLASS_TYPE) return LedStatus.STATUS_TOO_HIGH; - if(v<0) return LedStatus.STATUS_TOO_LOW; + v = (int) v; + if (v == 0) return LedStatus.STATUS_NEUTRAL; + if (v >= SCAN_GET_CLASS_TYPE) return LedStatus.STATUS_TOO_HIGH; + if (v < 0) return LedStatus.STATUS_TOO_LOW; return LedStatus.STATUS_OK; }; protected Parameters.Group.ParameterIn[] scanConfiguration; @@ -102,31 +103,31 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0, 4, 4, 4}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA+"Hint Details:", - "1 - Classic Hatches or High Power Casing", - "2 - Elemental Input Hatches or Molecular Casing", - "3 - Elemental Output Hatches or Molecular Casing", - "4 - Elemental Overflow Hatches or Molecular Casing", + EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", + translateToLocal("gt.blockmachines.multimachine.em.scanner.hint.0"),//1 - Classic Hatches or High Power Casing + translateToLocal("gt.blockmachines.multimachine.em.scanner.hint.1"),//2 - Elemental Input Hatches or Molecular Casing + translateToLocal("gt.blockmachines.multimachine.em.scanner.hint.2"),//3 - Elemental Output Hatches or Molecular Casing + translateToLocal("gt.blockmachines.multimachine.em.scanner.hint.3"),//4 - Elemental Overflow Hatches or Molecular Casing }; //endregion public GT_MetaTileEntity_EM_scanner(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); - eDismantleBoom=true; + eDismantleBoom = true; } public GT_MetaTileEntity_EM_scanner(String aName) { super(aName); - eDismantleBoom=true; + eDismantleBoom = true; } @Override protected void parametersInstantiation_EM() { - scanConfiguration=new Parameters.Group.ParameterIn[20]; + scanConfiguration = new Parameters.Group.ParameterIn[20]; for (int i = 0; i < 10; i++) { Parameters.Group hatch = parametrization.getGroup(i); - scanConfiguration[i*2] = hatch.makeInParameter(0, 0, CONFIG_NAME, CONFIG_STATUS); - scanConfiguration[i*2+1] = hatch.makeInParameter(1, 0, CONFIG_NAME, CONFIG_STATUS); + scanConfiguration[i * 2] = hatch.makeInParameter(0, 0, CONFIG_NAME, CONFIG_STATUS); + scanConfiguration[i * 2 + 1] = hatch.makeInParameter(1, 0, CONFIG_NAME, CONFIG_STATUS); } } @@ -145,7 +146,7 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa @Override public void construct(int stackSize, boolean hintsOnly) { - StructureBuilderExtreme(shape, blockType, blockMeta,2, 2, 0, getBaseMetaTileEntity(),this,hintsOnly); + StructureBuilderExtreme(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), this, hintsOnly); } @Override @@ -157,8 +158,8 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa public String[] getDescription() { return new String[]{ CommonValues.TEC_MARK_EM, - "What is existing here?", - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "I HAVE NO IDEA (yet)!" + "",//What is existing here? + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + ""//I HAVE NO IDEA (yet)! }; } @@ -167,17 +168,17 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa super.saveNBTData(aNBT); aNBT.setLong("eComputationRemaining", totalComputationRemaining); aNBT.setLong("eComputationRequired", totalComputationRequired); - if(objectResearched!=null) { + if (objectResearched != null) { aNBT.setTag("eObject", objectResearched.toNBT()); } else { aNBT.removeTag("eObject"); } - if(scanComplexity!=null) { + if (scanComplexity != null) { aNBT.setIntArray("eScanComplexity", scanComplexity); } else { aNBT.removeTag("eScanComplexity"); } - if(objectsScanned!=null) { + if (objectsScanned != null) { aNBT.setTag("eScanObjects", objectsScanned.toNBT()); } else { aNBT.removeTag("eScanObjects"); @@ -187,17 +188,17 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa @Override public void loadNBTData(NBTTagCompound aNBT) { super.loadNBTData(aNBT); - totalComputationRemaining =aNBT.getLong("eComputationRemaining"); - totalComputationRequired =aNBT.getLong("eComputationRequired"); - if(aNBT.hasKey("eObject")) { + totalComputationRemaining = aNBT.getLong("eComputationRemaining"); + totalComputationRequired = aNBT.getLong("eComputationRequired"); + if (aNBT.hasKey("eObject")) { objectResearched = cElementalDefinitionStack.fromNBT(aNBT.getCompoundTag("eObject")); - if(objectResearched.definition==nbtE__) { + if (objectResearched.definition == nbtE__) { objectResearched = null; } - }else { + } else { objectResearched = null; } - if(aNBT.hasKey("eScanComplexity")) { + if (aNBT.hasKey("eScanComplexity")) { scanComplexity = aNBT.getIntArray("eScanComplexity"); } else { scanComplexity = null; @@ -206,25 +207,25 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa if (aNBT.hasKey("eScanObjects")) { objectsScanned = cElementalInstanceStackMap.fromNBT(aNBT.getCompoundTag("eScanObjects")); } - }catch (tElementalException e){ - objectsScanned=new cElementalInstanceStackMap(); + } catch (tElementalException e) { + objectsScanned = new cElementalInstanceStackMap(); } } @Override public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if(aBaseMetaTileEntity.isActive() && (aTick & 0x2)==0 && aBaseMetaTileEntity.isClientSide()){ - int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX*4+aBaseMetaTileEntity.getXCoord(); - int yDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetY*4+aBaseMetaTileEntity.getYCoord(); - int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ*4+aBaseMetaTileEntity.getZCoord(); - aBaseMetaTileEntity.getWorld().markBlockRangeForRenderUpdate(xDir,yDir,zDir,xDir,yDir,zDir); + if (aBaseMetaTileEntity.isActive() && (aTick & 0x2) == 0 && aBaseMetaTileEntity.isClientSide()) { + int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 4 + aBaseMetaTileEntity.getXCoord(); + int yDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetY * 4 + aBaseMetaTileEntity.getYCoord(); + int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 4 + aBaseMetaTileEntity.getZCoord(); + aBaseMetaTileEntity.getWorld().markBlockRangeForRenderUpdate(xDir, yDir, zDir, xDir, yDir, zDir); } } @Override public void onFirstTick_EM(IGregTechTileEntity aBaseMetaTileEntity) { - if(aBaseMetaTileEntity.isServerSide()) { - if (totalComputationRemaining > 0 && objectResearched!=null) { + if (aBaseMetaTileEntity.isServerSide()) { + if (totalComputationRemaining > 0 && objectResearched != null) { eRecipe = null; if (ItemList.Tool_DataOrb.isStackEqual(mInventory[1], false, true)) { eRecipe = TT_recipe.TT_Recipe_Map_EM.sMachineRecipesEM.findRecipe(objectResearched.definition); @@ -240,7 +241,7 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa if (eRecipe == null) { quantumStuff(false); objectResearched = null; - eRequiredData=0; + eRequiredData = 0; totalComputationRequired = totalComputationRemaining = 0; mMaxProgresstime = 0; mEfficiencyIncrease = 0; @@ -253,27 +254,27 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa @Override public boolean checkRecipe_EM(ItemStack itemStack) { - eRecipe=null; - if(!eInputHatches.isEmpty() && eInputHatches.get(0).getContainerHandler().hasStacks() && !eOutputHatches.isEmpty()) { + eRecipe = null; + if (!eInputHatches.isEmpty() && eInputHatches.get(0).getContainerHandler().hasStacks() && !eOutputHatches.isEmpty()) { cElementalInstanceStackMap researchEM = eInputHatches.get(0).getContainerHandler(); - if(ItemList.Tool_DataOrb.isStackEqual(itemStack, false, true)) { - GT_Recipe scannerRecipe=null; - for(cElementalInstanceStack stackEM:researchEM.values()){ - objectsScanned=null; + if (ItemList.Tool_DataOrb.isStackEqual(itemStack, false, true)) { + GT_Recipe scannerRecipe = null; + for (cElementalInstanceStack stackEM : researchEM.values()) { + objectsScanned = null; eRecipe = TT_recipe.TT_Recipe_Map_EM.sMachineRecipesEM.findRecipe(stackEM.definition); - if(eRecipe!=null) { - scannerRecipe=eRecipe.scannerRecipe; - machineType= machine; - objectResearched=new cElementalDefinitionStack(stackEM.definition,1); + if (eRecipe != null) { + scannerRecipe = eRecipe.scannerRecipe; + machineType = machine; + objectResearched = new cElementalDefinitionStack(stackEM.definition, 1); //cleanMassEM_EM(objectResearched.getMass()); researchEM.remove(objectResearched.definition); break; } eRecipe = TT_recipe.TT_Recipe_Map_EM.sCrafterRecipesEM.findRecipe(stackEM.definition); - if(eRecipe!=null) { - scannerRecipe=eRecipe.scannerRecipe; - machineType= crafter; - objectResearched=new cElementalDefinitionStack(stackEM.definition,1); + if (eRecipe != null) { + scannerRecipe = eRecipe.scannerRecipe; + machineType = crafter; + objectResearched = new cElementalDefinitionStack(stackEM.definition, 1); //cleanMassEM_EM(objectResearched.getMass()); researchEM.remove(objectResearched.definition); break; @@ -281,7 +282,7 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa cleanStackEM_EM(stackEM); researchEM.remove(stackEM.definition); } - if(eRecipe!=null && scannerRecipe!=null){//todo make sure it werks + if (eRecipe != null && scannerRecipe != null) {//todo make sure it werks totalComputationRequired = totalComputationRemaining = scannerRecipe.mDuration * 20L; mMaxProgresstime = 20;//const mEfficiencyIncrease = 10000; @@ -291,39 +292,39 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa quantumStuff(true); return true; } - }else if(CustomItemList.scanContainer.isStackEqual(itemStack, false, true)) { - eRecipe=null; - if(researchEM.hasStacks()) { + } else if (CustomItemList.scanContainer.isStackEqual(itemStack, false, true)) { + eRecipe = null; + if (researchEM.hasStacks()) { objectsScanned = researchEM.takeAllToNewMap(); cleanMassEM_EM(objectsScanned.getMass()); - totalComputationRequired =0; - eRequiredData=0; - eAmpereFlow=objectsScanned.size() + TecTech.RANDOM.next(objectsScanned.size()); - mEUt=-(int)V[8]; + totalComputationRequired = 0; + eRequiredData = 0; + eAmpereFlow = objectsScanned.size() + TecTech.RANDOM.next(objectsScanned.size()); + mEUt = -(int) V[8]; //get depth scan complexity array { int[] scanComplexityTemp = new int[20]; for (int i = 0; i < 20; i++) { - scanComplexityTemp[i]=(int)scanConfiguration[i].get(); + scanComplexityTemp[i] = (int) scanConfiguration[i].get(); } int maxDepth = 0; for (int i = 0; i < 20; i++) { if (scanComplexityTemp[i] != SCAN_DO_NOTHING) { maxDepth = i; - if(!DEBUG_MODE) { + if (!DEBUG_MODE) { scanComplexityTemp[i] &= ~SCAN_GET_CLASS_TYPE; } - addComputationRequirements(i+1,scanComplexityTemp[i]); + addComputationRequirements(i + 1, scanComplexityTemp[i]); } } - maxDepth+=1;//from index to len + maxDepth += 1;//from index to len scanComplexity = new int[maxDepth]; - System.arraycopy(scanComplexityTemp,0,scanComplexity,0,maxDepth); + System.arraycopy(scanComplexityTemp, 0, scanComplexity, 0, maxDepth); } - totalComputationRemaining = totalComputationRequired*=20; + totalComputationRemaining = totalComputationRequired *= 20; mMaxProgresstime = 20;//const mEfficiencyIncrease = 10000; quantumStuff(true); @@ -332,96 +333,96 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa } } quantumStuff(false); - objectResearched=null; - totalComputationRemaining =0; + objectResearched = null; + totalComputationRemaining = 0; return false; } - private void addComputationRequirements(int depthPlus, int capabilities){ - if(areBitsSet(SCAN_GET_NOMENCLATURE,capabilities)){ - totalComputationRequired +=depthPlus*5L; - eRequiredData+=depthPlus; + private void addComputationRequirements(int depthPlus, int capabilities) { + if (areBitsSet(SCAN_GET_NOMENCLATURE, capabilities)) { + totalComputationRequired += depthPlus * 5L; + eRequiredData += depthPlus; } - if(areBitsSet(SCAN_GET_DEPTH_LEVEL,capabilities)){ - totalComputationRequired +=depthPlus*10L; - eRequiredData+=depthPlus; + if (areBitsSet(SCAN_GET_DEPTH_LEVEL, capabilities)) { + totalComputationRequired += depthPlus * 10L; + eRequiredData += depthPlus; } - if(areBitsSet(SCAN_GET_AMOUNT,capabilities)){ - totalComputationRequired +=depthPlus*64L; - eRequiredData+=depthPlus*8L; + if (areBitsSet(SCAN_GET_AMOUNT, capabilities)) { + totalComputationRequired += depthPlus * 64L; + eRequiredData += depthPlus * 8L; } - if(areBitsSet(SCAN_GET_CHARGE,capabilities)){ - totalComputationRequired +=depthPlus*128L; - eRequiredData+=depthPlus*4L; + if (areBitsSet(SCAN_GET_CHARGE, capabilities)) { + totalComputationRequired += depthPlus * 128L; + eRequiredData += depthPlus * 4L; } - if(areBitsSet(SCAN_GET_MASS,capabilities)){ - totalComputationRequired +=depthPlus*256L; - eRequiredData+=depthPlus*4L; + if (areBitsSet(SCAN_GET_MASS, capabilities)) { + totalComputationRequired += depthPlus * 256L; + eRequiredData += depthPlus * 4L; } - if(areBitsSet(SCAN_GET_ENERGY_LEVEL,capabilities)){ - totalComputationRequired +=depthPlus*512L; - eRequiredData+=depthPlus*16L; + if (areBitsSet(SCAN_GET_ENERGY_LEVEL, capabilities)) { + totalComputationRequired += depthPlus * 512L; + eRequiredData += depthPlus * 16L; } - if(areBitsSet(SCAN_GET_TIMESPAN_INFO,capabilities)){ - totalComputationRequired +=depthPlus*1024L; - eRequiredData+=depthPlus*32L; + if (areBitsSet(SCAN_GET_TIMESPAN_INFO, capabilities)) { + totalComputationRequired += depthPlus * 1024L; + eRequiredData += depthPlus * 32L; } - if(areBitsSet(SCAN_GET_ENERGY_STATES,capabilities)){ - totalComputationRequired +=depthPlus*2048L; - eRequiredData+=depthPlus*32L; + if (areBitsSet(SCAN_GET_ENERGY_STATES, capabilities)) { + totalComputationRequired += depthPlus * 2048L; + eRequiredData += depthPlus * 32L; } - if(areBitsSet(SCAN_GET_COLOR,capabilities)){ - totalComputationRequired +=depthPlus*1024L; - eRequiredData+=depthPlus*48L; + if (areBitsSet(SCAN_GET_COLOR, capabilities)) { + totalComputationRequired += depthPlus * 1024L; + eRequiredData += depthPlus * 48L; } - if(areBitsSet(SCAN_GET_AGE,capabilities)){ - totalComputationRequired +=depthPlus*2048L; - eRequiredData+=depthPlus*64L; + if (areBitsSet(SCAN_GET_AGE, capabilities)) { + totalComputationRequired += depthPlus * 2048L; + eRequiredData += depthPlus * 64L; } - if(areBitsSet(SCAN_GET_TIMESPAN_MULT,capabilities)){ - totalComputationRequired +=depthPlus*2048L; - eRequiredData+=depthPlus*64L; + if (areBitsSet(SCAN_GET_TIMESPAN_MULT, capabilities)) { + totalComputationRequired += depthPlus * 2048L; + eRequiredData += depthPlus * 64L; } } @Override public boolean onRunningTick(ItemStack aStack) { - if(totalComputationRemaining <=0) { - totalComputationRemaining =0; - mProgresstime=mMaxProgresstime; + if (totalComputationRemaining <= 0) { + totalComputationRemaining = 0; + mProgresstime = mMaxProgresstime; return true; - }else{ - totalComputationRemaining -=eAvailableData; - mProgresstime=1; + } else { + totalComputationRemaining -= eAvailableData; + mProgresstime = 1; return super.onRunningTick(aStack); } } @Override public void outputAfterRecipe_EM() { - if (eRecipe != null && ItemList.Tool_DataOrb.isStackEqual(mInventory[1], false, true)){ + if (eRecipe != null && ItemList.Tool_DataOrb.isStackEqual(mInventory[1], false, true)) { - mInventory[1].setStackDisplayName(GT_LanguageManager.getTranslation(eRecipe.mOutputs[0].getDisplayName()) + ' ' + machineType +" Construction Data"); + mInventory[1].setStackDisplayName(GT_LanguageManager.getTranslation(eRecipe.mOutputs[0].getDisplayName()) + ' ' + machineType + " Construction Data"); NBTTagCompound tNBT = mInventory[1].getTagCompound();//code above makes it not null tNBT.setString("eMachineType", machineType); tNBT.setTag(E_RECIPE_ID, objectResearched.toNBT()); - tNBT.setString("author", EnumChatFormatting.BLUE + "Tec" + EnumChatFormatting.DARK_BLUE + "Tech" + EnumChatFormatting.WHITE + ' ' + machineType+ " EM Recipe Generator"); - }else if(objectsScanned!=null && CustomItemList.scanContainer.isStackEqual(mInventory[1], false, true)){ - ElementalDefinitionScanStorage_EM.setContent(mInventory[1],objectsScanned,scanComplexity); + tNBT.setString("author", EnumChatFormatting.BLUE + "Tec" + EnumChatFormatting.DARK_BLUE + "Tech" + EnumChatFormatting.WHITE + ' ' + machineType + " EM Recipe Generator"); + } else if (objectsScanned != null && CustomItemList.scanContainer.isStackEqual(mInventory[1], false, true)) { + ElementalDefinitionScanStorage_EM.setContent(mInventory[1], objectsScanned, scanComplexity); } - objectResearched=null; - totalComputationRemaining =0; + objectResearched = null; + totalComputationRemaining = 0; quantumStuff(false); } @@ -460,7 +461,7 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa " Efficiency: " + EnumChatFormatting.YELLOW + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", "PowerPass: " + EnumChatFormatting.BLUE + ePowerPass + EnumChatFormatting.RESET + " SafeVoid: " + EnumChatFormatting.BLUE + eSafeVoid, - "Computation Available: " + EnumChatFormatting.GREEN + eAvailableData +EnumChatFormatting.RESET+" / "+EnumChatFormatting.YELLOW + eRequiredData + EnumChatFormatting.RESET, + "Computation Available: " + EnumChatFormatting.GREEN + eAvailableData + EnumChatFormatting.RESET + " / " + EnumChatFormatting.YELLOW + eRequiredData + EnumChatFormatting.RESET, "Computation Remaining:", EnumChatFormatting.GREEN + Long.toString(totalComputationRemaining / 20L) + EnumChatFormatting.RESET + " / " + EnumChatFormatting.YELLOW + totalComputationRequired / 20L @@ -477,20 +478,20 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa public void stopMachine() { quantumStuff(false); super.stopMachine(); - totalComputationRequired = totalComputationRemaining =0; - objectResearched=null; + totalComputationRequired = totalComputationRemaining = 0; + objectResearched = null; } - private void quantumStuff(boolean shouldExist){ - IGregTechTileEntity base=getBaseMetaTileEntity(); - if(base!=null && base.getWorld()!=null) { - int xDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetX * 4+base.getXCoord(); - int yDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetY * 4+base.getYCoord(); - int zDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetZ * 4+base.getZCoord(); + private void quantumStuff(boolean shouldExist) { + IGregTechTileEntity base = getBaseMetaTileEntity(); + if (base != null && base.getWorld() != null) { + int xDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetX * 4 + base.getXCoord(); + int yDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetY * 4 + base.getYCoord(); + int zDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetZ * 4 + base.getZCoord(); Block block = base.getWorld().getBlock(xDir, yDir, zDir); if (shouldExist) { - if(block != null && block.getMaterial()== Material.air) { + if (block != null && block.getMaterial() == Material.air) { base.getWorld().setBlock(xDir, yDir, zDir, QuantumStuffBlock.INSTANCE, 0, 2); } } else { @@ -500,4 +501,4 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa } } } -} +} \ No newline at end of file diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index 755022d6a3..b9e7b21e4f 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -383,9 +383,30 @@ gt.blockmachines.multimachine.em.computer.cfgo.0=Current max. heat gt.blockmachines.multimachine.em.computer.cfgo.1=Produced computation gt.blockmachines.multimachine.em.databank.name=Data Bank +gt.blockmachines.multimachine.em.databank.hint.0=1 - Classic Hatches or high power casing +gt.blockmachines.multimachine.em.databank.hint.1=2 - Data Access/Data Bank Master Hatches or computer casing +gt.blockmachines.multimachine.em.databank.desc.0=Remote assembly data delivery +gt.blockmachines.multimachine.em.databank.desc.1=Apply directly to the forehead + gt.blockmachines.multimachine.em.junction.name=Matter Junction +gt.blockmachines.multimachine.em.junction.hint.0=1 - Classic Hatches or High Power Casing +gt.blockmachines.multimachine.em.junction.hint.1=2 - Elemental Hatches or Molecular Casing +gt.blockmachines.multimachine.em.junction.desc.0=Reroutes Matter +gt.blockmachines.multimachine.em.junction.desc.1=Axis aligned movement! + gt.blockmachines.multimachine.em.mattertoem.name=Matter Quantizer +gt.blockmachines.multimachine.em.mattertoem.hint.0=1 - Classic Hatches or High Power Casing +gt.blockmachines.multimachine.em.mattertoem.hint.1=2 - Elemental Output Hatch +gt.blockmachines.multimachine.em.mattertoem.hint.2=3 - Elemental Overflow Hatches or Molecular Casing +gt.blockmachines.multimachine.em.mattertoem.desc.0=Conveniently convert regular stuff into quantum form. +gt.blockmachines.multimachine.em.mattertoem.desc.1=To make it more inconvenient. + gt.blockmachines.multimachine.em.emtomatter.name=Matter Dequantizer +gt.blockmachines.multimachine.em.emtomatter.hint.0=1 - Classic Hatches or High Power Casing" +gt.blockmachines.multimachine.em.emtomatter.hint.1=2 - Elemental Input Hatch +gt.blockmachines.multimachine.em.emtomatter.hint.2=3 - Elemental Overflow Hatches or Molecular Casing +gt.blockmachines.multimachine.em.emtomatter.desc.0=Transform quantum form back to... +gt.blockmachines.multimachine.em.emtomatter.desc.1=regular one, but why? gt.blockmachines.multimachine.em.emtoessentia.name=Essentia Dequantizer gt.blockmachines.multimachine.em.emtoessentia.hint.0=1 - Classic Hatches or High Power Casing @@ -404,17 +425,34 @@ gt.blockmachines.multimachine.em.essentiatoem.desc.0=Conveniently convert regula gt.blockmachines.multimachine.em.essentiatoem.desc.1=To make it more inconvenient. gt.blockmachines.multimachine.em.scanner.name=Elemental Scanner +gt.blockmachines.multimachine.em.scanner.hint.0=1 - Classic Hatches or High Power Casing +gt.blockmachines.multimachine.em.scanner.hint.1=2 - Elemental Input Hatches or Molecular Casing +gt.blockmachines.multimachine.em.scanner.hint.2=3 - Elemental Output Hatches or Molecular Casing +gt.blockmachines.multimachine.em.scanner.hint.3=4 - Elemental Overflow Hatches or Molecular Casing +gt.blockmachines.multimachine.em.scanner.desc.0=What is existing here? +gt.blockmachines.multimachine.em.scanner.desc.1=I HAVE NO IDEA (yet)! + gt.blockmachines.multimachine.em.research.name=Research station + gt.blockmachines.multimachine.em.collider.name=Matter Collider + gt.blockmachines.multimachine.em.infuser.name=Energy Infuser + gt.blockmachines.multimachine.em.processing.name=Quantum Processing Machine + gt.blockmachines.multimachine.em.crafter.name=Matter Assembler + gt.blockmachines.multimachine.em.stabilizer.name=Elemental Stabilizer + gt.blockmachines.multimachine.em.wormhole.name=Wormhole + gt.blockmachines.multimachine.em.decay.name=Decay Generator + gt.blockmachines.multimachine.em.annihilation.name=Annihilation Generator + gt.blockmachines.multimachine.em.blackholegenerator.name=Black Hole Generator + #Keywords and phrases tt.keyword.Air=Air tt.keyword.Earth=Earth @@ -433,6 +471,7 @@ tt.keyword.BOOM=BOOM! tt.keyword.ID=ID tt.keyword.Destination=Destination tt.keyword.Weight=Weight +tt.keyword.Source=Source tt.keyphrase.LIFE_TIME=LIFE TIME tt.keyphrase.CARRIES_COLOR=CARRIES COLOR diff --git a/src/main/resources/assets/tectech/lang/ru_RU.lang b/src/main/resources/assets/tectech/lang/ru_RU.lang deleted file mode 100644 index 1d78cd54bf..0000000000 --- a/src/main/resources/assets/tectech/lang/ru_RU.lang +++ /dev/null @@ -1,448 +0,0 @@ -#Creative Tab Name -itemGroup.TecTech=TecTech Interdimensional -#Blocks -tile.quantumGlass.name=Quantum Glass -tile.quantumStuff.name=Quantum Stuff -#Items -item.em.debugContainer.name=Debug EM Container -item.em.definitionContainer.name=EM Recipe Hint -item.em.definitionScanStorage.name=EM Scan Storage -item.em.constructable.name=Multiblock Machine Blueprint -item.em.frontRotate.name=Front Rotation Scrench -item.em.parametrizerMemoryCard.name=Parametrizer Memory Card -item.em.EuMeterGT.name=GT EU meter -item.tm.teslaCover.0.name=Tesla Coil Cover -item.tm.teslaCover.1.name=Tesla Coil Cover Rich Edition -item.tm.teslaStaff.name=Tesla Staff - -item.tm.teslaCoilCapacitor.0.name=LV Tesla Capacitor -item.tm.teslaCoilCapacitor.1.name=MV Tesla Capacitor -item.tm.teslaCoilCapacitor.2.name=HV Tesla Capacitor -item.tm.teslaCoilCapacitor.3.name=EV Tesla Capacitor -item.tm.teslaCoilCapacitor.4.name=IV Tesla Capacitor - -item.tm.itemTeslaComponent.0.name=Electrum Tesla Windings -item.tm.itemTeslaComponent.1.name=Superconductive Tesla Windings -#Death Messages -death.attack.microwaving=%1$s was dehydrated by radiation. -death.attack.microwaving.player=%1$s was dehydrated by radiation while fighting %2$s. -death.attack.elementalPollution=%1$s was vaping from the wrong hole. -death.attack.elementalPollution.player=%1$s was vaping from the wrong hole while fighting %2$s. -death.attack.subspace=%1$s was N-th dimensionally displeased. -death.attack.subspace.player=%1$s N-th dimensionally displeased while fighting %2$s. -#Machine hulls -gt.blockmachines.hull.tier.10.name=UEV Machine Hull -gt.blockmachines.hull.tier.11.name=UIV Machine Hull -gt.blockmachines.hull.tier.12.name=UMV Machine Hull -gt.blockmachines.hull.tier.13.name=UXV Machine Hull -gt.blockmachines.hull.tier.14.name=OPV Machine Hull -gt.blockmachines.hull.tier.15.name=MAX Machine Hull -#Transformers -gt.blockmachines.wetransformer.tier.00.name=Ultra Low Voltage Power Transformer -gt.blockmachines.wetransformer.tier.00.desc=LV -> ULV (Use Soft Mallet to invert) -gt.blockmachines.wetransformer.tier.01.name=Low Voltage Power Transformer -gt.blockmachines.wetransformer.tier.01.desc=MV -> LV (Use Soft Mallet to invert) -gt.blockmachines.wetransformer.tier.02.name=Medium Voltage Power Transformer -gt.blockmachines.wetransformer.tier.02.desc=HV -> MV (Use Soft Mallet to invert) -gt.blockmachines.wetransformer.tier.03.name=High Voltage Power Transformer -gt.blockmachines.wetransformer.tier.03.desc=EV -> HV (Use Soft Mallet to invert) -gt.blockmachines.wetransformer.tier.04.name=Extreme Power Transformer -gt.blockmachines.wetransformer.tier.04.desc=IV -> EV (Use Soft Mallet to invert) -gt.blockmachines.wetransformer.tier.05.name=Insane Power Transformer -gt.blockmachines.wetransformer.tier.05.desc=LuV -> IV (Use Soft Mallet to invert) -gt.blockmachines.wetransformer.tier.06.name=Ludicrous Power Transformer -gt.blockmachines.wetransformer.tier.06.desc=ZPM -> LuV (Use Soft Mallet to invert) -gt.blockmachines.wetransformer.tier.07.name=ZPM Voltage Power Transformer -gt.blockmachines.wetransformer.tier.07.desc=UV -> ZPM (Use Soft Mallet to invert) -gt.blockmachines.wetransformer.tier.08.name=Ultimate Power Transformer -gt.blockmachines.wetransformer.tier.08.desc=UHV -> UV (Use Soft Mallet to invert) -gt.blockmachines.wetransformer.tier.09.name=Highly Ultimate Power Transformer -gt.blockmachines.wetransformer.tier.09.desc=UEV -> UHV (Use Soft Mallet to invert) -gt.blockmachines.wetransformer.tier.10.name=Extremely Ultimate Power Transformer -gt.blockmachines.wetransformer.tier.10.desc=UIV -> UEV (Use Soft Mallet to invert) -gt.blockmachines.wetransformer.tier.11.name=Insanely Ultimate Power Transformer -gt.blockmachines.wetransformer.tier.11.desc=UMV -> UIV (Use Soft Mallet to invert) -gt.blockmachines.wetransformer.tier.12.name=Mega Ultimate Power Transformer -gt.blockmachines.wetransformer.tier.12.desc=UXV -> UMV (Use Soft Mallet to invert) -gt.blockmachines.wetransformer.tier.13.name=Extended Mega Ultimate Power Transformer -gt.blockmachines.wetransformer.tier.13.desc=OPV -> UXV (Use Soft Mallet to invert) -gt.blockmachines.wetransformer.tier.14.name=Overpowered Power Transformer -gt.blockmachines.wetransformer.tier.14.desc=MAX -> OPV (Use Soft Mallet to invert) - -gt.blockmachines.tt.transformer.tier.09.name=Highly Ultimate Transformer -gt.blockmachines.tt.transformer.tier.09.desc=UEV -> UHV (Use Soft Mallet to invert) -gt.blockmachines.tt.transformer.tier.10.name=Extremely Ultimate Transformer -gt.blockmachines.tt.transformer.tier.10.desc=UIV -> UEV (Use Soft Mallet to invert) -gt.blockmachines.tt.transformer.tier.11.name=Insanely Ultimate Transformer -gt.blockmachines.tt.transformer.tier.11.desc=UMV -> UIV (Use Soft Mallet to invert) -gt.blockmachines.tt.transformer.tier.12.name=Mega Ultimate Transformer -gt.blockmachines.tt.transformer.tier.12.desc=UXV -> UMV (Use Soft Mallet to invert) -gt.blockmachines.tt.transformer.tier.13.name=Extended Mega Ultimate Transformer -gt.blockmachines.tt.transformer.tier.13.desc=OPV -> UXV (Use Soft Mallet to invert) -gt.blockmachines.tt.transformer.tier.14.name=Overpowered Transformer -gt.blockmachines.tt.transformer.tier.14.desc=MAX -> OPV (Use Soft Mallet to invert) - -gt.blockmachines.transformer.ha.tier.09.name=Highly Ultimate Hi-Amp Transformer -gt.blockmachines.transformer.ha.tier.09.desc=UEV -> UHV (Use Soft Mallet to invert -gt.blockmachines.transformer.ha.tier.10.name=Extremely Ultimate Hi-Amp Transformer -gt.blockmachines.transformer.ha.tier.10.desc=UIV -> UEV (Use Soft Mallet to invert) -gt.blockmachines.transformer.ha.tier.11.name=Insanely Ultimate Hi-Amp Transformer -gt.blockmachines.transformer.ha.tier.11.desc=UMV -> UIV (Use Soft Mallet to invert) -gt.blockmachines.transformer.ha.tier.12.name=Mega Ultimate Hi-Amp Transformer -gt.blockmachines.transformer.ha.tier.12.desc=UXV -> UMV (Use Soft Mallet to invert) -gt.blockmachines.transformer.ha.tier.13.name=Extended Mega Ultimate Hi-Amp Transformer -gt.blockmachines.transformer.ha.tier.13.desc=OPV -> UXV (Use Soft Mallet to invert) -gt.blockmachines.transformer.ha.tier.14.name=Overpowered Hi-Amp Transformer -gt.blockmachines.transformer.ha.tier.14.desc=MAX -> OPV (Use Soft Mallet to invert) -#Hatches -tt.base.emhatch.desc.0=Max stacks amount: -tt.base.emhatch.desc.1=Stack capacity: -tt.base.emhatch.desc.2=Place Overflow Hatch behind,on top or below -tt.base.emhatch.desc.3=to provide overflow protection while this block -tt.base.emhatch.desc.4=is not attached to multi block. -tt.base.emhatch.desc.5=Transport range can be extended in straight -tt.base.emhatch.desc.6=line up to 15 blocks with quantum tunnels. -tt.base.emhatch.desc.7=Must be painted to work - -gt.blockmachines.hatch.emmuffler.tier.08.name=UV Overflow Output Hatch -gt.blockmachines.hatch.emmuffler.tier.09.name=UHV Overflow Output Hatch -gt.blockmachines.hatch.emmuffler.tier.10.name=UEV Overflow Output Hatch -gt.blockmachines.hatch.emmuffler.tier.11.name=UIV Overflow Output Hatch -gt.blockmachines.hatch.emmuffler.tier.12.name=UMV Overflow Output Hatch -gt.blockmachines.hatch.emmuffler.tier.13.name=UXV Overflow Output Hatch -gt.blockmachines.hatch.emmuffler.desc.0=Disposes excess elemental Matter -gt.blockmachines.hatch.emmuffler.desc.1=Mass capacity -gt.blockmachines.hatch.emmuffler.desc.2=Disposal Speed -gt.blockmachines.hatch.emmuffler.desc.3=DO NOT OBSTRUCT THE OUTPUT! - -gt.blockmachines.hatch.energymulti04.tier.05.name=IV 4A Energy Hatch -gt.blockmachines.hatch.energymulti16.tier.05.name=IV 16A Energy Hatch -gt.blockmachines.hatch.energymulti64.tier.05.name=IV 64A Energy Hatch -gt.blockmachines.hatch.energymulti04.tier.06.name=LuV 4A Energy Hatch -gt.blockmachines.hatch.energymulti16.tier.06.name=LuV 16A Energy Hatch -gt.blockmachines.hatch.energymulti64.tier.06.name=LuV 64A Energy Hatch -gt.blockmachines.hatch.energymulti04.tier.07.name=ZPM 4A Energy Hatch -gt.blockmachines.hatch.energymulti16.tier.07.name=ZPM 16A Energy Hatch -gt.blockmachines.hatch.energymulti64.tier.07.name=ZPM 64A Energy Hatch -gt.blockmachines.hatch.energymulti04.tier.08.name=UV 4A Energy Hatch -gt.blockmachines.hatch.energymulti16.tier.08.name=UV 16A Energy Hatch -gt.blockmachines.hatch.energymulti64.tier.08.name=UV 64A Energy Hatch -gt.blockmachines.hatch.energymulti04.tier.09.name=UHV 4A Energy Hatch -gt.blockmachines.hatch.energymulti16.tier.09.name=UHV 16A Energy Hatch -gt.blockmachines.hatch.energymulti64.tier.09.name=UHV 64A Energy Hatch -gt.blockmachines.hatch.energymulti04.tier.10.name=UEV 4A Energy Hatch -gt.blockmachines.hatch.energymulti16.tier.10.name=UEV 16A Energy Hatch -gt.blockmachines.hatch.energymulti64.tier.10.name=UEV 64A Energy Hatch -gt.blockmachines.hatch.energymulti04.tier.11.name=UIV 4A Energy Hatch -gt.blockmachines.hatch.energymulti16.tier.11.name=UIV 16A Energy Hatch -gt.blockmachines.hatch.energymulti64.tier.11.name=UIV 64A Energy Hatch -gt.blockmachines.hatch.energymulti04.tier.12.name=UMV 4A Energy Hatch -gt.blockmachines.hatch.energymulti16.tier.12.name=UMV 16A Energy Hatch -gt.blockmachines.hatch.energymulti64.tier.12.name=UMV 64A Energy Hatch -gt.blockmachines.hatch.energymulti04.tier.13.name=UXV 4A Energy Hatch -gt.blockmachines.hatch.energymulti16.tier.13.name=UXV 16A Energy Hatch -gt.blockmachines.hatch.energymulti64.tier.13.name=UXV 64A Energy Hatch -gt.blockmachines.hatch.energymulti.desc.0=Multiple Ampere Energy Injector for Multiblocks -gt.blockmachines.hatch.energymulti.desc.1=Amperes In - -gt.blockmachines.hatch.energytunnel1.tier.05.name=IV 256/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel2.tier.05.name=IV 1024/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel3.tier.05.name=IV 4096/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel4.tier.05.name=IV 16384/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel5.tier.05.name=IV 65536/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel6.tier.05.name=IV 262144/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel7.tier.05.name=IV 1048576/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel1.tier.06.name=LuV 256/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel2.tier.06.name=LuV 1024/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel3.tier.06.name=LuV 4096/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel4.tier.06.name=LuV 16384/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel5.tier.06.name=LuV 65536/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel6.tier.06.name=LuV 262144/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel7.tier.06.name=LuV 1048576/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel1.tier.07.name=ZPM 256/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel2.tier.07.name=ZPM 1024/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel3.tier.07.name=ZPM 4096/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel4.tier.07.name=ZPM 16384/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel5.tier.07.name=ZPM 65536/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel6.tier.07.name=ZPM 262144/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel7.tier.07.name=ZPM 1048576/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel1.tier.08.name=UV 256/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel2.tier.08.name=UV 1024/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel3.tier.08.name=UV 4096/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel4.tier.08.name=UV 16384/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel5.tier.08.name=UV 65536/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel6.tier.08.name=UV 262144/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel7.tier.08.name=UV 1048576/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel1.tier.09.name=UHV 256/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel2.tier.09.name=UHV 1024/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel3.tier.09.name=UHV 4096/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel4.tier.09.name=UHV 16384/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel5.tier.09.name=UHV 65536/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel6.tier.09.name=UHV 262144/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel7.tier.09.name=UHV 1048576/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel1.tier.10.name=UEV 256/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel2.tier.10.name=UEV 1024/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel3.tier.10.name=UEV 4096/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel4.tier.10.name=UEV 16384/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel5.tier.10.name=UEV 65536/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel6.tier.10.name=UEV 262144/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel7.tier.10.name=UEV 1048576/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel1.tier.11.name=UIV 256/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel2.tier.11.name=UIV 1024/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel3.tier.11.name=UIV 4096/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel4.tier.11.name=UIV 16384/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel5.tier.11.name=UIV 65536/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel6.tier.11.name=UIV 262144/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel7.tier.11.name=UIV 1048576/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel1.tier.12.name=UMV 256/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel2.tier.12.name=UMV 1024/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel3.tier.12.name=UMV 4096/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel4.tier.12.name=UMV 16384/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel5.tier.12.name=UMV 65536/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel6.tier.12.name=UMV 262144/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel7.tier.12.name=UMV 1048576/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel1.tier.13.name=UXV 256/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel2.tier.13.name=UXV 1024/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel3.tier.13.name=UXV 4096/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel4.tier.13.name=UXV 16384/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel5.tier.13.name=UXV 65536/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel6.tier.13.name=UXV 262144/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel7.tier.13.name=UXV 1048576/t Laser Target Hatch -gt.blockmachines.hatch.energytunnel.tier.14.name=Legendary Laser Target Hatch -gt.blockmachines.hatch.energytunnel.desc.0=Energy injecting terminal for Multiblocks -gt.blockmachines.hatch.energytunnel.desc.1=Throughput - -gt.blockmachines.hatch.dynamomulti04.tier.05.name=IV 4A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti16.tier.05.name=IV 16A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti64.tier.05.name=IV 64A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti04.tier.06.name=LuV 4A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti16.tier.06.name=LuV 16A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti64.tier.06.name=LuV 64A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti04.tier.07.name=ZPM 4A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti16.tier.07.name=ZPM 16A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti64.tier.07.name=ZPM 64A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti04.tier.08.name=UV 4A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti16.tier.08.name=UV 16A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti64.tier.08.name=UV 64A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti04.tier.09.name=UHV 4A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti16.tier.09.name=UHV 16A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti64.tier.09.name=UHV 64A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti04.tier.10.name=UEV 4A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti16.tier.10.name=UEV 16A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti64.tier.10.name=UEV 64A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti04.tier.11.name=UIV 4A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti16.tier.11.name=UIV 16A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti64.tier.11.name=UIV 64A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti04.tier.12.name=UMV 4A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti16.tier.12.name=UMV 16A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti64.tier.12.name=UMV 64A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti04.tier.13.name=IV 4A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti16.tier.13.name=IV 16A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti64.tier.13.name=IV 64A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti.desc.0=Multiple Ampere Energy Extractor for Multiblocks -gt.blockmachines.hatch.dynamomulti.desc.1=Amperes Out - -gt.blockmachines.hatch.dynamotunnel1.tier.05=IV 256/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel2.tier.05=IV 1024/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel3.tier.05=IV 4096/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel4.tier.05=IV 16384/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel5.tier.05=IV 65536/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel6.tier.05=IV 262144/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel7.tier.05=IV 1048576/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel1.tier.06=LuV 256/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel2.tier.06=LuV 1024/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel3.tier.06=LuV 4096/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel4.tier.06=LuV 16384/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel5.tier.06=LuV 65536/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel6.tier.06=LuV 262144/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel7.tier.06=LuV 1048576/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel1.tier.07=ZPM 256/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel2.tier.07=ZPM 1024/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel3.tier.07=ZPM 4096/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel4.tier.07=ZPM 16384/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel5.tier.07=ZPM 65536/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel6.tier.07=ZPM 262144/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel7.tier.07=ZPM 1048576/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel1.tier.08=UV 256/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel2.tier.08=UV 1024/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel3.tier.08=UV 4096/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel4.tier.08=UV 16384/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel5.tier.08=UV 65536/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel6.tier.08=UV 262144/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel7.tier.08=UV 1048576/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel1.tier.09=UHV 256/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel2.tier.09=UHV 1024/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel3.tier.09=UHV 4096/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel4.tier.09=UHV 16384/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel5.tier.09=UHV 65536/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel6.tier.09=UHV 262144/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel7.tier.09=UHV 1048576/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel1.tier.10=UEV 256/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel2.tier.10=UEV 1024/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel3.tier.10=UEV 4096/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel4.tier.10=UEV 16384/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel5.tier.10=UEV 65536/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel6.tier.10=UEV 262144/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel7.tier.10=UEV 1048576/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel1.tier.11=UIV 256/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel2.tier.11=UIV 1024/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel3.tier.11=UIV 4096/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel4.tier.11=UIV 16384/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel5.tier.11=UIV 65536/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel6.tier.11=UIV 262144/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel7.tier.11=UIV 1048576/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel1.tier.12=UMV 256/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel2.tier.12=UMV 1024/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel3.tier.12=UMV 4096/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel4.tier.12=UMV 16384/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel5.tier.12=UMV 65536/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel6.tier.12=UMV 262144/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel7.tier.12=UMV 1048576/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel1.tier.13=UXV 256/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel2.tier.13=UXV 1024/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel3.tier.13=UXV 4096/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel4.tier.13=UXV 16384/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel5.tier.13=UXV 65536/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel6.tier.13=UXV 262144/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel7.tier.13=UXV 1048576/t Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel.tier.14=Legendary Laser Source Hatch -gt.blockmachines.hatch.dynamotunnel.desc.0=Energy extracting terminal for Multiblocks -gt.blockmachines.hatch.dynamotunnel.desc.1=Throughput - -gt.blockmachines.emin.tier.08.name=UV Elemental Input Hatch -gt.blockmachines.emin.tier.09.name=UHV Elemental Input Hatch -gt.blockmachines.emin.tier.10.name=UEV Elemental Input Hatch -gt.blockmachines.emin.tier.11.name=UIV Elemental Input Hatch -gt.blockmachines.emin.tier.12.name=UMV Elemental Input Hatch -gt.blockmachines.emin.tier.13.name=UXV Elemental Input Hatch -gt.blockmachines.emin.desc=Elemental Input for Multiblocks - -gt.blockmachines.emout.tier.08.name=UV Elemental Output Hatch -gt.blockmachines.emout.tier.09.name=UHV Elemental Output Hatch -gt.blockmachines.emout.tier.10.name=UEV Elemental Output Hatch -gt.blockmachines.emout.tier.11.name=UIV Elemental Output Hatch -gt.blockmachines.emout.tier.12.name=UMV Elemental Output Hatch -gt.blockmachines.emout.tier.13.name=UXV Elemental Output Hatch -gt.blockmachines.emout.desc=Elemental Output for Multiblocks -#Multiblocks -gt.blockmachines.multimachine.em.transformer.name=Active Transformer -gt.blockmachines.multimachine.em.transformer.hint=1 - Energy IO Hatches or High Power Casing -gt.blockmachines.multimachine.em.transformer.desc.0=Power substation -gt.blockmachines.multimachine.em.transformer.desc.1=All the transformation! -gt.blockmachines.multimachine.em.transformer.desc.2=Only 0.78125% power loss, HAYO! - -gt.blockmachines.multimachine.tm.microwave.name=Microwave Grinder -gt.blockmachines.multimachine.tm.microwave.hint.0=1 - Classic Hatches or Clean Stainless Steel Casing -gt.blockmachines.multimachine.tm.microwave.hint.1=Also acts like a hopper so give it an Output Bus -gt.blockmachines.multimachine.tm.microwave.desc.0=High Frequency Oven -gt.blockmachines.multimachine.tm.microwave.desc.1=From live to done in seconds! -gt.blockmachines.multimachine.tm.microwave.desc.3=I said nuke the... I meant microwave supper! -gt.blockmachines.multimachine.tm.microwave.cfgi.0=Power setting -gt.blockmachines.multimachine.tm.microwave.cfgi.1=Timer setting -gt.blockmachines.multimachine.tm.microwave.cfgo.0=Timer value -gt.blockmachines.multimachine.tm.microwave.cfgo.1=Timer remaining - -gt.blockmachines.multimachine.tm.teslaCoil.name=Tesla Tower -gt.blockmachines.multimachine.tm.teslaCoil.hint.0=1 - Classic Hatches, Capacitor Hatches or Tesla Base Casing -gt.blockmachines.multimachine.tm.teslaCoil.hint.1=2 - Titanium Frames -gt.blockmachines.multimachine.tm.teslaCoil.desc.0=Tower of Wireless Power -gt.blockmachines.multimachine.tm.teslaCoil.desc.1=Fewer pesky cables! -gt.blockmachines.multimachine.tm.teslaCoil.desc.2=Survival chances might be affected -gt.blockmachines.multimachine.tm.teslaCoil.cfgi.0=Hysteresis low setting -gt.blockmachines.multimachine.tm.teslaCoil.cfgi.1=Hysteresis high setting -gt.blockmachines.multimachine.tm.teslaCoil.cfgi.2=Tesla Towers transfer radius setting -gt.blockmachines.multimachine.tm.teslaCoil.cfgi.3=Tesla Transceiver transfer radius setting -gt.blockmachines.multimachine.tm.teslaCoil.cfgi.4=Tesla Ultimate Cover transfer radius setting -gt.blockmachines.multimachine.tm.teslaCoil.cfgi.5=Output voltage setting -gt.blockmachines.multimachine.tm.teslaCoil.cfgi.6=Output current setting -gt.blockmachines.multimachine.tm.teslaCoil.cfgi.7=Scan time Min setting -gt.blockmachines.multimachine.tm.teslaCoil.cfgi.8=Overdrive setting -gt.blockmachines.multimachine.tm.teslaCoil.cfgi.9=Unused -gt.blockmachines.multimachine.tm.teslaCoil.cfgo.0=Tesla Towers transfer radius display -gt.blockmachines.multimachine.tm.teslaCoil.cfgo.1=Tesla Transceiver transfer radius display -gt.blockmachines.multimachine.tm.teslaCoil.cfgo.2=Tesla Ultimate Cover transfer radius display -gt.blockmachines.multimachine.tm.teslaCoil.cfgo.3=Output voltage display -gt.blockmachines.multimachine.tm.teslaCoil.cfgo.4=Output current display -gt.blockmachines.multimachine.tm.teslaCoil.cfgo.5=Energy Capacity display -gt.blockmachines.multimachine.tm.teslaCoil.cfgo.6=Energy Stored display -gt.blockmachines.multimachine.tm.teslaCoil.cfgo.7=Energy Fraction display -gt.blockmachines.multimachine.tm.teslaCoil.cfgo.8=Scan time display - -gt.blockmachines.multimachine.em.switch.name=Network Switch With QoS -gt.blockmachines.multimachine.em.switch.hint=1 - Classic/Data Hatches or Computer casing -gt.blockmachines.multimachine.em.switch.desc.0=User controlled computation power routing -gt.blockmachines.multimachine.em.switch.desc.1=Quality of service is a must - -gt.blockmachines.multimachine.em.computer.name=Quantum Computer -gt.blockmachines.multimachine.em.computer.hint.0=1 - Classic/Data Hatches or Computer casing -gt.blockmachines.multimachine.em.computer.hint.1=2 - Rack Hatches or Advanced computer casing -gt.blockmachines.multimachine.em.computer.desc=You need it to process the number above -gt.blockmachines.multimachine.em.computer.cfgi.0=Overclock ratio -gt.blockmachines.multimachine.em.computer.cfgi.1=Overvoltage ratio -gt.blockmachines.multimachine.em.computer.cfgo.0=Current max. heat -gt.blockmachines.multimachine.em.computer.cfgo.1=Produced computation - -gt.blockmachines.multimachine.em.databank.name=Data Bank -gt.blockmachines.multimachine.em.junction.name=Matter Junction -gt.blockmachines.multimachine.em.mattertoem.name=Matter Quantizer -gt.blockmachines.multimachine.em.emtomatter.name=Matter Dequantizer - -gt.blockmachines.multimachine.em.emtoessentia.name=Essentia Dequantizer -gt.blockmachines.multimachine.em.emtoessentia.hint.0=1 - Classic Hatches or High Power Casing -gt.blockmachines.multimachine.em.emtoessentia.hint.1=2 - Elemental Input Hatch -gt.blockmachines.multimachine.em.emtoessentia.hint.2=3 - Elemental Overflow Hatches or Elemental Casing -gt.blockmachines.multimachine.em.emtoessentia.hint.3=General - Some sort of Essentia Storage -gt.blockmachines.multimachine.em.emtoessentia.desc.0=Transform quantum form back to... -gt.blockmachines.multimachine.em.emtoessentia.desc.1=regular one, but why? - -gt.blockmachines.multimachine.em.essentiatoem.name=Essentia Quantizer -gt.blockmachines.multimachine.em.essentiatoem.hint.0=1 - Classic Hatches or High Power Casing -gt.blockmachines.multimachine.em.essentiatoem.hint.1=2 - Elemental Output Hatch -gt.blockmachines.multimachine.em.essentiatoem.hint.2=3 - Elemental Overflow Hatches or Elemental Casing -gt.blockmachines.multimachine.em.essentiatoem.hint.3=General - Some sort of Essentia Storage -gt.blockmachines.multimachine.em.essentiatoem.desc.0=Conveniently convert regular stuff into quantum form. -gt.blockmachines.multimachine.em.essentiatoem.desc.1=To make it more inconvenient. - -gt.blockmachines.multimachine.em.scanner.name=Elemental Scanner -gt.blockmachines.multimachine.em.research.name=Research station -gt.blockmachines.multimachine.em.collider.name=Matter Collider -gt.blockmachines.multimachine.em.infuser.name=Energy Infuser -gt.blockmachines.multimachine.em.processing.name=Quantum Processing Machine -gt.blockmachines.multimachine.em.crafter.name=Matter Assembler -gt.blockmachines.multimachine.em.stabilizer.name=Elemental Stabilizer -gt.blockmachines.multimachine.em.wormhole.name=Wormhole -gt.blockmachines.multimachine.em.decay.name=Decay Generator -gt.blockmachines.multimachine.em.annihilation.name=Annihilation Generator -gt.blockmachines.multimachine.em.blackholegenerator.name=Black Hole Generator - -#Keywords and phrases -tt.keyword.Air=Air -tt.keyword.Earth=Earth -tt.keyword.Fire=Fire -tt.keyword.Water=Water -tt.keyword.Order=Order -tt.keyword.Entropy=Entropy -tt.keyword.Primal=Primal -tt.keyword.Aspect=Aspect -tt.keyword.CLASS=CLASS -tt.keyword.NAME=NAME -tt.keyword.CHARGE=CHARGE -tt.keyword.COLORLESS=COLORLESS -tt.keyword.MASS=MASS -tt.keyword.BOOM=BOOM! -tt.keyword.ID=BLYADD -tt.keyword.Destination=Destination -tt.keyword.Weight=Weight - -tt.keyphrase.LIFE_TIME=LIFE TIME -tt.keyphrase.CARRIES_COLOR=CARRIES COLOR -tt.keyphrase.Hint_Details=Hint Details -tt.keyphrase.At_current_energy_level=At current energy level -tt.keyphrase.No_Stacks=No Stacks -tt.keyphrase.Contains_EM=Contains EM -tt.keyphrase.Contained_mass=Contained mass -tt.keyphrase.Mass_Disposal_speed=Mass Disposal speed -tt.keyphrase.Muffler_BOOM=Muffler BOOM! -#OpenTurrets compatibility -tile.turretHeadEM.name=Elemental Matter Turret -tile.turretBaseEM.name=Elemental Turret Base \ No newline at end of file -- cgit From 9002ca978f851fce53f81773ba290a82fea0f027 Mon Sep 17 00:00:00 2001 From: Bass Date: Fri, 30 Aug 2019 04:59:29 +0100 Subject: Unethical Housekeeping Procedure Forgive me father, for I have sinned. --- .../GT_MetaTileEntity_EM_essentiaDequantizer.java | 65 ++- .../GT_MetaTileEntity_EM_essentiaQuantizer.java | 83 ++- .../multi/GT_MetaTileEntity_EM_annihilation.java | 60 +- .../multi/GT_MetaTileEntity_EM_bhg.java | 298 +++++----- .../multi/GT_MetaTileEntity_EM_collider.java | 402 +++++++------- .../multi/GT_MetaTileEntity_EM_computer.java | 193 +++---- .../multi/GT_MetaTileEntity_EM_crafting.java | 63 ++- .../multi/GT_MetaTileEntity_EM_dataBank.java | 77 +-- .../multi/GT_MetaTileEntity_EM_decay.java | 114 ++-- .../multi/GT_MetaTileEntity_EM_dequantizer.java | 57 +- .../multi/GT_MetaTileEntity_EM_infuser.java | 137 +++-- .../multi/GT_MetaTileEntity_EM_junction.java | 68 ++- .../multi/GT_MetaTileEntity_EM_quantizer.java | 56 +- .../multi/GT_MetaTileEntity_EM_research.java | 559 +++++++++---------- .../multi/GT_MetaTileEntity_EM_scanner.java | 425 +++++++------- .../multi/GT_MetaTileEntity_EM_stabilizer.java | 36 +- .../multi/GT_MetaTileEntity_EM_switch.java | 76 +-- .../multi/GT_MetaTileEntity_EM_transformer.java | 74 +-- .../multi/GT_MetaTileEntity_EM_wormhole.java | 60 +- .../multi/GT_MetaTileEntity_TM_microwave.java | 113 ++-- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 318 +++++------ .../base/GT_MetaTileEntity_MultiblockBase_EM.java | 617 +++++++++++---------- .../em_machine/GT_MetaTileEntity_EM_machine.java | 227 ++++---- 23 files changed, 2112 insertions(+), 2066 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java index d3a8138686..4074f2d6db 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java +++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java @@ -35,8 +35,7 @@ import static net.minecraft.util.StatCollector.translateToLocal; * Created by danie_000 on 17.12.2016. */ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { - - //region Structure + //region structure //use multi A energy inputs, use less power the longer it runs private static final String[][] shape = new String[][]{ {" ", " . ", " ",}, @@ -76,42 +75,11 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_ return new GT_MetaTileEntity_EM_essentiaDequantizer(mName); } - @Override - @SideOnly(Side.CLIENT) - protected ResourceLocation getActivitySound() { - return GT_MetaTileEntity_EM_quantizer.activitySound; - } - @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { return essentiaContainerCompat.check(this) && structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); } - @Override - public void construct(int stackSize, boolean hintsOnly) { - IGregTechTileEntity iGregTechTileEntity = getBaseMetaTileEntity(); - int xDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetX; - int yDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetY; - int zDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetZ; - if (hintsOnly) { - TecTech.proxy.hint_particle(iGregTechTileEntity.getWorld(), - iGregTechTileEntity.getXCoord() + xDir, - iGregTechTileEntity.getYCoord() + yDir, - iGregTechTileEntity.getZCoord() + zDir, - TT_Container_Casings.sHintCasingsTT, 12); - } else { - if (iGregTechTileEntity.getBlockOffset(xDir, 0, zDir).getMaterial() == Material.air) { - iGregTechTileEntity.getWorld().setBlock(iGregTechTileEntity.getXCoord() + xDir, iGregTechTileEntity.getYCoord() + yDir, iGregTechTileEntity.getZCoord() + zDir, TT_Container_Casings.sHintCasingsTT, 12, 2); - } - } - StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, iGregTechTileEntity, this, hintsOnly); - } - - @Override - public String[] getStructureDescription(int stackSize) { - return description; - } - @Override public boolean checkRecipe_EM(ItemStack itemStack) { TileEntity container = essentiaContainerCompat.getContainer(this); @@ -147,4 +115,35 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_ EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.desc.1")//regular one, but why? }; } + + @Override + @SideOnly(Side.CLIENT) + protected ResourceLocation getActivitySound() { + return GT_MetaTileEntity_EM_quantizer.activitySound; + } + + @Override + public void construct(int stackSize, boolean hintsOnly) { + IGregTechTileEntity iGregTechTileEntity = getBaseMetaTileEntity(); + int xDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetX; + int yDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetY; + int zDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetZ; + if (hintsOnly) { + TecTech.proxy.hint_particle(iGregTechTileEntity.getWorld(), + iGregTechTileEntity.getXCoord() + xDir, + iGregTechTileEntity.getYCoord() + yDir, + iGregTechTileEntity.getZCoord() + zDir, + TT_Container_Casings.sHintCasingsTT, 12); + } else { + if (iGregTechTileEntity.getBlockOffset(xDir, 0, zDir).getMaterial() == Material.air) { + iGregTechTileEntity.getWorld().setBlock(iGregTechTileEntity.getXCoord() + xDir, iGregTechTileEntity.getYCoord() + yDir, iGregTechTileEntity.getZCoord() + zDir, TT_Container_Casings.sHintCasingsTT, 12, 2); + } + } + StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, iGregTechTileEntity, this, hintsOnly); + } + + @Override + public String[] getStructureDescription(int stackSize) { + return description; + } } \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java index 696242adff..0caf4be6d6 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java +++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java @@ -35,8 +35,7 @@ import static net.minecraft.util.StatCollector.translateToLocal; * Created by danie_000 on 17.12.2016. */ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { - - //region Structure + //region structure //use multi A energy inputs, use less power the longer it runs private static final String[][] shape = new String[][]{ {" ", " . ", " ",}, @@ -71,12 +70,6 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu super(aName); } - @Override - @SideOnly(Side.CLIENT) - protected ResourceLocation getActivitySound() { - return GT_MetaTileEntity_EM_quantizer.activitySound; - } - @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_EM_essentiaQuantizer(mName); @@ -87,40 +80,6 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu return essentiaContainerCompat.check(this) && structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); } - @Override - public void construct(int stackSize, boolean hintsOnly) { - IGregTechTileEntity iGregTechTileEntity = getBaseMetaTileEntity(); - int xDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetX; - int yDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetY; - int zDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetZ; - if (hintsOnly) { - TecTech.proxy.hint_particle(iGregTechTileEntity.getWorld(), - iGregTechTileEntity.getXCoord() + xDir, - iGregTechTileEntity.getYCoord() + yDir, - iGregTechTileEntity.getZCoord() + zDir, - TT_Container_Casings.sHintCasingsTT, 12); - } else { - if (iGregTechTileEntity.getBlockOffset(xDir, 0, zDir).getMaterial() == Material.air) { - iGregTechTileEntity.getWorld().setBlock(iGregTechTileEntity.getXCoord() + xDir, iGregTechTileEntity.getYCoord() + yDir, iGregTechTileEntity.getZCoord() + zDir, TT_Container_Casings.sHintCasingsTT, 12, 2); - } - } - StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, iGregTechTileEntity, this, hintsOnly); - } - - @Override - public String[] getStructureDescription(int stackSize) { - return description; - } - - @Override - public String[] getDescription() { - return new String[]{ - CommonValues.TEC_MARK_EM, - translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.desc.0"),//Conveniently convert regular stuff into quantum form. - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.desc.1")//To make it more inconvenient. - }; - } - @Override public boolean checkRecipe_EM(ItemStack itemStack) { TileEntity container = essentiaContainerCompat.getContainer(this); @@ -151,4 +110,44 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu eOutputHatches.get(0).getContainerHandler().putUnifyAll(outputEM[0]); outputEM = null; } + + @Override + public String[] getDescription() { + return new String[]{ + CommonValues.TEC_MARK_EM, + translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.desc.0"),//Conveniently convert regular stuff into quantum form. + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.desc.1")//To make it more inconvenient. + }; + } + + @Override + @SideOnly(Side.CLIENT) + protected ResourceLocation getActivitySound() { + return GT_MetaTileEntity_EM_quantizer.activitySound; + } + + @Override + public void construct(int stackSize, boolean hintsOnly) { + IGregTechTileEntity iGregTechTileEntity = getBaseMetaTileEntity(); + int xDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetX; + int yDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetY; + int zDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetZ; + if (hintsOnly) { + TecTech.proxy.hint_particle(iGregTechTileEntity.getWorld(), + iGregTechTileEntity.getXCoord() + xDir, + iGregTechTileEntity.getYCoord() + yDir, + iGregTechTileEntity.getZCoord() + zDir, + TT_Container_Casings.sHintCasingsTT, 12); + } else { + if (iGregTechTileEntity.getBlockOffset(xDir, 0, zDir).getMaterial() == Material.air) { + iGregTechTileEntity.getWorld().setBlock(iGregTechTileEntity.getXCoord() + xDir, iGregTechTileEntity.getYCoord() + yDir, iGregTechTileEntity.getZCoord() + zDir, TT_Container_Casings.sHintCasingsTT, 12, 2); + } + } + StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, iGregTechTileEntity, this, hintsOnly); + } + + @Override + public String[] getStructureDescription(int stackSize) { + return description; + } } \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java index ece8c6ba82..023bcb3a20 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java @@ -26,31 +26,33 @@ import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBloc * Created by danie_000 on 17.12.2016. */ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { + //region variables private static Textures.BlockIcons.CustomIcon ScreenOFF; private static Textures.BlockIcons.CustomIcon ScreenON; + //endregion //region structure private static final String[][] shape = new String[][]{ - {"\u0002","D000","C0 0","C0 . 0","C0 0","D000"}, - {"C01A10","C01A10","D1A1","00B101B00","11111111111","C01110","11111111111","00B101B00","D1A1","C01A10","C01A10",}, - {"C01A10","A223222322","A244242442","03442424430","12225252221","A244222442","12225252221","03442424430","A244242442","A223222322","C01A10",}, - {"D111","A244222442","A4G4","A4G4","12G21","12G21","12G21","A4G4","A4G4","A244222442","D111",}, - {"A0C0C0","03444244430","A4G4","A4G4","A4G4","02G20","A4G4","A4G4","A4G4","03444244430","A0C0C0",}, - {"00C!C00","02444544420","A4G4","A4G4","A4G4","!5G5!","A4G4","A4G4","A4G4","02444544420","00C!C00",}, - {"A0C0C0","03444244430","A4G4","A4G4","A4G4","02G20","A4G4","A4G4","A4G4","03444244430","A0C0C0",}, - {"D111","A244222442","A4G4","A4G4","12G21","12G21","12G21","A4G4","A4G4","A244222442","D111",}, - {"C01A10","A223222322","A244242442","03442424430","12225252221","A244222442","12225252221","03442424430","A244242442","A223222322","C01A10",}, - {"C01A10","C01A10","D1A1","00B101B00","11111111111","C01110","11111111111","00B101B00","D1A1","C01A10","C01A10",}, - {"\u0002","D000","C0 0","C0 0","C0 0","D000"}, + {"\u0002", "D000", "C0 0", "C0 . 0", "C0 0", "D000"}, + {"C01A10", "C01A10", "D1A1", "00B101B00", "11111111111", "C01110", "11111111111", "00B101B00", "D1A1", "C01A10", "C01A10",}, + {"C01A10", "A223222322", "A244242442", "03442424430", "12225252221", "A244222442", "12225252221", "03442424430", "A244242442", "A223222322", "C01A10",}, + {"D111", "A244222442", "A4G4", "A4G4", "12G21", "12G21", "12G21", "A4G4", "A4G4", "A244222442", "D111",}, + {"A0C0C0", "03444244430", "A4G4", "A4G4", "A4G4", "02G20", "A4G4", "A4G4", "A4G4", "03444244430", "A0C0C0",}, + {"00C!C00", "02444544420", "A4G4", "A4G4", "A4G4", "!5G5!", "A4G4", "A4G4", "A4G4", "02444544420", "00C!C00",}, + {"A0C0C0", "03444244430", "A4G4", "A4G4", "A4G4", "02G20", "A4G4", "A4G4", "A4G4", "03444244430", "A0C0C0",}, + {"D111", "A244222442", "A4G4", "A4G4", "12G21", "12G21", "12G21", "A4G4", "A4G4", "A244222442", "D111",}, + {"C01A10", "A223222322", "A244242442", "03442424430", "12225252221", "A244222442", "12225252221", "03442424430", "A244242442", "A223222322", "C01A10",}, + {"C01A10", "C01A10", "D1A1", "00B101B00", "11111111111", "C01110", "11111111111", "00B101B00", "D1A1", "C01A10", "C01A10",}, + {"\u0002", "D000", "C0 0", "C0 0", "C0 0", "D000"}, }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT ,sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT}; + private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT}; private static final byte[] blockMeta = new byte[]{4, 5, 12, 6, 0, 10}; private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addClassicToMachineList, this::addElementalToMachineList}; private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0, 4}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA+"Hint Details:", + EnumChatFormatting.AQUA + "Hint Details:", "1 - Classic Hatches or High Power Casing", "2 - Elemental Hatches or Molecular Casing", }; @@ -69,6 +71,20 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl return new GT_MetaTileEntity_EM_annihilation(mName); } + @Override + public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { + return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 5, 5, 0); + } + + @Override + public String[] getDescription() { + return new String[]{ + CommonValues.TEC_MARK_EM, + "Things+Anti Things don't like each other.", + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Matter into power!" + }; + } + @Override @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister aBlockIconRegister) { @@ -85,27 +101,13 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][12]}; } - @Override - public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 5, 5, 0); - } - @Override public void construct(int stackSize, boolean hintsOnly) { - StructureBuilderExtreme(shape, blockType, blockMeta, 5, 5, 0,getBaseMetaTileEntity(),this,hintsOnly); + StructureBuilderExtreme(shape, blockType, blockMeta, 5, 5, 0, getBaseMetaTileEntity(), this, hintsOnly); } @Override public String[] getStructureDescription(int stackSize) { return description; } - - @Override - public String[] getDescription() { - return new String[]{ - CommonValues.TEC_MARK_EM, - "Things+Anti Things don't like each other.", - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Matter into power!" - }; - } -} +} \ No newline at end of file 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 index 972f44fd85..37e5beed5a 100644 --- 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 @@ -29,106 +29,108 @@ import static gregtech.api.enums.GT_Values.E; * 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; - 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 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; + 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 + //region structure actual private static final String[][] shape = new String[][]{ - {"\u000B","M0000000","L00 00","L0 0","L0 !!! 0","L0 !.! 0","L0 !!! 0","L0 0","L00 00","M0000000",}, - {"\u0008","O0A0","O0A0","O0A0","O0A0","N11111","M1101011","I000010010010000","M1111111","I000010010010000","M1101011","N11111","O0A0","O0A0","O0A0","O0A0",}, - {"\u0006","O0A0","O0A0","O0A0","P1","P1","M1111111","L11E11","L1B222B1","G000B1A23332A1B000","J111A23332A111","G000B1A23332A1B000","L1B222B1","L11E11","M1111111","P1","P1","O0A0","O0A0","O0A0",}, - {"\u0005","O0A0","O0A0","P1","P1","\u0004","F00Q00","H11M11","F00Q00","\u0004","P1","P1","O0A0","O0A0",}, - {"\u0004","O0A0","N00000","P1","P4","P4","\u0003","F0S0","E00S00","F0144M4410","E00S00","F0S0","\u0003","P4","P4","P1","N00000","O0A0",}, - {"\u0003","O0A0","O0A0","P1","M2224222","\u0004","G2Q2","G2Q2","D00A2Q2A00","F14Q41","D00A2Q2A00","G2Q2","G2Q2","\u0004","M2224222","P1","O0A0","O0A0",}, - {"\u0002","O0A0","N00000","P1","P4","\u0006","D0W0","C00W00","D014S410","C00W00","D0W0","\u0006","P4","P1","N00000","O0A0",}, - {"\u0001","O0A0","O0A0","P1","M2224222","\u0006","E2U2","E2U2","B00A2U2A00","D14U41","B00A2U2A00","E2U2","E2U2","\u0006","M2224222","P1","O0A0","O0A0",}, - {"\u0001","O0A0","P1","P4","\u0009","B0[0","C14W41","B0[0","\u0009","P4","P1","O0A0",}, - {E,"O0A0","O0A0","P1","P4","\u0009","A00[00","C14W41","A00[00","\u0009","P4","P1","O0A0","O0A0",}, - {E,"O0A0","P1","\u000B","A0]0","B1[1","A0]0","\u000B","P1","O0A0",}, - {E,"O0A0","P1","\u000B","A0]0","B1[1","A0]0","\u000B","P1","O0A0",}, - {"O0A0","O0A0","M1111111","\u0009","B1[1","B1[1","001[100","B1[1","001[100","B1[1","B1[1","\u0009","M1111111","O0A0","O0A0",}, - {"O0A0","N11111","L11E11","\u0001","G2Q2",E,"E2U2","\u0003","B1[1","B1[1","A1]1","01]10","A1]1","01]10","A1]1","B1[1","B1[1","\u0003","E2U2",E,"G2Q2","\u0001","L11E11","N11111","O0A0",}, - {"O0A0","M1101011","L1B222B1",E,"F0S0","G2Q2","D0W0","E2U2","\u0003","B1[1","A1]1","A1]1","002[200","A12[21","002[200","A1]1","A1]1","B1[1","\u0003","E2U2","D0W0","G2Q2","F0S0",E,"L1B222B1","M1101011","O0A0",}, - {"L000000000","I000010010010000","G000B1A23332A1B000","F00Q00","E00S00","D00A2Q2A00","C00W00","B00A2U2A00","B0[0","A00[00","A0]0","A0]0","001[100","01]10","002[200","003[300","013[310","003[300","002[200","01]10","001[100","A0]0","A0]0","A00[00","B0[0","B00A2U2A00","C00W00","D00A2Q2A00","E00S00","F00Q00","G000B1A23332A1B000","I000010010010000","L000000000",}, - {"O0A0","M1111111","J111A23332A111","H11M11","F0144M4410","F14Q41","D014S410","D14U41","C14W41","C14W41","B1[1","B1[1","B1[1","A1]1","A12[21","013[310","A13[31","013[310","A12[21","A1]1","B1[1","B1[1","B1[1","C14W41","C14W41","D14U41","D014S410","F14Q41","F0144M4410","H11M11","J111A23332A111","M1111111","O0A0",}, - {"L000000000","I000010010010000","G000B1A23332A1B000","F00Q00","E00S00","D00A2Q2A00","C00W00","B00A2U2A00","B0[0","A00[00","A0]0","A0]0","001[100","01]10","002[200","003[300","013[310","003[300","002[200","01]10","001[100","A0]0","A0]0","A00[00","B0[0","B00A2U2A00","C00W00","D00A2Q2A00","E00S00","F00Q00","G000B1A23332A1B000","I000010010010000","L000000000",}, - {"O0A0","M1101011","L1B222B1",E,"F0S0","G2Q2","D0W0","E2U2","\u0003","B1[1","A1]1","A1]1","002[200","A12[21","002[200","A1]1","A1]1","B1[1","\u0003","E2U2","D0W0","G2Q2","F0S0",E,"L1B222B1","M1101011","O0A0",}, - {"O0A0","N11111","L11E11","\u0001","G2Q2",E,"E2U2","\u0003","B1[1","B1[1","A1]1","01]10","A1]1","01]10","A1]1","B1[1","B1[1","\u0003","E2U2",E,"G2Q2","\u0001","L11E11","N11111","O0A0",}, - {"O0A0","O0A0","M1111111","\u0009","B1[1","B1[1","001[100","B1[1","001[100","B1[1","B1[1","\u0009","M1111111","O0A0","O0A0",}, - {E,"O0A0","P1","\u000B","A0]0","B1[1","A0]0","\u000B","P1","O0A0",}, - {E,"O0A0","P1","\u000B","A0]0","B1[1","A0]0","\u000B","P1","O0A0",}, - {E,"O0A0","O0A0","P1","P4","\u0009","A00[00","C14W41","A00[00","\u0009","P4","P1","O0A0","O0A0",}, - {"\u0001","O0A0","P1","P4","\u0009","B0[0","C14W41","B0[0","\u0009","P4","P1","O0A0",}, - {"\u0001","O0A0","O0A0","P1","M2224222","\u0006","E2U2","E2U2","B00A2U2A00","D14U41","B00A2U2A00","E2U2","E2U2","\u0006","M2224222","P1","O0A0","O0A0",}, - {"\u0002","O0A0","N00000","P1","P4","\u0006","D0W0","C00W00","D014S410","C00W00","D0W0","\u0006","P4","P1","N00000","O0A0",}, - {"\u0003","O0A0","O0A0","P1","M2224222","\u0004","G2Q2","G2Q2","D00A2Q2A00","F14Q41","D00A2Q2A00","G2Q2","G2Q2","\u0004","M2224222","P1","O0A0","O0A0",}, - {"\u0004","O0A0","N00000","P1","P4","P4","\u0003","F0S0","E00S00","F0144M4410","E00S00","F0S0","\u0003","P4","P4","P1","N00000","O0A0",}, - {"\u0005","O0A0","O0A0","P1","P1","\u0004","F00Q00","H11M11","F00Q00","\u0004","P1","P1","O0A0","O0A0",}, - {"\u0006","O0A0","O0A0","O0A0","P1","P1","M1111111","L11E11","L1B222B1","G000B1A23332A1B000","J111A23332A111","G000B1A23332A1B000","L1B222B1","L11E11","M1111111","P1","P1","O0A0","O0A0","O0A0",}, - {"\u0008","O0A0","O0A0","O0A0","O0A0","N11111","M1101011","I000010010010000","M1111111","I000010010010000","M1101011","N11111","O0A0","O0A0","O0A0","O0A0",}, - {"\u000B","O0A0","O0A0","O0A0","L000000000","O0A0","L000000000","O0A0","O0A0","O0A0",}, + {"\u000B", "M0000000", "L00 00", "L0 0", "L0 !!! 0", "L0 !.! 0", "L0 !!! 0", "L0 0", "L00 00", "M0000000",}, + {"\u0008", "O0A0", "O0A0", "O0A0", "O0A0", "N11111", "M1101011", "I000010010010000", "M1111111", "I000010010010000", "M1101011", "N11111", "O0A0", "O0A0", "O0A0", "O0A0",}, + {"\u0006", "O0A0", "O0A0", "O0A0", "P1", "P1", "M1111111", "L11E11", "L1B222B1", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "L1B222B1", "L11E11", "M1111111", "P1", "P1", "O0A0", "O0A0", "O0A0",}, + {"\u0005", "O0A0", "O0A0", "P1", "P1", "\u0004", "F00Q00", "H11M11", "F00Q00", "\u0004", "P1", "P1", "O0A0", "O0A0",}, + {"\u0004", "O0A0", "N00000", "P1", "P4", "P4", "\u0003", "F0S0", "E00S00", "F0144M4410", "E00S00", "F0S0", "\u0003", "P4", "P4", "P1", "N00000", "O0A0",}, + {"\u0003", "O0A0", "O0A0", "P1", "M2224222", "\u0004", "G2Q2", "G2Q2", "D00A2Q2A00", "F14Q41", "D00A2Q2A00", "G2Q2", "G2Q2", "\u0004", "M2224222", "P1", "O0A0", "O0A0",}, + {"\u0002", "O0A0", "N00000", "P1", "P4", "\u0006", "D0W0", "C00W00", "D014S410", "C00W00", "D0W0", "\u0006", "P4", "P1", "N00000", "O0A0",}, + {"\u0001", "O0A0", "O0A0", "P1", "M2224222", "\u0006", "E2U2", "E2U2", "B00A2U2A00", "D14U41", "B00A2U2A00", "E2U2", "E2U2", "\u0006", "M2224222", "P1", "O0A0", "O0A0",}, + {"\u0001", "O0A0", "P1", "P4", "\u0009", "B0[0", "C14W41", "B0[0", "\u0009", "P4", "P1", "O0A0",}, + {E, "O0A0", "O0A0", "P1", "P4", "\u0009", "A00[00", "C14W41", "A00[00", "\u0009", "P4", "P1", "O0A0", "O0A0",}, + {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",}, + {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",}, + {"O0A0", "O0A0", "M1111111", "\u0009", "B1[1", "B1[1", "001[100", "B1[1", "001[100", "B1[1", "B1[1", "\u0009", "M1111111", "O0A0", "O0A0",}, + {"O0A0", "N11111", "L11E11", "\u0001", "G2Q2", E, "E2U2", "\u0003", "B1[1", "B1[1", "A1]1", "01]10", "A1]1", "01]10", "A1]1", "B1[1", "B1[1", "\u0003", "E2U2", E, "G2Q2", "\u0001", "L11E11", "N11111", "O0A0",}, + {"O0A0", "M1101011", "L1B222B1", E, "F0S0", "G2Q2", "D0W0", "E2U2", "\u0003", "B1[1", "A1]1", "A1]1", "002[200", "A12[21", "002[200", "A1]1", "A1]1", "B1[1", "\u0003", "E2U2", "D0W0", "G2Q2", "F0S0", E, "L1B222B1", "M1101011", "O0A0",}, + {"L000000000", "I000010010010000", "G000B1A23332A1B000", "F00Q00", "E00S00", "D00A2Q2A00", "C00W00", "B00A2U2A00", "B0[0", "A00[00", "A0]0", "A0]0", "001[100", "01]10", "002[200", "003[300", "013[310", "003[300", "002[200", "01]10", "001[100", "A0]0", "A0]0", "A00[00", "B0[0", "B00A2U2A00", "C00W00", "D00A2Q2A00", "E00S00", "F00Q00", "G000B1A23332A1B000", "I000010010010000", "L000000000",}, + {"O0A0", "M1111111", "J111A23332A111", "H11M11", "F0144M4410", "F14Q41", "D014S410", "D14U41", "C14W41", "C14W41", "B1[1", "B1[1", "B1[1", "A1]1", "A12[21", "013[310", "A13[31", "013[310", "A12[21", "A1]1", "B1[1", "B1[1", "B1[1", "C14W41", "C14W41", "D14U41", "D014S410", "F14Q41", "F0144M4410", "H11M11", "J111A23332A111", "M1111111", "O0A0",}, + {"L000000000", "I000010010010000", "G000B1A23332A1B000", "F00Q00", "E00S00", "D00A2Q2A00", "C00W00", "B00A2U2A00", "B0[0", "A00[00", "A0]0", "A0]0", "001[100", "01]10", "002[200", "003[300", "013[310", "003[300", "002[200", "01]10", "001[100", "A0]0", "A0]0", "A00[00", "B0[0", "B00A2U2A00", "C00W00", "D00A2Q2A00", "E00S00", "F00Q00", "G000B1A23332A1B000", "I000010010010000", "L000000000",}, + {"O0A0", "M1101011", "L1B222B1", E, "F0S0", "G2Q2", "D0W0", "E2U2", "\u0003", "B1[1", "A1]1", "A1]1", "002[200", "A12[21", "002[200", "A1]1", "A1]1", "B1[1", "\u0003", "E2U2", "D0W0", "G2Q2", "F0S0", E, "L1B222B1", "M1101011", "O0A0",}, + {"O0A0", "N11111", "L11E11", "\u0001", "G2Q2", E, "E2U2", "\u0003", "B1[1", "B1[1", "A1]1", "01]10", "A1]1", "01]10", "A1]1", "B1[1", "B1[1", "\u0003", "E2U2", E, "G2Q2", "\u0001", "L11E11", "N11111", "O0A0",}, + {"O0A0", "O0A0", "M1111111", "\u0009", "B1[1", "B1[1", "001[100", "B1[1", "001[100", "B1[1", "B1[1", "\u0009", "M1111111", "O0A0", "O0A0",}, + {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",}, + {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",}, + {E, "O0A0", "O0A0", "P1", "P4", "\u0009", "A00[00", "C14W41", "A00[00", "\u0009", "P4", "P1", "O0A0", "O0A0",}, + {"\u0001", "O0A0", "P1", "P4", "\u0009", "B0[0", "C14W41", "B0[0", "\u0009", "P4", "P1", "O0A0",}, + {"\u0001", "O0A0", "O0A0", "P1", "M2224222", "\u0006", "E2U2", "E2U2", "B00A2U2A00", "D14U41", "B00A2U2A00", "E2U2", "E2U2", "\u0006", "M2224222", "P1", "O0A0", "O0A0",}, + {"\u0002", "O0A0", "N00000", "P1", "P4", "\u0006", "D0W0", "C00W00", "D014S410", "C00W00", "D0W0", "\u0006", "P4", "P1", "N00000", "O0A0",}, + {"\u0003", "O0A0", "O0A0", "P1", "M2224222", "\u0004", "G2Q2", "G2Q2", "D00A2Q2A00", "F14Q41", "D00A2Q2A00", "G2Q2", "G2Q2", "\u0004", "M2224222", "P1", "O0A0", "O0A0",}, + {"\u0004", "O0A0", "N00000", "P1", "P4", "P4", "\u0003", "F0S0", "E00S00", "F0144M4410", "E00S00", "F0S0", "\u0003", "P4", "P4", "P1", "N00000", "O0A0",}, + {"\u0005", "O0A0", "O0A0", "P1", "P1", "\u0004", "F00Q00", "H11M11", "F00Q00", "\u0004", "P1", "P1", "O0A0", "O0A0",}, + {"\u0006", "O0A0", "O0A0", "O0A0", "P1", "P1", "M1111111", "L11E11", "L1B222B1", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "L1B222B1", "L11E11", "M1111111", "P1", "P1", "O0A0", "O0A0", "O0A0",}, + {"\u0008", "O0A0", "O0A0", "O0A0", "O0A0", "N11111", "M1101011", "I000010010010000", "M1111111", "I000010010010000", "M1101011", "N11111", "O0A0", "O0A0", "O0A0", "O0A0",}, + {"\u000B", "O0A0", "O0A0", "O0A0", "L000000000", "O0A0", "L000000000", "O0A0", "O0A0", "O0A0",}, }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT,sBlockCasingsTT,sBlockCasingsTT,sBlockCasingsTT,sBlockCasingsTT}; + private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMeta = new byte[]{12, 13, 14, 10, 11}; private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addClassicToMachineList, this::addElementalToMachineList}; private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0, 4}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA+"Hint Details:", + EnumChatFormatting.AQUA + "Hint Details:", "1 - Classic Hatches or High Power Casing", "2 - Elemental Hatches or Molecular Casing", }; //endregion - //region Structure dank - glass sphere for the looks + //region structure dank - glass sphere for the looks private static final String[][] shape2 = new String[][]{ - {"\u000B","M0000000","L00 00","L0 0","L0 !!! 0","L0 !.! 0","L0 !!! 0","L0 0","L00 00","M0000000",}, - {"\u0008","O0A0","M110A011","L1110A0111","K11110A01111","J1111222221111","J1112202022111","I000020020020000","M2222222","I000020020020000","J1112202022111","J1111222221111","K11110A01111","L1110A0111","M110A011","O0A0",}, - {"\u0006","O0A0","M110A011","K11110A01111","J111C2C111","I111D2D111","I11B2222222B11","H11B22E22B11","H11B2B333B2B11","G000B2A34443A2B000","J222A34443A222","G000B2A34443A2B000","H11B2B333B2B11","H11B22E22B11","I11B2222222B11","I111D2D111","J111C2C111","K11110A01111","M110A011","O0A0",}, - {"\u0005","O0A0","L1110A0111","J111C2C111","I11E2E11","H11M11","H1O1","G11O11","G1Q1","G1Q1","F00Q00","H22M22","F00Q00","G1Q1","G1Q1","G11O11","H1O1","H11M11","I11E2E11","J111C2C111","L1110A0111","O0A0",}, - {"\u0004","O0A0","K11100000111","I111D2D111","H11F5F11","G11G5G11","G1Q1","F11Q11","F1S1","F1S1","F0S0","E00S00","F0255M5520","E00S00","F0S0","F1S1","F1S1","F11Q11","G1Q1","G11G5G11","H11F5F11","I111D2D111","K11100000111","O0A0",}, - {"\u0003","O0A0","J111110A011111","H111E2E111","G11D3335333D11","F11Q11","F1S1","E11S11","E1U1","E1U1","E1A3Q3A1","E1A3Q3A1","D00A3Q3A00","F25Q52","D00A3Q3A00","E1A3Q3A1","E1A3Q3A1","E1U1","E1U1","E11S11","F1S1","F11Q11","G11D3335333D11","H111E2E111","J111110A011111","O0A0",}, - {"\u0002","O0A0","K11100000111","H111E2E111","G11G5G11","F1S1","E11S11","E1U1","E1U1","D1W1","D1W1","D1W1","D0W0","C00W00","D025S520","C00W00","D0W0","D1W1","D1W1","D1W1","E1U1","E1U1","E11S11","F1S1","G11G5G11","H111E2E111","K11100000111","O0A0",}, - {"\u0001","O0A0","L1110A0111","I111D2D111","G11D3335333D11","F1S1","E1U1","E1U1","D1W1","D1W1","D1W1","C1Y1","C1A3U3A1","C1A3U3A1","B00A3U3A00","D25U52","B00A3U3A00","C1A3U3A1","C1A3U3A1","C1Y1","D1W1","D1W1","D1W1","E1U1","E1U1","F1S1","G11D3335333D11","I111D2D111","L1110A0111","O0A0",}, - {"\u0001","M110A011","J111C2C111","H11F5F11","F11Q11","E11S11","E1U1","D1W1","D1W1","C1Y1","C1Y1","C1Y1","B1[1","B1[1","B0[0","C25W52","B0[0","B1[1","B1[1","C1Y1","C1Y1","C1Y1","D1W1","D1W1","E1U1","E11S11","F11Q11","H11F5F11","J111C2C111","M110A011",}, - {E,"O0A0","K11110A01111","I11E2E11","G11G5G11","F1S1","E1U1","D1W1","D1W1","C1Y1","C1Y1","B1[1","B1[1","B1[1","B1[1","A00[00","C25W52","A00[00","B1[1","B1[1","B1[1","B1[1","C1Y1","C1Y1","D1W1","D1W1","E1U1","F1S1","G11G5G11","I11E2E11","K11110A01111","O0A0",}, - {E,"M110A011","J111C2C111","H11M11","G1Q1","E11S11","E1U1","D1W1","C1Y1","C1Y1","B1[1","B1[1","B1[1","A1]1","A1]1","A0]0","B2[2","A0]0","A1]1","A1]1","B1[1","B1[1","B1[1","C1Y1","C1Y1","D1W1","E1U1","E11S11","G1Q1","H11M11","J111C2C111","M110A011",}, - {E,"L1110A0111","I111D2D111","H1O1","F11Q11","E1U1","D1W1","D1W1","C1Y1","B1[1","B1[1","B1[1","A1]1","A1]1","A1]1","A0]0","B2[2","A0]0","A1]1","A1]1","A1]1","B1[1","B1[1","B1[1","C1Y1","D1W1","D1W1","E1U1","F11Q11","H1O1","I111D2D111","L1110A0111",}, - {"O0A0","K11110A01111","I11B2222222B11","G11O11","F1S1","E1U1","D1W1","C1Y1","C1Y1","B1[1","B1[1","A1]1","A1]1","A12[21","A12[21","002[200","B2[2","002[200","A12[21","A12[21","A1]1","A1]1","B1[1","B1[1","C1Y1","C1Y1","D1W1","E1U1","F1S1","G11O11","I11B2222222B11","K11110A01111","O0A0",}, - {"O0A0","J1111222221111","H11B22E22B11","G1Q1","F1S1","E1A3Q3A1","D1W1","C1A3U3A1","B1[1","B1[1","A1]1","A1]1","A12[21","A12[21","A2]2","02]20","A2]2","02]20","A2]2","A12[21","A12[21","A1]1","A1]1","B1[1","B1[1","C1A3U3A1","D1W1","E1A3Q3A1","F1S1","G1Q1","H11B22E22B11","J1111222221111","O0A0",}, - {"O0A0","J1112202022111","H11B2B333B2B11","G1Q1","F0S0","E1A3Q3A1","D0W0","C1A3U3A1","B1[1","B1[1","A1]1","A1]1","A12[21","A2]2","A2]2","003[300","A23[32","003[300","A2]2","A2]2","A12[21","A1]1","A1]1","B1[1","B1[1","C1A3U3A1","D0W0","E1A3Q3A1","F0S0","G1Q1","H11B2B333B2B11","J1112202022111","O0A0",}, - {"L000000000","I000020020020000","G000B2A34443A2B000","F00Q00","E00S00","D00A3Q3A00","C00W00","B00A3U3A00","B0[0","A00[00","A0]0","A0]0","002[200","02]20","003[300","004[400","024[420","004[400","003[300","02]20","002[200","A0]0","A0]0","A00[00","B0[0","B00A3U3A00","C00W00","D00A3Q3A00","E00S00","F00Q00","G000B2A34443A2B000","I000020020020000","L000000000",}, - {"O0A0","M2222222","J222A34443A222","H22M22","F0255M5520","F25Q52","D025S520","D25U52","C25W52","C25W52","B2[2","B2[2","B2[2","A2]2","A23[32","024[420","A24[42","024[420","A23[32","A2]2","B2[2","B2[2","B2[2","C25W52","C25W52","D25U52","D025S520","F25Q52","F0255M5520","H22M22","J222A34443A222","M2222222","O0A0",}, - {"L000000000","I000020020020000","G000B2A34443A2B000","F00Q00","E00S00","D00A3Q3A00","C00W00","B00A3U3A00","B0[0","A00[00","A0]0","A0]0","002[200","02]20","003[300","004[400","024[420","004[400","003[300","02]20","002[200","A0]0","A0]0","A00[00","B0[0","B00A3U3A00","C00W00","D00A3Q3A00","E00S00","F00Q00","G000B2A34443A2B000","I000020020020000","L000000000",}, - {"O0A0","J1112202022111","H11B2B333B2B11","G1Q1","F0S0","E1A3Q3A1","D0W0","C1A3U3A1","B1[1","B1[1","A1]1","A1]1","A12[21","A2]2","A2]2","003[300","A23[32","003[300","A2]2","A2]2","A12[21","A1]1","A1]1","B1[1","B1[1","C1A3U3A1","D0W0","E1A3Q3A1","F0S0","G1Q1","H11B2B333B2B11","J1112202022111","O0A0",}, - {"O0A0","J1111222221111","H11B22E22B11","G1Q1","F1S1","E1A3Q3A1","D1W1","C1A3U3A1","B1[1","B1[1","A1]1","A1]1","A12[21","A12[21","A2]2","02]20","A2]2","02]20","A2]2","A12[21","A12[21","A1]1","A1]1","B1[1","B1[1","C1A3U3A1","D1W1","E1A3Q3A1","F1S1","G1Q1","H11B22E22B11","J1111222221111","O0A0",}, - {"O0A0","K11110A01111","I11B2222222B11","G11O11","F1S1","E1U1","D1W1","C1Y1","C1Y1","B1[1","B1[1","A1]1","A1]1","A12[21","A12[21","002[200","B2[2","002[200","A12[21","A12[21","A1]1","A1]1","B1[1","B1[1","C1Y1","C1Y1","D1W1","E1U1","F1S1","G11O11","I11B2222222B11","K11110A01111","O0A0",}, - {E,"L1110A0111","I111D2D111","H1O1","F11Q11","E1U1","D1W1","D1W1","C1Y1","B1[1","B1[1","B1[1","A1]1","A1]1","A1]1","A0]0","B2[2","A0]0","A1]1","A1]1","A1]1","B1[1","B1[1","B1[1","C1Y1","D1W1","D1W1","E1U1","F11Q11","H1O1","I111D2D111","L1110A0111",}, - {E,"M110A011","J111C2C111","H11M11","G1Q1","E11S11","E1U1","D1W1","C1Y1","C1Y1","B1[1","B1[1","B1[1","A1]1","A1]1","A0]0","B2[2","A0]0","A1]1","A1]1","B1[1","B1[1","B1[1","C1Y1","C1Y1","D1W1","E1U1","E11S11","G1Q1","H11M11","J111C2C111","M110A011",}, - {E,"O0A0","K11110A01111","I11E2E11","G11G5G11","F1S1","E1U1","D1W1","D1W1","C1Y1","C1Y1","B1[1","B1[1","B1[1","B1[1","A00[00","C25W52","A00[00","B1[1","B1[1","B1[1","B1[1","C1Y1","C1Y1","D1W1","D1W1","E1U1","F1S1","G11G5G11","I11E2E11","K11110A01111","O0A0",}, - {"\u0001","M110A011","J111C2C111","H11F5F11","F11Q11","E11S11","E1U1","D1W1","D1W1","C1Y1","C1Y1","C1Y1","B1[1","B1[1","B0[0","C25W52","B0[0","B1[1","B1[1","C1Y1","C1Y1","C1Y1","D1W1","D1W1","E1U1","E11S11","F11Q11","H11F5F11","J111C2C111","M110A011",}, - {"\u0001","O0A0","L1110A0111","I111D2D111","G11D3335333D11","F1S1","E1U1","E1U1","D1W1","D1W1","D1W1","C1Y1","C1A3U3A1","C1A3U3A1","B00A3U3A00","D25U52","B00A3U3A00","C1A3U3A1","C1A3U3A1","C1Y1","D1W1","D1W1","D1W1","E1U1","E1U1","F1S1","G11D3335333D11","I111D2D111","L1110A0111","O0A0",}, - {"\u0002","O0A0","K11100000111","H111E2E111","G11G5G11","F1S1","E11S11","E1U1","E1U1","D1W1","D1W1","D1W1","D0W0","C00W00","D025S520","C00W00","D0W0","D1W1","D1W1","D1W1","E1U1","E1U1","E11S11","F1S1","G11G5G11","H111E2E111","K11100000111","O0A0",}, - {"\u0003","O0A0","J111110A011111","H111E2E111","G11D3335333D11","F11Q11","F1S1","E11S11","E1U1","E1U1","E1A3Q3A1","E1A3Q3A1","D00A3Q3A00","F25Q52","D00A3Q3A00","E1A3Q3A1","E1A3Q3A1","E1U1","E1U1","E11S11","F1S1","F11Q11","G11D3335333D11","H111E2E111","J111110A011111","O0A0",}, - {"\u0004","O0A0","K11100000111","I111D2D111","H11F5F11","G11G5G11","G1Q1","F11Q11","F1S1","F1S1","F0S0","E00S00","F0255M5520","E00S00","F0S0","F1S1","F1S1","F11Q11","G1Q1","G11G5G11","H11F5F11","I111D2D111","K11100000111","O0A0",}, - {"\u0005","O0A0","L1110A0111","J111C2C111","I11E2E11","H11M11","H1O1","G11O11","G1Q1","G1Q1","F00Q00","H22M22","F00Q00","G1Q1","G1Q1","G11O11","H1O1","H11M11","I11E2E11","J111C2C111","L1110A0111","O0A0",}, - {"\u0006","O0A0","M110A011","K11110A01111","J111C2C111","I111D2D111","I11B2222222B11","H11B22E22B11","H11B2B333B2B11","G000B2A34443A2B000","J222A34443A222","G000B2A34443A2B000","H11B2B333B2B11","H11B22E22B11","I11B2222222B11","I111D2D111","J111C2C111","K11110A01111","M110A011","O0A0",}, - {"\u0008","O0A0","M110A011","L1110A0111","K11110A01111","J1111222221111","J1112202022111","I000020020020000","M2222222","I000020020020000","J1112202022111","J1111222221111","K11110A01111","L1110A0111","M110A011","O0A0",}, - {"\u000B","O0A0","O0A0","O0A0","L000000000","O0A0","L000000000","O0A0","O0A0","O0A0",}, + {"\u000B", "M0000000", "L00 00", "L0 0", "L0 !!! 0", "L0 !.! 0", "L0 !!! 0", "L0 0", "L00 00", "M0000000",}, + {"\u0008", "O0A0", "M110A011", "L1110A0111", "K11110A01111", "J1111222221111", "J1112202022111", "I000020020020000", "M2222222", "I000020020020000", "J1112202022111", "J1111222221111", "K11110A01111", "L1110A0111", "M110A011", "O0A0",}, + {"\u0006", "O0A0", "M110A011", "K11110A01111", "J111C2C111", "I111D2D111", "I11B2222222B11", "H11B22E22B11", "H11B2B333B2B11", "G000B2A34443A2B000", "J222A34443A222", "G000B2A34443A2B000", "H11B2B333B2B11", "H11B22E22B11", "I11B2222222B11", "I111D2D111", "J111C2C111", "K11110A01111", "M110A011", "O0A0",}, + {"\u0005", "O0A0", "L1110A0111", "J111C2C111", "I11E2E11", "H11M11", "H1O1", "G11O11", "G1Q1", "G1Q1", "F00Q00", "H22M22", "F00Q00", "G1Q1", "G1Q1", "G11O11", "H1O1", "H11M11", "I11E2E11", "J111C2C111", "L1110A0111", "O0A0",}, + {"\u0004", "O0A0", "K11100000111", "I111D2D111", "H11F5F11", "G11G5G11", "G1Q1", "F11Q11", "F1S1", "F1S1", "F0S0", "E00S00", "F0255M5520", "E00S00", "F0S0", "F1S1", "F1S1", "F11Q11", "G1Q1", "G11G5G11", "H11F5F11", "I111D2D111", "K11100000111", "O0A0",}, + {"\u0003", "O0A0", "J111110A011111", "H111E2E111", "G11D3335333D11", "F11Q11", "F1S1", "E11S11", "E1U1", "E1U1", "E1A3Q3A1", "E1A3Q3A1", "D00A3Q3A00", "F25Q52", "D00A3Q3A00", "E1A3Q3A1", "E1A3Q3A1", "E1U1", "E1U1", "E11S11", "F1S1", "F11Q11", "G11D3335333D11", "H111E2E111", "J111110A011111", "O0A0",}, + {"\u0002", "O0A0", "K11100000111", "H111E2E111", "G11G5G11", "F1S1", "E11S11", "E1U1", "E1U1", "D1W1", "D1W1", "D1W1", "D0W0", "C00W00", "D025S520", "C00W00", "D0W0", "D1W1", "D1W1", "D1W1", "E1U1", "E1U1", "E11S11", "F1S1", "G11G5G11", "H111E2E111", "K11100000111", "O0A0",}, + {"\u0001", "O0A0", "L1110A0111", "I111D2D111", "G11D3335333D11", "F1S1", "E1U1", "E1U1", "D1W1", "D1W1", "D1W1", "C1Y1", "C1A3U3A1", "C1A3U3A1", "B00A3U3A00", "D25U52", "B00A3U3A00", "C1A3U3A1", "C1A3U3A1", "C1Y1", "D1W1", "D1W1", "D1W1", "E1U1", "E1U1", "F1S1", "G11D3335333D11", "I111D2D111", "L1110A0111", "O0A0",}, + {"\u0001", "M110A011", "J111C2C111", "H11F5F11", "F11Q11", "E11S11", "E1U1", "D1W1", "D1W1", "C1Y1", "C1Y1", "C1Y1", "B1[1", "B1[1", "B0[0", "C25W52", "B0[0", "B1[1", "B1[1", "C1Y1", "C1Y1", "C1Y1", "D1W1", "D1W1", "E1U1", "E11S11", "F11Q11", "H11F5F11", "J111C2C111", "M110A011",}, + {E, "O0A0", "K11110A01111", "I11E2E11", "G11G5G11", "F1S1", "E1U1", "D1W1", "D1W1", "C1Y1", "C1Y1", "B1[1", "B1[1", "B1[1", "B1[1", "A00[00", "C25W52", "A00[00", "B1[1", "B1[1", "B1[1", "B1[1", "C1Y1", "C1Y1", "D1W1", "D1W1", "E1U1", "F1S1", "G11G5G11", "I11E2E11", "K11110A01111", "O0A0",}, + {E, "M110A011", "J111C2C111", "H11M11", "G1Q1", "E11S11", "E1U1", "D1W1", "C1Y1", "C1Y1", "B1[1", "B1[1", "B1[1", "A1]1", "A1]1", "A0]0", "B2[2", "A0]0", "A1]1", "A1]1", "B1[1", "B1[1", "B1[1", "C1Y1", "C1Y1", "D1W1", "E1U1", "E11S11", "G1Q1", "H11M11", "J111C2C111", "M110A011",}, + {E, "L1110A0111", "I111D2D111", "H1O1", "F11Q11", "E1U1", "D1W1", "D1W1", "C1Y1", "B1[1", "B1[1", "B1[1", "A1]1", "A1]1", "A1]1", "A0]0", "B2[2", "A0]0", "A1]1", "A1]1", "A1]1", "B1[1", "B1[1", "B1[1", "C1Y1", "D1W1", "D1W1", "E1U1", "F11Q11", "H1O1", "I111D2D111", "L1110A0111",}, + {"O0A0", "K11110A01111", "I11B2222222B11", "G11O11", "F1S1", "E1U1", "D1W1", "C1Y1", "C1Y1", "B1[1", "B1[1", "A1]1", "A1]1", "A12[21", "A12[21", "002[200", "B2[2", "002[200", "A12[21", "A12[21", "A1]1", "A1]1", "B1[1", "B1[1", "C1Y1", "C1Y1", "D1W1", "E1U1", "F1S1", "G11O11", "I11B2222222B11", "K11110A01111", "O0A0",}, + {"O0A0", "J1111222221111", "H11B22E22B11", "G1Q1", "F1S1", "E1A3Q3A1", "D1W1", "C1A3U3A1", "B1[1", "B1[1", "A1]1", "A1]1", "A12[21", "A12[21", "A2]2", "02]20", "A2]2", "02]20", "A2]2", "A12[21", "A12[21", "A1]1", "A1]1", "B1[1", "B1[1", "C1A3U3A1", "D1W1", "E1A3Q3A1", "F1S1", "G1Q1", "H11B22E22B11", "J1111222221111", "O0A0",}, + {"O0A0", "J1112202022111", "H11B2B333B2B11", "G1Q1", "F0S0", "E1A3Q3A1", "D0W0", "C1A3U3A1", "B1[1", "B1[1", "A1]1", "A1]1", "A12[21", "A2]2", "A2]2", "003[300", "A23[32", "003[300", "A2]2", "A2]2", "A12[21", "A1]1", "A1]1", "B1[1", "B1[1", "C1A3U3A1", "D0W0", "E1A3Q3A1", "F0S0", "G1Q1", "H11B2B333B2B11", "J1112202022111", "O0A0",}, + {"L000000000", "I000020020020000", "G000B2A34443A2B000", "F00Q00", "E00S00", "D00A3Q3A00", "C00W00", "B00A3U3A00", "B0[0", "A00[00", "A0]0", "A0]0", "002[200", "02]20", "003[300", "004[400", "024[420", "004[400", "003[300", "02]20", "002[200", "A0]0", "A0]0", "A00[00", "B0[0", "B00A3U3A00", "C00W00", "D00A3Q3A00", "E00S00", "F00Q00", "G000B2A34443A2B000", "I000020020020000", "L000000000",}, + {"O0A0", "M2222222", "J222A34443A222", "H22M22", "F0255M5520", "F25Q52", "D025S520", "D25U52", "C25W52", "C25W52", "B2[2", "B2[2", "B2[2", "A2]2", "A23[32", "024[420", "A24[42", "024[420", "A23[32", "A2]2", "B2[2", "B2[2", "B2[2", "C25W52", "C25W52", "D25U52", "D025S520", "F25Q52", "F0255M5520", "H22M22", "J222A34443A222", "M2222222", "O0A0",}, + {"L000000000", "I000020020020000", "G000B2A34443A2B000", "F00Q00", "E00S00", "D00A3Q3A00", "C00W00", "B00A3U3A00", "B0[0", "A00[00", "A0]0", "A0]0", "002[200", "02]20", "003[300", "004[400", "024[420", "004[400", "003[300", "02]20", "002[200", "A0]0", "A0]0", "A00[00", "B0[0", "B00A3U3A00", "C00W00", "D00A3Q3A00", "E00S00", "F00Q00", "G000B2A34443A2B000", "I000020020020000", "L000000000",}, + {"O0A0", "J1112202022111", "H11B2B333B2B11", "G1Q1", "F0S0", "E1A3Q3A1", "D0W0", "C1A3U3A1", "B1[1", "B1[1", "A1]1", "A1]1", "A12[21", "A2]2", "A2]2", "003[300", "A23[32", "003[300", "A2]2", "A2]2", "A12[21", "A1]1", "A1]1", "B1[1", "B1[1", "C1A3U3A1", "D0W0", "E1A3Q3A1", "F0S0", "G1Q1", "H11B2B333B2B11", "J1112202022111", "O0A0",}, + {"O0A0", "J1111222221111", "H11B22E22B11", "G1Q1", "F1S1", "E1A3Q3A1", "D1W1", "C1A3U3A1", "B1[1", "B1[1", "A1]1", "A1]1", "A12[21", "A12[21", "A2]2", "02]20", "A2]2", "02]20", "A2]2", "A12[21", "A12[21", "A1]1", "A1]1", "B1[1", "B1[1", "C1A3U3A1", "D1W1", "E1A3Q3A1", "F1S1", "G1Q1", "H11B22E22B11", "J1111222221111", "O0A0",}, + {"O0A0", "K11110A01111", "I11B2222222B11", "G11O11", "F1S1", "E1U1", "D1W1", "C1Y1", "C1Y1", "B1[1", "B1[1", "A1]1", "A1]1", "A12[21", "A12[21", "002[200", "B2[2", "002[200", "A12[21", "A12[21", "A1]1", "A1]1", "B1[1", "B1[1", "C1Y1", "C1Y1", "D1W1", "E1U1", "F1S1", "G11O11", "I11B2222222B11", "K11110A01111", "O0A0",}, + {E, "L1110A0111", "I111D2D111", "H1O1", "F11Q11", "E1U1", "D1W1", "D1W1", "C1Y1", "B1[1", "B1[1", "B1[1", "A1]1", "A1]1", "A1]1", "A0]0", "B2[2", "A0]0", "A1]1", "A1]1", "A1]1", "B1[1", "B1[1", "B1[1", "C1Y1", "D1W1", "D1W1", "E1U1", "F11Q11", "H1O1", "I111D2D111", "L1110A0111",}, + {E, "M110A011", "J111C2C111", "H11M11", "G1Q1", "E11S11", "E1U1", "D1W1", "C1Y1", "C1Y1", "B1[1", "B1[1", "B1[1", "A1]1", "A1]1", "A0]0", "B2[2", "A0]0", "A1]1", "A1]1", "B1[1", "B1[1", "B1[1", "C1Y1", "C1Y1", "D1W1", "E1U1", "E11S11", "G1Q1", "H11M11", "J111C2C111", "M110A011",}, + {E, "O0A0", "K11110A01111", "I11E2E11", "G11G5G11", "F1S1", "E1U1", "D1W1", "D1W1", "C1Y1", "C1Y1", "B1[1", "B1[1", "B1[1", "B1[1", "A00[00", "C25W52", "A00[00", "B1[1", "B1[1", "B1[1", "B1[1", "C1Y1", "C1Y1", "D1W1", "D1W1", "E1U1", "F1S1", "G11G5G11", "I11E2E11", "K11110A01111", "O0A0",}, + {"\u0001", "M110A011", "J111C2C111", "H11F5F11", "F11Q11", "E11S11", "E1U1", "D1W1", "D1W1", "C1Y1", "C1Y1", "C1Y1", "B1[1", "B1[1", "B0[0", "C25W52", "B0[0", "B1[1", "B1[1", "C1Y1", "C1Y1", "C1Y1", "D1W1", "D1W1", "E1U1", "E11S11", "F11Q11", "H11F5F11", "J111C2C111", "M110A011",}, + {"\u0001", "O0A0", "L1110A0111", "I111D2D111", "G11D3335333D11", "F1S1", "E1U1", "E1U1", "D1W1", "D1W1", "D1W1", "C1Y1", "C1A3U3A1", "C1A3U3A1", "B00A3U3A00", "D25U52", "B00A3U3A00", "C1A3U3A1", "C1A3U3A1", "C1Y1", "D1W1", "D1W1", "D1W1", "E1U1", "E1U1", "F1S1", "G11D3335333D11", "I111D2D111", "L1110A0111", "O0A0",}, + {"\u0002", "O0A0", "K11100000111", "H111E2E111", "G11G5G11", "F1S1", "E11S11", "E1U1", "E1U1", "D1W1", "D1W1", "D1W1", "D0W0", "C00W00", "D025S520", "C00W00", "D0W0", "D1W1", "D1W1", "D1W1", "E1U1", "E1U1", "E11S11", "F1S1", "G11G5G11", "H111E2E111", "K11100000111", "O0A0",}, + {"\u0003", "O0A0", "J111110A011111", "H111E2E111", "G11D3335333D11", "F11Q11", "F1S1", "E11S11", "E1U1", "E1U1", "E1A3Q3A1", "E1A3Q3A1", "D00A3Q3A00", "F25Q52", "D00A3Q3A00", "E1A3Q3A1", "E1A3Q3A1", "E1U1", "E1U1", "E11S11", "F1S1", "F11Q11", "G11D3335333D11", "H111E2E111", "J111110A011111", "O0A0",}, + {"\u0004", "O0A0", "K11100000111", "I111D2D111", "H11F5F11", "G11G5G11", "G1Q1", "F11Q11", "F1S1", "F1S1", "F0S0", "E00S00", "F0255M5520", "E00S00", "F0S0", "F1S1", "F1S1", "F11Q11", "G1Q1", "G11G5G11", "H11F5F11", "I111D2D111", "K11100000111", "O0A0",}, + {"\u0005", "O0A0", "L1110A0111", "J111C2C111", "I11E2E11", "H11M11", "H1O1", "G11O11", "G1Q1", "G1Q1", "F00Q00", "H22M22", "F00Q00", "G1Q1", "G1Q1", "G11O11", "H1O1", "H11M11", "I11E2E11", "J111C2C111", "L1110A0111", "O0A0",}, + {"\u0006", "O0A0", "M110A011", "K11110A01111", "J111C2C111", "I111D2D111", "I11B2222222B11", "H11B22E22B11", "H11B2B333B2B11", "G000B2A34443A2B000", "J222A34443A222", "G000B2A34443A2B000", "H11B2B333B2B11", "H11B22E22B11", "I11B2222222B11", "I111D2D111", "J111C2C111", "K11110A01111", "M110A011", "O0A0",}, + {"\u0008", "O0A0", "M110A011", "L1110A0111", "K11110A01111", "J1111222221111", "J1112202022111", "I000020020020000", "M2222222", "I000020020020000", "J1112202022111", "J1111222221111", "K11110A01111", "L1110A0111", "M110A011", "O0A0",}, + {"\u000B", "O0A0", "O0A0", "O0A0", "L000000000", "O0A0", "L000000000", "O0A0", "O0A0", "O0A0",}, }; - private static final Block[] blockType2 = new Block[]{sBlockCasingsTT, QuantumGlassBlock.INSTANCE,sBlockCasingsTT,sBlockCasingsTT,sBlockCasingsTT,sBlockCasingsTT}; + private static final Block[] blockType2 = new Block[]{sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMeta2 = new byte[]{12, 0, 13, 14, 10, 11}; //endregion @@ -140,66 +142,9 @@ public class GT_MetaTileEntity_EM_bhg extends GT_MetaTileEntity_MultiblockBase_E super(aName); } - @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(shape2, blockType2, blockMeta2, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 16, 16, 0)){ - glassDome=true; - return true; - } - if(structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 16, 16, 0)){ - glassDome=false; - return true; - } - //todo check tiers of hatches!!!! - return false; - } - - @Override - public void construct(int stackSize, boolean hintsOnly) { - if((stackSize &1)==1) { - StructureBuilderExtreme(shape, blockType, blockMeta, 16, 16, 0, getBaseMetaTileEntity(),this, hintsOnly); - } else { - StructureBuilderExtreme(shape2, blockType2, blockMeta2, 16, 16, 0, getBaseMetaTileEntity(),this, hintsOnly); - } - } - - @Override - public String[] getStructureDescription(int stackSize) { - return description; - } - - @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_RenderedTexture(aActive ? ScreenON : ScreenOFF)}; - } - return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][12]}; - } - - @Override - public String[] getDescription() { - return new String[]{ - CommonValues.TEC_MARK_EM, - "Singularity based power generation.", - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Super unstable!!!" - }; - } - /** * Black hole event horizon radius calculator + * * @param massKg mass in kg * @return radius in meters */ @@ -209,6 +154,7 @@ public class GT_MetaTileEntity_EM_bhg extends GT_MetaTileEntity_MultiblockBase_E /** * Black hole event horizon surface area calculator + * * @param massKg mass in kg * @return area in meters^2 */ @@ -218,6 +164,7 @@ public class GT_MetaTileEntity_EM_bhg extends GT_MetaTileEntity_MultiblockBase_E /** * Black hole event horizon temperature calculator + * * @param massKg mass in kg * @return temperature in K */ @@ -227,6 +174,7 @@ public class GT_MetaTileEntity_EM_bhg extends GT_MetaTileEntity_MultiblockBase_E /** * Black hole luminosity calculator + * * @param massKg mass in kg * @return luminosity in watts */ @@ -236,6 +184,7 @@ public class GT_MetaTileEntity_EM_bhg extends GT_MetaTileEntity_MultiblockBase_E /** * Black hole acretion disk luminosity calculator + * * @param massKgPer1s mass injection kg per s * @return luminosity in watts */ @@ -245,36 +194,40 @@ public class GT_MetaTileEntity_EM_bhg extends GT_MetaTileEntity_MultiblockBase_E /** * Black hole gravity field calculator, should be used for gravity blasting - * @param massKg mass in kg + * + * @param massKg mass in kg * @param distanceSq distance squared in meters * @return gravity field */ - private static double getGravityField(double massKg,double distanceSq) { + 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 massKg mass in kg * @param radiusSq radius squared in meters * @return force in newtons */ - private static double getContainmentForce(double massKg,double radiusSq) { + 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 massKg mass in kg * @param radiusSq radius squared in meters * @return pressure in pascals */ - private static double getContainmentPressure(double massKg,double radiusSq) { + 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 */ @@ -284,16 +237,75 @@ public class GT_MetaTileEntity_EM_bhg extends GT_MetaTileEntity_MultiblockBase_E /** * Black hole power balance, zero at mass ~= 2.5525e10 (T~=4.8067e12) - * @param massKg mass in kg + * + * @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); + 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(shape2, blockType2, blockMeta2, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 16, 16, 0)) { + glassDome = true; + return true; + } + if (structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 16, 16, 0)) { + glassDome = false; + return true; + } + //todo check tiers of hatches!!!! + return false; + } + + @Override + public String[] getDescription() { + return new String[]{ + CommonValues.TEC_MARK_EM, + "Singularity based power generation.", + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Super unstable!!!" + }; + } + + @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_RenderedTexture(aActive ? ScreenON : ScreenOFF)}; + } + return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][12]}; + } + + @Override + public void construct(int stackSize, boolean hintsOnly) { + if ((stackSize & 1) == 1) { + StructureBuilderExtreme(shape, blockType, blockMeta, 16, 16, 0, getBaseMetaTileEntity(), this, hintsOnly); + } else { + StructureBuilderExtreme(shape2, blockType2, blockMeta2, 16, 16, 0, getBaseMetaTileEntity(), this, hintsOnly); + } + } + + @Override + public String[] getStructureDescription(int stackSize) { + return description; + } +} \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java index 5d3a700153..8e0cf294f3 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java @@ -15,11 +15,7 @@ import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.casing.TT_Container_Casings; import com.github.technus.tectech.thing.metaTileEntity.IConstructable; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputElemental; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.IHatchAdder; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.INameFunction; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.IStatusFunction; +import com.github.technus.tectech.thing.metaTileEntity.multi.base.*; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedTexture; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -48,6 +44,7 @@ import static net.minecraft.util.StatCollector.translateToLocal; * Created by danie_000 on 17.12.2016. */ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { + //region variables private static Textures.BlockIcons.CustomIcon ScreenOFF; private static Textures.BlockIcons.CustomIcon ScreenON; private static Textures.BlockIcons.CustomIcon ScreenON_Slave; @@ -57,12 +54,12 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB private static double MASS_TO_EU_INSTANT; private static int STARTUP_COST, KEEPUP_COST; - public static void setValues(int heliumPlasmaValue) { - double MASS_TO_EU_PARTIAL = heliumPlasmaValue / 1.75893000478707E07;//mass diff - MASS_TO_EU_INSTANT = MASS_TO_EU_PARTIAL * 20; - STARTUP_COST = -heliumPlasmaValue * 10000; - KEEPUP_COST = -heliumPlasmaValue; - } + protected byte eTier = 0; + protected cElementalInstanceStack stack; + private long plasmaEnergy; + + protected boolean started = false; + //endregion //region collision handlers public static final HashMap FUSE_HANDLERS = new HashMap<>(); @@ -266,10 +263,6 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB } //endregion - protected byte eTier = 0; - protected cElementalInstanceStack stack; - private long plasmaEnergy; - //region parameters protected Parameters.Group.ParameterIn mode; private static final IStatusFunction MODE_STATUS = (base_EM, p) -> { @@ -300,9 +293,7 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB }; //endregion - protected boolean started = false; - - //region Structure + //region structure //use multi A energy inputs, use less power the longer it runs private static final String[][] shape = new String[][]{ {"I0A0A0", "I00000", "I0A0A0",}, @@ -363,59 +354,98 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB super(aName); } - @Override - protected void parametersInstantiation_EM() { - Parameters.Group hatch_0 = parametrization.getGroup(0); - mode = hatch_0.makeInParameter(0, FUSE_MODE, MODE_NAME, MODE_STATUS); + public static void setValues(int heliumPlasmaValue) { + double MASS_TO_EU_PARTIAL = heliumPlasmaValue / 1.75893000478707E07;//mass diff + MASS_TO_EU_INSTANT = MASS_TO_EU_PARTIAL * 20; + STARTUP_COST = -heliumPlasmaValue * 10000; + KEEPUP_COST = -heliumPlasmaValue; } - @Override - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_EM_collider(mName); - } + protected double fuse(GT_MetaTileEntity_EM_collider partner) { + if (partner.stack != null && stack != null) {//todo add single event mode as an option + boolean check = stack.definition.fusionMakesEnergy(stack.getEnergy()) && + partner.stack.definition.fusionMakesEnergy(partner.stack.getEnergy()); - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister aBlockIconRegister) { - ScreenOFF = new Textures.BlockIcons.CustomIcon("iconsets/EM_COLLIDER"); - ScreenON = new Textures.BlockIcons.CustomIcon("iconsets/EM_COLLIDER_ACTIVE"); - ScreenOFF_Slave = new Textures.BlockIcons.CustomIcon("iconsets/EM_COLLIDER_SLAVE"); - ScreenON_Slave = new Textures.BlockIcons.CustomIcon("iconsets/EM_COLLIDER_ACTIVE_SLAVE"); - super.registerIcons(aBlockIconRegister); - } + cElementalInstanceStack stack2 = partner.stack; + double preMass = stack2.getMass() + stack.getMass(); + //System.out.println("preMass = " + preMass); - @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - if (aSide == aFacing) { - if (aFacing % 2 == 0) { - return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][4], new TT_RenderedTexture(aActive ? ScreenON : ScreenOFF)}; + cElementalInstanceStackMap map = new cElementalInstanceStackMap(); + IColliderHandler colliderHandler; + if (stack2.definition.getClassType() > stack.definition.getClassType()) {//always bigger first + colliderHandler = FUSE_HANDLERS.get((stack2.definition.getClassType() << 16) | stack.definition.getClassType()); + if (handleRecipe(stack2, map, colliderHandler)) return 0; } else { - return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][4], new TT_RenderedTexture(aActive ? ScreenON_Slave : ScreenOFF_Slave)}; + colliderHandler = FUSE_HANDLERS.get((stack.definition.getClassType() << 16) | stack2.definition.getClassType()); + if (handleRecipe(stack2, map, colliderHandler)) return 0; + } + for (cElementalInstanceStack newStack : map.values()) { + check &= newStack.definition.fusionMakesEnergy(newStack.getEnergy()); } + //System.out.println("outputEM[0].getMass() = " + outputEM[0].getMass()); + outputEM = new cElementalInstanceStackMap[]{map}; + + partner.stack = stack = null; + //System.out.println("check = " + check); + //System.out.println("preMass-map.getMass() = " + (preMass - map.getMass())); + return check ? preMass - map.getMass() : + Math.min(preMass - map.getMass(), 0); } - return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][4]}; + return 0; } - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - aNBT.setByte("eTier", eTier);//collider tier - aNBT.setBoolean("eStarted", started); - if (stack != null) { - aNBT.setTag("eStack", stack.toNBT()); + private boolean handleRecipe(cElementalInstanceStack stack2, cElementalInstanceStackMap map, IColliderHandler colliderHandler) { + if (colliderHandler != null && eTier >= colliderHandler.getRequiredTier()) { + colliderHandler.collide(stack2, stack, map); + } else { + map.putUnifyAll(stack, stack2); + outputEM = new cElementalInstanceStackMap[]{map}; + return true; } - aNBT.setLong("ePlasmaEnergy", plasmaEnergy); + return false; } - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - eTier = aNBT.getByte("eTier");//collider tier - started = aNBT.getBoolean("eStarted"); - if (aNBT.hasKey("eStack")) { - stack = cElementalInstanceStack.fromNBT(aNBT.getCompoundTag("eStack")); + protected GT_MetaTileEntity_EM_collider getPartner() { + IGregTechTileEntity iGregTechTileEntity = getBaseMetaTileEntity(); + int xDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetX * 4; + int yDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetY * 4; + int zDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetZ * 4; + IGregTechTileEntity gregTechBaseTileEntity = iGregTechTileEntity.getIGregTechTileEntityOffset(xDir, yDir, zDir); + if (gregTechBaseTileEntity != null) { + IMetaTileEntity gregTechMetaTileEntity = gregTechBaseTileEntity.getMetaTileEntity(); + return gregTechMetaTileEntity instanceof GT_MetaTileEntity_EM_collider && + ((GT_MetaTileEntity_EM_collider) gregTechMetaTileEntity).mMachine && + gregTechBaseTileEntity.getBackFacing() == iGregTechTileEntity.getFrontFacing() ? + (GT_MetaTileEntity_EM_collider) gregTechMetaTileEntity : null; } - plasmaEnergy = aNBT.getLong("ePlasmaEnergy"); + return null; + } + + protected final boolean isMaster() { + return getBaseMetaTileEntity().getFrontFacing() % 2 == 0; + } + + private void makeEU(double massDiff) { + plasmaEnergy += massDiff * MASS_TO_EU_INSTANT; + System.out.println("plasmaEnergy = " + plasmaEnergy); + } + + private cElementalInstanceStackMap tickStack() { + if (stack == null) { + return null; + } + cElementalInstanceStackMap newInstances = stack.decay(1, stack.age += 1, 0); + if (newInstances == null) { + stack.nextColor(); + } else { + stack = newInstances.remove(newInstances.getLast().definition); + } + return newInstances; + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_EM_collider(mName); } @Override @@ -455,37 +485,6 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB return false; } - @Override - public void construct(int stackSize, boolean hintsOnly) { - IGregTechTileEntity iGregTechTileEntity = getBaseMetaTileEntity(); - int xDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetX * 4; - int yDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetY * 4; - int zDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetZ * 4; - if (hintsOnly) { - TecTech.proxy.hint_particle(iGregTechTileEntity.getWorld(), - iGregTechTileEntity.getXCoord() + xDir, - iGregTechTileEntity.getYCoord() + yDir, - iGregTechTileEntity.getZCoord() + zDir, - TT_Container_Casings.sHintCasingsTT, 12); - } else { - if (iGregTechTileEntity.getBlockOffset(xDir, 0, zDir).getMaterial() == Material.air) { - iGregTechTileEntity.getWorld().setBlock(iGregTechTileEntity.getXCoord() + xDir, iGregTechTileEntity.getYCoord() + yDir, iGregTechTileEntity.getZCoord() + zDir, TT_Container_Casings.sHintCasingsTT, 12, 2); - } - } - if ((stackSize & 1) == 1) { - StructureBuilderExtreme(shape, blockType, blockMeta1, 11, 1, 18, iGregTechTileEntity, this, hintsOnly); - } else { - StructureBuilderExtreme(shape, blockType, blockMeta2, 11, 1, 18, iGregTechTileEntity, this, hintsOnly); - } - } - - @Override - public void parametersStatusesWrite_EM(boolean machineBusy) { - if (isMaster()) { - super.parametersStatusesWrite_EM(machineBusy); - } - } - @Override public boolean checkRecipe_EM(ItemStack itemStack) { GT_MetaTileEntity_EM_collider partner = getPartner(); @@ -528,99 +527,6 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB } } - protected double fuse(GT_MetaTileEntity_EM_collider partner) { - if (partner.stack != null && stack != null) {//todo add single event mode as an option - boolean check = stack.definition.fusionMakesEnergy(stack.getEnergy()) && - partner.stack.definition.fusionMakesEnergy(partner.stack.getEnergy()); - - cElementalInstanceStack stack2 = partner.stack; - double preMass = stack2.getMass() + stack.getMass(); - //System.out.println("preMass = " + preMass); - - cElementalInstanceStackMap map = new cElementalInstanceStackMap(); - IColliderHandler colliderHandler; - if (stack2.definition.getClassType() > stack.definition.getClassType()) {//always bigger first - colliderHandler = FUSE_HANDLERS.get((stack2.definition.getClassType() << 16) | stack.definition.getClassType()); - if (handleRecipe(stack2, map, colliderHandler)) return 0; - } else { - colliderHandler = FUSE_HANDLERS.get((stack.definition.getClassType() << 16) | stack2.definition.getClassType()); - if (handleRecipe(stack2, map, colliderHandler)) return 0; - } - for (cElementalInstanceStack newStack : map.values()) { - check &= newStack.definition.fusionMakesEnergy(newStack.getEnergy()); - } - //System.out.println("outputEM[0].getMass() = " + outputEM[0].getMass()); - outputEM = new cElementalInstanceStackMap[]{map}; - - partner.stack = stack = null; - //System.out.println("check = " + check); - //System.out.println("preMass-map.getMass() = " + (preMass - map.getMass())); - return check ? preMass - map.getMass() : - Math.min(preMass - map.getMass(), 0); - } - return 0; - } - - private boolean handleRecipe(cElementalInstanceStack stack2, cElementalInstanceStackMap map, IColliderHandler colliderHandler) { - if (colliderHandler != null && eTier >= colliderHandler.getRequiredTier()) { - colliderHandler.collide(stack2, stack, map); - } else { - map.putUnifyAll(stack, stack2); - outputEM = new cElementalInstanceStackMap[]{map}; - return true; - } - return false; - } - - @Override - protected void afterRecipeCheckFailed() { - started = false; - if (stack != null) { - cleanMassEM_EM(stack.getMass()); - stack = null; - } - getBaseMetaTileEntity().disableWorking(); - super.afterRecipeCheckFailed(); - } - - @Override - public void stopMachine() { - started = false; - if (stack != null) { - cleanMassEM_EM(stack.getMass()); - stack = null; - } - super.stopMachine(); - } - - @Override - public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if (!aBaseMetaTileEntity.isAllowedToWork()) { - started = false; - } - super.onPreTick(aBaseMetaTileEntity, aTick); - } - - protected GT_MetaTileEntity_EM_collider getPartner() { - IGregTechTileEntity iGregTechTileEntity = getBaseMetaTileEntity(); - int xDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetX * 4; - int yDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetY * 4; - int zDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetZ * 4; - IGregTechTileEntity gregTechBaseTileEntity = iGregTechTileEntity.getIGregTechTileEntityOffset(xDir, yDir, zDir); - if (gregTechBaseTileEntity != null) { - IMetaTileEntity gregTechMetaTileEntity = gregTechBaseTileEntity.getMetaTileEntity(); - return gregTechMetaTileEntity instanceof GT_MetaTileEntity_EM_collider && - ((GT_MetaTileEntity_EM_collider) gregTechMetaTileEntity).mMachine && - gregTechBaseTileEntity.getBackFacing() == iGregTechTileEntity.getFrontFacing() ? - (GT_MetaTileEntity_EM_collider) gregTechMetaTileEntity : null; - } - return null; - } - - protected final boolean isMaster() { - return getBaseMetaTileEntity().getFrontFacing() % 2 == 0; - } - @Override public void outputAfterRecipe_EM() { GT_MetaTileEntity_EM_collider partner = getPartner(); @@ -663,35 +569,127 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB } } - private void makeEU(double massDiff) { - plasmaEnergy += massDiff * MASS_TO_EU_INSTANT; - System.out.println("plasmaEnergy = " + plasmaEnergy); + @Override + public String[] getDescription() { + return new String[]{ + CommonValues.TEC_MARK_EM, + "Collide matter at extreme velocities.", + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Faster than light*!!!" + }; } - private cElementalInstanceStackMap tickStack() { - if (stack == null) { - return null; + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister aBlockIconRegister) { + ScreenOFF = new Textures.BlockIcons.CustomIcon("iconsets/EM_COLLIDER"); + ScreenON = new Textures.BlockIcons.CustomIcon("iconsets/EM_COLLIDER_ACTIVE"); + ScreenOFF_Slave = new Textures.BlockIcons.CustomIcon("iconsets/EM_COLLIDER_SLAVE"); + ScreenON_Slave = new Textures.BlockIcons.CustomIcon("iconsets/EM_COLLIDER_ACTIVE_SLAVE"); + super.registerIcons(aBlockIconRegister); + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aSide == aFacing) { + if (aFacing % 2 == 0) { + return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][4], new TT_RenderedTexture(aActive ? ScreenON : ScreenOFF)}; + } else { + return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][4], new TT_RenderedTexture(aActive ? ScreenON_Slave : ScreenOFF_Slave)}; + } } - cElementalInstanceStackMap newInstances = stack.decay(1, stack.age += 1, 0); - if (newInstances == null) { - stack.nextColor(); - } else { - stack = newInstances.remove(newInstances.getLast().definition); + return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][4]}; + } + + @Override + protected void parametersInstantiation_EM() { + Parameters.Group hatch_0 = parametrization.getGroup(0); + mode = hatch_0.makeInParameter(0, FUSE_MODE, MODE_NAME, MODE_STATUS); + } + + @Override + public void parametersStatusesWrite_EM(boolean machineBusy) { + if (isMaster()) { + super.parametersStatusesWrite_EM(machineBusy); } - return newInstances; } @Override - public String[] getStructureDescription(int stackSize) { - return description; + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setByte("eTier", eTier);//collider tier + aNBT.setBoolean("eStarted", started); + if (stack != null) { + aNBT.setTag("eStack", stack.toNBT()); + } + aNBT.setLong("ePlasmaEnergy", plasmaEnergy); } @Override - public String[] getDescription() { - return new String[]{ - CommonValues.TEC_MARK_EM, - "Collide matter at extreme velocities.", - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Faster than light*!!!" - }; + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + eTier = aNBT.getByte("eTier");//collider tier + started = aNBT.getBoolean("eStarted"); + if (aNBT.hasKey("eStack")) { + stack = cElementalInstanceStack.fromNBT(aNBT.getCompoundTag("eStack")); + } + plasmaEnergy = aNBT.getLong("ePlasmaEnergy"); + } + + @Override + public void stopMachine() { + started = false; + if (stack != null) { + cleanMassEM_EM(stack.getMass()); + stack = null; + } + super.stopMachine(); + } + + @Override + protected void afterRecipeCheckFailed() { + started = false; + if (stack != null) { + cleanMassEM_EM(stack.getMass()); + stack = null; + } + getBaseMetaTileEntity().disableWorking(); + super.afterRecipeCheckFailed(); + } + + @Override + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if (!aBaseMetaTileEntity.isAllowedToWork()) { + started = false; + } + super.onPreTick(aBaseMetaTileEntity, aTick); + } + + @Override + public void construct(int stackSize, boolean hintsOnly) { + IGregTechTileEntity iGregTechTileEntity = getBaseMetaTileEntity(); + int xDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetX * 4; + int yDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetY * 4; + int zDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetZ * 4; + if (hintsOnly) { + TecTech.proxy.hint_particle(iGregTechTileEntity.getWorld(), + iGregTechTileEntity.getXCoord() + xDir, + iGregTechTileEntity.getYCoord() + yDir, + iGregTechTileEntity.getZCoord() + zDir, + TT_Container_Casings.sHintCasingsTT, 12); + } else { + if (iGregTechTileEntity.getBlockOffset(xDir, 0, zDir).getMaterial() == Material.air) { + iGregTechTileEntity.getWorld().setBlock(iGregTechTileEntity.getXCoord() + xDir, iGregTechTileEntity.getYCoord() + yDir, iGregTechTileEntity.getZCoord() + zDir, TT_Container_Casings.sHintCasingsTT, 12, 2); + } + } + if ((stackSize & 1) == 1) { + StructureBuilderExtreme(shape, blockType, blockMeta1, 11, 1, 18, iGregTechTileEntity, this, hintsOnly); + } else { + StructureBuilderExtreme(shape, blockType, blockMeta2, 11, 1, 18, iGregTechTileEntity, this, hintsOnly); + } + } + + @Override + public String[] getStructureDescription(int stackSize) { + return description; } } \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java index 1aa2420773..ee21f81e06 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java @@ -40,12 +40,14 @@ import static net.minecraft.util.StatCollector.translateToLocal; * Created by danie_000 on 17.12.2016. */ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { + //region variables private final ArrayList eRacks = new ArrayList<>(); private static Textures.BlockIcons.CustomIcon ScreenOFF; private static Textures.BlockIcons.CustomIcon ScreenON; + //endregion - //region Structure + //region structure private static final String[][] front = new String[][]{{"A ", "A ", "A. ", "A ",},}; private static final String[][] terminator = new String[][]{{"A ", "A ", "A ", "A ",},}; private static final String[][] cap = new String[][]{{"-01", "A22", "A22", "-01",},}; @@ -100,40 +102,49 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB eCertainStatus = -128;//no-brain value } - @Override - protected void parametersInstantiation_EM() { - Parameters.Group hatch_0 = parametrization.getGroup(0); - overclock = hatch_0.makeInParameter(0, 1, OC_NAME, OC_STATUS); - overvolt = hatch_0.makeInParameter(1, 1, OV_NAME, OV_STATUS); - maxCurrentTemp = hatch_0.makeOutParameter(0, 0, MAX_TEMP_NAME, MAX_TEMP_STATUS); - availableData = hatch_0.makeOutParameter(1, 0, COMPUTE_NAME, COMPUTE_STATUS); - } - - @Override - @SideOnly(Side.CLIENT) - protected ResourceLocation getActivitySound() { - return GT_MetaTileEntity_EM_switch.activitySound; - } - @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_EM_computer(mName); } @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister aBlockIconRegister) { - ScreenOFF = new Textures.BlockIcons.CustomIcon("iconsets/EM_COMPUTER"); - ScreenON = new Textures.BlockIcons.CustomIcon("iconsets/EM_COMPUTER_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][3], new TT_RenderedTexture(aActive ? ScreenON : ScreenOFF)}; + public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { + for (GT_MetaTileEntity_Hatch_Rack rack : eRacks) { + if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(rack)) { + rack.getBaseMetaTileEntity().setActive(false); + } } - return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][3]}; + eRacks.clear(); + if (!structureCheck_EM(front, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, 0)) { + return false; + } + if (!structureCheck_EM(cap, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, -1)) { + return false; + } + byte offset = -2, totalLen = 4; + while (offset > -16) { + if (!structureCheck_EM(slice, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, offset)) { + break; + } + totalLen++; + offset--; + } + if (totalLen > 16) { + return false; + } + if (!structureCheck_EM(cap, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, ++offset)) { + return false; + } + if (!structureCheck_EM(terminator, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, --offset)) { + return false; + } + eCertainMode = (byte) Math.min(totalLen / 3, 5); + for (GT_MetaTileEntity_Hatch_Rack rack : eRacks) { + if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(rack)) { + rack.getBaseMetaTileEntity().setActive(iGregTechTileEntity.isActive()); + } + } + return eUncertainHatches.size() == 1; } @Override @@ -226,21 +237,37 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB } @Override - protected long getAvailableData_EM() { - return eAvailableData; + public String[] getDescription() { + return new String[]{ + CommonValues.TEC_MARK_EM, + Util.intBitsToString(TecTech.RANDOM.nextInt()), + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.computer.desc")//You need it to process the number above + }; } @Override - protected void afterRecipeCheckFailed() { - super.afterRecipeCheckFailed(); - for (GT_MetaTileEntity_Hatch_Rack rack : eRacks) { - if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(rack)) { - rack.getBaseMetaTileEntity().setActive(false); - } + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister aBlockIconRegister) { + ScreenOFF = new Textures.BlockIcons.CustomIcon("iconsets/EM_COMPUTER"); + ScreenON = new Textures.BlockIcons.CustomIcon("iconsets/EM_COMPUTER_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][3], new TT_RenderedTexture(aActive ? ScreenON : ScreenOFF)}; } + return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][3]}; + } + + @Override + @SideOnly(Side.CLIENT) + protected ResourceLocation getActivitySound() { + return GT_MetaTileEntity_EM_switch.activitySound; } - @Override//Had a crash bug with breaking a rack and then the multi + @Override public void onRemoval() { super.onRemoval(); for (GT_MetaTileEntity_Hatch_Rack rack : eRacks) { @@ -250,6 +277,27 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB } } + @Override + protected void parametersInstantiation_EM() { + Parameters.Group hatch_0 = parametrization.getGroup(0); + overclock = hatch_0.makeInParameter(0, 1, OC_NAME, OC_STATUS); + overvolt = hatch_0.makeInParameter(1, 1, OV_NAME, OV_STATUS); + maxCurrentTemp = hatch_0.makeOutParameter(0, 0, MAX_TEMP_NAME, MAX_TEMP_STATUS); + availableData = hatch_0.makeOutParameter(1, 0, COMPUTE_NAME, COMPUTE_STATUS); + } + + @Override + protected void extraExplosions_EM() { + for (MetaTileEntity tTileEntity : eRacks) { + tTileEntity.getBaseMetaTileEntity().doExplosion(V[9]); + } + } + + @Override + protected long getAvailableData_EM() { + return eAvailableData; + } + @Override public void stopMachine() { super.stopMachine(); @@ -262,43 +310,28 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB } @Override - public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { + protected void afterRecipeCheckFailed() { + super.afterRecipeCheckFailed(); for (GT_MetaTileEntity_Hatch_Rack rack : eRacks) { if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(rack)) { rack.getBaseMetaTileEntity().setActive(false); } } - eRacks.clear(); - if (!structureCheck_EM(front, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, 0)) { - return false; - } - if (!structureCheck_EM(cap, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, -1)) { - return false; - } - byte offset = -2, totalLen = 4; - while (offset > -16) { - if (!structureCheck_EM(slice, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, offset)) { - break; - } - totalLen++; - offset--; - } - if (totalLen > 16) { - return false; - } - if (!structureCheck_EM(cap, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, ++offset)) { + } + + public final boolean addRackToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { return false; } - if (!structureCheck_EM(terminator, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, --offset)) { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { return false; } - eCertainMode = (byte) Math.min(totalLen / 3, 5); - for (GT_MetaTileEntity_Hatch_Rack rack : eRacks) { - if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(rack)) { - rack.getBaseMetaTileEntity().setActive(iGregTechTileEntity.isActive()); - } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Rack) { + ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); + return eRacks.add((GT_MetaTileEntity_Hatch_Rack) aMetaTileEntity); } - return eUncertainHatches.size() == 1; + return false; } @Override @@ -320,36 +353,4 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB public String[] getStructureDescription(int stackSize) { return description; } - - @Override - protected void extraExplosions_EM() { - for (MetaTileEntity tTileEntity : eRacks) { - tTileEntity.getBaseMetaTileEntity().doExplosion(V[9]); - } - } - - @Override - public String[] getDescription() { - return new String[]{ - CommonValues.TEC_MARK_EM, - Util.intBitsToString(TecTech.RANDOM.nextInt()), - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.computer.desc")//You need it to process the number above - }; - } - - //NEW METHOD - public final boolean addRackToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) { - return false; - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Rack) { - ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); - return eRacks.add((GT_MetaTileEntity_Hatch_Rack) aMetaTileEntity); - } - return false; - } } \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java index a72740e84f..8e55ba4988 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java @@ -26,32 +26,35 @@ import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBloc * Created by danie_000 on 17.12.2016. */ public class GT_MetaTileEntity_EM_crafting extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { + //region variables private static Textures.BlockIcons.CustomIcon ScreenOFF; private static Textures.BlockIcons.CustomIcon ScreenON; - public static final String crafter="EM Crafting"; + public static final String crafter = "EM Crafting"; + //endregion + //region structure private static final String[][] shape = new String[][]{ - {"A000","0 0","0 . 0","0 0","A000",}, - {"00000","00000","00000","00000","00000",}, - {"0C0","A!!!","A!1!","A!!!","0C0",}, - {"22222","22222","22122","22222","22222",}, - {"23432","33333","43134","33333","23432",}, - {"23332","33333","33533","33333","23332",}, - {"23432","33333","43134","33333","23432",}, - {"22222","22222","22122","22222","22222",}, - {"0C0","A!!!","A!1!","A!!!","0C0",}, - {"00000","00000","00000","00000","00000",}, - {"A000","0 0","0 0","0 0","A000",}, + {"A000", "0 0", "0 . 0", "0 0", "A000",}, + {"00000", "00000", "00000", "00000", "00000",}, + {"0C0", "A!!!", "A!1!", "A!!!", "0C0",}, + {"22222", "22222", "22122", "22222", "22222",}, + {"23432", "33333", "43134", "33333", "23432",}, + {"23332", "33333", "33533", "33333", "23332",}, + {"23432", "33333", "43134", "33333", "23432",}, + {"22222", "22222", "22122", "22222", "22222",}, + {"0C0", "A!!!", "A!1!", "A!!!", "0C0",}, + {"00000", "00000", "00000", "00000", "00000",}, + {"A000", "0 0", "0 0", "0 0", "A000",}, }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT , QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT}; + private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMeta = new byte[]{4, 10, 5, 0, 6, 9}; private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addClassicToMachineList, this::addElementalToMachineList}; private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0, 4}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA+"Hint Details:", + EnumChatFormatting.AQUA + "Hint Details:", "1 - Classic Hatches or High Power Casing", "2 - Elemental Hatches or Molecular Casing", }; @@ -70,6 +73,11 @@ public class GT_MetaTileEntity_EM_crafting extends GT_MetaTileEntity_MultiblockB return new GT_MetaTileEntity_EM_crafting(mName); } + @Override + public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { + return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0); + } + @Override @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister aBlockIconRegister) { @@ -78,6 +86,15 @@ public class GT_MetaTileEntity_EM_crafting extends GT_MetaTileEntity_MultiblockB super.registerIcons(aBlockIconRegister); } + @Override + public String[] getDescription() { + return new String[]{ + CommonValues.TEC_MARK_EM, + "The most precise way of making stuff.", + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "(Trans-Planck process)" + }; + } + @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { if (aSide == aFacing) { @@ -86,27 +103,13 @@ public class GT_MetaTileEntity_EM_crafting extends GT_MetaTileEntity_MultiblockB return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][12]}; } - @Override - public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0); - } - @Override public void construct(int stackSize, boolean hintsOnly) { - StructureBuilderExtreme(shape, blockType, blockMeta,2, 2, 0, getBaseMetaTileEntity(),this,hintsOnly); + StructureBuilderExtreme(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), this, hintsOnly); } @Override public String[] getStructureDescription(int stackSize) { return description; } - - @Override - public String[] getDescription() { - return new String[]{ - CommonValues.TEC_MARK_EM, - "The most precise way of making stuff.", - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "(Trans-Planck process)" - }; - } -} +} \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java index b05653fb33..f18fe57b6f 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java @@ -36,10 +36,12 @@ import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBloc import static net.minecraft.util.StatCollector.translateToLocal; public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { + //region variables private final ArrayList eStacksDataOutputs = new ArrayList<>(); private final ArrayList eDataAccessHatches = new ArrayList<>(); + //endregion - //region Structure + //region structure private static final String[][] shape = new String[][]{ {"0 0", "0 . 0", "0 0",}, {"0!!!0", "01110", "0!!!0",}, @@ -66,37 +68,11 @@ public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockB super(aName); } - public final static ResourceLocation activitySound = new ResourceLocation(Reference.MODID + ":fx_hi_freq"); - - @Override - @SideOnly(Side.CLIENT) - protected ResourceLocation getActivitySound() { - return activitySound; - } - @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_EM_dataBank(mName); } - @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][1], new TT_RenderedTexture(aActive ? GT_MetaTileEntity_MultiblockBase_EM.ScreenON : GT_MetaTileEntity_MultiblockBase_EM.ScreenOFF)}; - } - return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][1]}; - } - - @Override - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_Container_MultiMachineEM(aPlayerInventory, aBaseMetaTileEntity, true, false, true); - } - - @Override - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachineEM(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "EMDisplay.png", true, false, true);//todo texture - } - @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { eDataAccessHatches.clear(); @@ -104,16 +80,6 @@ public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockB return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 1, 0); } - @Override - public void construct(int stackSize, boolean hintsOnly) { - StructureBuilderExtreme(shape, blockType, blockMeta, 2, 1, 0, getBaseMetaTileEntity(), this, hintsOnly); - } - - @Override - public String[] getStructureDescription(int stackSize) { - return description; - } - @Override public boolean checkRecipe_EM(ItemStack itemStack) { if (eDataAccessHatches.size() > 0 && eStacksDataOutputs.size() > 0) { @@ -159,7 +125,32 @@ public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockB }; } - //NEW METHOD + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_MultiMachineEM(aPlayerInventory, aBaseMetaTileEntity, true, false, true); + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_MultiMachineEM(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "EMDisplay.png", true, false, true);//todo texture + } + + @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][1], new TT_RenderedTexture(aActive ? GT_MetaTileEntity_MultiblockBase_EM.ScreenON : GT_MetaTileEntity_MultiblockBase_EM.ScreenOFF)}; + } + return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][1]}; + } + + public final static ResourceLocation activitySound = new ResourceLocation(Reference.MODID + ":fx_hi_freq"); + + @Override + @SideOnly(Side.CLIENT) + protected ResourceLocation getActivitySound() { + return activitySound; + } + public final boolean addDataBankHatchToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { if (aTileEntity == null) { return false; @@ -177,4 +168,14 @@ public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockB } return false; } + + @Override + public void construct(int stackSize, boolean hintsOnly) { + StructureBuilderExtreme(shape, blockType, blockMeta, 2, 1, 0, getBaseMetaTileEntity(), this, hintsOnly); + } + + @Override + public String[] getStructureDescription(int stackSize) { + return description; + } } \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java index 21344b9f34..f650d550c5 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java @@ -6,11 +6,7 @@ import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElement import com.github.technus.tectech.thing.metaTileEntity.IConstructable; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputElemental; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.IHatchAdder; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.INameFunction; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.IStatusFunction; +import com.github.technus.tectech.thing.metaTileEntity.multi.base.*; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedTexture; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -39,22 +35,13 @@ import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStat * Created by danie_000 on 17.12.2016. */ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { + //region variables private static Textures.BlockIcons.CustomIcon ScreenOFF; private static Textures.BlockIcons.CustomIcon ScreenON; public static final double URANIUM_INGOT_MASS_DIFF = 1.6114516E10; private static final double URANIUM_MASS_TO_EU_PARTIAL = ConfigUtil.getFloat(MainConfig.get(), "balance/energy/generator/nuclear") * 3_000_000.0 / URANIUM_INGOT_MASS_DIFF; public static final double URANIUM_MASS_TO_EU_INSTANT = URANIUM_MASS_TO_EU_PARTIAL *20; - - //region parameters - protected Parameters.Group.ParameterIn ampereFlow; - private static final INameFunction FLOW_NAME= (base, p)->"Ampere divider"; - private static final IStatusFunction FLOW_STATUS= (base, p)->{ - if(base.eAmpereFlow<=0){ - return STATUS_TOO_LOW; - } - return STATUS_OK; - }; //endregion //region structure @@ -82,6 +69,17 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase }; //endregion + //region parameters + protected Parameters.Group.ParameterIn ampereFlow; + private static final INameFunction FLOW_NAME= (base, p)->"Ampere divider"; + private static final IStatusFunction FLOW_STATUS= (base, p)->{ + if(base.eAmpereFlow<=0){ + return STATUS_TOO_LOW; + } + return STATUS_OK; + }; + //endregion + public GT_MetaTileEntity_EM_decay(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } @@ -90,57 +88,16 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase super(aName); } - @Override - protected void parametersInstantiation_EM() { - Parameters.Group hatch_0=parametrization.getGroup(0, true); - ampereFlow=hatch_0.makeInParameter(0,1,FLOW_NAME,FLOW_STATUS); - } - @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_EM_decay(mName); } - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister aBlockIconRegister) { - ScreenOFF = new Textures.BlockIcons.CustomIcon("iconsets/EM_DECAY"); - ScreenON = new Textures.BlockIcons.CustomIcon("iconsets/EM_DECAY_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_RenderedTexture(aActive ? ScreenON : ScreenOFF)}; - } - return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][12]}; - } - @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0); } - @Override - public void construct(int stackSize, boolean hintsOnly) { - StructureBuilderExtreme(shape, blockType, blockMeta,2, 2, 0, getBaseMetaTileEntity(),this,hintsOnly); - } - - @Override - public String[] getStructureDescription(int stackSize) { - return description; - } - - @Override - public String[] getDescription() { - return new String[]{ - CommonValues.TEC_MARK_EM, - "Is life time too long?", - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Make it half-life (3) instead!" - }; - } - @Override public boolean checkRecipe_EM(ItemStack itemStack) { cElementalInstanceStackMap map= getInputsClone_EM(); @@ -164,7 +121,7 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase for(cElementalInstanceStack stack:outputEM[0].values()){ if (stack.getEnergy() == 0 && stack.definition.decayMakesEnergy(1) && getBaseMetaTileEntity().decreaseStoredEnergyUnits( - (long) (stack.getEnergySettingCost(1) * URANIUM_MASS_TO_EU_INSTANT), false)) { + (long) (stack.getEnergySettingCost(1) * URANIUM_MASS_TO_EU_INSTANT), false)) { stack.setEnergy(1); }else if(!stack.definition.decayMakesEnergy(stack.getEnergy())){ outputEM[0].remove(stack.definition); @@ -193,6 +150,15 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase } } + @Override + public String[] getDescription() { + return new String[]{ + CommonValues.TEC_MARK_EM, + "Is life time too long?", + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Make it half-life (3) instead!" + }; + } + @Override public String[] getInfoData() {//TODO Do it long storedEnergy = 0; @@ -229,4 +195,36 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase "Computation: " + EnumChatFormatting.GREEN + eAvailableData + EnumChatFormatting.RESET + " / " + EnumChatFormatting.YELLOW + eRequiredData + EnumChatFormatting.RESET, }; } -} + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister aBlockIconRegister) { + ScreenOFF = new Textures.BlockIcons.CustomIcon("iconsets/EM_DECAY"); + ScreenON = new Textures.BlockIcons.CustomIcon("iconsets/EM_DECAY_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_RenderedTexture(aActive ? ScreenON : ScreenOFF)}; + } + return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][12]}; + } + + @Override + protected void parametersInstantiation_EM() { + Parameters.Group hatch_0=parametrization.getGroup(0, true); + ampereFlow=hatch_0.makeInParameter(0,1,FLOW_NAME,FLOW_STATUS); + } + + @Override + public void construct(int stackSize, boolean hintsOnly) { + StructureBuilderExtreme(shape, blockType, blockMeta,2, 2, 0, getBaseMetaTileEntity(),this,hintsOnly); + } + + @Override + public String[] getStructureDescription(int stackSize) { + return description; + } +} \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java index e682c77702..27b770c88b 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java @@ -37,8 +37,7 @@ import static net.minecraft.util.StatCollector.translateToLocal; * Created by danie_000 on 17.12.2016. */ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { - - //region Structure + //region structure //use multi A energy inputs, use less power the longer it runs private static final String[][] shape = new String[][]{ {" ", " . ", " ",}, @@ -71,10 +70,17 @@ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_Multiblo super(aName); } - @Override - @SideOnly(Side.CLIENT) - protected ResourceLocation getActivitySound() { - return GT_MetaTileEntity_EM_quantizer.activitySound; + private void startRecipe(iHasElementalDefinition from, long energy) { + mMaxProgresstime = 20; + mEfficiencyIncrease = 10000; + float mass = from.getMass(); + float euMult = Math.abs(mass / refMass); + eAmpereFlow = (int) Math.ceil(Math.sqrt(Math.sqrt(euMult))); + if (mass > refUnstableMass || from.getDefinition().getRawTimeSpan(energy) < STABLE_RAW_LIFE_TIME) { + mEUt = (int) -V[8]; + } else { + mEUt = (int) -V[6]; + } } @Override @@ -87,16 +93,6 @@ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_Multiblo return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); } - @Override - public void construct(int stackSize, boolean hintsOnly) { - StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), this, hintsOnly); - } - - @Override - public String[] getStructureDescription(int stackSize) { - return description; - } - @Override public boolean checkRecipe_EM(ItemStack itemStack) { for (GT_MetaTileEntity_Hatch_InputElemental in : eInputHatches) { @@ -136,19 +132,6 @@ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_Multiblo return false; } - private void startRecipe(iHasElementalDefinition from, long energy) { - mMaxProgresstime = 20; - mEfficiencyIncrease = 10000; - float mass = from.getMass(); - float euMult = Math.abs(mass / refMass); - eAmpereFlow = (int) Math.ceil(Math.sqrt(Math.sqrt(euMult))); - if (mass > refUnstableMass || from.getDefinition().getRawTimeSpan(energy) < STABLE_RAW_LIFE_TIME) { - mEUt = (int) -V[8]; - } else { - mEUt = (int) -V[6]; - } - } - @Override public String[] getDescription() { return new String[]{ @@ -157,4 +140,20 @@ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_Multiblo EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.emtomatter.desc.1")//regular one, but why? }; } + + @Override + @SideOnly(Side.CLIENT) + protected ResourceLocation getActivitySound() { + return GT_MetaTileEntity_EM_quantizer.activitySound; + } + + @Override + public void construct(int stackSize, boolean hintsOnly) { + StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), this, hintsOnly); + } + + @Override + public String[] getStructureDescription(int stackSize) { + return description; + } } \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java index d0b5b4ff35..71be7013be 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java @@ -32,7 +32,7 @@ import static gregtech.api.GregTech_API.mEUtoRF; * Created by danie_000 on 17.12.2016. */ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { - //region Structure + //region structure private static final String[][] shape = new String[][]{ {" ", "000", "1.1", "000", " ",}, {" ", "010", "111", "010", " ",}, @@ -45,7 +45,7 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA+"Hint Details:", + EnumChatFormatting.AQUA + "Hint Details:", "1 - Classic Hatches or High Power Casing", }; //endregion @@ -53,22 +53,55 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa public GT_MetaTileEntity_EM_infuser(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); minRepairStatus = (byte) getIdealStatus(); - eDismantleBoom=true; + eDismantleBoom = true; } public GT_MetaTileEntity_EM_infuser(String aName) { super(aName); minRepairStatus = (byte) getIdealStatus(); - eDismantleBoom=true; + eDismantleBoom = true; } + private long doChargeItemStack(IElectricItem item, ItemStack stack) { + try { + double euDiff = item.getMaxCharge(stack) - ElectricItem.manager.getCharge(stack); + if (euDiff > 0) { + setEUVar(getEUVar() - (getEUVar() >> 5)); + } + long remove = (long) Math.ceil( + ElectricItem.manager.charge(stack, + Math.min(euDiff, getEUVar()) + , item.getTier(stack), true, false)); + setEUVar(getEUVar() - remove); + if (getEUVar() < 0) { + setEUVar(0); + } + return remove; + } catch (Exception e) { + if (DEBUG_MODE) { + e.printStackTrace(); + } + } + return 0; + } - public final static ResourceLocation activitySound=new ResourceLocation(Reference.MODID+":fx_whooum"); - - @Override - @SideOnly(Side.CLIENT) - protected ResourceLocation getActivitySound(){ - return activitySound; + private long doChargeItemStackRF(IEnergyContainerItem item, ItemStack stack) { + try { + long RF = Math.min(item.getMaxEnergyStored(stack) - item.getEnergyStored(stack), getEUVar() * mEUtoRF / 100L); + //if(RF>0)this.setEUVar(this.getEUVar()-this.getEUVar()>>10); + RF = item.receiveEnergy(stack, RF > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int) RF, false); + RF = RF * 100L / mEUtoRF; + setEUVar(getEUVar() - RF); + if (getEUVar() < 0) { + setEUVar(0); + } + return RF; + } catch (Exception e) { + if (DEBUG_MODE) { + e.printStackTrace(); + } + } + return 0; } @Override @@ -76,31 +109,11 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa return new GT_MetaTileEntity_EM_infuser(mName); } - @Override - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_Container_MultiMachineEM(aPlayerInventory, aBaseMetaTileEntity,true,false,true); - } - - @Override - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachineEM(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "EMDisplay.png",true,false,true); - } - @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, 0); } - @Override - public void construct(int stackSize, boolean hintsOnly) { - StructureBuilderExtreme(shape, blockType, blockMeta,1, 2, 0, getBaseMetaTileEntity(),this,hintsOnly); - } - - @Override - public String[] getStructureDescription(int stackSize) { - return description; - } - @Override public boolean checkRecipe_EM(ItemStack itemStack) { if (itemStack != null && itemStack.stackSize == 1) { @@ -149,45 +162,31 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa }; } - private long doChargeItemStack(IElectricItem item, ItemStack stack) { - try { - double euDiff = item.getMaxCharge(stack) - ElectricItem.manager.getCharge(stack); - if (euDiff > 0) { - setEUVar(getEUVar() - (getEUVar() >> 5)); - } - long remove = (long) Math.ceil( - ElectricItem.manager.charge(stack, - Math.min(euDiff, getEUVar()) - , item.getTier(stack), true, false)); - setEUVar(getEUVar() - remove); - if (getEUVar() < 0) { - setEUVar(0); - } - return remove; - } catch (Exception e) { - if (DEBUG_MODE) { - e.printStackTrace(); - } - } - return 0; + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_MultiMachineEM(aPlayerInventory, aBaseMetaTileEntity, true, false, true); } - private long doChargeItemStackRF(IEnergyContainerItem item, ItemStack stack) { - try { - long RF = Math.min(item.getMaxEnergyStored(stack) - item.getEnergyStored(stack), getEUVar() * mEUtoRF / 100L); - //if(RF>0)this.setEUVar(this.getEUVar()-this.getEUVar()>>10); - RF = item.receiveEnergy(stack, RF > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int) RF, false); - RF = RF * 100L / mEUtoRF; - setEUVar(getEUVar() - RF); - if (getEUVar() < 0) { - setEUVar(0); - } - return RF; - } catch (Exception e) { - if (DEBUG_MODE) { - e.printStackTrace(); - } - } - return 0; + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_MultiMachineEM(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "EMDisplay.png", true, false, true); + } + + public final static ResourceLocation activitySound = new ResourceLocation(Reference.MODID + ":fx_whooum"); + + @Override + @SideOnly(Side.CLIENT) + protected ResourceLocation getActivitySound() { + return activitySound; + } + + @Override + public void construct(int stackSize, boolean hintsOnly) { + StructureBuilderExtreme(shape, blockType, blockMeta, 1, 2, 0, getBaseMetaTileEntity(), this, hintsOnly); + } + + @Override + public String[] getStructureDescription(int stackSize) { + return description; } -} +} \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java index 9d431e3bc3..aba87eaf6b 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java @@ -4,11 +4,7 @@ import com.github.technus.tectech.CommonValues; import com.github.technus.tectech.thing.metaTileEntity.IConstructable; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputElemental; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_OutputElemental; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.IHatchAdder; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.INameFunction; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.IStatusFunction; +import com.github.technus.tectech.thing.metaTileEntity.multi.base.*; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Utility; @@ -28,7 +24,7 @@ import static net.minecraft.util.StatCollector.translateToLocal; * Created by danie_000 on 17.12.2016. */ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { - //region Structure + //region structure //use multi A energy inputs, use less power the longer it runs private static final String[][] shape = new String[][]{ {" ", " . ", " ",}, @@ -94,17 +90,6 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB super(aName); } - @Override - protected void parametersInstantiation_EM() { - src = new Parameters.Group.ParameterIn[10]; - dst = new Parameters.Group.ParameterIn[10]; - for (int i = 0; i < 10; i++) { - Parameters.Group hatch = parametrization.getGroup(i); - src[i] = hatch.makeInParameter(0, i, ROUTE_NAME, SRC_STATUS); - dst[i] = hatch.makeInParameter(1, i, ROUTE_NAME, DST_STATUS); - } - } - @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_EM_junction(mName); @@ -121,25 +106,6 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB return false; } - @Override - public void construct(int stackSize, boolean hintsOnly) { - StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), this, hintsOnly); - } - - @Override - public String[] getStructureDescription(int stackSize) { - return description; - } - - @Override - public String[] getDescription() { - return new String[]{ - CommonValues.TEC_MARK_EM, - translateToLocal("gt.blockmachines.multimachine.em.junction.desc.0"),//Reroutes Matter - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.junction.desc.1")//Axis aligned movement! - }; - } - @Override public boolean checkRecipe_EM(ItemStack itemStack) { for (GT_MetaTileEntity_Hatch_InputElemental in : eInputHatches) { @@ -181,4 +147,34 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB } } } + + @Override + public String[] getDescription() { + return new String[]{ + CommonValues.TEC_MARK_EM, + translateToLocal("gt.blockmachines.multimachine.em.junction.desc.0"),//Reroutes Matter + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.junction.desc.1")//Axis aligned movement! + }; + } + + @Override + protected void parametersInstantiation_EM() { + src = new Parameters.Group.ParameterIn[10]; + dst = new Parameters.Group.ParameterIn[10]; + for (int i = 0; i < 10; i++) { + Parameters.Group hatch = parametrization.getGroup(i); + src[i] = hatch.makeInParameter(0, i, ROUTE_NAME, SRC_STATUS); + dst[i] = hatch.makeInParameter(1, i, ROUTE_NAME, DST_STATUS); + } + } + + @Override + public void construct(int stackSize, boolean hintsOnly) { + StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), this, hintsOnly); + } + + @Override + public String[] getStructureDescription(int stackSize) { + return description; + } } \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java index ee327bed51..4d65b67ed0 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java @@ -46,7 +46,7 @@ import static net.minecraft.util.StatCollector.translateToLocal; * Created by danie_000 on 17.12.2016. */ public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { - //region Structure + //region structure //use multi A energy inputs, use less power the longer it runs private static final String[][] shape = new String[][]{ {" ", " . ", " ",}, @@ -79,14 +79,6 @@ public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_Multiblock super(aName); } - public final static ResourceLocation activitySound = new ResourceLocation(Reference.MODID + ":fx_mid_freq"); - - @Override - @SideOnly(Side.CLIENT) - protected ResourceLocation getActivitySound() { - return activitySound; - } - @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_EM_quantizer(mName); @@ -97,25 +89,6 @@ public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_Multiblock return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); } - @Override - public void construct(int stackSize, boolean hintsOnly) { - StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), this, hintsOnly); - } - - @Override - public String[] getStructureDescription(int stackSize) { - return description; - } - - @Override - public String[] getDescription() { - return new String[]{ - CommonValues.TEC_MARK_EM, - translateToLocal("gt.blockmachines.multimachine.em.mattertoem.desc.0"),//Conveniently convert regular stuff into quantum form. - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.mattertoem.desc.1")//To make it more inconvenient. - }; - } - @Override public boolean checkRecipe_EM(ItemStack itemStack) {//TODO implement instance quantization if (GregTech_API.sPostloadFinished) { @@ -205,4 +178,31 @@ public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_Multiblock eOutputHatches.get(0).getContainerHandler().putUnifyAll(outputEM[0]); outputEM = null; } + + @Override + public String[] getDescription() { + return new String[]{ + CommonValues.TEC_MARK_EM, + translateToLocal("gt.blockmachines.multimachine.em.mattertoem.desc.0"),//Conveniently convert regular stuff into quantum form. + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.mattertoem.desc.1")//To make it more inconvenient. + }; + } + + public final static ResourceLocation activitySound = new ResourceLocation(Reference.MODID + ":fx_mid_freq"); + + @Override + @SideOnly(Side.CLIENT) + protected ResourceLocation getActivitySound() { + return activitySound; + } + + @Override + public void construct(int stackSize, boolean hintsOnly) { + StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), this, hintsOnly); + } + + @Override + public String[] getStructureDescription(int stackSize) { + return description; + } } \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java index 0a2e06ac7d..0690a30b8b 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java @@ -48,12 +48,14 @@ import static net.minecraft.util.StatCollector.translateToLocal; * Created by danie_000 on 17.12.2016. */ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { + //region variables private final ArrayList eHolders = new ArrayList<>(); private GT_Recipe.GT_Recipe_AssemblyLine tRecipe; private TT_recipe.TT_assLineRecipe aRecipe; private String machineType; private ItemStack holdItem; - private long computationRemaining,computationRequired; + private long computationRemaining, computationRequired; + //endregion //region structure private static final String[][] shape = new String[][]{ @@ -72,7 +74,7 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, Blocks.air}; private static final byte[] blockMetaFallback = new byte[]{1, 0}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA+translateToLocal("tt.keyphrase.Hint_Details") + ":", + EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", "1 - Classic/Data Hatches or Computer casing", "2 - Holder Hatch", }; @@ -86,183 +88,7 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB super(aName); } - @Override - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_EM_research(mName); - } - - @Override - public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - for (GT_MetaTileEntity_Hatch_Holder rack : eHolders) { - if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(rack)) { - rack.getBaseMetaTileEntity().setActive(false); - } - } - eHolders.clear(); - - if (!structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 3, 4)) { - return false; - } - - for (GT_MetaTileEntity_Hatch_Holder rack : eHolders) { - if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(rack)) { - rack.getBaseMetaTileEntity().setActive(iGregTechTileEntity.isActive()); - } - } - return eHolders.size() == 1; - } - - @Override - public void construct(int stackSize, boolean hintsOnly) { - StructureBuilderExtreme(shape, blockType, blockMeta,1, 3, 4, getBaseMetaTileEntity(),this,hintsOnly); - } - - @Override - public String[] getStructureDescription(int stackSize) { - return description; - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - aNBT.setLong("eComputationRemaining",computationRemaining); - aNBT.setLong("eComputationRequired",computationRequired); - if(holdItem!=null) { - aNBT.setTag("eHold", holdItem.writeToNBT(new NBTTagCompound())); - } else { - aNBT.removeTag("eHold"); - } - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - computationRemaining=aNBT.getLong("eComputationRemaining"); - computationRequired=aNBT.getLong("eComputationRequired"); - if(aNBT.hasKey("eHold")) { - holdItem = ItemStack.loadItemStackFromNBT(aNBT.getCompoundTag("eHold")); - } else { - holdItem = null; - } - } - - @Override - public void onFirstTick_EM(IGregTechTileEntity aBaseMetaTileEntity) { - if(aBaseMetaTileEntity.isServerSide()) { - if (computationRemaining > 0) { - aRecipe = null; - tRecipe = null; - if (holdItem != null) { - if (ItemList.Tool_DataStick.isStackEqual(mInventory[1], false, true)) { - for (GT_Recipe.GT_Recipe_AssemblyLine tRecipe : GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes) { - if (GT_Utility.areStacksEqual(tRecipe.mResearchItem, holdItem, true)) { - this.tRecipe = tRecipe; - break; - } - } - } else if (ItemList.Tool_DataOrb.isStackEqual(mInventory[1], false, true)) { - for (TT_recipe.TT_assLineRecipe assRecipeTT : TT_recipe.TT_Recipe_Map.sMachineRecipes.recipeList()) { - if (GT_Utility.areStacksEqual(assRecipeTT.mResearchItem, holdItem, true)) { - aRecipe = assRecipeTT; - machineType = machine; - break; - } - } - if (aRecipe == null) { - for (TT_recipe.TT_assLineRecipe assRecipeTT : TT_recipe.TT_Recipe_Map.sCrafterRecipes.recipeList()) { - if (GT_Utility.areStacksEqual(assRecipeTT.mResearchItem, holdItem, true)) { - aRecipe = assRecipeTT; - machineType = crafter; - break; - } - } - } - } - } - if (tRecipe == null && aRecipe == null) { - holdItem = null; - computationRequired = computationRemaining = 0; - mMaxProgresstime = 0; - mEfficiencyIncrease = 0; - for (GT_MetaTileEntity_Hatch_Holder r : eHolders) { - r.getBaseMetaTileEntity().setActive(false); - } - } - } - } - } - - @Override - public boolean checkRecipe_EM(ItemStack itemStack) { - tRecipe=null; - aRecipe=null; - if(!eHolders.isEmpty() && eHolders.get(0).mInventory[0]!=null) { - holdItem = eHolders.get(0).mInventory[0].copy(); - if(ItemList.Tool_DataStick.isStackEqual(itemStack, false, true)) { - for (GT_Recipe.GT_Recipe_AssemblyLine assRecipe : GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes) { - if (GT_Utility.areStacksEqual(assRecipe.mResearchItem, holdItem, true)) { - tRecipe = assRecipe; - //if found - if (iterateRecipes()) return true; - } - } - }else if(ItemList.Tool_DataOrb.isStackEqual(itemStack, false, true)){ - for (TT_recipe.TT_assLineRecipe assRecipeTT:TT_recipe.TT_Recipe_Map.sMachineRecipes.recipeList()){ - if (GT_Utility.areStacksEqual(assRecipeTT.mResearchItem, holdItem, true)) { - aRecipe = assRecipeTT; - machineType=machine; - //if found - if (iterateRecipes()) return true; - } - } - for (TT_recipe.TT_assLineRecipe assRecipeTT:TT_recipe.TT_Recipe_Map.sCrafterRecipes.recipeList()){ - if (GT_Utility.areStacksEqual(assRecipeTT.mResearchItem, holdItem, true)) { - aRecipe = assRecipeTT; - machineType=crafter; - //if found - if (iterateRecipes()) return true; - } - } - } - } - holdItem=null; - computationRequired=computationRemaining=0; - for (GT_MetaTileEntity_Hatch_Holder r : eHolders) { - r.getBaseMetaTileEntity().setActive(false); - } - return false; - } - - private boolean iterateRecipes() { - for (GT_Recipe ttRecipe : TT_recipe.GT_Recipe_MapTT.sResearchableFakeRecipes.mRecipeList) { - if (GT_Utility.areStacksEqual(ttRecipe.mInputs[0], holdItem, true)) { - computationRequired = computationRemaining = ttRecipe.mDuration * 20L; - mMaxProgresstime = 20; - mEfficiencyIncrease = 10000; - eRequiredData = (short) (ttRecipe.mSpecialValue >>> 16); - eAmpereFlow = (short) (ttRecipe.mSpecialValue & 0xFFFF); - mEUt = ttRecipe.mEUt; - eHolders.get(0).getBaseMetaTileEntity().setActive(true); - return true; - } - } - return false; - } - - @Override - public boolean onRunningTick(ItemStack aStack) { - if(computationRemaining<=0) { - computationRemaining=0; - mProgresstime=mMaxProgresstime; - return true; - }else{ - computationRemaining-=eAvailableData; - mProgresstime=1; - return super.onRunningTick(aStack); - } - } - - private void makeStick(){ + private void makeStick() { mInventory[1].setTagCompound(new NBTTagCompound()); mInventory[1].setStackDisplayName(GT_LanguageManager.getTranslation(tRecipe.mOutput.getDisplayName()) + " Construction Data"); GT_Utility.ItemNBT.setBookTitle(mInventory[1], GT_LanguageManager.getTranslation(tRecipe.mOutput.getDisplayName()) + " Construction Data"); @@ -294,36 +120,37 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB } private static LinkedHashMap lServerNames; + static { try { Class GT_Assemblyline_Server = Class.forName("gregtech.api.util.GT_Assemblyline_Server"); - lServerNames=(LinkedHashMap)GT_Assemblyline_Server.getField("lServerNames").get(null); - }catch (ClassNotFoundException|NoSuchFieldException|IllegalAccessException e){ - lServerNames=null; + lServerNames = (LinkedHashMap) GT_Assemblyline_Server.getField("lServerNames").get(null); + } catch (ClassNotFoundException | NoSuchFieldException | IllegalAccessException e) { + lServerNames = null; } } - private void makeStick2(){ + private void makeStick2() { String s = tRecipe.mOutput.getDisplayName(); if (getBaseMetaTileEntity().isServerSide()) { s = lServerNames.get(tRecipe.mOutput.getDisplayName()); - if (s==null) { + if (s == null) { s = tRecipe.mOutput.getDisplayName(); } } mInventory[1].setTagCompound(new NBTTagCompound()); - mInventory[1].setStackDisplayName(s+" Construction Data"); - GT_Utility.ItemNBT.setBookTitle(mInventory[1], s+" Construction Data"); + mInventory[1].setStackDisplayName(s + " Construction Data"); + GT_Utility.ItemNBT.setBookTitle(mInventory[1], s + " Construction Data"); NBTTagCompound tNBT = mInventory[1].getTagCompound(); tNBT.setTag("output", tRecipe.mOutput.writeToNBT(new NBTTagCompound())); tNBT.setInteger("time", tRecipe.mDuration); tNBT.setInteger("eu", tRecipe.mEUt); - for(int i = 0 ; i < tRecipe.mInputs.length ; i++){ - tNBT.setTag(""+i, tRecipe.mInputs[i].writeToNBT(new NBTTagCompound())); + for (int i = 0; i < tRecipe.mInputs.length; i++) { + tNBT.setTag("" + i, tRecipe.mInputs[i].writeToNBT(new NBTTagCompound())); } - for(int i = 0 ; i < tRecipe.mOreDictAlt.length ; i++){ + for (int i = 0; i < tRecipe.mOreDictAlt.length; i++) { if (tRecipe.mOreDictAlt[i] != null && tRecipe.mOreDictAlt[i].length > 0) { tNBT.setInteger("a" + i, tRecipe.mOreDictAlt[i].length); for (int j = 0; j < tRecipe.mOreDictAlt[i].length; j++) { @@ -331,30 +158,30 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB } } } - for(int i = 0 ; i < tRecipe.mFluidInputs.length ; i++){ - tNBT.setTag("f"+i, tRecipe.mFluidInputs[i].writeToNBT(new NBTTagCompound())); + for (int i = 0; i < tRecipe.mFluidInputs.length; i++) { + tNBT.setTag("f" + i, tRecipe.mFluidInputs[i].writeToNBT(new NBTTagCompound())); } - tNBT.setString("author", EnumChatFormatting.BLUE + "Tec" + EnumChatFormatting.DARK_BLUE + "Tech" + EnumChatFormatting.WHITE + ' ' + machineType+ " Recipe Generator"); + tNBT.setString("author", EnumChatFormatting.BLUE + "Tec" + EnumChatFormatting.DARK_BLUE + "Tech" + EnumChatFormatting.WHITE + ' ' + machineType + " Recipe Generator"); NBTTagList tNBTList = new NBTTagList(); - s=tRecipe.mOutput.getDisplayName(); + s = tRecipe.mOutput.getDisplayName(); if (getBaseMetaTileEntity().isServerSide()) { s = lServerNames.get(tRecipe.mOutput.getDisplayName()); - if (s==null) { + if (s == null) { s = tRecipe.mOutput.getDisplayName(); } } - tNBTList.appendTag(new NBTTagString("Construction plan for "+tRecipe.mOutput.stackSize+" "+s+". Needed EU/t: "+tRecipe.mEUt+" Production time: "+(tRecipe.mDuration/20))); - for(int i=0;i 0) tNBTList.appendTag(new NBTTagString(tBuilder.toString())); - } else if(tRecipe.mInputs[i]!=null){ - s=tRecipe.mInputs[i].getDisplayName(); + } else if (tRecipe.mInputs[i] != null) { + s = tRecipe.mInputs[i].getDisplayName(); if (getBaseMetaTileEntity().isServerSide()) { s = lServerNames.get(tRecipe.mInputs[i].getDisplayName()); - if (s==null) { + if (s == null) { s = tRecipe.mInputs[i].getDisplayName(); } } - tNBTList.appendTag(new NBTTagString("Input Bus "+(i+1)+": "+tRecipe.mInputs[i].stackSize+" "+s)); + tNBTList.appendTag(new NBTTagString("Input Bus " + (i + 1) + ": " + tRecipe.mInputs[i].stackSize + " " + s)); } } - for(int i=0;i>> 16); + eAmpereFlow = (short) (ttRecipe.mSpecialValue & 0xFFFF); + mEUt = ttRecipe.mEUt; + eHolders.get(0).getBaseMetaTileEntity().setActive(true); + return true; + } + } + return false; + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_EM_research(mName); + } + + @Override + public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { + for (GT_MetaTileEntity_Hatch_Holder rack : eHolders) { + if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(rack)) { + rack.getBaseMetaTileEntity().setActive(false); + } + } + eHolders.clear(); + + if (!structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 3, 4)) { + return false; + } + + for (GT_MetaTileEntity_Hatch_Holder rack : eHolders) { + if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(rack)) { + rack.getBaseMetaTileEntity().setActive(iGregTechTileEntity.isActive()); + } + } + return eHolders.size() == 1; + } + + @Override + public boolean checkRecipe_EM(ItemStack itemStack) { + tRecipe = null; + aRecipe = null; + if (!eHolders.isEmpty() && eHolders.get(0).mInventory[0] != null) { + holdItem = eHolders.get(0).mInventory[0].copy(); + if (ItemList.Tool_DataStick.isStackEqual(itemStack, false, true)) { + for (GT_Recipe.GT_Recipe_AssemblyLine assRecipe : GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes) { + if (GT_Utility.areStacksEqual(assRecipe.mResearchItem, holdItem, true)) { + tRecipe = assRecipe; + //if found + if (iterateRecipes()) return true; + } + } + } else if (ItemList.Tool_DataOrb.isStackEqual(itemStack, false, true)) { + for (TT_recipe.TT_assLineRecipe assRecipeTT : TT_recipe.TT_Recipe_Map.sMachineRecipes.recipeList()) { + if (GT_Utility.areStacksEqual(assRecipeTT.mResearchItem, holdItem, true)) { + aRecipe = assRecipeTT; + machineType = machine; + //if found + if (iterateRecipes()) return true; + } + } + for (TT_recipe.TT_assLineRecipe assRecipeTT : TT_recipe.TT_Recipe_Map.sCrafterRecipes.recipeList()) { + if (GT_Utility.areStacksEqual(assRecipeTT.mResearchItem, holdItem, true)) { + aRecipe = assRecipeTT; + machineType = crafter; + //if found + if (iterateRecipes()) return true; + } + } + } + } + holdItem = null; + computationRequired = computationRemaining = 0; + for (GT_MetaTileEntity_Hatch_Holder r : eHolders) { + r.getBaseMetaTileEntity().setActive(false); + } + return false; + } + @Override public void outputAfterRecipe_EM() { - if(!eHolders.isEmpty()) { - if (tRecipe != null && ItemList.Tool_DataStick.isStackEqual(mInventory[1], false, true)){ + if (!eHolders.isEmpty()) { + if (tRecipe != null && ItemList.Tool_DataStick.isStackEqual(mInventory[1], false, true)) { eHolders.get(0).getBaseMetaTileEntity().setActive(false); eHolders.get(0).mInventory[0] = null; if (lServerNames == null) { @@ -402,40 +312,74 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB } else { try { makeStick2(); - }catch (NoSuchFieldError e){ + } catch (NoSuchFieldError e) { makeStick(); } } - }else if (aRecipe != null && ItemList.Tool_DataOrb.isStackEqual(mInventory[1], false, true)) { + } else if (aRecipe != null && ItemList.Tool_DataOrb.isStackEqual(mInventory[1], false, true)) { eHolders.get(0).getBaseMetaTileEntity().setActive(false); eHolders.get(0).mInventory[0] = null; - mInventory[1].setStackDisplayName(GT_LanguageManager.getTranslation(aRecipe.mOutputs[0].getDisplayName()) + ' ' + machineType +" Construction Data"); + mInventory[1].setStackDisplayName(GT_LanguageManager.getTranslation(aRecipe.mOutputs[0].getDisplayName()) + ' ' + machineType + " Construction Data"); NBTTagCompound tNBT = mInventory[1].getTagCompound();//code above makes it not null tNBT.setString("eMachineType", machineType); - GameRegistry.UniqueIdentifier uid=GameRegistry.findUniqueIdentifierFor(aRecipe.mOutputs[0].getItem()); - tNBT.setString(E_RECIPE_ID, uid+":"+aRecipe.mOutputs[0].getItemDamage()); - tNBT.setString("author", EnumChatFormatting.BLUE + "Tec" + EnumChatFormatting.DARK_BLUE + "Tech" + EnumChatFormatting.WHITE + ' ' + machineType+ " Recipe Generator"); + GameRegistry.UniqueIdentifier uid = GameRegistry.findUniqueIdentifierFor(aRecipe.mOutputs[0].getItem()); + tNBT.setString(E_RECIPE_ID, uid + ":" + aRecipe.mOutputs[0].getItemDamage()); + tNBT.setString("author", EnumChatFormatting.BLUE + "Tec" + EnumChatFormatting.DARK_BLUE + "Tech" + EnumChatFormatting.WHITE + ' ' + machineType + " Recipe Generator"); } } - computationRequired=computationRemaining=0; - tRecipe=null; - aRecipe=null; - holdItem=null; + computationRequired = computationRemaining = 0; + tRecipe = null; + aRecipe = null; + holdItem = null; } @Override - protected void extraExplosions_EM() { - for (MetaTileEntity tTileEntity : eHolders) { - tTileEntity.getBaseMetaTileEntity().doExplosion(V[9]); - } + public String[] getDescription() { + return new String[]{ + CommonValues.TEC_MARK_EM, + "Philosophers didn't even...", + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "dream about it!" + }; } - //@Override - //public boolean isFacingValid(byte aFacing) { - // return aFacing >= 2; - //} + @Override + public String[] getInfoData() { + long storedEnergy = 0; + long maxEnergy = 0; + for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) { + if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { + storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU(); + maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity(); + } + } + for (GT_MetaTileEntity_Hatch_EnergyMulti tHatch : eEnergyMulti) { + if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { + storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU(); + maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity(); + } + } + + return new String[]{ + "Energy Hatches:", + EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET + " EU / " + + EnumChatFormatting.YELLOW + maxEnergy + EnumChatFormatting.RESET + " EU", + (mEUt <= 0 ? "Probably uses: " : "Probably makes: ") + + EnumChatFormatting.RED + Math.abs(mEUt) + EnumChatFormatting.RESET + " EU/t at " + + EnumChatFormatting.RED + eAmpereFlow + EnumChatFormatting.RESET + " A", + "Tier Rating: " + EnumChatFormatting.YELLOW + VN[getMaxEnergyInputTier_EM()] + EnumChatFormatting.RESET + " / " + EnumChatFormatting.GREEN + VN[getMinEnergyInputTier_EM()] + EnumChatFormatting.RESET + + " Amp Rating: " + EnumChatFormatting.GREEN + eMaxAmpereFlow + EnumChatFormatting.RESET + " A", + "Problems: " + EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + + " Efficiency: " + EnumChatFormatting.YELLOW + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", + "PowerPass: " + EnumChatFormatting.BLUE + ePowerPass + EnumChatFormatting.RESET + + " SafeVoid: " + EnumChatFormatting.BLUE + eSafeVoid, + "Computation Available: " + EnumChatFormatting.GREEN + eAvailableData + EnumChatFormatting.RESET, + "Computation Remaining:", + EnumChatFormatting.GREEN + Long.toString(computationRemaining / 20L) + EnumChatFormatting.RESET + " / " + + EnumChatFormatting.YELLOW + computationRequired / 20L + }; + } @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { @@ -445,16 +389,6 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][3]}; } - @Override - public String[] getDescription() { - return new String[]{ - CommonValues.TEC_MARK_EM, - "Philosophers didn't even...", - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "dream about it!" - }; - } - - @Override public void onRemoval() { super.onRemoval(); @@ -463,19 +397,113 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB } } + @Override + protected void extraExplosions_EM() { + for (MetaTileEntity tTileEntity : eHolders) { + tTileEntity.getBaseMetaTileEntity().doExplosion(V[9]); + } + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setLong("eComputationRemaining", computationRemaining); + aNBT.setLong("eComputationRequired", computationRequired); + if (holdItem != null) { + aNBT.setTag("eHold", holdItem.writeToNBT(new NBTTagCompound())); + } else { + aNBT.removeTag("eHold"); + } + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + computationRemaining = aNBT.getLong("eComputationRemaining"); + computationRequired = aNBT.getLong("eComputationRequired"); + if (aNBT.hasKey("eHold")) { + holdItem = ItemStack.loadItemStackFromNBT(aNBT.getCompoundTag("eHold")); + } else { + holdItem = null; + } + } + @Override public void stopMachine() { super.stopMachine(); for (GT_MetaTileEntity_Hatch_Holder r : eHolders) { r.getBaseMetaTileEntity().setActive(false); } - computationRequired=computationRemaining=0; - tRecipe=null; - aRecipe=null; - holdItem=null; + computationRequired = computationRemaining = 0; + tRecipe = null; + aRecipe = null; + holdItem = null; + } + + //@Override + //public boolean isFacingValid(byte aFacing) { + // return aFacing >= 2; + //} + + @Override + public void onFirstTick_EM(IGregTechTileEntity aBaseMetaTileEntity) { + if (aBaseMetaTileEntity.isServerSide()) { + if (computationRemaining > 0) { + aRecipe = null; + tRecipe = null; + if (holdItem != null) { + if (ItemList.Tool_DataStick.isStackEqual(mInventory[1], false, true)) { + for (GT_Recipe.GT_Recipe_AssemblyLine tRecipe : GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes) { + if (GT_Utility.areStacksEqual(tRecipe.mResearchItem, holdItem, true)) { + this.tRecipe = tRecipe; + break; + } + } + } else if (ItemList.Tool_DataOrb.isStackEqual(mInventory[1], false, true)) { + for (TT_recipe.TT_assLineRecipe assRecipeTT : TT_recipe.TT_Recipe_Map.sMachineRecipes.recipeList()) { + if (GT_Utility.areStacksEqual(assRecipeTT.mResearchItem, holdItem, true)) { + aRecipe = assRecipeTT; + machineType = machine; + break; + } + } + if (aRecipe == null) { + for (TT_recipe.TT_assLineRecipe assRecipeTT : TT_recipe.TT_Recipe_Map.sCrafterRecipes.recipeList()) { + if (GT_Utility.areStacksEqual(assRecipeTT.mResearchItem, holdItem, true)) { + aRecipe = assRecipeTT; + machineType = crafter; + break; + } + } + } + } + } + if (tRecipe == null && aRecipe == null) { + holdItem = null; + computationRequired = computationRemaining = 0; + mMaxProgresstime = 0; + mEfficiencyIncrease = 0; + for (GT_MetaTileEntity_Hatch_Holder r : eHolders) { + r.getBaseMetaTileEntity().setActive(false); + } + } + } + } + } + + @Override + public boolean onRunningTick(ItemStack aStack) { + if (computationRemaining <= 0) { + computationRemaining = 0; + mProgresstime = mMaxProgresstime; + return true; + } else { + computationRemaining -= eAvailableData; + mProgresstime = 1; + return super.onRunningTick(aStack); + } } - //NEW METHOD public final boolean addHolderToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { if (aTileEntity == null) { return false; @@ -497,39 +525,12 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB } @Override - public String[] getInfoData() { - long storedEnergy = 0; - long maxEnergy = 0; - for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) { - if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { - storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU(); - maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity(); - } - } - for (GT_MetaTileEntity_Hatch_EnergyMulti tHatch : eEnergyMulti) { - if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { - storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU(); - maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity(); - } - } + public void construct(int stackSize, boolean hintsOnly) { + StructureBuilderExtreme(shape, blockType, blockMeta, 1, 3, 4, getBaseMetaTileEntity(), this, hintsOnly); + } - return new String[]{ - "Energy Hatches:", - EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET + " EU / " + - EnumChatFormatting.YELLOW + maxEnergy + EnumChatFormatting.RESET + " EU", - (mEUt <= 0 ? "Probably uses: " : "Probably makes: ") + - EnumChatFormatting.RED + Math.abs(mEUt) + EnumChatFormatting.RESET + " EU/t at " + - EnumChatFormatting.RED + eAmpereFlow + EnumChatFormatting.RESET + " A", - "Tier Rating: " + EnumChatFormatting.YELLOW + VN[getMaxEnergyInputTier_EM()] + EnumChatFormatting.RESET + " / " + EnumChatFormatting.GREEN + VN[getMinEnergyInputTier_EM()] + EnumChatFormatting.RESET + - " Amp Rating: " + EnumChatFormatting.GREEN + eMaxAmpereFlow + EnumChatFormatting.RESET + " A", - "Problems: " + EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + - " Efficiency: " + EnumChatFormatting.YELLOW + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", - "PowerPass: " + EnumChatFormatting.BLUE + ePowerPass + EnumChatFormatting.RESET + - " SafeVoid: " + EnumChatFormatting.BLUE + eSafeVoid, - "Computation Available: " + EnumChatFormatting.GREEN + eAvailableData + EnumChatFormatting.RESET, - "Computation Remaining:", - EnumChatFormatting.GREEN + Long.toString(computationRemaining / 20L) + EnumChatFormatting.RESET + " / " + - EnumChatFormatting.YELLOW + computationRequired / 20L - }; + @Override + public String[] getStructureDescription(int stackSize) { + return description; } -} +} \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java index a7f4c84f41..20ba5eb57f 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java @@ -13,12 +13,7 @@ import com.github.technus.tectech.thing.block.QuantumStuffBlock; import com.github.technus.tectech.thing.item.ElementalDefinitionScanStorage_EM; import com.github.technus.tectech.thing.metaTileEntity.IConstructable; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.IHatchAdder; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.INameFunction; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.IStatusFunction; +import com.github.technus.tectech.thing.metaTileEntity.multi.base.*; import gregtech.api.enums.ItemList; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -51,6 +46,7 @@ import static net.minecraft.util.StatCollector.translateToLocal; * Created by danie_000 on 17.12.2016. */ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { + //region variables public static final int SCAN_DO_NOTHING = 0, SCAN_GET_NOMENCLATURE = 1, SCAN_GET_DEPTH_LEVEL = 2, SCAN_GET_AMOUNT = 4, SCAN_GET_CHARGE = 8, SCAN_GET_MASS = 16, SCAN_GET_ENERGY_LEVEL = 32, SCAN_GET_TIMESPAN_INFO = 64, SCAN_GET_ENERGY_STATES = 128, @@ -62,23 +58,6 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa private String machineType; private long totalComputationRemaining, totalComputationRequired; private int[] scanComplexity; - - //region parameters - private static final INameFunction CONFIG_NAME = - (base, p) -> "Config at Depth: " + (p.hatchId() * 2 + p.parameterId()); - private static final IStatusFunction CONFIG_STATUS = - (base, p) -> { - double v = p.get(); - if (Double.isNaN(v)) { - return LedStatus.STATUS_WRONG; - } - v = (int) v; - if (v == 0) return LedStatus.STATUS_NEUTRAL; - if (v >= SCAN_GET_CLASS_TYPE) return LedStatus.STATUS_TOO_HIGH; - if (v < 0) return LedStatus.STATUS_TOO_LOW; - return LedStatus.STATUS_OK; - }; - protected Parameters.Group.ParameterIn[] scanConfiguration; //endregion //region structure @@ -111,6 +90,24 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa }; //endregion + //region parameters + private static final INameFunction CONFIG_NAME = + (base, p) -> "Config at Depth: " + (p.hatchId() * 2 + p.parameterId()); + private static final IStatusFunction CONFIG_STATUS = + (base, p) -> { + double v = p.get(); + if (Double.isNaN(v)) { + return LedStatus.STATUS_WRONG; + } + v = (int) v; + if (v == 0) return LedStatus.STATUS_NEUTRAL; + if (v >= SCAN_GET_CLASS_TYPE) return LedStatus.STATUS_TOO_HIGH; + if (v < 0) return LedStatus.STATUS_TOO_LOW; + return LedStatus.STATUS_OK; + }; + protected Parameters.Group.ParameterIn[] scanConfiguration; + //endregion + public GT_MetaTileEntity_EM_scanner(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); eDismantleBoom = true; @@ -121,135 +118,93 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa eDismantleBoom = true; } - @Override - protected void parametersInstantiation_EM() { - scanConfiguration = new Parameters.Group.ParameterIn[20]; - for (int i = 0; i < 10; i++) { - Parameters.Group hatch = parametrization.getGroup(i); - scanConfiguration[i * 2] = hatch.makeInParameter(0, 0, CONFIG_NAME, CONFIG_STATUS); - scanConfiguration[i * 2 + 1] = hatch.makeInParameter(1, 0, CONFIG_NAME, CONFIG_STATUS); + private void quantumStuff(boolean shouldExist) { + IGregTechTileEntity base = getBaseMetaTileEntity(); + if (base != null && base.getWorld() != null) { + int xDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetX * 4 + base.getXCoord(); + int yDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetY * 4 + base.getYCoord(); + int zDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetZ * 4 + base.getZCoord(); + Block block = base.getWorld().getBlock(xDir, yDir, zDir); + if (shouldExist) { + if (block != null && block.getMaterial() == Material.air) { + base.getWorld().setBlock(xDir, yDir, zDir, QuantumStuffBlock.INSTANCE, 0, 2); + } + } else { + if (block instanceof QuantumStuffBlock) { + base.getWorld().setBlock(xDir, yDir, zDir, Blocks.air, 0, 2); + } + } } } - @Override - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_EM_scanner(mName); - } + private void addComputationRequirements(int depthPlus, int capabilities) { + if (areBitsSet(SCAN_GET_NOMENCLATURE, capabilities)) { + totalComputationRequired += depthPlus * 5L; + eRequiredData += depthPlus; + } + if (areBitsSet(SCAN_GET_DEPTH_LEVEL, capabilities)) { + totalComputationRequired += depthPlus * 10L; + eRequiredData += depthPlus; - @Override - public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - if (!structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0)) { - return false; } - return eInputHatches.size() == 1 && eOutputHatches.size() == 1 && eOutputHatches.get(0).getBaseMetaTileEntity().getFrontFacing() == iGregTechTileEntity.getFrontFacing(); - } + if (areBitsSet(SCAN_GET_AMOUNT, capabilities)) { + totalComputationRequired += depthPlus * 64L; + eRequiredData += depthPlus * 8L; - @Override - public void construct(int stackSize, boolean hintsOnly) { - StructureBuilderExtreme(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), this, hintsOnly); - } + } + if (areBitsSet(SCAN_GET_CHARGE, capabilities)) { + totalComputationRequired += depthPlus * 128L; + eRequiredData += depthPlus * 4L; - @Override - public String[] getStructureDescription(int stackSize) { - return description; - } + } + if (areBitsSet(SCAN_GET_MASS, capabilities)) { + totalComputationRequired += depthPlus * 256L; + eRequiredData += depthPlus * 4L; - @Override - public String[] getDescription() { - return new String[]{ - CommonValues.TEC_MARK_EM, - "",//What is existing here? - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + ""//I HAVE NO IDEA (yet)! - }; - } + } + if (areBitsSet(SCAN_GET_ENERGY_LEVEL, capabilities)) { + totalComputationRequired += depthPlus * 512L; + eRequiredData += depthPlus * 16L; - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - aNBT.setLong("eComputationRemaining", totalComputationRemaining); - aNBT.setLong("eComputationRequired", totalComputationRequired); - if (objectResearched != null) { - aNBT.setTag("eObject", objectResearched.toNBT()); - } else { - aNBT.removeTag("eObject"); } - if (scanComplexity != null) { - aNBT.setIntArray("eScanComplexity", scanComplexity); - } else { - aNBT.removeTag("eScanComplexity"); + if (areBitsSet(SCAN_GET_TIMESPAN_INFO, capabilities)) { + totalComputationRequired += depthPlus * 1024L; + eRequiredData += depthPlus * 32L; + } - if (objectsScanned != null) { - aNBT.setTag("eScanObjects", objectsScanned.toNBT()); - } else { - aNBT.removeTag("eScanObjects"); + if (areBitsSet(SCAN_GET_ENERGY_STATES, capabilities)) { + totalComputationRequired += depthPlus * 2048L; + eRequiredData += depthPlus * 32L; + } - } + if (areBitsSet(SCAN_GET_COLOR, capabilities)) { + totalComputationRequired += depthPlus * 1024L; + eRequiredData += depthPlus * 48L; - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - totalComputationRemaining = aNBT.getLong("eComputationRemaining"); - totalComputationRequired = aNBT.getLong("eComputationRequired"); - if (aNBT.hasKey("eObject")) { - objectResearched = cElementalDefinitionStack.fromNBT(aNBT.getCompoundTag("eObject")); - if (objectResearched.definition == nbtE__) { - objectResearched = null; - } - } else { - objectResearched = null; } - if (aNBT.hasKey("eScanComplexity")) { - scanComplexity = aNBT.getIntArray("eScanComplexity"); - } else { - scanComplexity = null; + if (areBitsSet(SCAN_GET_AGE, capabilities)) { + totalComputationRequired += depthPlus * 2048L; + eRequiredData += depthPlus * 64L; + } - try { - if (aNBT.hasKey("eScanObjects")) { - objectsScanned = cElementalInstanceStackMap.fromNBT(aNBT.getCompoundTag("eScanObjects")); - } - } catch (tElementalException e) { - objectsScanned = new cElementalInstanceStackMap(); + if (areBitsSet(SCAN_GET_TIMESPAN_MULT, capabilities)) { + totalComputationRequired += depthPlus * 2048L; + eRequiredData += depthPlus * 64L; + } } @Override - public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if (aBaseMetaTileEntity.isActive() && (aTick & 0x2) == 0 && aBaseMetaTileEntity.isClientSide()) { - int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 4 + aBaseMetaTileEntity.getXCoord(); - int yDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetY * 4 + aBaseMetaTileEntity.getYCoord(); - int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 4 + aBaseMetaTileEntity.getZCoord(); - aBaseMetaTileEntity.getWorld().markBlockRangeForRenderUpdate(xDir, yDir, zDir, xDir, yDir, zDir); - } + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_EM_scanner(mName); } @Override - public void onFirstTick_EM(IGregTechTileEntity aBaseMetaTileEntity) { - if (aBaseMetaTileEntity.isServerSide()) { - if (totalComputationRemaining > 0 && objectResearched != null) { - eRecipe = null; - if (ItemList.Tool_DataOrb.isStackEqual(mInventory[1], false, true)) { - eRecipe = TT_recipe.TT_Recipe_Map_EM.sMachineRecipesEM.findRecipe(objectResearched.definition); - if (eRecipe != null) { - machineType = machine; - } else { - eRecipe = TT_recipe.TT_Recipe_Map_EM.sCrafterRecipesEM.findRecipe(objectResearched.definition); - if (eRecipe != null) { - machineType = crafter; - } - } - } - if (eRecipe == null) { - quantumStuff(false); - objectResearched = null; - eRequiredData = 0; - totalComputationRequired = totalComputationRemaining = 0; - mMaxProgresstime = 0; - mEfficiencyIncrease = 0; - } else { - quantumStuff(true); - } - } + public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { + if (!structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0)) { + return false; } + return eInputHatches.size() == 1 && eOutputHatches.size() == 1 && eOutputHatches.get(0).getBaseMetaTileEntity().getFrontFacing() == iGregTechTileEntity.getFrontFacing(); } @Override @@ -338,76 +293,6 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa return false; } - private void addComputationRequirements(int depthPlus, int capabilities) { - if (areBitsSet(SCAN_GET_NOMENCLATURE, capabilities)) { - totalComputationRequired += depthPlus * 5L; - eRequiredData += depthPlus; - } - if (areBitsSet(SCAN_GET_DEPTH_LEVEL, capabilities)) { - totalComputationRequired += depthPlus * 10L; - eRequiredData += depthPlus; - - } - if (areBitsSet(SCAN_GET_AMOUNT, capabilities)) { - totalComputationRequired += depthPlus * 64L; - eRequiredData += depthPlus * 8L; - - } - if (areBitsSet(SCAN_GET_CHARGE, capabilities)) { - totalComputationRequired += depthPlus * 128L; - eRequiredData += depthPlus * 4L; - - } - if (areBitsSet(SCAN_GET_MASS, capabilities)) { - totalComputationRequired += depthPlus * 256L; - eRequiredData += depthPlus * 4L; - - } - if (areBitsSet(SCAN_GET_ENERGY_LEVEL, capabilities)) { - totalComputationRequired += depthPlus * 512L; - eRequiredData += depthPlus * 16L; - - } - if (areBitsSet(SCAN_GET_TIMESPAN_INFO, capabilities)) { - totalComputationRequired += depthPlus * 1024L; - eRequiredData += depthPlus * 32L; - - } - if (areBitsSet(SCAN_GET_ENERGY_STATES, capabilities)) { - totalComputationRequired += depthPlus * 2048L; - eRequiredData += depthPlus * 32L; - - } - if (areBitsSet(SCAN_GET_COLOR, capabilities)) { - totalComputationRequired += depthPlus * 1024L; - eRequiredData += depthPlus * 48L; - - } - if (areBitsSet(SCAN_GET_AGE, capabilities)) { - totalComputationRequired += depthPlus * 2048L; - eRequiredData += depthPlus * 64L; - - } - if (areBitsSet(SCAN_GET_TIMESPAN_MULT, capabilities)) { - totalComputationRequired += depthPlus * 2048L; - eRequiredData += depthPlus * 64L; - - } - } - - @Override - public boolean onRunningTick(ItemStack aStack) { - if (totalComputationRemaining <= 0) { - totalComputationRemaining = 0; - mProgresstime = mMaxProgresstime; - return true; - } else { - totalComputationRemaining -= eAvailableData; - mProgresstime = 1; - return super.onRunningTick(aStack); - } - } - @Override public void outputAfterRecipe_EM() { if (eRecipe != null && ItemList.Tool_DataOrb.isStackEqual(mInventory[1], false, true)) { @@ -427,8 +312,12 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa } @Override - public int getInventoryStackLimit() { - return 1; + public String[] getDescription() { + return new String[]{ + CommonValues.TEC_MARK_EM, + "",//What is existing here? + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + ""//I HAVE NO IDEA (yet)! + }; } @Override @@ -474,6 +363,65 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa super.onRemoval(); } + @Override + protected void parametersInstantiation_EM() { + scanConfiguration = new Parameters.Group.ParameterIn[20]; + for (int i = 0; i < 10; i++) { + Parameters.Group hatch = parametrization.getGroup(i); + scanConfiguration[i * 2] = hatch.makeInParameter(0, 0, CONFIG_NAME, CONFIG_STATUS); + scanConfiguration[i * 2 + 1] = hatch.makeInParameter(1, 0, CONFIG_NAME, CONFIG_STATUS); + } + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setLong("eComputationRemaining", totalComputationRemaining); + aNBT.setLong("eComputationRequired", totalComputationRequired); + if (objectResearched != null) { + aNBT.setTag("eObject", objectResearched.toNBT()); + } else { + aNBT.removeTag("eObject"); + } + if (scanComplexity != null) { + aNBT.setIntArray("eScanComplexity", scanComplexity); + } else { + aNBT.removeTag("eScanComplexity"); + } + if (objectsScanned != null) { + aNBT.setTag("eScanObjects", objectsScanned.toNBT()); + } else { + aNBT.removeTag("eScanObjects"); + } + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + totalComputationRemaining = aNBT.getLong("eComputationRemaining"); + totalComputationRequired = aNBT.getLong("eComputationRequired"); + if (aNBT.hasKey("eObject")) { + objectResearched = cElementalDefinitionStack.fromNBT(aNBT.getCompoundTag("eObject")); + if (objectResearched.definition == nbtE__) { + objectResearched = null; + } + } else { + objectResearched = null; + } + if (aNBT.hasKey("eScanComplexity")) { + scanComplexity = aNBT.getIntArray("eScanComplexity"); + } else { + scanComplexity = null; + } + try { + if (aNBT.hasKey("eScanObjects")) { + objectsScanned = cElementalInstanceStackMap.fromNBT(aNBT.getCompoundTag("eScanObjects")); + } + } catch (tElementalException e) { + objectsScanned = new cElementalInstanceStackMap(); + } + } + @Override public void stopMachine() { quantumStuff(false); @@ -483,22 +431,71 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa } - private void quantumStuff(boolean shouldExist) { - IGregTechTileEntity base = getBaseMetaTileEntity(); - if (base != null && base.getWorld() != null) { - int xDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetX * 4 + base.getXCoord(); - int yDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetY * 4 + base.getYCoord(); - int zDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetZ * 4 + base.getZCoord(); - Block block = base.getWorld().getBlock(xDir, yDir, zDir); - if (shouldExist) { - if (block != null && block.getMaterial() == Material.air) { - base.getWorld().setBlock(xDir, yDir, zDir, QuantumStuffBlock.INSTANCE, 0, 2); + @Override + public void onFirstTick_EM(IGregTechTileEntity aBaseMetaTileEntity) { + if (aBaseMetaTileEntity.isServerSide()) { + if (totalComputationRemaining > 0 && objectResearched != null) { + eRecipe = null; + if (ItemList.Tool_DataOrb.isStackEqual(mInventory[1], false, true)) { + eRecipe = TT_recipe.TT_Recipe_Map_EM.sMachineRecipesEM.findRecipe(objectResearched.definition); + if (eRecipe != null) { + machineType = machine; + } else { + eRecipe = TT_recipe.TT_Recipe_Map_EM.sCrafterRecipesEM.findRecipe(objectResearched.definition); + if (eRecipe != null) { + machineType = crafter; + } + } } - } else { - if (block instanceof QuantumStuffBlock) { - base.getWorld().setBlock(xDir, yDir, zDir, Blocks.air, 0, 2); + if (eRecipe == null) { + quantumStuff(false); + objectResearched = null; + eRequiredData = 0; + totalComputationRequired = totalComputationRemaining = 0; + mMaxProgresstime = 0; + mEfficiencyIncrease = 0; + } else { + quantumStuff(true); } } } } + + @Override + public boolean onRunningTick(ItemStack aStack) { + if (totalComputationRemaining <= 0) { + totalComputationRemaining = 0; + mProgresstime = mMaxProgresstime; + return true; + } else { + totalComputationRemaining -= eAvailableData; + mProgresstime = 1; + return super.onRunningTick(aStack); + } + } + + @Override + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if (aBaseMetaTileEntity.isActive() && (aTick & 0x2) == 0 && aBaseMetaTileEntity.isClientSide()) { + int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 4 + aBaseMetaTileEntity.getXCoord(); + int yDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetY * 4 + aBaseMetaTileEntity.getYCoord(); + int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 4 + aBaseMetaTileEntity.getZCoord(); + aBaseMetaTileEntity.getWorld().markBlockRangeForRenderUpdate(xDir, yDir, zDir, xDir, yDir, zDir); + } + } + + @Override + public int getInventoryStackLimit() { + return 1; + } + + @Override + public void construct(int stackSize, boolean hintsOnly) { + StructureBuilderExtreme(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), this, hintsOnly); + } + + @Override + public String[] getStructureDescription(int stackSize) { + return description; + } } \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java index 30794ca47e..a51e8a781f 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java @@ -21,20 +21,20 @@ import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBloc public class GT_MetaTileEntity_EM_stabilizer extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { //region structure private static final String[][] shape = new String[][]{ - {"A010","0 0","1 . 1","0 0","A010",}, - {"23232","32223","22222","32223","23232",}, - {"12!21","22422","!444!","22422","12!21",}, - {"23232","32223","22222","32223","23232",}, - {"A010","0 0","1 1","0 0","A010",}, + {"A010", "0 0", "1 . 1", "0 0", "A010",}, + {"23232", "32223", "22222", "32223", "23232",}, + {"12!21", "22422", "!444!", "22422", "12!21",}, + {"23232", "32223", "22222", "32223", "23232",}, + {"A010", "0 0", "1 1", "0 0", "A010",}, }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT ,sBlockCasingsTT, sBlockCasingsTT}; + private static final Block[] blockType = new Block[]{sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMeta = new byte[]{4, 0, 5, 6, 9}; private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addClassicToMachineList, this::addElementalToMachineList}; private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0, 4}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA+"Hint Details:", + EnumChatFormatting.AQUA + "Hint Details:", "1 - Classic Hatches or High Power Casing", "2 - Elemental Hatches or Molecular Casing", }; @@ -58,16 +58,6 @@ public class GT_MetaTileEntity_EM_stabilizer extends GT_MetaTileEntity_Multibloc return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0); } - @Override - public void construct(int stackSize, boolean hintsOnly) { - StructureBuilderExtreme(shape, blockType, blockMeta,2, 2, 0, getBaseMetaTileEntity(),this,hintsOnly); - } - - @Override - public String[] getStructureDescription(int stackSize) { - return description; - } - @Override public String[] getDescription() { return new String[]{ @@ -76,4 +66,14 @@ public class GT_MetaTileEntity_EM_stabilizer extends GT_MetaTileEntity_Multibloc EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Wibbly wobbly timey wimey, stuff." }; } -} + + @Override + public void construct(int stackSize, boolean hintsOnly) { + StructureBuilderExtreme(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), this, hintsOnly); + } + + @Override + public String[] getStructureDescription(int stackSize) { + return description; + } +} \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java index 933e266781..795349c50c 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java @@ -32,7 +32,7 @@ import static net.minecraft.util.StatCollector.translateToLocal; * Created by danie_000 on 17.12.2016. */ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { - //region Structure + //region structure private static final String[][] shape = new String[][]{ {" ", " . ", " ",}, {" ", " 0 ", " ",}, @@ -86,53 +86,16 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas super(aName); } - @Override - protected void parametersInstantiation_EM() { - dst = new Parameters.Group.ParameterIn[10]; - weight = new Parameters.Group.ParameterIn[10]; - for (int i = 0; i < 10; i++) { - Parameters.Group hatch = parametrization.getGroup(i); - dst[i] = hatch.makeInParameter(0, i, ROUTE_NAME, DST_STATUS); - weight[i] = hatch.makeInParameter(1, 0, ROUTE_NAME, WEI_STATUS); - } - } - - public final static ResourceLocation activitySound = new ResourceLocation(Reference.MODID + ":fx_hi_freq"); - - @Override - @SideOnly(Side.CLIENT) - protected ResourceLocation getActivitySound() { - return activitySound; - } - @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_EM_switch(mName); } - @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][1], new TT_RenderedTexture(aActive ? GT_MetaTileEntity_MultiblockBase_EM.ScreenON : GT_MetaTileEntity_MultiblockBase_EM.ScreenOFF)}; - } - return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][1]}; - } - @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); } - @Override - public void construct(int stackSize, boolean hintsOnly) { - StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), this, hintsOnly); - } - - @Override - public String[] getStructureDescription(int stackSize) { - return description; - } - @Override public boolean checkRecipe_EM(ItemStack itemStack) { short thingsActive = 0; @@ -224,4 +187,41 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.switch.desc.1")//Quality of service is a must }; } + + @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][1], new TT_RenderedTexture(aActive ? GT_MetaTileEntity_MultiblockBase_EM.ScreenON : GT_MetaTileEntity_MultiblockBase_EM.ScreenOFF)}; + } + return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][1]}; + } + + public final static ResourceLocation activitySound = new ResourceLocation(Reference.MODID + ":fx_hi_freq"); + + @Override + @SideOnly(Side.CLIENT) + protected ResourceLocation getActivitySound() { + return activitySound; + } + + @Override + protected void parametersInstantiation_EM() { + dst = new Parameters.Group.ParameterIn[10]; + weight = new Parameters.Group.ParameterIn[10]; + for (int i = 0; i < 10; i++) { + Parameters.Group hatch = parametrization.getGroup(i); + dst[i] = hatch.makeInParameter(0, i, ROUTE_NAME, DST_STATUS); + weight[i] = hatch.makeInParameter(1, 0, ROUTE_NAME, WEI_STATUS); + } + } + + @Override + public void construct(int stackSize, boolean hintsOnly) { + StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), this, hintsOnly); + } + + @Override + public String[] getStructureDescription(int stackSize) { + return description; + } } \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java index f02b41d9ce..1a3bebf59b 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java @@ -31,7 +31,7 @@ import static net.minecraft.util.StatCollector.translateToLocal; * Created by danie_000 on 17.12.2016. */ public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { - //region Structure + //region structure private static final String[][] shape = new String[][]{ {" ", " . ", " ",}, {" ", " 0 ", " ",}, @@ -71,14 +71,6 @@ public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_Multiblo eDismantleBoom = true; } - public final static ResourceLocation activitySound = new ResourceLocation(Reference.MODID + ":fx_noise"); - - @Override - @SideOnly(Side.CLIENT) - protected ResourceLocation getActivitySound() { - return activitySound; - } - @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_EM_transformer(mName); @@ -90,8 +82,27 @@ public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_Multiblo } @Override - public void construct(int stackSize, boolean hintsOnly) { - StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), this, hintsOnly); + public boolean checkRecipe_EM(ItemStack itemStack) { + if (ePowerPass) { + mEfficiencyIncrease = 10000; + mMaxProgresstime = 20; + } else { + mEfficiencyIncrease = 0; + mMaxProgresstime = 0; + } + eAmpereFlow = 0; + mEUt = 0; + return ePowerPass; + } + + @Override + public String[] getDescription() { + return new String[]{ + CommonValues.TEC_MARK_GENERAL, + translateToLocal("gt.blockmachines.multimachine.em.transformer.desc.0"),//Power substation + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.transformer.desc.1"),//All the transformation! + EnumChatFormatting.BLUE + translateToLocal("gt.blockmachines.multimachine.em.transformer.desc.2"),//Only 0.78125% power loss, HAYO! + }; } @Override @@ -104,11 +115,6 @@ public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_Multiblo return new GT_GUIContainer_MultiMachineEM(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "EMDisplay.png", true, false, false); } - @Override - public String[] getStructureDescription(int stackSize) { - return description; - } - @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { if (aSide == aFacing) { @@ -117,32 +123,21 @@ public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_Multiblo return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][0]}; } + public final static ResourceLocation activitySound = new ResourceLocation(Reference.MODID + ":fx_noise"); + @Override - public String[] getDescription() { - return new String[]{ - CommonValues.TEC_MARK_GENERAL, - translateToLocal("gt.blockmachines.multimachine.em.transformer.desc.0"),//Power substation - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.transformer.desc.1"),//All the transformation! - EnumChatFormatting.BLUE + translateToLocal("gt.blockmachines.multimachine.em.transformer.desc.2"),//Only 0.78125% power loss, HAYO! - }; + @SideOnly(Side.CLIENT) + protected ResourceLocation getActivitySound() { + return activitySound; } @Override - public boolean checkRecipe_EM(ItemStack itemStack) { - if (ePowerPass) { - mEfficiencyIncrease = 10000; - mMaxProgresstime = 20; - } else { - mEfficiencyIncrease = 0; - mMaxProgresstime = 0; - } - eAmpereFlow = 0; - mEUt = 0; - return ePowerPass; + public boolean onRunningTick(ItemStack aStack) { + return true; } @Override - public boolean onRunningTick(ItemStack aStack) { + public boolean doRandomMaintenanceDamage() { return true; } @@ -154,7 +149,12 @@ public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_Multiblo } @Override - public boolean doRandomMaintenanceDamage() { - return true; + public void construct(int stackSize, boolean hintsOnly) { + StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), this, hintsOnly); + } + + @Override + public String[] getStructureDescription(int stackSize) { + return description; } } \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java index 7f69f459f9..20d20921d4 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java @@ -27,31 +27,33 @@ import static gregtech.api.enums.GT_Values.E; * Created by danie_000 on 17.12.2016. */ public class GT_MetaTileEntity_EM_wormhole extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable {//TODO MAKE COMPATIBLE WITH STARGATES XD + //region variables private static Textures.BlockIcons.CustomIcon ScreenOFF; private static Textures.BlockIcons.CustomIcon ScreenON; + //endregion //region structure private static final String[][] shape = new String[][]{ - {E,E,E,"C ","C . ","C "/*,E,E,E,*/}, - {E,E,"D0","C000","B00100","C000","D0"/*,E,E,*/}, - {E,E,"D0","C2A2","B0C0","C2A2","D0"/*,E,E,*/}, - {E,"D0","D0",E,"A00C00",E,"D0","D0"/*,E,*/}, - {E,"D0",E,E,"A0E0",E,E,"D0"/*,E,*/}, - {"D0","D0",E,E,"00E00",E,E,"D0","D0",}, - {"B00000","A0033300","003C300","03E30","03E30","03E30","003C300","A0033300","B00000",}, - {"B0!!!0","A 31113 ","031222130","!12C21!","!12C21!","!12C21!","031222130","A 31113 ","B0!!!0",}, - {"B0!!!0","A 31113 ","031444130","!14C41!","!14C41!","!14C41!","031444130","A 31113 ","B0!!!0",}, - {"B0!!!0","A 31113 ","031222130","!12C21!","!12C21!","!12C21!","031222130","A 31113 ","B0!!!0",}, - {"B00000","A0033300","003C300","03E30","03E30","03E30","003C300","A0033300","B00000",}, + {E, E, E, "C ", "C . ", "C "/*,E,E,E,*/}, + {E, E, "D0", "C000", "B00100", "C000", "D0"/*,E,E,*/}, + {E, E, "D0", "C2A2", "B0C0", "C2A2", "D0"/*,E,E,*/}, + {E, "D0", "D0", E, "A00C00", E, "D0", "D0"/*,E,*/}, + {E, "D0", E, E, "A0E0", E, E, "D0"/*,E,*/}, + {"D0", "D0", E, E, "00E00", E, E, "D0", "D0",}, + {"B00000", "A0033300", "003C300", "03E30", "03E30", "03E30", "003C300", "A0033300", "B00000",}, + {"B0!!!0", "A 31113 ", "031222130", "!12C21!", "!12C21!", "!12C21!", "031222130", "A 31113 ", "B0!!!0",}, + {"B0!!!0", "A 31113 ", "031444130", "!14C41!", "!14C41!", "!14C41!", "031444130", "A 31113 ", "B0!!!0",}, + {"B0!!!0", "A 31113 ", "031222130", "!12C21!", "!12C21!", "!12C21!", "031222130", "A 31113 ", "B0!!!0",}, + {"B00000", "A0033300", "003C300", "03E30", "03E30", "03E30", "003C300", "A0033300", "B00000",}, }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE ,sBlockCasingsTT, sBlockCasingsTT}; + private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMeta = new byte[]{12, 10, 0, 5, 11}; private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addClassicToMachineList, this::addElementalToMachineList}; private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0, 4}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA+"Hint Details:", + EnumChatFormatting.AQUA + "Hint Details:", "1 - Classic Hatches or High Power Casing", "2 - Elemental Hatches or Molecular Casing", }; @@ -70,6 +72,20 @@ public class GT_MetaTileEntity_EM_wormhole extends GT_MetaTileEntity_MultiblockB return new GT_MetaTileEntity_EM_wormhole(mName); } + @Override + public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { + return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 4, 4, 0); + } + + @Override + public String[] getDescription() { + return new String[]{ + CommonValues.TEC_MARK_EM, + "It is not full of worms.", + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "It is full of anti-worms!!!" + }; + } + @Override @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister aBlockIconRegister) { @@ -86,27 +102,13 @@ public class GT_MetaTileEntity_EM_wormhole extends GT_MetaTileEntity_MultiblockB return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][4]}; } - @Override - public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 4, 4, 0); - } - @Override public void construct(int stackSize, boolean hintsOnly) { - StructureBuilderExtreme(shape, blockType, blockMeta,4, 4, 0, getBaseMetaTileEntity(),this,hintsOnly); + StructureBuilderExtreme(shape, blockType, blockMeta, 4, 4, 0, getBaseMetaTileEntity(), this, hintsOnly); } @Override public String[] getStructureDescription(int stackSize) { return description; } - - @Override - public String[] getDescription() { - return new String[]{ - CommonValues.TEC_MARK_EM, - "It is not full of worms.", - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "It is full of anti-worms!!!" - }; - } -} +} \ No newline at end of file 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 6d9691ba10..60a642ee95 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 @@ -34,9 +34,11 @@ import static net.minecraft.util.StatCollector.translateToLocal; * Created by danie_000 on 17.12.2016. */ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { + //region variables private boolean hasBeenPausedThisCycle = false; + //endregion - //region Structure + //region structure //use multi A energy inputs, use less power the longer it runs private static final String[][] shape = new String[][]{ {"00000", "00000", "00.00", "0 0",}, @@ -87,66 +89,16 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock super(aName); } - @Override - protected void parametersInstantiation_EM() { - Parameters.Group hatch_0 = parametrization.getGroup(0, true); - powerSetting = hatch_0.makeInParameter(0, 1000, POWER_SETTING_NAME, POWER_STATUS); - timerSetting = hatch_0.makeInParameter(1, 360, TIMER_SETTING_NAME, TIMER_STATUS); - - timerValue = hatch_0.makeOutParameter(0, 0, TIMER_VALUE_NAME, TIMER_STATUS); - remainingTime = hatch_0.makeOutParameter(1, 360, TIMER_REMAINING_NAME, TIMER_STATUS); - } - @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_TM_microwave(mName); } - @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[49], new TT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE)}; - } else if (aSide == GT_Utility.getOppositeSide(aFacing)) { - return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[49], aActive ? Textures.BlockIcons.CASING_BLOCKS[52] : Textures.BlockIcons.CASING_BLOCKS[53]}; - } - return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[49]}; - } - - @Override - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_Container_MultiMachineEM(aPlayerInventory, aBaseMetaTileEntity, false, true, true); - } - - @Override - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachineEM(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "EMDisplay.png", false, true, true);//todo texture - } - @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0); } - @Override - public void construct(int stackSize, boolean hintsOnly) { - StructureBuilderExtreme(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), this, hintsOnly); - } - - @Override - public String[] getStructureDescription(int stackSize) { - return description; - } - - @Override - public String[] getDescription() { - return new String[]{ - CommonValues.BASS_MARK, - translateToLocal("gt.blockmachines.multimachine.tm.microwave.desc.0"),//High Frequency Oven - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.tm.microwave.desc.1"),//From live to done in seconds! - EnumChatFormatting.BLUE + translateToLocal("gt.blockmachines.multimachine.tm.microwave.desc.2"),//I said nuke the... I meant microwave supper! - }; - } - @Override public boolean checkRecipe_EM(ItemStack itemStack) { hasBeenPausedThisCycle = false; @@ -232,11 +184,43 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock } @Override - public boolean onRunningTick(ItemStack aStack) { - if (eSafeVoid) { - hasBeenPausedThisCycle = true; + public String[] getDescription() { + return new String[]{ + CommonValues.BASS_MARK, + translateToLocal("gt.blockmachines.multimachine.tm.microwave.desc.0"),//High Frequency Oven + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.tm.microwave.desc.1"),//From live to done in seconds! + EnumChatFormatting.BLUE + translateToLocal("gt.blockmachines.multimachine.tm.microwave.desc.2"),//I said nuke the... I meant microwave supper! + }; + } + + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_MultiMachineEM(aPlayerInventory, aBaseMetaTileEntity, false, true, true); + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_MultiMachineEM(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "EMDisplay.png", false, true, true);//todo texture + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[49], new TT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE)}; + } else if (aSide == GT_Utility.getOppositeSide(aFacing)) { + return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[49], aActive ? Textures.BlockIcons.CASING_BLOCKS[52] : Textures.BlockIcons.CASING_BLOCKS[53]}; } - return hasBeenPausedThisCycle || super.onRunningTick(aStack);//consume eu and other resources if not paused + return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[49]}; + } + + @Override + protected void parametersInstantiation_EM() { + Parameters.Group hatch_0 = parametrization.getGroup(0, true); + powerSetting = hatch_0.makeInParameter(0, 1000, POWER_SETTING_NAME, POWER_STATUS); + timerSetting = hatch_0.makeInParameter(1, 360, TIMER_SETTING_NAME, TIMER_STATUS); + + timerValue = hatch_0.makeOutParameter(0, 0, TIMER_VALUE_NAME, TIMER_STATUS); + remainingTime = hatch_0.makeOutParameter(1, 360, TIMER_REMAINING_NAME, TIMER_STATUS); } @Override @@ -246,8 +230,27 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock timerValue.set(0); } + @Override + public boolean onRunningTick(ItemStack aStack) { + if (eSafeVoid) { + hasBeenPausedThisCycle = true; + } + return hasBeenPausedThisCycle || super.onRunningTick(aStack);//consume eu and other resources if not paused + } + + //TODO Why is the basetype 1?? @Override public byte getTileEntityBaseType() { return 1; } + + @Override + public void construct(int stackSize, boolean hintsOnly) { + StructureBuilderExtreme(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), this, hintsOnly); + } + + @Override + public String[] getStructureDescription(int stackSize) { + return description; + } } \ No newline at end of file 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 dc1a54a119..a95963f1a7 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 @@ -42,6 +42,7 @@ import static gregtech.api.enums.GT_Values.E; import static net.minecraft.util.StatCollector.translateToLocal; public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { + //region variables private final static HashSet sparkList = new HashSet<>(); private static Textures.BlockIcons.CustomIcon ScreenOFF; @@ -74,6 +75,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private int[][] scanPosOffsets = new int[10][3]; private int[] posZap = new int[3];//Power Transfer Origin public int[] posTop = new int[3];//Lightning Origin + //endregion //region structure private static final String[][] shape = new String[][]{//3 16 0 @@ -231,87 +233,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock super(aName); } - @Override - protected void parametersInstantiation_EM() { - Parameters.Group hatch_0 = parametrization.getGroup(0, true); - Parameters.Group hatch_1 = parametrization.getGroup(1, true); - Parameters.Group hatch_2 = parametrization.getGroup(2, true); - Parameters.Group hatch_3 = parametrization.getGroup(3, true); - Parameters.Group hatch_4 = parametrization.getGroup(4, true); - Parameters.Group hatch_5 = parametrization.getGroup(5, true); - Parameters.Group hatch_6 = parametrization.getGroup(6, true); - Parameters.Group hatch_7 = parametrization.getGroup(7, true); - Parameters.Group hatch_8 = parametrization.getGroup(8, true); - Parameters.Group hatch_9 = parametrization.getGroup(9, true); - - histLowSetting = hatch_0.makeInParameter(0, 0.25, HYSTERESIS_LOW_SETTING_NAME, HYSTERESIS_LOW_STATUS); - popogaSetting = hatch_0.makeInParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); - histHighSetting = hatch_1.makeInParameter(0, 0.75, HYSTERESIS_HIGH_SETTING_NAME, HYSTERESIS_HIGH_STATUS); - popogaSetting = hatch_1.makeInParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); - transferRadiusTowerSetting = hatch_2.makeInParameter(0, 32, TRANSFER_RADIUS_TOWER_SETTING_NAME, TRANSFER_RADIUS_TOWER_STATUS); - popogaSetting = hatch_2.makeInParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); - transferRadiusTransceiverSetting = hatch_3.makeInParameter(0, 16, TRANSFER_RADIUS_TRANSCEIVER_SETTING_NAME, TRANSFER_RADIUS_TRANSCEIVER_OR_COVER_ULTIMATE_STATUS); - transferRadiusCoverUltimateSetting = hatch_3.makeInParameter(1, 16, TRANSFER_RADIUS_COVER_ULTIMATE_SETTING_NAME, TRANSFER_RADIUS_TRANSCEIVER_OR_COVER_ULTIMATE_STATUS); - outputVoltageSetting = hatch_4.makeInParameter(0, -1, OUTPUT_VOLTAGE_SETTING_NAME, OUTPUT_VOLTAGE_OR_CURRENT_STATUS); - popogaSetting = hatch_4.makeInParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); - outputCurrentSetting = hatch_5.makeInParameter(0, -1, OUTPUT_CURRENT_SETTING_NAME, OUTPUT_VOLTAGE_OR_CURRENT_STATUS); - popogaSetting = hatch_5.makeInParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); - popogaSetting = hatch_6.makeInParameter(0, 0, POPOGA_NAME, POPOGA_STATUS); - popogaSetting = hatch_6.makeInParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); - scanTimeMinSetting = hatch_7.makeInParameter(0, 100, SCAN_TIME_MIN_SETTING_NAME, SCAN_TIME_MIN_STATUS); - popogaSetting = hatch_7.makeInParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); - overDriveSetting = hatch_8.makeInParameter(0, 0, OVERDRIVE_SETTING_NAME, OVERDRIVE_STATUS); - popogaSetting = hatch_8.makeInParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); - popogaSetting = hatch_9.makeInParameter(0, 0, POPOGA_NAME, POPOGA_STATUS); - popogaSetting = hatch_9.makeInParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); - - popogaDisplay = hatch_0.makeOutParameter(0, 0, POPOGA_NAME, POPOGA_STATUS); - popogaDisplay = hatch_0.makeOutParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); - popogaDisplay = hatch_1.makeOutParameter(0, 0, POPOGA_NAME, POPOGA_STATUS); - popogaDisplay = hatch_1.makeOutParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); - transferRadiusTowerDisplay = hatch_2.makeOutParameter(0, 0, TRANSFER_RADIUS_TOWER_DISPLAY_NAME, TRANSFER_RADIUS_TOWER_STATUS); - popogaDisplay = hatch_2.makeOutParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); - transferRadiusTransceiverDisplay = hatch_3.makeOutParameter(0, 0, TRANSFER_RADIUS_TRANSCEIVER_DISPLAY_NAME, TRANSFER_RADIUS_TRANSCEIVER_OR_COVER_ULTIMATE_STATUS); - transferRadiusCoverUltimateDisplay = hatch_3.makeOutParameter(1, 0, TRANSFER_RADIUS_COVER_ULTIMATE_DISPLAY_NAME, TRANSFER_RADIUS_TRANSCEIVER_OR_COVER_ULTIMATE_STATUS); - outputVoltageDisplay = hatch_4.makeOutParameter(0, 0, OUTPUT_VOLTAGE_DISPLAY_NAME, POWER_STATUS); - popogaDisplay = hatch_4.makeOutParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); - outputCurrentDisplay = hatch_5.makeOutParameter(0, 0, OUTPUT_CURRENT_DISPLAY_NAME, POWER_STATUS); - energyCapacityDisplay = hatch_5.makeOutParameter(1, 0, ENERGY_CAPACITY_DISPLAY_NAME, ENERGY_STATUS); - energyStoredDisplay = hatch_6.makeOutParameter(0, 0, ENERGY_STORED_DISPLAY_NAME, ENERGY_STATUS); - energyFractionDisplay = hatch_6.makeOutParameter(1, 0, ENERGY_FRACTION_DISPLAY_NAME, ENERGY_STATUS); - scanTimeDisplay = hatch_7.makeOutParameter(0, 0, SCAN_TIME_DISPLAY_NAME, SCAN_TIME_STATUS); - popogaDisplay = hatch_7.makeOutParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); - popogaDisplay = hatch_8.makeOutParameter(0, 0, POPOGA_NAME, POPOGA_STATUS); - popogaDisplay = hatch_8.makeOutParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); - popogaDisplay = hatch_9.makeOutParameter(0, 0, POPOGA_NAME, POPOGA_STATUS); - popogaDisplay = hatch_9.makeOutParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); - } - - @Override - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_TM_teslaCoil(mName); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister aBlockIconRegister) { - ScreenOFF = new Textures.BlockIcons.CustomIcon("iconsets/TM_TESLA_TOWER"); - ScreenON = new Textures.BlockIcons.CustomIcon("iconsets/TM_TESLA_TOWER_ACTIVE"); - super.registerIcons(aBlockIconRegister); - } - - @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - aNBT.setLong("eEnergyCapacity", energyCapacity); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - energyCapacity = aNBT.getLong("eEnergyCapacity"); - } - private long getEnergyEfficiency(long voltage, int distance, boolean overDriveToggle) { if (overDriveToggle) { return (long) ((voltage * 2) - (voltage * Math.pow(overdriveEfficiency, distance))); @@ -328,37 +249,49 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock return 1F; } - @Override - public long maxEUStore() { - return energyCapacity * 2; - } + private void scanForTransmissionTargets(int[] coordsMin, int[] coordsMax) { + //This makes sure the minimums are actually smaller than the maximums + int xMin = coordsMin[0] < coordsMax[0] ? coordsMin[0] : coordsMax[0]; + int yMin = coordsMin[1] < coordsMax[1] ? coordsMin[1] : coordsMax[1]; + int zMin = coordsMin[2] < coordsMax[2] ? coordsMin[2] : coordsMax[2]; + //And vice versa + int xMax = coordsMin[0] > coordsMax[0] ? coordsMin[0] : coordsMax[0]; + int yMax = coordsMin[1] > coordsMax[1] ? coordsMin[1] : coordsMax[1]; + int zMax = coordsMin[2] > coordsMax[2] ? coordsMin[2] : coordsMax[2]; - @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][16 + 6], new TT_RenderedTexture(aActive ? ScreenON : ScreenOFF)}; + for (int xPos = xMin; xPos <= xMax; xPos++) { + for (int yPos = yMin; yPos <= yMax; yPos++) { + for (int zPos = zMin; zPos <= zMax; zPos++) { + if (xPos == 0 && yPos == 0 && zPos == 0) { + continue; + } + IGregTechTileEntity node = getBaseMetaTileEntity().getIGregTechTileEntityOffset(xPos, yPos, zPos); + if (node == null) { + continue; + } + IMetaTileEntity nodeInside = node.getMetaTileEntity(); + if (nodeInside instanceof GT_MetaTileEntity_TeslaCoil || nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive() || (node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil)) { + eTeslaMap.put(node, (int) Math.ceil(Math.sqrt(Math.pow(xPos, 2) + Math.pow(yPos, 2) + Math.pow(zPos, 2)))); + } + } + } } - return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][16 + 6]}; + } - @Override - public void onRemoval() { - super.onRemoval(); - for (GT_MetaTileEntity_Hatch_Capacitor cap : eCapacitorHatches) { - cap.getBaseMetaTileEntity().setActive(false); - } + private void thaumLightning(IGregTechTileEntity mte, IGregTechTileEntity node) { + byte xR = (byte) (node.getXCoord() - posTop[0]); + byte yR = (byte) (node.getYCoord() - posTop[1]); + byte zR = (byte) (node.getZCoord() - posTop[2]); + + int wID = mte.getWorld().provider.dimensionId; + + sparkList.add(new ThaumSpark(posTop[0], posTop[1], posTop[2], xR, yR, zR, wID)); } @Override - public void stopMachine() { - super.stopMachine(); - for (GT_MetaTileEntity_Hatch_Capacitor cap : eCapacitorHatches) { - cap.getBaseMetaTileEntity().setActive(false); - } - - setEUVar(0); - energyStoredDisplay.set(0); - energyFractionDisplay.set(0); + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_TM_teslaCoil(mName); } @Override @@ -419,26 +352,6 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock return false; } - @Override - public void construct(int stackSize, boolean hintsOnly) { - StructureBuilderExtreme(shape, blockType, blockMetas[(stackSize - 1) % 6], 3, 16, 0, getBaseMetaTileEntity(), this, hintsOnly); - } - - @Override - public String[] getStructureDescription(int stackSize) { - return description; - } - - @Override - public String[] getDescription() { - return new String[]{ - CommonValues.BASS_MARK, - translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.desc.0"),//Tower of Wireless Power - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.desc.1"),//Fewer pesky cables! - EnumChatFormatting.BLUE + translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.desc.2"),//Survival chances might be affected - }; - } - @Override public boolean checkRecipe_EM(ItemStack itemStack) { if (!histHighSetting.getStatus(false).isOk || @@ -500,44 +413,118 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock return true; } - private void scanForTransmissionTargets(int[] coordsMin, int[] coordsMax) { - //This makes sure the minimums are actually smaller than the maximums - int xMin = coordsMin[0] < coordsMax[0] ? coordsMin[0] : coordsMax[0]; - int yMin = coordsMin[1] < coordsMax[1] ? coordsMin[1] : coordsMax[1]; - int zMin = coordsMin[2] < coordsMax[2] ? coordsMin[2] : coordsMax[2]; - //And vice versa - int xMax = coordsMin[0] > coordsMax[0] ? coordsMin[0] : coordsMax[0]; - int yMax = coordsMin[1] > coordsMax[1] ? coordsMin[1] : coordsMax[1]; - int zMax = coordsMin[2] > coordsMax[2] ? coordsMin[2] : coordsMax[2]; + @Override + public String[] getDescription() { + return new String[]{ + CommonValues.BASS_MARK, + translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.desc.0"),//Tower of Wireless Power + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.desc.1"),//Fewer pesky cables! + EnumChatFormatting.BLUE + translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.desc.2"),//Survival chances might be affected + }; + } - for (int xPos = xMin; xPos <= xMax; xPos++) { - for (int yPos = yMin; yPos <= yMax; yPos++) { - for (int zPos = zMin; zPos <= zMax; zPos++) { - if (xPos == 0 && yPos == 0 && zPos == 0) { - continue; - } - IGregTechTileEntity node = getBaseMetaTileEntity().getIGregTechTileEntityOffset(xPos, yPos, zPos); - if (node == null) { - continue; - } - IMetaTileEntity nodeInside = node.getMetaTileEntity(); - if (nodeInside instanceof GT_MetaTileEntity_TeslaCoil || nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive() || (node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil)) { - eTeslaMap.put(node, (int) Math.ceil(Math.sqrt(Math.pow(xPos, 2) + Math.pow(yPos, 2) + Math.pow(zPos, 2)))); - } - } - } + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister aBlockIconRegister) { + ScreenOFF = new Textures.BlockIcons.CustomIcon("iconsets/TM_TESLA_TOWER"); + ScreenON = new Textures.BlockIcons.CustomIcon("iconsets/TM_TESLA_TOWER_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][16 + 6], new TT_RenderedTexture(aActive ? ScreenON : ScreenOFF)}; } + return new ITexture[]{Textures.BlockIcons.casingTexturePages[texturePage][16 + 6]}; + } + @Override + public void onRemoval() { + super.onRemoval(); + for (GT_MetaTileEntity_Hatch_Capacitor cap : eCapacitorHatches) { + cap.getBaseMetaTileEntity().setActive(false); + } } - private void thaumLightning(IGregTechTileEntity mte, IGregTechTileEntity node) { - byte xR = (byte) (node.getXCoord() - posTop[0]); - byte yR = (byte) (node.getYCoord() - posTop[1]); - byte zR = (byte) (node.getZCoord() - posTop[2]); + @Override + protected void parametersInstantiation_EM() { + Parameters.Group hatch_0 = parametrization.getGroup(0, true); + Parameters.Group hatch_1 = parametrization.getGroup(1, true); + Parameters.Group hatch_2 = parametrization.getGroup(2, true); + Parameters.Group hatch_3 = parametrization.getGroup(3, true); + Parameters.Group hatch_4 = parametrization.getGroup(4, true); + Parameters.Group hatch_5 = parametrization.getGroup(5, true); + Parameters.Group hatch_6 = parametrization.getGroup(6, true); + Parameters.Group hatch_7 = parametrization.getGroup(7, true); + Parameters.Group hatch_8 = parametrization.getGroup(8, true); + Parameters.Group hatch_9 = parametrization.getGroup(9, true); - int wID = mte.getWorld().provider.dimensionId; + histLowSetting = hatch_0.makeInParameter(0, 0.25, HYSTERESIS_LOW_SETTING_NAME, HYSTERESIS_LOW_STATUS); + popogaSetting = hatch_0.makeInParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + histHighSetting = hatch_1.makeInParameter(0, 0.75, HYSTERESIS_HIGH_SETTING_NAME, HYSTERESIS_HIGH_STATUS); + popogaSetting = hatch_1.makeInParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + transferRadiusTowerSetting = hatch_2.makeInParameter(0, 32, TRANSFER_RADIUS_TOWER_SETTING_NAME, TRANSFER_RADIUS_TOWER_STATUS); + popogaSetting = hatch_2.makeInParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + transferRadiusTransceiverSetting = hatch_3.makeInParameter(0, 16, TRANSFER_RADIUS_TRANSCEIVER_SETTING_NAME, TRANSFER_RADIUS_TRANSCEIVER_OR_COVER_ULTIMATE_STATUS); + transferRadiusCoverUltimateSetting = hatch_3.makeInParameter(1, 16, TRANSFER_RADIUS_COVER_ULTIMATE_SETTING_NAME, TRANSFER_RADIUS_TRANSCEIVER_OR_COVER_ULTIMATE_STATUS); + outputVoltageSetting = hatch_4.makeInParameter(0, -1, OUTPUT_VOLTAGE_SETTING_NAME, OUTPUT_VOLTAGE_OR_CURRENT_STATUS); + popogaSetting = hatch_4.makeInParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + outputCurrentSetting = hatch_5.makeInParameter(0, -1, OUTPUT_CURRENT_SETTING_NAME, OUTPUT_VOLTAGE_OR_CURRENT_STATUS); + popogaSetting = hatch_5.makeInParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + popogaSetting = hatch_6.makeInParameter(0, 0, POPOGA_NAME, POPOGA_STATUS); + popogaSetting = hatch_6.makeInParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + scanTimeMinSetting = hatch_7.makeInParameter(0, 100, SCAN_TIME_MIN_SETTING_NAME, SCAN_TIME_MIN_STATUS); + popogaSetting = hatch_7.makeInParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + overDriveSetting = hatch_8.makeInParameter(0, 0, OVERDRIVE_SETTING_NAME, OVERDRIVE_STATUS); + popogaSetting = hatch_8.makeInParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + popogaSetting = hatch_9.makeInParameter(0, 0, POPOGA_NAME, POPOGA_STATUS); + popogaSetting = hatch_9.makeInParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); - sparkList.add(new ThaumSpark(posTop[0], posTop[1], posTop[2], xR, yR, zR, wID)); + popogaDisplay = hatch_0.makeOutParameter(0, 0, POPOGA_NAME, POPOGA_STATUS); + popogaDisplay = hatch_0.makeOutParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + popogaDisplay = hatch_1.makeOutParameter(0, 0, POPOGA_NAME, POPOGA_STATUS); + popogaDisplay = hatch_1.makeOutParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + transferRadiusTowerDisplay = hatch_2.makeOutParameter(0, 0, TRANSFER_RADIUS_TOWER_DISPLAY_NAME, TRANSFER_RADIUS_TOWER_STATUS); + popogaDisplay = hatch_2.makeOutParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + transferRadiusTransceiverDisplay = hatch_3.makeOutParameter(0, 0, TRANSFER_RADIUS_TRANSCEIVER_DISPLAY_NAME, TRANSFER_RADIUS_TRANSCEIVER_OR_COVER_ULTIMATE_STATUS); + transferRadiusCoverUltimateDisplay = hatch_3.makeOutParameter(1, 0, TRANSFER_RADIUS_COVER_ULTIMATE_DISPLAY_NAME, TRANSFER_RADIUS_TRANSCEIVER_OR_COVER_ULTIMATE_STATUS); + outputVoltageDisplay = hatch_4.makeOutParameter(0, 0, OUTPUT_VOLTAGE_DISPLAY_NAME, POWER_STATUS); + popogaDisplay = hatch_4.makeOutParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + outputCurrentDisplay = hatch_5.makeOutParameter(0, 0, OUTPUT_CURRENT_DISPLAY_NAME, POWER_STATUS); + energyCapacityDisplay = hatch_5.makeOutParameter(1, 0, ENERGY_CAPACITY_DISPLAY_NAME, ENERGY_STATUS); + energyStoredDisplay = hatch_6.makeOutParameter(0, 0, ENERGY_STORED_DISPLAY_NAME, ENERGY_STATUS); + energyFractionDisplay = hatch_6.makeOutParameter(1, 0, ENERGY_FRACTION_DISPLAY_NAME, ENERGY_STATUS); + scanTimeDisplay = hatch_7.makeOutParameter(0, 0, SCAN_TIME_DISPLAY_NAME, SCAN_TIME_STATUS); + popogaDisplay = hatch_7.makeOutParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + popogaDisplay = hatch_8.makeOutParameter(0, 0, POPOGA_NAME, POPOGA_STATUS); + popogaDisplay = hatch_8.makeOutParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + popogaDisplay = hatch_9.makeOutParameter(0, 0, POPOGA_NAME, POPOGA_STATUS); + popogaDisplay = hatch_9.makeOutParameter(1, 0, POPOGA_NAME, POPOGA_STATUS); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setLong("eEnergyCapacity", energyCapacity); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + energyCapacity = aNBT.getLong("eEnergyCapacity"); + } + + @Override + public void stopMachine() { + super.stopMachine(); + for (GT_MetaTileEntity_Hatch_Capacitor cap : eCapacitorHatches) { + cap.getBaseMetaTileEntity().setActive(false); + } + + setEUVar(0); + energyStoredDisplay.set(0); + energyFractionDisplay.set(0); } @Override @@ -787,8 +774,9 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock return true; } - private boolean addFrameToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - return aTileEntity != null && aTileEntity.getMetaTileEntity() instanceof GT_MetaPipeEntity_Frame; + @Override + public long maxEUStore() { + return energyCapacity * 2; } private boolean addCapacitorToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { @@ -829,4 +817,18 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } return false; } + + private boolean addFrameToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + return aTileEntity != null && aTileEntity.getMetaTileEntity() instanceof GT_MetaPipeEntity_Frame; + } + + @Override + public void construct(int stackSize, boolean hintsOnly) { + StructureBuilderExtreme(shape, blockType, blockMetas[(stackSize - 1) % 6], 3, 16, 0, getBaseMetaTileEntity(), this, hintsOnly); + } + + @Override + public String[] getStructureDescription(int stackSize) { + return description; + } } \ No newline at end of file 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 0ec865b1e2..54f438aa9f 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 @@ -55,7 +55,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt protected static Textures.BlockIcons.CustomIcon ScreenON; //Sound resource - same as with screen but override getActivitySound - public final static ResourceLocation activitySound=new ResourceLocation(Reference.MODID+":fx_lo_freq"); + public final static ResourceLocation activitySound = new ResourceLocation(Reference.MODID + ":fx_lo_freq"); @SideOnly(Side.CLIENT) private SoundLoop activitySoundLoop; //endregion @@ -117,16 +117,16 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt //region READ ONLY unless u really need to change it //max amperes machine can take in after computing it to the lowest tier (exchange packets to min tier count) - protected long eMaxAmpereFlow = 0,eMaxAmpereGen=0; + protected long eMaxAmpereFlow = 0, eMaxAmpereGen = 0; //What is the max and minimal tier of eu hatches installed - private long maxEUinputMin = 0, maxEUinputMax = 0,maxEUoutputMin = 0, maxEUoutputMax = 0; + private long maxEUinputMin = 0, maxEUinputMax = 0, maxEUoutputMin = 0, maxEUoutputMax = 0; //read only unless you are making computation generator - read computer class protected long eAvailableData = 0; // data being available //just some info - private so hidden - private boolean explodedThisTick=false; + private boolean explodedThisTick = false; //front rotation val private byte frontRotation = 0; @@ -135,37 +135,37 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt protected GT_MetaTileEntity_MultiblockBase_EM(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); - parametrization=new Parameters(this); + parametrization = new Parameters(this); parametersInstantiation_EM(); - parametrization.setToDefaults(true,true); + parametrization.setToDefaults(true, true); } protected GT_MetaTileEntity_MultiblockBase_EM(String aName) { super(aName); - parametrization=new Parameters(this); + parametrization = new Parameters(this); parametersInstantiation_EM(); - parametrization.setToDefaults(true,true); + parametrization.setToDefaults(true, true); } //region SUPER STRUCT @Override - public boolean isFrontRotationValid(byte frontRotation, byte frontFacing){ + public boolean isFrontRotationValid(byte frontRotation, byte frontFacing) { return true; } - public boolean isFacingValid_EM(byte aFacing){ + public boolean isFacingValid_EM(byte aFacing) { return true; } @Override public void rotateAroundFrontPlane(boolean direction) { - if(direction){ + if (direction) { frontRotation++; - if(frontRotation>3) frontRotation=0; - }else { + if (frontRotation > 3) frontRotation = 0; + } else { frontRotation--; - if(frontRotation<0) frontRotation=3; + if (frontRotation < 0) frontRotation = 3; } if (isFrontRotationValid(frontRotation, getBaseMetaTileEntity().getFrontFacing())) { updateRotationOnClients(); @@ -176,6 +176,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt /** * Gets AABB based on abc and not xyz, without offsetting to controller position!!! + * * @param minA * @param minB * @param minC @@ -184,291 +185,292 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt * @param maxC * @return */ - public final AxisAlignedBB getBoundingBox(double minA,double minB,double minC,double maxA,double maxB,double maxC){ - double[] offSetsMin= getTranslatedOffsets(minA,minB,minC); - double[] offSetsMax= getTranslatedOffsets(maxA,maxB,maxC); - for (int i=0;i<3;i++){ - if(offSetsMax[i] * can get/set Parameters here also * * @param itemStack item in the controller * @return is recipe is valid - * */ + */ public boolean checkRecipe_EM(ItemStack itemStack) { return false; } @@ -528,22 +531,24 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt /** * Put EM stuff from outputEM into EM output hatches here * or do other stuff - it is basically on recipe succeded - * + *

* based on "machine state" do output, * this must move to outputEM to EM output hatches * and can also modify output items/fluids/EM, remaining EM is NOT overflowed. * (Well it can be overflowed if machine didn't finished, soft-hammered/disabled/not enough EU) * Setting available data processing */ - public void outputAfterRecipe_EM() {} + public void outputAfterRecipe_EM() { + } /** * to add fluids into hatches + * * @param mOutputFluids */ @Override protected void addFluidOutputs(FluidStack[] mOutputFluids) { - int min=mOutputFluids.length>mOutputHatches.size()?mOutputHatches.size():mOutputFluids.length; + int min = mOutputFluids.length > mOutputHatches.size() ? mOutputHatches.size() : mOutputFluids.length; for (int i = 0; i < min; ++i) { if (mOutputHatches.get(i) != null && mOutputFluids[i] != null && GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(mOutputHatches.get(i))) { mOutputHatches.get(i).fill(mOutputFluids[i], true); @@ -555,48 +560,46 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt //region tooltip and scanner result /** - * * @param hatchNo * @param paramID * @return */ - public ArrayList getFullLedDescriptionIn(int hatchNo, int paramID){ - ArrayList list=new ArrayList<>(); - list.add(EnumChatFormatting.WHITE+"ID: " + - EnumChatFormatting.AQUA+hatchNo + - EnumChatFormatting.YELLOW+ ":" + - EnumChatFormatting.AQUA+paramID + - EnumChatFormatting.YELLOW+ ":"+ - EnumChatFormatting.AQUA+"I "+parametrization.getStatusIn(hatchNo, paramID).name.get()); - list.add(EnumChatFormatting.WHITE+"Value: "+ - EnumChatFormatting.AQUA+ Util.doubleToString(parametrization.getIn(hatchNo,paramID))); - try{ + public ArrayList getFullLedDescriptionIn(int hatchNo, int paramID) { + ArrayList list = new ArrayList<>(); + list.add(EnumChatFormatting.WHITE + "ID: " + + EnumChatFormatting.AQUA + hatchNo + + EnumChatFormatting.YELLOW + ":" + + EnumChatFormatting.AQUA + paramID + + EnumChatFormatting.YELLOW + ":" + + EnumChatFormatting.AQUA + "I " + parametrization.getStatusIn(hatchNo, paramID).name.get()); + list.add(EnumChatFormatting.WHITE + "Value: " + + EnumChatFormatting.AQUA + Util.doubleToString(parametrization.getIn(hatchNo, paramID))); + try { list.add(parametrization.groups[hatchNo].parameterIn[paramID].getBrief()); - }catch (NullPointerException|IndexOutOfBoundsException e){ + } catch (NullPointerException | IndexOutOfBoundsException e) { list.add("Unused"); } return list; } /** - * * @param hatchNo * @param paramID * @return */ - public ArrayList getFullLedDescriptionOut(int hatchNo, int paramID){ - ArrayList list=new ArrayList<>(); - list.add(EnumChatFormatting.WHITE+"ID: " + - EnumChatFormatting.AQUA+hatchNo + - EnumChatFormatting.YELLOW+ ":" + - EnumChatFormatting.AQUA+paramID + - EnumChatFormatting.YELLOW+ ":"+ - EnumChatFormatting.AQUA+"O "+parametrization.getStatusOut(hatchNo, paramID).name.get()); - list.add(EnumChatFormatting.WHITE+"Value: "+ - EnumChatFormatting.AQUA+Util.doubleToString(parametrization.getOut(hatchNo,paramID))); - try{ + public ArrayList getFullLedDescriptionOut(int hatchNo, int paramID) { + ArrayList list = new ArrayList<>(); + list.add(EnumChatFormatting.WHITE + "ID: " + + EnumChatFormatting.AQUA + hatchNo + + EnumChatFormatting.YELLOW + ":" + + EnumChatFormatting.AQUA + paramID + + EnumChatFormatting.YELLOW + ":" + + EnumChatFormatting.AQUA + "O " + parametrization.getStatusOut(hatchNo, paramID).name.get()); + list.add(EnumChatFormatting.WHITE + "Value: " + + EnumChatFormatting.AQUA + Util.doubleToString(parametrization.getOut(hatchNo, paramID))); + try { list.add(parametrization.groups[hatchNo].parameterOut[paramID].getBrief()); - }catch (NullPointerException|IndexOutOfBoundsException e){ + } catch (NullPointerException | IndexOutOfBoundsException e) { list.add("Unused"); } return list; @@ -604,6 +607,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt /** * TOOLTIP + * * @return strings in tooltip */ @Override @@ -616,6 +620,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt /** * scanner gives it + * * @return */ @Override @@ -642,7 +647,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt "Energy Hatches:", EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET + " EU / " + EnumChatFormatting.YELLOW + maxEnergy + EnumChatFormatting.RESET + " EU", - (mEUt*eAmpereFlow <= 0 ? "Probably uses: " : "Probably makes: ") + + (mEUt * eAmpereFlow <= 0 ? "Probably uses: " : "Probably makes: ") + EnumChatFormatting.RED + Math.abs(mEUt) + EnumChatFormatting.RESET + " EU/t at " + EnumChatFormatting.RED + eAmpereFlow + EnumChatFormatting.RESET + " A", "Tier Rating: " + EnumChatFormatting.YELLOW + VN[getMaxEnergyInputTier_EM()] + EnumChatFormatting.RESET + " / " + EnumChatFormatting.GREEN + VN[getMinEnergyInputTier_EM()] + EnumChatFormatting.RESET + @@ -657,6 +662,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt /** * should it work with scanner? HELL YES + * * @return */ @Override @@ -670,6 +676,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt /** * Server side container + * * @param aID * @param aPlayerInventory * @param aBaseMetaTileEntity @@ -682,6 +689,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt /** * Client side gui + * * @param aID * @param aPlayerInventory * @param aBaseMetaTileEntity @@ -695,6 +703,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt /** * add more textures + * * @param aBlockIconRegister */ @Override @@ -707,6 +716,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt /** * actually use textures + * * @param aBaseMetaTileEntity * @param aSide * @param aFacing @@ -725,26 +735,28 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt /** * should return your activity sound + * * @return */ @SideOnly(Side.CLIENT) - protected ResourceLocation getActivitySound(){ + protected ResourceLocation getActivitySound() { return activitySound; } /** * plays the sounds auto magically + * * @param activitySound */ @SideOnly(Side.CLIENT) - protected void soundMagic(ResourceLocation activitySound){ - if(getBaseMetaTileEntity().isActive()){ - if(activitySoundLoop==null){ - activitySoundLoop =new SoundLoop(activitySound,getBaseMetaTileEntity(),false,true); + protected void soundMagic(ResourceLocation activitySound) { + if (getBaseMetaTileEntity().isActive()) { + if (activitySoundLoop == null) { + activitySoundLoop = new SoundLoop(activitySound, getBaseMetaTileEntity(), false, true); Minecraft.getMinecraft().getSoundHandler().playSound(activitySoundLoop); } - }else { - if(activitySoundLoop!=null) { + } else { + if (activitySoundLoop != null) { activitySoundLoop = null; } } @@ -756,6 +768,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt /** * is the thing inside controller a valid item to make the machine work + * * @param itemStack * @return */ @@ -766,6 +779,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt /** * how much damage to apply to thing in controller - not sure how it does it + * * @param itemStack * @return */ @@ -802,7 +816,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt } } cleanOutputEM_EM(); - if (ePowerPass && getEUVar()>V[3] || eDismantleBoom && mMaxProgresstime > 0 && areChunksAroundLoaded_EM()) { + if (ePowerPass && getEUVar() > V[3] || eDismantleBoom && mMaxProgresstime > 0 && areChunksAroundLoaded_EM()) { explodeMultiblock(); } } catch (Exception e) { @@ -815,14 +829,15 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt /** * prevents spontaneous explosions when the chunks unloading would cause them * should cover 3 chunks radius + * * @return */ - protected boolean areChunksAroundLoaded_EM(){ - if(GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(this) && getBaseMetaTileEntity().isServerSide()){ - IGregTechTileEntity base=getBaseMetaTileEntity(); - return base.getWorld().doChunksNearChunkExist(base.getXCoord(),base.getYCoord(),base.getZCoord(),3); + protected boolean areChunksAroundLoaded_EM() { + if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(this) && getBaseMetaTileEntity().isServerSide()) { + IGregTechTileEntity base = getBaseMetaTileEntity(); + return base.getWorld().doChunksNearChunkExist(base.getXCoord(), base.getYCoord(), base.getZCoord(), 3); //todo check if it is actually checking if chunks are loaded - }else { + } else { return false; } } @@ -830,29 +845,30 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt /** * instantiate parameters in CONSTRUCTOR! CALLED ONCE on creation, don't call it in your classes */ - protected void parametersInstantiation_EM(){} + protected void parametersInstantiation_EM() { + } /** * It is automatically called OFTEN * update status of parameters in guis (and "machine state" if u wish) * Called before check recipe, before outputting, and every second the machine is complete - * + *

* good place to update parameter statuses, default implementation handles it well * * @param machineBusy is machine doing SHIT */ protected void parametersStatusesWrite_EM(boolean machineBusy) {//todo unimplement? - if(!machineBusy){ + if (!machineBusy) { for (Parameters.Group.ParameterIn parameterIn : parametrization.parameterInArrayList) { if (parameterIn != null) { parameterIn.updateStatus(); } } - }else{ - for (Parameters.Group hatch:parametrization.groups){ - if(hatch!=null && hatch.updateWhileRunning){ - for (Parameters.Group.ParameterIn in:hatch.parameterIn) { - if(in!=null){ + } else { + for (Parameters.Group hatch : parametrization.groups) { + if (hatch != null && hatch.updateWhileRunning) { + for (Parameters.Group.ParameterIn in : hatch.parameterIn) { + if (in != null) { in.updateStatus(); } } @@ -868,17 +884,21 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt /** * For extra types of hatches initiation, LOOK HOW IT IS CALLED! in onPostTick + * * @param mMachine was the machine considered complete at that point in onPostTick */ - protected void hatchInit_EM(boolean mMachine) {} + protected void hatchInit_EM(boolean mMachine) { + } /** * called when the multiblock is exploding - if u want to add more EXPLOSIONS, for ex. new types of hatches also have to explode */ - protected void extraExplosions_EM() {}//For that extra hatches explosions, and maybe some MOORE EXPLOSIONS + protected void extraExplosions_EM() { + }//For that extra hatches explosions, and maybe some MOORE EXPLOSIONS /** * Get Available data, Override only on data outputters should return mAvailableData that is set in check recipe + * * @return available data */ protected long getAvailableData_EM() { @@ -886,8 +906,8 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt Vec3pos pos = new Vec3pos(getBaseMetaTileEntity()); for (GT_MetaTileEntity_Hatch_InputData in : eInputData) { if (in.q != null) { - Long value=in.q.contentIfNotInTrace(pos); - if(value!=null) { + Long value = in.q.contentIfNotInTrace(pos); + if (value != null) { result += value; } } @@ -906,6 +926,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt /** * get pollution per tick + * * @param itemStack what is in controller * @return how much pollution is produced */ @@ -916,6 +937,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt /** * EM pollution per tick + * * @param itemStack - item in controller * @return how much excess matter is there */ @@ -926,15 +948,16 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt /** * triggered if machine is not allowed to work after completing a recipe, override to make it not shutdown for instance (like turbines). * bu just replacing it with blank - active transformer is doing it - * + *

* CALLED DIRECTLY when soft hammered to offline state - usually should stop the machine unless some other mechanics should do it */ - protected void notAllowedToWork_stopMachine_EM(){ + protected void notAllowedToWork_stopMachine_EM() { stopMachine(); } /** * store data + * * @param aNBT */ @Override @@ -952,7 +975,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt aNBT.setByte("eCertainM", eCertainMode); aNBT.setByte("eCertainS", eCertainStatus); aNBT.setByte("eMinRepair", minRepairStatus); - aNBT.setByte("eRotation",frontRotation); + aNBT.setByte("eRotation", frontRotation); aNBT.setBoolean("eParam", eParameters); aNBT.setBoolean("ePass", ePowerPass); aNBT.setBoolean("eVoid", eSafeVoid); @@ -1024,6 +1047,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt /** * load data + * * @param aNBT */ @Override @@ -1069,7 +1093,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt int outputLen = aNBT.getInteger("eOutputStackCount"); if (outputLen > 0) { outputEM = new cElementalInstanceStackMap[outputLen]; - NBTTagCompound compound=aNBT.getCompoundTag("outputEM"); + NBTTagCompound compound = aNBT.getCompoundTag("outputEM"); for (int i = 0; i < outputEM.length; i++) { if (compound.hasKey(Integer.toString(i))) { try { @@ -1086,20 +1110,20 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt outputEM = null; } - if(aNBT.hasKey("eParamsIn") && aNBT.hasKey("eParamsOut") && aNBT.hasKey("eParamsB")){ + if (aNBT.hasKey("eParamsIn") && aNBT.hasKey("eParamsOut") && aNBT.hasKey("eParamsB")) { NBTTagCompound paramI = aNBT.getCompoundTag("eParamsIn"); NBTTagCompound paramO = aNBT.getCompoundTag("eParamsOut"); NBTTagCompound paramB = aNBT.getCompoundTag("eParamsB"); for (int i = 0; i < 10; i++) { - if(paramB.getBoolean(Integer.toString(i))){ + if (paramB.getBoolean(Integer.toString(i))) { parametrization.iParamsIn[i] = Float.intBitsToFloat(paramI.getInteger(Integer.toString(i))); - parametrization.iParamsOut[i] =Float.intBitsToFloat(paramO.getInteger(Integer.toString(i))); - }else { + parametrization.iParamsOut[i] = Float.intBitsToFloat(paramO.getInteger(Integer.toString(i))); + } else { parametrization.iParamsIn[i] = paramI.getInteger(Integer.toString(i)); parametrization.iParamsOut[i] = paramO.getInteger(Integer.toString(i)); } } - }else{ + } else { NBTTagCompound paramI = aNBT.getCompoundTag("eParamsInD"); for (int i = 0; i < parametrization.iParamsIn.length; i++) { parametrization.iParamsIn[i] = paramI.getDouble(Integer.toString(i)); @@ -1123,6 +1147,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt /** * if u want to use gt recipe maps... + * * @return */ @Override @@ -1170,7 +1195,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt * After recipe check failed * helper method so i don't have to set that params to nothing at all times */ - protected void afterRecipeCheckFailed(){ + protected void afterRecipeCheckFailed() { cleanOrExplode(); for (GT_MetaTileEntity_Hatch_OutputData data : eOutputData) { @@ -1214,6 +1239,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt /** * cyclic check even when not working, called LESS frequently + * * @return */ private boolean cyclicUpdate() { @@ -1226,6 +1252,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt /** * mining level... + * * @return */ @Override @@ -1245,15 +1272,15 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt @Override public final void forceSetRotationDoRender(byte rotation) { frontRotation = rotation; - IGregTechTileEntity base=getBaseMetaTileEntity(); - if(base.isClientSide()) { + IGregTechTileEntity base = getBaseMetaTileEntity(); + if (base.isClientSide()) { base.issueTextureUpdate(); } } - protected final void updateRotationOnClients(){ - if(getBaseMetaTileEntity().isServerSide()){ - IGregTechTileEntity base=getBaseMetaTileEntity(); + protected final void updateRotationOnClients() { + if (getBaseMetaTileEntity().isServerSide()) { + IGregTechTileEntity base = getBaseMetaTileEntity(); NetworkDispatcher.INSTANCE.sendToAllAround(new RotationMessage.RotationData(this), base.getWorld().provider.dimensionId, base.getXCoord(), @@ -1273,6 +1300,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt /** * internal check machine + * * @param iGregTechTileEntity * @param itemStack * @return @@ -1284,13 +1312,14 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt /** * internal check recipe + * * @param itemStack * @return */ @Override public final boolean checkRecipe(ItemStack itemStack) {//do recipe checks, based on "machine content and state" hatchesStatusUpdate_EM(); - boolean result= checkRecipe_EM(itemStack);//if had no - set default params + boolean result = checkRecipe_EM(itemStack);//if had no - set default params hatchesStatusUpdate_EM(); return result; } @@ -1299,17 +1328,17 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt * callback for updating parameters and new hatches */ protected void hatchesStatusUpdate_EM() { - if(getBaseMetaTileEntity().isClientSide()){ + if (getBaseMetaTileEntity().isClientSide()) { return; } - boolean busy=mMaxProgresstime>0; + boolean busy = mMaxProgresstime > 0; if (busy) {//write from buffer to hatches only for (GT_MetaTileEntity_Hatch_Param hatch : eParamHatches) { if (!GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(hatch) || hatch.param < 0) { continue; } int hatchId = hatch.param; - if(parametrization.groups[hatchId]!=null && parametrization.groups[hatchId].updateWhileRunning){ + if (parametrization.groups[hatchId] != null && parametrization.groups[hatchId].updateWhileRunning) { parametrization.iParamsIn[hatchId] = hatch.value0D; parametrization.iParamsIn[hatchId + 10] = hatch.value1D; } @@ -1343,12 +1372,13 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt //region TICKING functions - public void onFirstTick_EM(IGregTechTileEntity aBaseMetaTileEntity){} + public void onFirstTick_EM(IGregTechTileEntity aBaseMetaTileEntity) { + } @Override public final void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { isFacingValid(aBaseMetaTileEntity.getFrontFacing()); - if(getBaseMetaTileEntity().isClientSide()){ + if (getBaseMetaTileEntity().isClientSide()) { NetworkDispatcher.INSTANCE.sendToServer(new RotationMessage.RotationQuery(this)); } onFirstTick_EM(aBaseMetaTileEntity); @@ -1356,18 +1386,19 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt /** * called every tick the machines is active + * * @param aStack * @return */ @Override public boolean onRunningTick(ItemStack aStack) { if (eRequiredData > eAvailableData) { - if(energyFlowOnRunningTick(aStack,false)) { + if (energyFlowOnRunningTick(aStack, false)) { stopMachine(); } return false; } - return energyFlowOnRunningTick(aStack,true); + return energyFlowOnRunningTick(aStack, true); } /** @@ -1376,7 +1407,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (aBaseMetaTileEntity.isServerSide()) { - explodedThisTick=false; + explodedThisTick = false; if (mEfficiency < 0) { mEfficiency = 0; } @@ -1568,7 +1599,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt hatch.getBaseMetaTileEntity().setActive(true); } } - for (GT_MetaTileEntity_Hatch_Param hatch : eParamHatches){ + for (GT_MetaTileEntity_Hatch_Param hatch : eParamHatches) { if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(hatch)) { hatch.getBaseMetaTileEntity().setActive(true); } @@ -1649,7 +1680,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt } for (GT_MetaTileEntity_Hatch_OutputElemental out : eOutputHatches) { for (cElementalInstanceStack instance : out.getContainerHandler().values()) { - long qty = (long)Math.floor(remaining / instance.definition.getMass()); + long qty = (long) Math.floor(remaining / instance.definition.getMass()); if (qty > 0) { qty = Math.min(qty, instance.amount); if (voider.addOverflowMatter(instance.definition.getMass() * qty)) { @@ -1692,12 +1723,12 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt } } } - if (ePowerPass && getEUVar()>getMinimumStoredEU()) { + if (ePowerPass && getEUVar() > getMinimumStoredEU()) { for (GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) { if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { euVar = tHatch.maxEUOutput(); if (tHatch.getBaseMetaTileEntity().getStoredEU() <= tHatch.maxEUStore() - euVar && - aBaseMetaTileEntity.decreaseStoredEnergyUnits(euVar + Math.min(euVar >> 7,1), false)) { + aBaseMetaTileEntity.decreaseStoredEnergyUnits(euVar + Math.min(euVar >> 7, 1), false)) { tHatch.setEUVar(tHatch.getBaseMetaTileEntity().getStoredEU() + euVar); } } @@ -1706,7 +1737,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { euVar = tHatch.maxEUOutput() * tHatch.Amperes; if (tHatch.getBaseMetaTileEntity().getStoredEU() <= tHatch.maxEUStore() - euVar && - aBaseMetaTileEntity.decreaseStoredEnergyUnits(euVar + Math.min(euVar >> 7,tHatch.Amperes), false)) { + aBaseMetaTileEntity.decreaseStoredEnergyUnits(euVar + Math.min(euVar >> 7, tHatch.Amperes), false)) { tHatch.setEUVar(tHatch.getBaseMetaTileEntity().getStoredEU() + euVar); } } @@ -1757,7 +1788,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt if (aBaseMetaTileEntity.isAllowedToWork()) { if (checkRecipe(mInventory[1])) { mEfficiency = Math.max(0, Math.min(mEfficiency + mEfficiencyIncrease, getMaxEfficiency(mInventory[1]) - (getIdealStatus() - getRepairStatus()) * 1000)); - }else { + } else { afterRecipeCheckFailed(); } updateSlots(); @@ -1772,7 +1803,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt if (aBaseMetaTileEntity.isAllowedToWork()) { if (checkRecipe(mInventory[1])) { mEfficiency = Math.max(0, Math.min(mEfficiency + mEfficiencyIncrease, getMaxEfficiency(mInventory[1]) - (getIdealStatus() - getRepairStatus()) * 1000)); - }else { + } else { afterRecipeCheckFailed(); } updateSlots(); @@ -1792,7 +1823,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt for (GT_MetaTileEntity_Hatch_Muffler aMuffler : mMufflerHatches) { aMuffler.getBaseMetaTileEntity().setActive(active); } - }else{ + } else { soundMagic(getActivitySound()); } } @@ -1826,7 +1857,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt if (allowProduction && euFlow > 0) { addEnergyOutput_EM((long) mEUt * (long) mEfficiency / getMaxEfficiency(aStack), eAmpereFlow); } else if (euFlow < 0) { - if (!drainEnergyInput_EM(mEUt,(long) mEUt * getMaxEfficiency(aStack) / Math.max(1000L, mEfficiency), eAmpereFlow)) { + if (!drainEnergyInput_EM(mEUt, (long) mEUt * getMaxEfficiency(aStack) / Math.max(1000L, mEfficiency), eAmpereFlow)) { stopMachine(); return false; } @@ -1849,7 +1880,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt @Override public long maxEUStore() { - return Math.max(maxEUinputMin * (eMaxAmpereFlow << 3),maxEUoutputMin*(eMaxAmpereGen << 3)); + return Math.max(maxEUinputMin * (eMaxAmpereFlow << 3), maxEUoutputMin * (eMaxAmpereGen << 3)); } @Override @@ -1897,16 +1928,15 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt } /** - * * @param EU * @param Amperes * @return if was able to put inside the hatches */ private boolean addEnergyOutput_EM(long EU, long Amperes) { - if(EU<0) { + if (EU < 0) { EU = -EU; } - if(Amperes<0) { + if (Amperes < 0) { Amperes = -Amperes; } long euVar = EU * Amperes; @@ -1945,7 +1975,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt } } } - setEUVar(Math.min(getEUVar() + euVar,maxEUStore())); + setEUVar(Math.min(getEUVar() + euVar, maxEUStore())); return false; } @@ -1969,19 +1999,19 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt } private boolean drainEnergyInput_EM(long EUtTierVoltage, long EUtEffective, long Amperes) { - if(EUtTierVoltage<0) { + if (EUtTierVoltage < 0) { EUtTierVoltage = -EUtTierVoltage; } - if(EUtEffective<0) { + if (EUtEffective < 0) { EUtEffective = -EUtEffective; } - if(Amperes<0) { + if (Amperes < 0) { Amperes = -Amperes; } long EUuse = EUtEffective * Amperes; if (EUuse > getEUVar() || //not enough power EUtTierVoltage > maxEUinputMax || //TIER IS BASED ON BEST HATCH! not total EUtEffective input - (EUtTierVoltage*Amperes - 1) / maxEUinputMin + 1 > eMaxAmpereFlow) {// EUuse==0? --> (EUuse - 1) / maxEUinputMin + 1 = 1! //if not too much A + (EUtTierVoltage * Amperes - 1) / maxEUinputMin + 1 > eMaxAmpereFlow) {// EUuse==0? --> (EUuse - 1) / maxEUinputMin + 1 = 1! //if not too much A if (DEBUG_MODE) { TecTech.LOGGER.debug("L1 " + EUuse + ' ' + getEUVar() + ' ' + (EUuse > getEUVar())); TecTech.LOGGER.debug("L2 " + EUtEffective + ' ' + maxEUinputMax + ' ' + (EUtEffective > maxEUinputMax)); @@ -2036,7 +2066,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt } //new Method - public final long getMaxInputEnergy(){ + public final long getMaxInputEnergy() { long energy = 0; for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) { if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { @@ -2061,7 +2091,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt return getTier(maxEUinputMin); } - public final long getMaxAmpereFlowAtMinTierOfEnergyHatches(){ + public final long getMaxAmpereFlowAtMinTierOfEnergyHatches() { return eAmpereFlow; } @@ -2069,21 +2099,21 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt //region convenience copies input and output EM //new Method - public final cElementalInstanceStackMap getInputsClone_EM(){ - cElementalInstanceStackMap in=new cElementalInstanceStackMap(); - for(GT_MetaTileEntity_Hatch_ElementalContainer hatch:eInputHatches){ + public final cElementalInstanceStackMap getInputsClone_EM() { + cElementalInstanceStackMap in = new cElementalInstanceStackMap(); + for (GT_MetaTileEntity_Hatch_ElementalContainer hatch : eInputHatches) { in.putUnifyAll(hatch.getContainerHandler()); } - return in.hasStacks()?in:null; + return in.hasStacks() ? in : null; } //new Method - public final cElementalInstanceStackMap getOutputsClone_EM(){ - cElementalInstanceStackMap out=new cElementalInstanceStackMap(); - for(GT_MetaTileEntity_Hatch_ElementalContainer hatch:eOutputHatches){ + public final cElementalInstanceStackMap getOutputsClone_EM() { + cElementalInstanceStackMap out = new cElementalInstanceStackMap(); + for (GT_MetaTileEntity_Hatch_ElementalContainer hatch : eOutputHatches) { out.putUnifyAll(hatch.getContainerHandler()); } - return out.hasStacks()?out:null; + return out.hasStacks() ? out : null; } //endregion @@ -2124,18 +2154,18 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt public void cleanMassEM_EM(float mass) { if (mass > 0) { if (eMufflerHatches.size() < 1) { - TecTech.anomalyHandler.addAnomaly(getBaseMetaTileEntity(),mass); + TecTech.anomalyHandler.addAnomaly(getBaseMetaTileEntity(), mass); explodeMultiblock(); return; } mass /= eMufflerHatches.size(); - boolean shouldExplode=false; + boolean shouldExplode = false; for (GT_MetaTileEntity_Hatch_OverflowElemental dump : eMufflerHatches) { if (dump.addOverflowMatter(mass)) { - shouldExplode=true; + shouldExplode = true; } } - if(shouldExplode){ + if (shouldExplode) { explodeMultiblock(); } } @@ -2165,10 +2195,10 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt @Override public final void explodeMultiblock() { - if(explodedThisTick) { + if (explodedThisTick) { return; } - explodedThisTick=true; + explodedThisTick = true; if (!TecTech.configTecTech.BOOM_ENABLE) { TecTech.proxy.broadcast("Multi Explode BOOM! " + getBaseMetaTileEntity().getXCoord() + ' ' + getBaseMetaTileEntity().getYCoord() + ' ' + getBaseMetaTileEntity().getZCoord()); StackTraceElement[] ste = Thread.currentThread().getStackTrace(); @@ -2728,4 +2758,5 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt } return false; } -} + //endregion +} \ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java index 39871910d9..f928e99925 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java @@ -30,10 +30,12 @@ import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStat * Created by danie_000 on 17.12.2016. */ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { + //region variables public static final String machine = "EM Machinery"; private ItemStack loadedMachine; private IBehaviour currentBehaviour; + //endregion //region structure private static final String[][] shape = new String[][]{ @@ -94,6 +96,95 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa super(aName); } + private boolean setCurrentBehaviour(){ + ItemStack newMachine=mInventory[1]; + if(ItemStack.areItemStacksEqual(newMachine, loadedMachine)){ + return false; + } + loadedMachine=newMachine; + Supplier behaviourSupplier=GT_MetaTileEntity_EM_machine.BEHAVIOUR_MAP.get(new Util.ItemStack_NoNBT(newMachine)); + if(currentBehaviour==null && behaviourSupplier==null) { + return false; + } + if(currentBehaviour!=null){ + for(int i=6;i<10;i++){ + parametrization.removeGroup(i); + } + } + if(behaviourSupplier!=null){ + currentBehaviour=behaviourSupplier.get(); + currentBehaviour.parametersInstantiation(this, parametrization); + for(int i=6;i<10;i++){ + parametrization.setToDefaults(i,true,true); + } + } else { + currentBehaviour=null; + } + + return true; + } + + private static final HashMap> BEHAVIOUR_MAP = new HashMap<>(); + + public static void registerBehaviour(Supplier behaviour, ItemStack is) { + BEHAVIOUR_MAP.put(new Util.ItemStack_NoNBT(is), behaviour); + TecTech.LOGGER.info("Registered EM machine behaviour "+behaviour.get().getClass().getSimpleName()+' '+new Util.ItemStack_NoNBT(is).toString()); + } + + public interface IBehaviour { + /** + * instantiate parameters, u can also check machine tier here + * @param te + * @param parameters + */ + void parametersInstantiation(GT_MetaTileEntity_EM_machine te, Parameters parameters); + + /** + * handle parameters per recipe + * @param te this te instance + * @param parameters of this te + * @return return true if machine can start with current parameters, false if not + */ + boolean checkParametersInAndSetStatuses(GT_MetaTileEntity_EM_machine te, Parameters parameters); + + /** + * do recipe handling + * @param inputs from muxed inputs + * @param parameters array passed from previous method! + * @return null if recipe should not start, control object to set machine state and start recipe + */ + MultiblockControl process(cElementalInstanceStackMap[] inputs, GT_MetaTileEntity_EM_machine te, Parameters parameters); + } + + private void quantumStuff(boolean shouldIExist){ + IGregTechTileEntity base=getBaseMetaTileEntity(); + if(base!=null && base.getWorld()!=null) { + int xDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetX * 2+base.getXCoord(); + int yDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetY * 2+base.getYCoord(); + int zDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetZ * 2+base.getZCoord(); + Block block = base.getWorld().getBlock(xDir, yDir, zDir); + if (shouldIExist) { + if(block != null && block.getMaterial()== Material.air) { + base.getWorld().setBlock(xDir, yDir, zDir, QuantumStuffBlock.INSTANCE, 0, 2); + } + } else { + if (block instanceof QuantumStuffBlock) { + base.getWorld().setBlock(xDir, yDir, zDir, Blocks.air, 0, 2); + } + } + } + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_EM_machine(mName); + } + + @Override + public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { + return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 1); + } + @Override public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); @@ -121,26 +212,6 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa } } - @Override - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_EM_machine(mName); - } - - @Override - public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 1); - } - - @Override - public void construct(int stackSize, boolean hintsOnly) { - StructureBuilderExtreme(shape, blockType, blockMeta, 2, 2, 1, getBaseMetaTileEntity(), this,hintsOnly); - } - - @Override - public String[] getStructureDescription(int stackSize) { - return description; - } - @Override public String[] getDescription() { return new String[]{CommonValues.TEC_MARK_EM, "Processing quantum matter since...", EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "the time u started using it."}; @@ -154,21 +225,6 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa } } - @Override - public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if(aBaseMetaTileEntity.isClientSide() && (aTick & 0x2)==0){ - if((aTick&0x10)==0) { - setCurrentBehaviour(); - } - if(aBaseMetaTileEntity.isActive()){ - int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX*2+aBaseMetaTileEntity.getXCoord(); - int yDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetY*2+aBaseMetaTileEntity.getYCoord(); - int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ*2+aBaseMetaTileEntity.getZCoord(); - aBaseMetaTileEntity.getWorld().markBlockRangeForRenderUpdate(xDir,yDir,zDir,xDir,yDir,zDir); - } - } - } - @Override public void onRemoval() { quantumStuff(false); @@ -225,6 +281,13 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa return polluted; } + + @Override + public void stopMachine() { + quantumStuff(false); + super.stopMachine(); + } + @Override protected void afterRecipeCheckFailed() { quantumStuff(false); @@ -255,12 +318,6 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa //all other are handled by base multi block code - cleaning is automatic } - @Override - public void stopMachine() { - quantumStuff(false); - super.stopMachine(); - } - @Override public void parametersStatusesWrite_EM(boolean machineBusy) { if (!machineBusy) { @@ -269,82 +326,28 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa super.parametersStatusesWrite_EM(machineBusy); } - private boolean setCurrentBehaviour(){ - ItemStack newMachine=mInventory[1]; - if(ItemStack.areItemStacksEqual(newMachine, loadedMachine)){ - return false; - } - loadedMachine=newMachine; - Supplier behaviourSupplier=GT_MetaTileEntity_EM_machine.BEHAVIOUR_MAP.get(new Util.ItemStack_NoNBT(newMachine)); - if(currentBehaviour==null && behaviourSupplier==null) { - return false; - } - if(currentBehaviour!=null){ - for(int i=6;i<10;i++){ - parametrization.removeGroup(i); + @Override + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if(aBaseMetaTileEntity.isClientSide() && (aTick & 0x2)==0){ + if((aTick&0x10)==0) { + setCurrentBehaviour(); } - } - if(behaviourSupplier!=null){ - currentBehaviour=behaviourSupplier.get(); - currentBehaviour.parametersInstantiation(this, parametrization); - for(int i=6;i<10;i++){ - parametrization.setToDefaults(i,true,true); + if(aBaseMetaTileEntity.isActive()){ + int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX*2+aBaseMetaTileEntity.getXCoord(); + int yDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetY*2+aBaseMetaTileEntity.getYCoord(); + int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ*2+aBaseMetaTileEntity.getZCoord(); + aBaseMetaTileEntity.getWorld().markBlockRangeForRenderUpdate(xDir,yDir,zDir,xDir,yDir,zDir); } - } else { - currentBehaviour=null; } - - return true; - } - - private static final HashMap> BEHAVIOUR_MAP = new HashMap<>(); - - public static void registerBehaviour(Supplier behaviour, ItemStack is) { - BEHAVIOUR_MAP.put(new Util.ItemStack_NoNBT(is), behaviour); - TecTech.LOGGER.info("Registered EM machine behaviour "+behaviour.get().getClass().getSimpleName()+' '+new Util.ItemStack_NoNBT(is).toString()); } - public interface IBehaviour { - /** - * instantiate parameters, u can also check machine tier here - * @param te - * @param parameters - */ - void parametersInstantiation(GT_MetaTileEntity_EM_machine te, Parameters parameters); - - /** - * handle parameters per recipe - * @param te this te instance - * @param parameters of this te - * @return return true if machine can start with current parameters, false if not - */ - boolean checkParametersInAndSetStatuses(GT_MetaTileEntity_EM_machine te, Parameters parameters); - - /** - * do recipe handling - * @param inputs from muxed inputs - * @param parameters array passed from previous method! - * @return null if recipe should not start, control object to set machine state and start recipe - */ - MultiblockControl process(cElementalInstanceStackMap[] inputs, GT_MetaTileEntity_EM_machine te, Parameters parameters); + @Override + public void construct(int stackSize, boolean hintsOnly) { + StructureBuilderExtreme(shape, blockType, blockMeta, 2, 2, 1, getBaseMetaTileEntity(), this,hintsOnly); } - private void quantumStuff(boolean shouldExist){ - IGregTechTileEntity base=getBaseMetaTileEntity(); - if(base!=null && base.getWorld()!=null) { - int xDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetX * 2+base.getXCoord(); - int yDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetY * 2+base.getYCoord(); - int zDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetZ * 2+base.getZCoord(); - Block block = base.getWorld().getBlock(xDir, yDir, zDir); - if (shouldExist) { - if(block != null && block.getMaterial()== Material.air) { - base.getWorld().setBlock(xDir, yDir, zDir, QuantumStuffBlock.INSTANCE, 0, 2); - } - } else { - if (block instanceof QuantumStuffBlock) { - base.getWorld().setBlock(xDir, yDir, zDir, Blocks.air, 0, 2); - } - } - } + @Override + public String[] getStructureDescription(int stackSize) { + return description; } -} +} \ No newline at end of file -- cgit From 77a23fbedcc7d9799475a382c92e2cb6cad02e24 Mon Sep 17 00:00:00 2001 From: Bass Date: Sat, 31 Aug 2019 03:00:03 +0100 Subject: Lang continued --- .../multi/GT_MetaTileEntity_EM_collider.java | 22 ++--- .../multi/GT_MetaTileEntity_EM_research.java | 56 +++++++---- .../multi/GT_MetaTileEntity_EM_scanner.java | 106 +++++++++++++-------- src/main/resources/assets/tectech/lang/en_US.lang | 39 +++++++- 4 files changed, 151 insertions(+), 72 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java index 8e0cf294f3..2b0b0f8465 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java @@ -283,13 +283,13 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB if (base_EM.isMaster()) { double mode = p.get(); if (mode == FUSE_MODE) { - return "Mode: Fuse"; + return translateToLocal("gt.blockmachines.multimachine.em.collider.mode.0");//Mode: Fuse } else if (mode == COLLIDE_MODE) { - return "Mode: Collide"; + return translateToLocal("gt.blockmachines.multimachine.em.collider.mode.1");//Mode: Collide } - return "Mode: Undefined"; + return translateToLocal("gt.blockmachines.multimachine.em.collider.mode.2");//Mode: Undefined } - return "Currently Slaves..."; + return translateToLocal("gt.blockmachines.multimachine.em.collider.mode.3");//Currently Slaves... }; //endregion @@ -338,11 +338,11 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB private static final byte[] blockMetaFallback = new byte[]{0, 4, 4, 4}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", - "1 - Classic Hatches or High Power Casing", - "2 - Elemental Input Hatches or Molecular Casing", - "3 - Elemental Output Hatches or Molecular Casing", - "4 - Elemental Overflow Hatches or Molecular Casing", - "General - Another Controller facing opposite direction", + translateToLocal("gt.blockmachines.multimachine.em.collider.hint.0"),//1 - Classic Hatches or High Power Casing + translateToLocal("gt.blockmachines.multimachine.em.collider.hint.1"),//2 - Elemental Input Hatches or Molecular Casing + translateToLocal("gt.blockmachines.multimachine.em.collider.hint.2"),//3 - Elemental Output Hatches or Molecular Casing + translateToLocal("gt.blockmachines.multimachine.em.collider.hint.3"),//4 - Elemental Overflow Hatches or Molecular Casing + translateToLocal("gt.blockmachines.multimachine.em.collider.hint.4"),//General - Another Controller facing opposite direction }; //endregion @@ -573,8 +573,8 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB public String[] getDescription() { return new String[]{ CommonValues.TEC_MARK_EM, - "Collide matter at extreme velocities.", - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Faster than light*!!!" + translateToLocal("gt.blockmachines.multimachine.em.collider.desc.0"),//Collide matter at extreme velocities. + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.collider.desc.1")//Faster than light*!!! }; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java index 0690a30b8b..5b1c54695c 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java @@ -22,12 +22,15 @@ import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.nbt.NBTTagString; import net.minecraft.util.EnumChatFormatting; +import org.apache.commons.lang3.reflect.FieldUtils; import java.util.ArrayList; import java.util.LinkedHashMap; @@ -43,6 +46,7 @@ import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileE import static com.github.technus.tectech.thing.metaTileEntity.multi.em_machine.GT_MetaTileEntity_EM_machine.machine; import static gregtech.api.enums.GT_Values.E; import static net.minecraft.util.StatCollector.translateToLocal; +import static net.minecraft.util.StatCollector.translateToLocalFormatted; /** * Created by danie_000 on 17.12.2016. @@ -55,6 +59,10 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB private String machineType; private ItemStack holdItem; private long computationRemaining, computationRequired; + + private static LinkedHashMap lServerNames; + + private String clientLocale = "en_US"; //endregion //region structure @@ -75,8 +83,8 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB private static final byte[] blockMetaFallback = new byte[]{1, 0}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", - "1 - Classic/Data Hatches or Computer casing", - "2 - Holder Hatch", + translateToLocal("gt.blockmachines.multimachine.em.research.hint.0"),//1 - Classic/Data Hatches or Computer casing + translateToLocal("gt.blockmachines.multimachine.em.research.hint.1"),//2 - Holder Hatch }; //endregion @@ -119,8 +127,6 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB tNBT.setTag("pages", tNBTList); } - private static LinkedHashMap lServerNames; - static { try { Class GT_Assemblyline_Server = Class.forName("gregtech.api.util.GT_Assemblyline_Server"); @@ -339,8 +345,8 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB public String[] getDescription() { return new String[]{ CommonValues.TEC_MARK_EM, - "Philosophers didn't even...", - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "dream about it!" + translateToLocal("gt.blockmachines.multimachine.em.research.desc.0"),//Philosophers didn't even... + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.research.desc.0")//dream about it! }; } @@ -362,20 +368,20 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB } return new String[]{ - "Energy Hatches:", + translateToLocalFormatted("tt.keyphrase.Energy_Hatches", clientLocale) + ":", EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET + " EU / " + EnumChatFormatting.YELLOW + maxEnergy + EnumChatFormatting.RESET + " EU", - (mEUt <= 0 ? "Probably uses: " : "Probably makes: ") + - EnumChatFormatting.RED + Math.abs(mEUt) + EnumChatFormatting.RESET + " EU/t at " + + (mEUt <= 0 ? translateToLocalFormatted("tt.keyphrase.Probably_uses", clientLocale) + ": " : translateToLocalFormatted("tt.keyphrase.Probably_makes", clientLocale) + ": ") + + EnumChatFormatting.RED + Math.abs(mEUt) + EnumChatFormatting.RESET + " EU/t " + translateToLocalFormatted("tt.keyword.at", clientLocale) + " " + EnumChatFormatting.RED + eAmpereFlow + EnumChatFormatting.RESET + " A", - "Tier Rating: " + EnumChatFormatting.YELLOW + VN[getMaxEnergyInputTier_EM()] + EnumChatFormatting.RESET + " / " + EnumChatFormatting.GREEN + VN[getMinEnergyInputTier_EM()] + EnumChatFormatting.RESET + - " Amp Rating: " + EnumChatFormatting.GREEN + eMaxAmpereFlow + EnumChatFormatting.RESET + " A", - "Problems: " + EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + - " Efficiency: " + EnumChatFormatting.YELLOW + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", - "PowerPass: " + EnumChatFormatting.BLUE + ePowerPass + EnumChatFormatting.RESET + - " SafeVoid: " + EnumChatFormatting.BLUE + eSafeVoid, - "Computation Available: " + EnumChatFormatting.GREEN + eAvailableData + EnumChatFormatting.RESET, - "Computation Remaining:", + translateToLocalFormatted("tt.keyphrase.Tier_Rating", clientLocale) + ": " + EnumChatFormatting.YELLOW + VN[getMaxEnergyInputTier_EM()] + EnumChatFormatting.RESET + " / " + EnumChatFormatting.GREEN + VN[getMinEnergyInputTier_EM()] + EnumChatFormatting.RESET + + " " + translateToLocalFormatted("tt.keyphrase.Amp_Rating", clientLocale) + ": " + EnumChatFormatting.GREEN + eMaxAmpereFlow + EnumChatFormatting.RESET + " A", + translateToLocalFormatted("tt.keyword.Problems", clientLocale) + ": " + EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + + " " + translateToLocalFormatted("tt.keyword.Efficiency", clientLocale) + ": " + EnumChatFormatting.YELLOW + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", + translateToLocalFormatted("tt.keyword.PowerPass", clientLocale) + ": " + EnumChatFormatting.BLUE + ePowerPass + EnumChatFormatting.RESET + + " " + translateToLocalFormatted("tt.keyword.SafeVoid", clientLocale) + ": " + EnumChatFormatting.BLUE + eSafeVoid, + translateToLocalFormatted("tt.keyphrase.Computation_Available", clientLocale) + ": " + EnumChatFormatting.GREEN + eAvailableData + EnumChatFormatting.RESET + " / " + EnumChatFormatting.YELLOW + eRequiredData + EnumChatFormatting.RESET, + translateToLocalFormatted("tt.keyphrase.Computation_Remaining", clientLocale) + ":", EnumChatFormatting.GREEN + Long.toString(computationRemaining / 20L) + EnumChatFormatting.RESET + " / " + EnumChatFormatting.YELLOW + computationRequired / 20L }; @@ -519,6 +525,22 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB return false; } + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + if (!aBaseMetaTileEntity.isClientSide() && aPlayer instanceof EntityPlayerMP) { + try { + EntityPlayerMP player = (EntityPlayerMP) aPlayer; + clientLocale = (String) FieldUtils.readField(player, "translator", true); + } catch (Exception e) { + clientLocale = "en_US"; + } + } else { + return true; + } + System.out.println(clientLocale); + return true; + } + @Override public int getInventoryStackLimit() { return 1; diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java index 20ba5eb57f..51d49b3653 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java @@ -23,11 +23,14 @@ import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Recipe; import net.minecraft.block.Block; import net.minecraft.block.material.Material; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.common.util.ForgeDirection; +import org.apache.commons.lang3.reflect.FieldUtils; import static com.github.technus.tectech.CommonValues.V; import static com.github.technus.tectech.CommonValues.VN; @@ -41,6 +44,7 @@ import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBloc import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_crafting.crafter; import static com.github.technus.tectech.thing.metaTileEntity.multi.em_machine.GT_MetaTileEntity_EM_machine.machine; import static net.minecraft.util.StatCollector.translateToLocal; +import static net.minecraft.util.StatCollector.translateToLocalFormatted; /** * Created by danie_000 on 17.12.2016. @@ -56,8 +60,10 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa private cElementalDefinitionStack objectResearched; private cElementalInstanceStackMap objectsScanned; private String machineType; - private long totalComputationRemaining, totalComputationRequired; + private long computationRemaining, computationRequired; private int[] scanComplexity; + + private String clientLocale = "en_US"; //endregion //region structure @@ -139,56 +145,56 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa private void addComputationRequirements(int depthPlus, int capabilities) { if (areBitsSet(SCAN_GET_NOMENCLATURE, capabilities)) { - totalComputationRequired += depthPlus * 5L; + computationRequired += depthPlus * 5L; eRequiredData += depthPlus; } if (areBitsSet(SCAN_GET_DEPTH_LEVEL, capabilities)) { - totalComputationRequired += depthPlus * 10L; + computationRequired += depthPlus * 10L; eRequiredData += depthPlus; } if (areBitsSet(SCAN_GET_AMOUNT, capabilities)) { - totalComputationRequired += depthPlus * 64L; + computationRequired += depthPlus * 64L; eRequiredData += depthPlus * 8L; } if (areBitsSet(SCAN_GET_CHARGE, capabilities)) { - totalComputationRequired += depthPlus * 128L; + computationRequired += depthPlus * 128L; eRequiredData += depthPlus * 4L; } if (areBitsSet(SCAN_GET_MASS, capabilities)) { - totalComputationRequired += depthPlus * 256L; + computationRequired += depthPlus * 256L; eRequiredData += depthPlus * 4L; } if (areBitsSet(SCAN_GET_ENERGY_LEVEL, capabilities)) { - totalComputationRequired += depthPlus * 512L; + computationRequired += depthPlus * 512L; eRequiredData += depthPlus * 16L; } if (areBitsSet(SCAN_GET_TIMESPAN_INFO, capabilities)) { - totalComputationRequired += depthPlus * 1024L; + computationRequired += depthPlus * 1024L; eRequiredData += depthPlus * 32L; } if (areBitsSet(SCAN_GET_ENERGY_STATES, capabilities)) { - totalComputationRequired += depthPlus * 2048L; + computationRequired += depthPlus * 2048L; eRequiredData += depthPlus * 32L; } if (areBitsSet(SCAN_GET_COLOR, capabilities)) { - totalComputationRequired += depthPlus * 1024L; + computationRequired += depthPlus * 1024L; eRequiredData += depthPlus * 48L; } if (areBitsSet(SCAN_GET_AGE, capabilities)) { - totalComputationRequired += depthPlus * 2048L; + computationRequired += depthPlus * 2048L; eRequiredData += depthPlus * 64L; } if (areBitsSet(SCAN_GET_TIMESPAN_MULT, capabilities)) { - totalComputationRequired += depthPlus * 2048L; + computationRequired += depthPlus * 2048L; eRequiredData += depthPlus * 64L; } @@ -238,7 +244,7 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa researchEM.remove(stackEM.definition); } if (eRecipe != null && scannerRecipe != null) {//todo make sure it werks - totalComputationRequired = totalComputationRemaining = scannerRecipe.mDuration * 20L; + computationRequired = computationRemaining = scannerRecipe.mDuration * 20L; mMaxProgresstime = 20;//const mEfficiencyIncrease = 10000; eRequiredData = (short) (scannerRecipe.mSpecialValue >>> 16); @@ -253,7 +259,7 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa objectsScanned = researchEM.takeAllToNewMap(); cleanMassEM_EM(objectsScanned.getMass()); - totalComputationRequired = 0; + computationRequired = 0; eRequiredData = 0; eAmpereFlow = objectsScanned.size() + TecTech.RANDOM.next(objectsScanned.size()); mEUt = -(int) V[8]; @@ -279,7 +285,7 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa System.arraycopy(scanComplexityTemp, 0, scanComplexity, 0, maxDepth); } - totalComputationRemaining = totalComputationRequired *= 20; + computationRemaining = computationRequired *= 20; mMaxProgresstime = 20;//const mEfficiencyIncrease = 10000; quantumStuff(true); @@ -289,7 +295,7 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa } quantumStuff(false); objectResearched = null; - totalComputationRemaining = 0; + computationRemaining = 0; return false; } @@ -307,7 +313,7 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa ElementalDefinitionScanStorage_EM.setContent(mInventory[1], objectsScanned, scanComplexity); } objectResearched = null; - totalComputationRemaining = 0; + computationRemaining = 0; quantumStuff(false); } @@ -315,8 +321,8 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa public String[] getDescription() { return new String[]{ CommonValues.TEC_MARK_EM, - "",//What is existing here? - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + ""//I HAVE NO IDEA (yet)! + translateToLocal("gt.blockmachines.multimachine.em.scanner.desc.0"),//What is existing here? + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.scanner.desc.1")//I HAVE NO IDEA (yet)! }; } @@ -338,22 +344,22 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa } return new String[]{ - "Energy Hatches:", + translateToLocalFormatted("tt.keyphrase.Energy_Hatches", clientLocale) + ":", EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET + " EU / " + EnumChatFormatting.YELLOW + maxEnergy + EnumChatFormatting.RESET + " EU", - (mEUt <= 0 ? "Probably uses: " : "Probably makes: ") + - EnumChatFormatting.RED + Math.abs(mEUt) + EnumChatFormatting.RESET + " EU/t at " + + (mEUt <= 0 ? translateToLocalFormatted("tt.keyphrase.Probably_uses", clientLocale) + ": " : translateToLocalFormatted("tt.keyphrase.Probably_makes", clientLocale) + ": ") + + EnumChatFormatting.RED + Math.abs(mEUt) + EnumChatFormatting.RESET + " EU/t " + translateToLocalFormatted("tt.keyword.at", clientLocale) + " " + EnumChatFormatting.RED + eAmpereFlow + EnumChatFormatting.RESET + " A", - "Tier Rating: " + EnumChatFormatting.YELLOW + VN[getMaxEnergyInputTier_EM()] + EnumChatFormatting.RESET + " / " + EnumChatFormatting.GREEN + VN[getMinEnergyInputTier_EM()] + EnumChatFormatting.RESET + - " Amp Rating: " + EnumChatFormatting.GREEN + eMaxAmpereFlow + EnumChatFormatting.RESET + " A", - "Problems: " + EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + - " Efficiency: " + EnumChatFormatting.YELLOW + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", - "PowerPass: " + EnumChatFormatting.BLUE + ePowerPass + EnumChatFormatting.RESET + - " SafeVoid: " + EnumChatFormatting.BLUE + eSafeVoid, - "Computation Available: " + EnumChatFormatting.GREEN + eAvailableData + EnumChatFormatting.RESET + " / " + EnumChatFormatting.YELLOW + eRequiredData + EnumChatFormatting.RESET, - "Computation Remaining:", - EnumChatFormatting.GREEN + Long.toString(totalComputationRemaining / 20L) + EnumChatFormatting.RESET + " / " + - EnumChatFormatting.YELLOW + totalComputationRequired / 20L + translateToLocalFormatted("tt.keyphrase.Tier_Rating", clientLocale) + ": " + EnumChatFormatting.YELLOW + VN[getMaxEnergyInputTier_EM()] + EnumChatFormatting.RESET + " / " + EnumChatFormatting.GREEN + VN[getMinEnergyInputTier_EM()] + EnumChatFormatting.RESET + + " " + translateToLocalFormatted("tt.keyphrase.Amp_Rating", clientLocale) + ": " + EnumChatFormatting.GREEN + eMaxAmpereFlow + EnumChatFormatting.RESET + " A", + translateToLocalFormatted("tt.keyword.Problems", clientLocale) + ": " + EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + + " " + translateToLocalFormatted("tt.keyword.Efficiency", clientLocale) + ": " + EnumChatFormatting.YELLOW + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", + translateToLocalFormatted("tt.keyword.PowerPass", clientLocale) + ": " + EnumChatFormatting.BLUE + ePowerPass + EnumChatFormatting.RESET + + " " + translateToLocalFormatted("tt.keyword.SafeVoid", clientLocale) + ": " + EnumChatFormatting.BLUE + eSafeVoid, + translateToLocalFormatted("tt.keyphrase.Computation_Available", clientLocale) + ": " + EnumChatFormatting.GREEN + eAvailableData + EnumChatFormatting.RESET + " / " + EnumChatFormatting.YELLOW + eRequiredData + EnumChatFormatting.RESET, + translateToLocalFormatted("tt.keyphrase.Computation_Remaining", clientLocale) + ":", + EnumChatFormatting.GREEN + Long.toString(computationRemaining / 20L) + EnumChatFormatting.RESET + " / " + + EnumChatFormatting.YELLOW + computationRequired / 20L }; } @@ -376,8 +382,8 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa @Override public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); - aNBT.setLong("eComputationRemaining", totalComputationRemaining); - aNBT.setLong("eComputationRequired", totalComputationRequired); + aNBT.setLong("eComputationRemaining", computationRemaining); + aNBT.setLong("eComputationRequired", computationRequired); if (objectResearched != null) { aNBT.setTag("eObject", objectResearched.toNBT()); } else { @@ -398,8 +404,8 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa @Override public void loadNBTData(NBTTagCompound aNBT) { super.loadNBTData(aNBT); - totalComputationRemaining = aNBT.getLong("eComputationRemaining"); - totalComputationRequired = aNBT.getLong("eComputationRequired"); + computationRemaining = aNBT.getLong("eComputationRemaining"); + computationRequired = aNBT.getLong("eComputationRequired"); if (aNBT.hasKey("eObject")) { objectResearched = cElementalDefinitionStack.fromNBT(aNBT.getCompoundTag("eObject")); if (objectResearched.definition == nbtE__) { @@ -426,7 +432,7 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa public void stopMachine() { quantumStuff(false); super.stopMachine(); - totalComputationRequired = totalComputationRemaining = 0; + computationRequired = computationRemaining = 0; objectResearched = null; } @@ -434,7 +440,7 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa @Override public void onFirstTick_EM(IGregTechTileEntity aBaseMetaTileEntity) { if (aBaseMetaTileEntity.isServerSide()) { - if (totalComputationRemaining > 0 && objectResearched != null) { + if (computationRemaining > 0 && objectResearched != null) { eRecipe = null; if (ItemList.Tool_DataOrb.isStackEqual(mInventory[1], false, true)) { eRecipe = TT_recipe.TT_Recipe_Map_EM.sMachineRecipesEM.findRecipe(objectResearched.definition); @@ -451,7 +457,7 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa quantumStuff(false); objectResearched = null; eRequiredData = 0; - totalComputationRequired = totalComputationRemaining = 0; + computationRequired = computationRemaining = 0; mMaxProgresstime = 0; mEfficiencyIncrease = 0; } else { @@ -463,17 +469,33 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa @Override public boolean onRunningTick(ItemStack aStack) { - if (totalComputationRemaining <= 0) { - totalComputationRemaining = 0; + if (computationRemaining <= 0) { + computationRemaining = 0; mProgresstime = mMaxProgresstime; return true; } else { - totalComputationRemaining -= eAvailableData; + computationRemaining -= eAvailableData; mProgresstime = 1; return super.onRunningTick(aStack); } } + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + if (!aBaseMetaTileEntity.isClientSide() && aPlayer instanceof EntityPlayerMP) { + try { + EntityPlayerMP player = (EntityPlayerMP) aPlayer; + clientLocale = (String) FieldUtils.readField(player, "translator", true); + } catch (Exception e) { + clientLocale = "en_US"; + } + } else { + return true; + } + System.out.println(clientLocale); + return true; + } + @Override public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (aBaseMetaTileEntity.isActive() && (aTick & 0x2) == 0 && aBaseMetaTileEntity.isClientSide()) { diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index b9e7b21e4f..c1ba86678c 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -324,6 +324,7 @@ gt.blockmachines.emout.tier.11.name=UIV Elemental Output Hatch gt.blockmachines.emout.tier.12.name=UMV Elemental Output Hatch gt.blockmachines.emout.tier.13.name=UXV Elemental Output Hatch gt.blockmachines.emout.desc=Elemental Output for Multiblocks + #Multiblocks gt.blockmachines.multimachine.em.transformer.name=Active Transformer gt.blockmachines.multimachine.em.transformer.hint=1 - Energy IO Hatches or High Power Casing @@ -433,8 +434,23 @@ gt.blockmachines.multimachine.em.scanner.desc.0=What is existing here? gt.blockmachines.multimachine.em.scanner.desc.1=I HAVE NO IDEA (yet)! gt.blockmachines.multimachine.em.research.name=Research station +gt.blockmachines.multimachine.em.research.hint.0=1 - Classic/Data Hatches or Computer casing +gt.blockmachines.multimachine.em.research.hint.1=2 - Holder Hatch +gt.blockmachines.multimachine.em.research.desc.0=Philosophers didn't even... +gt.blockmachines.multimachine.em.research.desc.1=dream about it! gt.blockmachines.multimachine.em.collider.name=Matter Collider +gt.blockmachines.multimachine.em.collider.hint.0=1 - Classic Hatches or High Power Casing +gt.blockmachines.multimachine.em.collider.hint.1=2 - Elemental Input Hatches or Molecular Casing +gt.blockmachines.multimachine.em.collider.hint.2=3 - Elemental Output Hatches or Molecular Casing +gt.blockmachines.multimachine.em.collider.hint.3=4 - Elemental Overflow Hatches or Molecular Casing +gt.blockmachines.multimachine.em.collider.hint.4=General - Another Controller facing opposite direction +gt.blockmachines.multimachine.em.collider.desc.0=Collide matter at extreme velocities. +gt.blockmachines.multimachine.em.collider.desc.1=Faster than light*!!! +gt.blockmachines.multimachine.em.collider.mode.0=Mode: Fuse +gt.blockmachines.multimachine.em.collider.mode.1=Mode: Collide +gt.blockmachines.multimachine.em.collider.mode.2=Mode: Undefined +gt.blockmachines.multimachine.em.collider.mode.3=Currently Slaves... gt.blockmachines.multimachine.em.infuser.name=Energy Infuser @@ -452,8 +468,12 @@ gt.blockmachines.multimachine.em.annihilation.name=Annihilation Generator gt.blockmachines.multimachine.em.blackholegenerator.name=Black Hole Generator - #Keywords and phrases +#Example: ID:3 +tt.keyword.ID=ID +#Example: 32EU at 1A +tt.keyword.at=at +#These are Thaumcraft aspects tt.keyword.Air=Air tt.keyword.Earth=Earth tt.keyword.Fire=Fire @@ -468,20 +488,35 @@ tt.keyword.CHARGE=CHARGE tt.keyword.COLORLESS=COLORLESS tt.keyword.MASS=MASS tt.keyword.BOOM=BOOM! -tt.keyword.ID=ID tt.keyword.Destination=Destination tt.keyword.Weight=Weight tt.keyword.Source=Source +#Problemns as in maintanance issues +tt.keyword.Problems=Problems +tt.keyword.Efficiency=Efficiency +#Button that allows to pass power to other machines +tt.keyword.PowerPass=PowerPass +#Button that vents EM +tt.keyword.SafeVoid=SafeVoid tt.keyphrase.LIFE_TIME=LIFE TIME tt.keyphrase.CARRIES_COLOR=CARRIES COLOR tt.keyphrase.Hint_Details=Hint Details tt.keyphrase.At_current_energy_level=At current energy level +#Used when 0 Elemental Matter Stacks tt.keyphrase.No_Stacks=No Stacks tt.keyphrase.Contains_EM=Contains EM tt.keyphrase.Contained_mass=Contained mass tt.keyphrase.Mass_Disposal_speed=Mass Disposal speed tt.keyphrase.Muffler_BOOM=Muffler BOOM! +tt.keyphrase.Energy_Hatches=Energy Hatches +tt.keyphrase.Probably_uses=Probably uses +tt.keyphrase.Probably_makes=Probably makes +tt.keyphrase.Tier_Rating=Tier Rating +tt.keyphrase.Amp_Rating=Amp Rating +tt.keyphrase.Computation_Available=Computation Available +tt.keyphrase.Computation_Remaining=Computation Remaining + #OpenTurrets compatibility tile.turretHeadEM.name=Elemental Matter Turret tile.turretBaseEM.name=Elemental Turret Base \ No newline at end of file -- cgit From d72cdd2d70e37c2217ddb2d24cbc2a804dacdee6 Mon Sep 17 00:00:00 2001 From: Bass Date: Sun, 1 Sep 2019 08:34:10 +0100 Subject: Decay Generator Housekeeping proceedure --- .../multi/GT_MetaTileEntity_EM_decay.java | 68 +++++++++++----------- 1 file changed, 34 insertions(+), 34 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java index f650d550c5..65f93d537c 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java @@ -41,29 +41,29 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase public static final double URANIUM_INGOT_MASS_DIFF = 1.6114516E10; private static final double URANIUM_MASS_TO_EU_PARTIAL = ConfigUtil.getFloat(MainConfig.get(), "balance/energy/generator/nuclear") * 3_000_000.0 / URANIUM_INGOT_MASS_DIFF; - public static final double URANIUM_MASS_TO_EU_INSTANT = URANIUM_MASS_TO_EU_PARTIAL *20; + public static final double URANIUM_MASS_TO_EU_INSTANT = URANIUM_MASS_TO_EU_PARTIAL * 20; //endregion //region structure private static final String[][] shape = new String[][]{ - {"0C0","A ","A . ","A ","0C0",}, - {"00000","00000","00000","00000","00000",}, - {"0C0","A!!!","A!0!","A!!!","0C0",}, - {"01110","12221","12221","12221","01110",}, - {"01310","12221","32223","12221","01310",}, - {"01110","12221","12221","12221","01110",}, - {"0C0","A!!!","A!0!","A!!!","0C0",}, - {"00000","00000","00000","00000","00000",}, - {"0C0","A ","A ","A ","0C0",}, + {"0C0", "A ", "A . ", "A ", "0C0",}, + {"00000", "00000", "00000", "00000", "00000",}, + {"0C0", "A!!!", "A!0!", "A!!!", "0C0",}, + {"01110", "12221", "12221", "12221", "01110",}, + {"01310", "12221", "32223", "12221", "01310",}, + {"01110", "12221", "12221", "12221", "01110",}, + {"0C0", "A!!!", "A!0!", "A!!!", "0C0",}, + {"00000", "00000", "00000", "00000", "00000",}, + {"0C0", "A ", "A ", "A ", "0C0",}, }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT ,sBlockCasingsTT}; + private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMeta = new byte[]{4, 5, 8, 6}; private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addClassicToMachineList, this::addElementalToMachineList}; private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0, 4}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA+"Hint Details:", + EnumChatFormatting.AQUA + "Hint Details:", "1 - Classic Hatches or High Power Casing", "2 - Elemental Hatches or Molecular Casing", }; @@ -71,9 +71,9 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase //region parameters protected Parameters.Group.ParameterIn ampereFlow; - private static final INameFunction FLOW_NAME= (base, p)->"Ampere divider"; - private static final IStatusFunction FLOW_STATUS= (base, p)->{ - if(base.eAmpereFlow<=0){ + private static final INameFunction FLOW_NAME = (base, p) -> "Ampere divider"; + private static final IStatusFunction FLOW_STATUS = (base, p) -> { + if (base.eAmpereFlow <= 0) { return STATUS_TOO_LOW; } return STATUS_OK; @@ -100,9 +100,9 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase @Override public boolean checkRecipe_EM(ItemStack itemStack) { - cElementalInstanceStackMap map= getInputsClone_EM(); - if(map!=null && map.hasStacks()){ - for(GT_MetaTileEntity_Hatch_InputElemental i:eInputHatches){ + cElementalInstanceStackMap map = getInputsClone_EM(); + if (map != null && map.hasStacks()) { + for (GT_MetaTileEntity_Hatch_InputElemental i : eInputHatches) { i.getContainerHandler().clear(); } return startRecipe(map); @@ -113,40 +113,40 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase private boolean startRecipe(cElementalInstanceStackMap input) { mMaxProgresstime = 20; mEfficiencyIncrease = 10000; - outputEM=new cElementalInstanceStackMap[2]; - outputEM[0]=input; - outputEM[1]=new cElementalInstanceStackMap(); + outputEM = new cElementalInstanceStackMap[2]; + outputEM[0] = input; + outputEM[1] = new cElementalInstanceStackMap(); - for(cElementalInstanceStack stack:outputEM[0].values()){ + for (cElementalInstanceStack stack : outputEM[0].values()) { if (stack.getEnergy() == 0 && stack.definition.decayMakesEnergy(1) && getBaseMetaTileEntity().decreaseStoredEnergyUnits( (long) (stack.getEnergySettingCost(1) * URANIUM_MASS_TO_EU_INSTANT), false)) { stack.setEnergy(1); - }else if(!stack.definition.decayMakesEnergy(stack.getEnergy())){ + } else if (!stack.definition.decayMakesEnergy(stack.getEnergy())) { outputEM[0].remove(stack.definition); outputEM[1].putReplace(stack); } //System.out.println(stack.definition.getSymbol()+" "+stack.amount); } - float preMass=outputEM[0].getMass(); - outputEM[0].tickContent(1,0,1); - double energyDose=((preMass-outputEM[0].getMass())* URANIUM_MASS_TO_EU_PARTIAL); - eAmpereFlow=(long) ampereFlow.get(); + float preMass = outputEM[0].getMass(); + outputEM[0].tickContent(1, 0, 1); + double energyDose = ((preMass - outputEM[0].getMass()) * URANIUM_MASS_TO_EU_PARTIAL); + eAmpereFlow = (long) ampereFlow.get(); if (eAmpereFlow <= 0) { - mEUt=0; + mEUt = 0; return false; } - mEUt=(int)(energyDose/eAmpereFlow); + mEUt = (int) (energyDose / eAmpereFlow); return outputEM[0].hasStacks(); } @Override public void outputAfterRecipe_EM() { - for(int i=0;i<2&&i Date: Sun, 1 Sep 2019 09:16:43 +0100 Subject: Lang even more --- .../multi/GT_MetaTileEntity_EM_crafting.java | 11 +- .../multi/GT_MetaTileEntity_EM_infuser.java | 13 ++- .../multi/GT_MetaTileEntity_EM_stabilizer.java | 11 +- .../multi/GT_MetaTileEntity_EM_wormhole.java | 11 +- .../em_machine/GT_MetaTileEntity_EM_machine.java | 123 +++++++++++---------- src/main/resources/assets/tectech/lang/en_US.lang | 21 ++++ 6 files changed, 111 insertions(+), 79 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java index 8e55ba4988..263a46a9d3 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java @@ -21,6 +21,7 @@ import static com.github.technus.tectech.Util.StructureBuilderExtreme; 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 net.minecraft.util.StatCollector.translateToLocal; /** * Created by danie_000 on 17.12.2016. @@ -54,9 +55,9 @@ public class GT_MetaTileEntity_EM_crafting extends GT_MetaTileEntity_MultiblockB private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0, 4}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA + "Hint Details:", - "1 - Classic Hatches or High Power Casing", - "2 - Elemental Hatches or Molecular Casing", + EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", + translateToLocal("gt.blockmachines.multimachine.em.crafter.hint.0"),//1 - Classic Hatches or High Power Casing + translateToLocal("gt.blockmachines.multimachine.em.crafter.hint.1"),//2 - Elemental Hatches or Molecular Casing }; //endregion @@ -90,8 +91,8 @@ public class GT_MetaTileEntity_EM_crafting extends GT_MetaTileEntity_MultiblockB public String[] getDescription() { return new String[]{ CommonValues.TEC_MARK_EM, - "The most precise way of making stuff.", - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "(Trans-Planck process)" + translateToLocal("gt.blockmachines.multimachine.em.crafter.desc.0"),//The most precise way of making stuff. + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.crafter.desc.1")// }; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java index 71be7013be..4e8e8d27ec 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java @@ -27,6 +27,7 @@ import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static gregtech.api.GregTech_API.mEUtoRF; +import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by danie_000 on 17.12.2016. @@ -45,8 +46,8 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA + "Hint Details:", - "1 - Classic Hatches or High Power Casing", + EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", + translateToLocal("gt.blockmachines.multimachine.em.infuser.hint"),//1 - Classic Hatches or High Power Casing }; //endregion @@ -155,10 +156,10 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa public String[] getDescription() { return new String[]{ CommonValues.TEC_MARK_GENERAL, - "Power Transfer Extreme!", - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Insanely fast charging!", - EnumChatFormatting.BLUE + "Doesn't work while broken!", - EnumChatFormatting.BLUE + "Power loss is a thing." + translateToLocal("gt.blockmachines.multimachine.em.infuser.desc.0"),//Power Transfer Extreme! + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.infuser.desc.1"), + EnumChatFormatting.BLUE + translateToLocal("gt.blockmachines.multimachine.em.infuser.desc.2"), + EnumChatFormatting.BLUE + translateToLocal("gt.blockmachines.multimachine.em.infuser.desc.3") }; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java index a51e8a781f..b159827012 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java @@ -14,6 +14,7 @@ import net.minecraft.util.EnumChatFormatting; import static com.github.technus.tectech.Util.StructureBuilderExtreme; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; +import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by danie_000 on 17.12.2016. @@ -34,9 +35,9 @@ public class GT_MetaTileEntity_EM_stabilizer extends GT_MetaTileEntity_Multibloc private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0, 4}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA + "Hint Details:", - "1 - Classic Hatches or High Power Casing", - "2 - Elemental Hatches or Molecular Casing", + EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", + translateToLocal("gt.blockmachines.multimachine.em.stabilizer.hint.0"),//1 - Classic Hatches or High Power Casing + translateToLocal("gt.blockmachines.multimachine.em.stabilizer.hint.1"),//2 - Elemental Hatches or Molecular Casing }; //endregion @@ -62,8 +63,8 @@ public class GT_MetaTileEntity_EM_stabilizer extends GT_MetaTileEntity_Multibloc public String[] getDescription() { return new String[]{ CommonValues.TEC_MARK_EM, - "Alters time to stabilize matter", - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Wibbly wobbly timey wimey, stuff." + translateToLocal("gt.blockmachines.multimachine.em.stabilizer.desc.0"),//Alters time to stabilize matter + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.stabilizer.desc.1")//Wibbly wobbly timey wimey, stuff. }; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java index 20d20921d4..034fdca334 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java @@ -22,6 +22,7 @@ import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texture 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 gregtech.api.enums.GT_Values.E; +import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by danie_000 on 17.12.2016. @@ -53,9 +54,9 @@ public class GT_MetaTileEntity_EM_wormhole extends GT_MetaTileEntity_MultiblockB private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0, 4}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA + "Hint Details:", - "1 - Classic Hatches or High Power Casing", - "2 - Elemental Hatches or Molecular Casing", + EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", + translateToLocal("gt.blockmachines.multimachine.em.wormhole.hint.0"),//1 - Classic Hatches or High Power Casing + translateToLocal("gt.blockmachines.multimachine.em.wormhole.hint.1"),//2 - Elemental Hatches or Molecular Casing }; //endregion @@ -81,8 +82,8 @@ public class GT_MetaTileEntity_EM_wormhole extends GT_MetaTileEntity_MultiblockB public String[] getDescription() { return new String[]{ CommonValues.TEC_MARK_EM, - "It is not full of worms.", - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "It is full of anti-worms!!!" + translateToLocal("gt.blockmachines.multimachine.em.wormhole.desc.0"),//It is not full of worms. + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.wormhole.desc.1")//It is full of anti-worms!!! }; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java index f928e99925..d45fbc31d7 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java @@ -25,6 +25,7 @@ import static com.github.technus.tectech.Util.StructureBuilderExtreme; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; +import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by danie_000 on 17.12.2016. @@ -48,35 +49,35 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa {"B0", "A!!!", "0!!!0", "A!!!", "B0",},}; private static final Block[] blockType = new Block[]{sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMeta = new byte[]{4, 0, 5, 6}; - private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addClassicToMachineList,this::addElementalToMachineList}; + private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addClassicToMachineList, this::addElementalToMachineList}; private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0, 4}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA + "Hint Details:", - "1 - Classic Hatches or High Power Casing", - "2 - Elemental Hatches or Molecular Casing",}; + EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", + translateToLocal("gt.blockmachines.multimachine.em.processing.hint.0"),//1 - Classic Hatches or High Power Casing + translateToLocal("gt.blockmachines.multimachine.em.processing.hint.1"),};//2 - Elemental Hatches or Molecular Casing //endregion //region parameters protected Parameters.Group.ParameterIn[] inputMux; protected Parameters.Group.ParameterIn[] outputMux; private static final IStatusFunction SRC_STATUS = - (base,p)-> { + (base, p) -> { double v = p.get(); if (Double.isNaN(v)) return STATUS_WRONG; - v=(int)v; + v = (int) v; if (v < 0) return STATUS_TOO_LOW; if (v == 0) return STATUS_NEUTRAL; if (v >= base.eInputHatches.size()) return STATUS_TOO_HIGH; return STATUS_OK; }; private static final IStatusFunction DST_STATUS = - (base,p)->{ - if(base.inputMux[p.hatchId()].getStatus(false)== STATUS_OK){ + (base, p) -> { + if (base.inputMux[p.hatchId()].getStatus(false) == STATUS_OK) { double v = p.get(); if (Double.isNaN(v)) return STATUS_WRONG; - v=(int)v; + v = (int) v; if (v < 0) return STATUS_TOO_LOW; if (v == 0) return STATUS_LOW; if (v >= base.eInputHatches.size()) return STATUS_TOO_HIGH; @@ -84,8 +85,8 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa } return STATUS_NEUTRAL; }; - private static final INameFunction ROUTE_NAME= - (base,p)->(p.parameterId()==0?"Source ":"Destination ")+p.hatchId(); + private static final INameFunction ROUTE_NAME = + (base, p) -> (p.parameterId() == 0 ? translateToLocal("tt.keyword.Source") + " " : translateToLocal("tt.keyword.Destination") + " ") + p.hatchId(); //endregion public GT_MetaTileEntity_EM_machine(int aID, String aName, String aNameRegional) { @@ -96,29 +97,29 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa super(aName); } - private boolean setCurrentBehaviour(){ - ItemStack newMachine=mInventory[1]; - if(ItemStack.areItemStacksEqual(newMachine, loadedMachine)){ + private boolean setCurrentBehaviour() { + ItemStack newMachine = mInventory[1]; + if (ItemStack.areItemStacksEqual(newMachine, loadedMachine)) { return false; } - loadedMachine=newMachine; - Supplier behaviourSupplier=GT_MetaTileEntity_EM_machine.BEHAVIOUR_MAP.get(new Util.ItemStack_NoNBT(newMachine)); - if(currentBehaviour==null && behaviourSupplier==null) { + loadedMachine = newMachine; + Supplier behaviourSupplier = GT_MetaTileEntity_EM_machine.BEHAVIOUR_MAP.get(new Util.ItemStack_NoNBT(newMachine)); + if (currentBehaviour == null && behaviourSupplier == null) { return false; } - if(currentBehaviour!=null){ - for(int i=6;i<10;i++){ + if (currentBehaviour != null) { + for (int i = 6; i < 10; i++) { parametrization.removeGroup(i); } } - if(behaviourSupplier!=null){ - currentBehaviour=behaviourSupplier.get(); + if (behaviourSupplier != null) { + currentBehaviour = behaviourSupplier.get(); currentBehaviour.parametersInstantiation(this, parametrization); - for(int i=6;i<10;i++){ - parametrization.setToDefaults(i,true,true); + for (int i = 6; i < 10; i++) { + parametrization.setToDefaults(i, true, true); } } else { - currentBehaviour=null; + currentBehaviour = null; } return true; @@ -128,12 +129,13 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa public static void registerBehaviour(Supplier behaviour, ItemStack is) { BEHAVIOUR_MAP.put(new Util.ItemStack_NoNBT(is), behaviour); - TecTech.LOGGER.info("Registered EM machine behaviour "+behaviour.get().getClass().getSimpleName()+' '+new Util.ItemStack_NoNBT(is).toString()); + TecTech.LOGGER.info("Registered EM machine behaviour " + behaviour.get().getClass().getSimpleName() + ' ' + new Util.ItemStack_NoNBT(is).toString()); } public interface IBehaviour { /** * instantiate parameters, u can also check machine tier here + * * @param te * @param parameters */ @@ -141,7 +143,8 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa /** * handle parameters per recipe - * @param te this te instance + * + * @param te this te instance * @param parameters of this te * @return return true if machine can start with current parameters, false if not */ @@ -149,22 +152,23 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa /** * do recipe handling - * @param inputs from muxed inputs + * + * @param inputs from muxed inputs * @param parameters array passed from previous method! * @return null if recipe should not start, control object to set machine state and start recipe */ MultiblockControl process(cElementalInstanceStackMap[] inputs, GT_MetaTileEntity_EM_machine te, Parameters parameters); } - private void quantumStuff(boolean shouldIExist){ - IGregTechTileEntity base=getBaseMetaTileEntity(); - if(base!=null && base.getWorld()!=null) { - int xDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetX * 2+base.getXCoord(); - int yDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetY * 2+base.getYCoord(); - int zDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetZ * 2+base.getZCoord(); + private void quantumStuff(boolean shouldIExist) { + IGregTechTileEntity base = getBaseMetaTileEntity(); + if (base != null && base.getWorld() != null) { + int xDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetX * 2 + base.getXCoord(); + int yDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetY * 2 + base.getYCoord(); + int zDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetZ * 2 + base.getZCoord(); Block block = base.getWorld().getBlock(xDir, yDir, zDir); if (shouldIExist) { - if(block != null && block.getMaterial()== Material.air) { + if (block != null && block.getMaterial() == Material.air) { base.getWorld().setBlock(xDir, yDir, zDir, QuantumStuffBlock.INSTANCE, 0, 2); } } else { @@ -188,7 +192,7 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa @Override public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); - if(aNBT.hasKey("eLoadedMachine")){ + if (aNBT.hasKey("eLoadedMachine")) { loadedMachine = ItemStack.loadItemStackFromNBT(aNBT.getCompoundTag("eLoadedMachine")); } } @@ -196,31 +200,35 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa @Override public void loadNBTData(NBTTagCompound aNBT) { super.loadNBTData(aNBT); - if(loadedMachine !=null) { + if (loadedMachine != null) { aNBT.setTag("eLoadedMachine", loadedMachine.writeToNBT(new NBTTagCompound())); } } @Override protected void parametersInstantiation_EM() { - inputMux=new Parameters.Group.ParameterIn[6]; - outputMux=new Parameters.Group.ParameterIn[6]; - for (int i=0;i<6;i++){ - Parameters.Group hatch=parametrization.getGroup(i); - inputMux[i]=hatch.makeInParameter(0,i,ROUTE_NAME,SRC_STATUS); - outputMux[i]=hatch.makeInParameter(1,i,ROUTE_NAME,DST_STATUS); + inputMux = new Parameters.Group.ParameterIn[6]; + outputMux = new Parameters.Group.ParameterIn[6]; + for (int i = 0; i < 6; i++) { + Parameters.Group hatch = parametrization.getGroup(i); + inputMux[i] = hatch.makeInParameter(0, i, ROUTE_NAME, SRC_STATUS); + outputMux[i] = hatch.makeInParameter(1, i, ROUTE_NAME, DST_STATUS); } } @Override public String[] getDescription() { - return new String[]{CommonValues.TEC_MARK_EM, "Processing quantum matter since...", EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "the time u started using it."}; + return new String[]{ + CommonValues.TEC_MARK_EM, + translateToLocal("gt.blockmachines.multimachine.em.processing.desc.0"),//Processing quantum matter since... + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.processing.desc.1")//the time u started using it. + }; } @Override public void onFirstTick_EM(IGregTechTileEntity aBaseMetaTileEntity) { setCurrentBehaviour(); - if(aBaseMetaTileEntity.isServerSide()) { + if (aBaseMetaTileEntity.isServerSide()) { quantumStuff(aBaseMetaTileEntity.isActive()); } } @@ -234,7 +242,7 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa @Override public boolean checkRecipe_EM(ItemStack itemStack) { setCurrentBehaviour(); - if(currentBehaviour==null){ + if (currentBehaviour == null) { return false; } @@ -244,7 +252,7 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa cElementalInstanceStackMap[] handles = new cElementalInstanceStackMap[6]; for (int i = 0; i < 6; i++) { - int pointer = (int)inputMux[i].get(); + int pointer = (int) inputMux[i].get(); if (pointer >= 0 && pointer < eInputHatches.size()) { handles[i] = eInputHatches.get(pointer).getContainerHandler(); } @@ -260,7 +268,7 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa } } - MultiblockControl control = currentBehaviour.process(handles,this, parametrization); + MultiblockControl control = currentBehaviour.process(handles, this, parametrization); if (control == null) { return false; } @@ -276,12 +284,11 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa mMaxProgresstime = control.getMaxProgressTime(); eRequiredData = control.getRequiredData(); mEfficiencyIncrease = control.getEffIncrease(); - boolean polluted=polluteEnvironment(control.getPollutionToAdd()); + boolean polluted = polluteEnvironment(control.getPollutionToAdd()); quantumStuff(polluted); return polluted; } - @Override public void stopMachine() { quantumStuff(false); @@ -302,7 +309,7 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa cElementalInstanceStackMap[] handles = new cElementalInstanceStackMap[6]; for (int i = 0; i < 6; i++) { - int pointer = (int)outputMux[i].get(); + int pointer = (int) outputMux[i].get(); if (pointer >= 0 && pointer < eOutputHatches.size()) { handles[i] = eOutputHatches.get(pointer).getContainerHandler(); } @@ -328,22 +335,22 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa @Override public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if(aBaseMetaTileEntity.isClientSide() && (aTick & 0x2)==0){ - if((aTick&0x10)==0) { + if (aBaseMetaTileEntity.isClientSide() && (aTick & 0x2) == 0) { + if ((aTick & 0x10) == 0) { setCurrentBehaviour(); } - if(aBaseMetaTileEntity.isActive()){ - int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX*2+aBaseMetaTileEntity.getXCoord(); - int yDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetY*2+aBaseMetaTileEntity.getYCoord(); - int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ*2+aBaseMetaTileEntity.getZCoord(); - aBaseMetaTileEntity.getWorld().markBlockRangeForRenderUpdate(xDir,yDir,zDir,xDir,yDir,zDir); + if (aBaseMetaTileEntity.isActive()) { + int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 2 + aBaseMetaTileEntity.getXCoord(); + int yDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetY * 2 + aBaseMetaTileEntity.getYCoord(); + int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 2 + aBaseMetaTileEntity.getZCoord(); + aBaseMetaTileEntity.getWorld().markBlockRangeForRenderUpdate(xDir, yDir, zDir, xDir, yDir, zDir); } } } @Override public void construct(int stackSize, boolean hintsOnly) { - StructureBuilderExtreme(shape, blockType, blockMeta, 2, 2, 1, getBaseMetaTileEntity(), this,hintsOnly); + StructureBuilderExtreme(shape, blockType, blockMeta, 2, 2, 1, getBaseMetaTileEntity(), this, hintsOnly); } @Override diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index c1ba86678c..a80a03ed18 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -453,14 +453,35 @@ gt.blockmachines.multimachine.em.collider.mode.2=Mode: Undefined gt.blockmachines.multimachine.em.collider.mode.3=Currently Slaves... gt.blockmachines.multimachine.em.infuser.name=Energy Infuser +gt.blockmachines.multimachine.em.infuser.hint=1 - Classic Hatches or High Power Casing +gt.blockmachines.multimachine.em.infuser.desc.0=Power Transfer Extreme! +gt.blockmachines.multimachine.em.infuser.desc.1=Insanely fast charging! +gt.blockmachines.multimachine.em.infuser.desc.2=Doesn't work while broken! +gt.blockmachines.multimachine.em.infuser.desc.3=Power loss is a thing. gt.blockmachines.multimachine.em.processing.name=Quantum Processing Machine +gt.blockmachines.multimachine.em.processing.hint.0=1 - Classic Hatches or High Power Casing +gt.blockmachines.multimachine.em.processing.hint.1=2 - Elemental Hatches or Molecular Casing +gt.blockmachines.multimachine.em.processing.desc.0=Processing quantum matter since... +gt.blockmachines.multimachine.em.processing.desc.1=the time u started using it. gt.blockmachines.multimachine.em.crafter.name=Matter Assembler +gt.blockmachines.multimachine.em.crafter.hint.0=1 - Classic Hatches or High Power Casing +gt.blockmachines.multimachine.em.crafter.hint.1=2 - Elemental Hatches or Molecular Casing +gt.blockmachines.multimachine.em.crafter.desc.0=The most precise way of making stuff. +gt.blockmachines.multimachine.em.crafter.desc.1=(Trans-Planck process) gt.blockmachines.multimachine.em.stabilizer.name=Elemental Stabilizer +gt.blockmachines.multimachine.em.stabilizer.hint.0=1 - Classic Hatches or High Power Casing +gt.blockmachines.multimachine.em.stabilizer.hint.1=2 - Elemental Hatches or Molecular Casing +gt.blockmachines.multimachine.em.stabilizer.desc.0=Alters time to stabilize matter +gt.blockmachines.multimachine.em.stabilizer.desc.1=Wibbly wobbly timey wimey, stuff. gt.blockmachines.multimachine.em.wormhole.name=Wormhole +gt.blockmachines.multimachine.em.wormhole.hint.0=1 - Classic Hatches or High Power Casing +gt.blockmachines.multimachine.em.wormhole.hint.1=2 - Elemental Hatches or Molecular Casing +gt.blockmachines.multimachine.em.wormhole.desc.0=It is not full of worms. +gt.blockmachines.multimachine.em.wormhole.desc.1=It is full of anti-worms!!! gt.blockmachines.multimachine.em.decay.name=Decay Generator -- cgit From 01f376b9eed8c7789a0074084986e3b441aa97fc Mon Sep 17 00:00:00 2001 From: Bass Date: Sun, 1 Sep 2019 21:50:33 +0100 Subject: Even even more Lang + right click fix --- ...GT_MetaTileEntity_Hatch_ElementalContainer.java | 2 + .../GT_MetaTileEntity_Hatch_OverflowElemental.java | 2 + .../multi/GT_MetaTileEntity_EM_annihilation.java | 11 +++-- .../multi/GT_MetaTileEntity_EM_bhg.java | 11 +++-- .../multi/GT_MetaTileEntity_EM_decay.java | 57 ++++++++++++++++------ .../multi/GT_MetaTileEntity_EM_research.java | 2 + .../multi/GT_MetaTileEntity_EM_scanner.java | 2 + src/main/resources/assets/tectech/lang/en_US.lang | 16 ++++++ 8 files changed, 77 insertions(+), 26 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ElementalContainer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ElementalContainer.java index 5439e3f6d6..1498dafecc 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ElementalContainer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ElementalContainer.java @@ -217,6 +217,8 @@ public abstract class GT_MetaTileEntity_Hatch_ElementalContainer extends GT_Meta @Override public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + super.onRightclick(aBaseMetaTileEntity, aPlayer); + if (!aBaseMetaTileEntity.isClientSide() && aPlayer instanceof EntityPlayerMP) { try { EntityPlayerMP player = (EntityPlayerMP) aPlayer; diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java index 6af2285e32..8000298443 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java @@ -192,6 +192,8 @@ public class GT_MetaTileEntity_Hatch_OverflowElemental extends GT_MetaTileEntity @Override public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + super.onRightclick(aBaseMetaTileEntity, aPlayer); + if (!aBaseMetaTileEntity.isClientSide() && aPlayer instanceof EntityPlayerMP) { try { EntityPlayerMP player = (EntityPlayerMP) aPlayer; diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java index 023bcb3a20..21e020be01 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java @@ -21,6 +21,7 @@ import static com.github.technus.tectech.Util.StructureBuilderExtreme; 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 net.minecraft.util.StatCollector.translateToLocal; /** * Created by danie_000 on 17.12.2016. @@ -52,9 +53,9 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0, 4}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA + "Hint Details:", - "1 - Classic Hatches or High Power Casing", - "2 - Elemental Hatches or Molecular Casing", + EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", + translateToLocal("gt.blockmachines.multimachine.em.annihilation.hint.0"),//1 - Classic Hatches or High Power Casing + translateToLocal("gt.blockmachines.multimachine.em.annihilation.hint.1"),//2 - Elemental Hatches or Molecular Casing }; //endregion @@ -80,8 +81,8 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl public String[] getDescription() { return new String[]{ CommonValues.TEC_MARK_EM, - "Things+Anti Things don't like each other.", - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Matter into power!" + translateToLocal("gt.blockmachines.multimachine.em.annihilation.desc.0"),//Things+Anti Things don't like each other. + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.annihilation.desc.1")//Matter into power! }; } 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 index 37e5beed5a..79ae424bcb 100644 --- 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 @@ -24,6 +24,7 @@ import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBloc 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 gregtech.api.enums.GT_Values.E; +import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by danie_000 on 17.12.2016. @@ -88,9 +89,9 @@ public class GT_MetaTileEntity_EM_bhg extends GT_MetaTileEntity_MultiblockBase_E private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0, 4}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA + "Hint Details:", - "1 - Classic Hatches or High Power Casing", - "2 - Elemental Hatches or Molecular Casing", + 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 @@ -274,8 +275,8 @@ public class GT_MetaTileEntity_EM_bhg extends GT_MetaTileEntity_MultiblockBase_E public String[] getDescription() { return new String[]{ CommonValues.TEC_MARK_EM, - "Singularity based power generation.", - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Super unstable!!!" + translateToLocal("gt.blockmachines.multimachine.em.blackholegenerator.desc.0"),//Singularity based power generation. + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.blackholegenerator.desc.1")//Super unstable!!! }; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java index 65f93d537c..ae9ee1c524 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java @@ -20,8 +20,11 @@ import ic2.core.init.MainConfig; import ic2.core.util.ConfigUtil; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; +import org.apache.commons.lang3.reflect.FieldUtils; import static com.github.technus.tectech.CommonValues.VN; import static com.github.technus.tectech.Util.StructureBuilderExtreme; @@ -30,6 +33,8 @@ import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texture import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.STATUS_OK; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.STATUS_TOO_LOW; +import static net.minecraft.util.StatCollector.translateToLocal; +import static net.minecraft.util.StatCollector.translateToLocalFormatted; /** * Created by danie_000 on 17.12.2016. @@ -42,6 +47,8 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase public static final double URANIUM_INGOT_MASS_DIFF = 1.6114516E10; private static final double URANIUM_MASS_TO_EU_PARTIAL = ConfigUtil.getFloat(MainConfig.get(), "balance/energy/generator/nuclear") * 3_000_000.0 / URANIUM_INGOT_MASS_DIFF; public static final double URANIUM_MASS_TO_EU_INSTANT = URANIUM_MASS_TO_EU_PARTIAL * 20; + + private String clientLocale = "en_US"; //endregion //region structure @@ -63,15 +70,15 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; private static final byte[] blockMetaFallback = new byte[]{0, 4}; private static final String[] description = new String[]{ - EnumChatFormatting.AQUA + "Hint Details:", - "1 - Classic Hatches or High Power Casing", - "2 - Elemental Hatches or Molecular Casing", + EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", + translateToLocal("gt.blockmachines.multimachine.em.decay.hint.0"),//1 - Classic Hatches or High Power Casing + translateToLocal("gt.blockmachines.multimachine.em.decay.hint.1"),//2 - Elemental Hatches or Molecular Casing }; //endregion //region parameters protected Parameters.Group.ParameterIn ampereFlow; - private static final INameFunction FLOW_NAME = (base, p) -> "Ampere divider"; + private static final INameFunction FLOW_NAME = (base, p) -> translateToLocal("gt.blockmachines.multimachine.em.decay.conf");//Ampere divider private static final IStatusFunction FLOW_STATUS = (base, p) -> { if (base.eAmpereFlow <= 0) { return STATUS_TOO_LOW; @@ -154,8 +161,8 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase public String[] getDescription() { return new String[]{ CommonValues.TEC_MARK_EM, - "Is life time too long?", - EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Make it half-life (3) instead!" + translateToLocal("gt.blockmachines.multimachine.em.decay.desc.0"),//Is life time too long? + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockmachines.multimachine.em.decay.desc.1")//Make it half-life (3) instead! }; } @@ -177,22 +184,22 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase } return new String[]{ - "Progress:", + translateToLocalFormatted("tt.keyword.Progress", clientLocale) + ":", EnumChatFormatting.GREEN + Integer.toString(mProgresstime / 20) + EnumChatFormatting.RESET + " s / " + EnumChatFormatting.YELLOW + mMaxProgresstime / 20 + EnumChatFormatting.RESET + " s", - "Energy Hatches:", + translateToLocalFormatted("tt.keyphrase.Energy_Hatches", clientLocale) + ":", EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET + " EU / " + EnumChatFormatting.YELLOW + maxEnergy + EnumChatFormatting.RESET + " EU", - (mEUt <= 0 ? "Probably uses: " : "Probably makes: ") + + (mEUt <= 0 ? translateToLocalFormatted("tt.keyphrase.Probably_uses", clientLocale) + ": " : translateToLocalFormatted("tt.keyphrase.Probably_makes", clientLocale) + ": ") + EnumChatFormatting.RED + Math.abs(mEUt) + EnumChatFormatting.RESET + " EU/t at " + EnumChatFormatting.RED + eAmpereFlow + EnumChatFormatting.RESET + " A", - "Tier Rating: " + EnumChatFormatting.YELLOW + VN[getMaxEnergyInputTier_EM()] + EnumChatFormatting.RESET + " / " + EnumChatFormatting.GREEN + VN[getMinEnergyInputTier_EM()] + EnumChatFormatting.RESET + - " Amp Rating: " + EnumChatFormatting.GREEN + eMaxAmpereFlow + EnumChatFormatting.RESET + " A", - "Problems: " + EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + - " Efficiency: " + EnumChatFormatting.YELLOW + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", - "PowerPass: " + EnumChatFormatting.BLUE + ePowerPass + EnumChatFormatting.RESET + - " SafeVoid: " + EnumChatFormatting.BLUE + eSafeVoid, - "Computation: " + EnumChatFormatting.GREEN + eAvailableData + EnumChatFormatting.RESET + " / " + EnumChatFormatting.YELLOW + eRequiredData + EnumChatFormatting.RESET, + translateToLocalFormatted("tt.keyphrase.Tier_Rating", clientLocale) + ": " + EnumChatFormatting.YELLOW + VN[getMaxEnergyInputTier_EM()] + EnumChatFormatting.RESET + " / " + EnumChatFormatting.GREEN + VN[getMinEnergyInputTier_EM()] + EnumChatFormatting.RESET + + " " + translateToLocalFormatted("tt.keyphrase.Amp_Rating", clientLocale) + ": " + EnumChatFormatting.GREEN + eMaxAmpereFlow + EnumChatFormatting.RESET + " A", + translateToLocalFormatted("tt.keyword.Problems", clientLocale) + ": " + EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + + " " + translateToLocalFormatted("tt.keyword.Efficiency", clientLocale) + ": " + EnumChatFormatting.YELLOW + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", + translateToLocalFormatted("tt.keyword.PowerPass", clientLocale) + ": " + EnumChatFormatting.BLUE + ePowerPass + EnumChatFormatting.RESET + + " " + translateToLocalFormatted("tt.keyword.SafeVoid", clientLocale) + ": " + EnumChatFormatting.BLUE + eSafeVoid, + translateToLocalFormatted("tt.keyword.Computation", clientLocale) + ": " + EnumChatFormatting.GREEN + eAvailableData + EnumChatFormatting.RESET + " / " + EnumChatFormatting.YELLOW + eRequiredData + EnumChatFormatting.RESET, }; } @@ -218,6 +225,24 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase ampereFlow = hatch_0.makeInParameter(0, 1, FLOW_NAME, FLOW_STATUS); } + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + super.onRightclick(aBaseMetaTileEntity, aPlayer); + + if (!aBaseMetaTileEntity.isClientSide() && aPlayer instanceof EntityPlayerMP) { + try { + EntityPlayerMP player = (EntityPlayerMP) aPlayer; + clientLocale = (String) FieldUtils.readField(player, "translator", true); + } catch (Exception e) { + clientLocale = "en_US"; + } + } else { + return true; + } + System.out.println(clientLocale); + return true; + } + @Override public void construct(int stackSize, boolean hintsOnly) { StructureBuilderExtreme(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), this, hintsOnly); diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java index 5b1c54695c..53dc178ef8 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java @@ -527,6 +527,8 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB @Override public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + super.onRightclick(aBaseMetaTileEntity, aPlayer); + if (!aBaseMetaTileEntity.isClientSide() && aPlayer instanceof EntityPlayerMP) { try { EntityPlayerMP player = (EntityPlayerMP) aPlayer; diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java index 51d49b3653..6170bd081f 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java @@ -482,6 +482,8 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa @Override public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + super.onRightclick(aBaseMetaTileEntity, aPlayer); + if (!aBaseMetaTileEntity.isClientSide() && aPlayer instanceof EntityPlayerMP) { try { EntityPlayerMP player = (EntityPlayerMP) aPlayer; diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index a80a03ed18..cf2405e570 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -483,11 +483,25 @@ gt.blockmachines.multimachine.em.wormhole.hint.1=2 - Elemental Hatches or Molecu gt.blockmachines.multimachine.em.wormhole.desc.0=It is not full of worms. gt.blockmachines.multimachine.em.wormhole.desc.1=It is full of anti-worms!!! +#GET INFODATA IS FUCKED! gt.blockmachines.multimachine.em.decay.name=Decay Generator +gt.blockmachines.multimachine.em.decay.hint.0=1 - Classic Hatches or High Power Casing +gt.blockmachines.multimachine.em.decay.hint.1=2 - Elemental Hatches or Molecular Casing +gt.blockmachines.multimachine.em.decay.desc.0=Is life time too long? +gt.blockmachines.multimachine.em.decay.desc.1=Make it half-life (3) instead! +gt.blockmachines.multimachine.em.decay.conf=Ampere divider gt.blockmachines.multimachine.em.annihilation.name=Annihilation Generator +gt.blockmachines.multimachine.em.annihilation.hint.0=1 - Classic Hatches or High Power Casing +gt.blockmachines.multimachine.em.annihilation.hint.1=2 - Elemental Hatches or Molecular Casing +gt.blockmachines.multimachine.em.annihilation.desc.0=Things+Anti Things don't like each other. +gt.blockmachines.multimachine.em.annihilation.desc.1=Matter into power! gt.blockmachines.multimachine.em.blackholegenerator.name=Black Hole Generator +gt.blockmachines.multimachine.em.blackholegenerator.hint.0=1 - Classic Hatches or High Power Casing +gt.blockmachines.multimachine.em.blackholegenerator.hint.1=2 - Elemental Hatches or Molecular Casing +gt.blockmachines.multimachine.em.blackholegenerator.desc.0=Singularity based power generation. +gt.blockmachines.multimachine.em.blackholegenerator.desc.1=Super unstable!!! #Keywords and phrases #Example: ID:3 @@ -512,6 +526,8 @@ tt.keyword.BOOM=BOOM! tt.keyword.Destination=Destination tt.keyword.Weight=Weight tt.keyword.Source=Source +tt.keyword.Progress=Progress +tt.keyword.Computation=Computation #Problemns as in maintanance issues tt.keyword.Problems=Problems tt.keyword.Efficiency=Efficiency -- cgit From 9ab14042bf3c9cb4244d799d6b088d678d63a0de Mon Sep 17 00:00:00 2001 From: Bass Date: Sat, 14 Sep 2019 09:54:37 +0100 Subject: okbuddy --- .../java/com/github/technus/tectech/loader/thing/MachineLoader.java | 2 +- src/main/resources/assets/tectech/lang/en_US.lang | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'src/main/java') 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 803c19572e..856ba8dd13 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 @@ -647,4 +647,4 @@ public class MachineLoader implements Runnable { new NoDreamCraftMachineLoader().run(); } } -} +} \ No newline at end of file diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index cf2405e570..483174e2f3 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -337,7 +337,7 @@ gt.blockmachines.multimachine.tm.microwave.hint.0=1 - Classic Hatches or Clean S gt.blockmachines.multimachine.tm.microwave.hint.1=Also acts like a hopper so give it an Output Bus gt.blockmachines.multimachine.tm.microwave.desc.0=High Frequency Oven gt.blockmachines.multimachine.tm.microwave.desc.1=From live to done in seconds! -gt.blockmachines.multimachine.tm.microwave.desc.3=I said nuke the... I meant microwave supper! +gt.blockmachines.multimachine.tm.microwave.desc.2=I said nuke the... I meant microwave supper! gt.blockmachines.multimachine.tm.microwave.cfgi.0=Power setting gt.blockmachines.multimachine.tm.microwave.cfgi.1=Timer setting gt.blockmachines.multimachine.tm.microwave.cfgo.0=Timer value @@ -483,7 +483,6 @@ gt.blockmachines.multimachine.em.wormhole.hint.1=2 - Elemental Hatches or Molecu gt.blockmachines.multimachine.em.wormhole.desc.0=It is not full of worms. gt.blockmachines.multimachine.em.wormhole.desc.1=It is full of anti-worms!!! -#GET INFODATA IS FUCKED! gt.blockmachines.multimachine.em.decay.name=Decay Generator gt.blockmachines.multimachine.em.decay.hint.0=1 - Classic Hatches or High Power Casing gt.blockmachines.multimachine.em.decay.hint.1=2 - Elemental Hatches or Molecular Casing -- cgit From dcb3b15eb849054ff8809fb78e67439efe7a6c02 Mon Sep 17 00:00:00 2001 From: Tec Date: Tue, 1 Oct 2019 19:28:28 +0200 Subject: Fix ParamTxt --- src/main/java/com/github/technus/tectech/Util.java | 5 +-- .../hatch/GT_MetaTileEntity_Hatch_ParamText.java | 50 ++-------------------- .../multi/GT_MetaTileEntity_EM_computer.java | 20 ++++----- 3 files changed, 15 insertions(+), 60 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/Util.java b/src/main/java/com/github/technus/tectech/Util.java index f73bb30c52..088cbd8c82 100644 --- a/src/main/java/com/github/technus/tectech/Util.java +++ b/src/main/java/com/github/technus/tectech/Util.java @@ -37,7 +37,6 @@ import org.apache.commons.lang3.StringUtils; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; -import java.io.Serializable; import java.lang.reflect.Field; import java.util.*; import java.util.regex.Matcher; @@ -454,7 +453,6 @@ public final class Util { */ //endregion - //Check Machine Structure based on string[][] (effectively char[][][]), ond offset of the controller //This only checks for REGULAR BLOCKS! public static boolean StructureCheckerExtreme( @@ -497,8 +495,7 @@ public final class Util { if (block < ' ') {//Control chars allow skipping b -= block; break; - } else if (block > '@') //characters allow to skip check A-1 skip, B-2 skips etc. - { + } else if (block > '@') {//characters allow to skip check A-1 skip, B-2 skips etc. a += block - '@'; }//else if (block < '+')//used to mark THINGS // a++; diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ParamText.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ParamText.java index 6a93fac487..c9c84cfbc0 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ParamText.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ParamText.java @@ -1,19 +1,12 @@ package com.github.technus.tectech.thing.metaTileEntity.hatch; import com.github.technus.tectech.CommonValues; -import com.github.technus.tectech.Util; import com.github.technus.tectech.loader.NetworkDispatcher; import com.github.technus.tectech.thing.metaTileEntity.hatch.gui.GT_Container_ParamText; import com.github.technus.tectech.thing.metaTileEntity.hatch.gui.GT_GUIContainer_ParamText; -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.metatileentity.implementations.GT_MetaTileEntity_Hatch; -import gregtech.api.objects.GT_RenderedTexture; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.InventoryPlayer; @@ -25,32 +18,16 @@ import net.minecraftforge.fluids.FluidStack; /** * Created by danie_000 on 15.12.2016. */ -public class GT_MetaTileEntity_Hatch_ParamText extends GT_MetaTileEntity_Hatch { - public int param = -1; +public class GT_MetaTileEntity_Hatch_ParamText extends GT_MetaTileEntity_Hatch_Param { public String value0s=""; public String value1s=""; - public double value0D = 0; - public double value1D = 0; - public double input0D = 0; - public double input1D = 0; - private static Textures.BlockIcons.CustomIcon ScreenON; - private static Textures.BlockIcons.CustomIcon ScreenOFF; public GT_MetaTileEntity_Hatch_ParamText(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 0, "For parametrization of Multiblocks"); - Util.setTier(aTier,this); + super(aID,aName,aNameRegional,aTier); } public GT_MetaTileEntity_Hatch_ParamText(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { - super(aName, aTier, 0, aDescription, aTextures); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister aBlockIconRegister) { - super.registerIcons(aBlockIconRegister); - ScreenOFF = new Textures.BlockIcons.CustomIcon("iconsets/PARAM"); - ScreenON = new Textures.BlockIcons.CustomIcon("iconsets/PARAM_ACTIVE"); + super(aName, aTier, aDescription, aTextures); } @Override @@ -66,16 +43,6 @@ public class GT_MetaTileEntity_Hatch_ParamText extends GT_MetaTileEntity_Hatch { return new GT_GUIContainer_ParamText(aPlayerInventory, aBaseMetaTileEntity); } - @Override - public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(ScreenON)}; - } - - @Override - public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(ScreenOFF)}; - } - //@Override //public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { // if (aBaseMetaTileEntity.isClientSide() && (aTick % 20L == 0L)) { @@ -131,23 +98,14 @@ public class GT_MetaTileEntity_Hatch_ParamText extends GT_MetaTileEntity_Hatch { @Override public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); - aNBT.setDouble("eValue0D", value0D); - aNBT.setDouble("eValue1D", value1D); - aNBT.setDouble("eInput0D", input0D); - aNBT.setDouble("eInput1D", input1D); - aNBT.setInteger("eParam", param); aNBT.setString("eIeValue0S", value0s); aNBT.setString("eIeValue1S", value1s); + aNBT.removeTag("ePointer"); } @Override public void loadNBTData(NBTTagCompound aNBT) { super.loadNBTData(aNBT); - value0D = aNBT.getDouble("eValue0D"); - value1D = aNBT.getDouble("eValue1D"); - input0D = aNBT.getDouble("eInput0D"); - input1D = aNBT.getDouble("eInput1D"); - param = aNBT.getInteger("eParam"); value0s = aNBT.getString("eIeValue0S"); if (value0s==null){ value0s=""; diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java index ee21f81e06..edb581179e 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java @@ -107,6 +107,15 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB return new GT_MetaTileEntity_EM_computer(mName); } + @Override + protected void parametersInstantiation_EM() { + Parameters.Group hatch_0 = parametrization.getGroup(0); + overclock = hatch_0.makeInParameter(0, 1, OC_NAME, OC_STATUS); + overvolt = hatch_0.makeInParameter(1, 1, OV_NAME, OV_STATUS); + maxCurrentTemp = hatch_0.makeOutParameter(0, 0, MAX_TEMP_NAME, MAX_TEMP_STATUS); + availableData = hatch_0.makeOutParameter(1, 0, COMPUTE_NAME, COMPUTE_STATUS); + } + @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { for (GT_MetaTileEntity_Hatch_Rack rack : eRacks) { @@ -277,15 +286,6 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB } } - @Override - protected void parametersInstantiation_EM() { - Parameters.Group hatch_0 = parametrization.getGroup(0); - overclock = hatch_0.makeInParameter(0, 1, OC_NAME, OC_STATUS); - overvolt = hatch_0.makeInParameter(1, 1, OV_NAME, OV_STATUS); - maxCurrentTemp = hatch_0.makeOutParameter(0, 0, MAX_TEMP_NAME, MAX_TEMP_STATUS); - availableData = hatch_0.makeOutParameter(1, 0, COMPUTE_NAME, COMPUTE_STATUS); - } - @Override protected void extraExplosions_EM() { for (MetaTileEntity tTileEntity : eRacks) { @@ -341,7 +341,7 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB StructureBuilderExtreme(cap, blockType, blockMeta, 1, 2, -1, igt, this, hintsOnly); byte offset = -2; - for (int rackSlices = stackSize > 12 ? 12 : stackSize; rackSlices > 0; rackSlices--) { + for (int rackSlices = Math.min(stackSize, 12); rackSlices > 0; rackSlices--) { StructureBuilderExtreme(slice, blockType, blockMeta, 1, 2, offset--, igt, this, hintsOnly); } -- cgit From e59e2af4748b2132b884ff46e18b99993db49dd2 Mon Sep 17 00:00:00 2001 From: Tec Date: Tue, 1 Oct 2019 19:45:17 +0200 Subject: Fix retardation --- .../technus/tectech/thing/metaTileEntity/multi/base/LedStatus.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/LedStatus.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/LedStatus.java index 5fce024cfc..d1173933f7 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/LedStatus.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/LedStatus.java @@ -57,7 +57,7 @@ public enum LedStatus { if(val==value) return STATUS_WRONG; } if(Double.isNaN(value)) return STATUS_WRONG; - return STATUS_UNDEFINED; + return STATUS_OK; } public static LedStatus fromLimitsExclusiveOuterBoundary(double value, double min,double low, double high,double max, double... excludedNumbers){ -- cgit From 43f85a9972d987519aa61bbc272ce7bb01f98ddf Mon Sep 17 00:00:00 2001 From: Tec Date: Tue, 1 Oct 2019 20:44:10 +0200 Subject: Depreacte broken api, refactor field names --- src/main/java/com/github/technus/tectech/Util.java | 2 ++ .../hatch/gui/GT_Container_Param.java | 36 ++++++++++--------- .../hatch/gui/GT_Container_ParamAdv.java | 36 ++++++++++--------- .../hatch/gui/GT_Container_ParamText.java | 36 ++++++++++--------- .../hatch/gui/GT_GUIContainer_Param.java | 12 +++---- .../hatch/gui/GT_GUIContainer_ParamAdv.java | 12 +++---- .../hatch/gui/GT_GUIContainer_ParamText.java | 40 +++++++++++----------- .../multi/base/GT_Container_MultiMachineEM.java | 6 ++-- .../single/gui/GT_Container_DebugPollutor.java | 8 +++-- 9 files changed, 103 insertions(+), 85 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/Util.java b/src/main/java/com/github/technus/tectech/Util.java index 088cbd8c82..5bd3ff59a9 100644 --- a/src/main/java/com/github/technus/tectech/Util.java +++ b/src/main/java/com/github/technus/tectech/Util.java @@ -1452,6 +1452,7 @@ public final class Util { return previousValue; } + @Deprecated public static double receiveDouble(double previousValue, int startIndex, int index, int value){ return Double.longBitsToDouble(receiveLong(Double.doubleToLongBits(previousValue),startIndex,index,value)); } @@ -1497,6 +1498,7 @@ public final class Util { crafter.sendProgressBarUpdate(container, startIndex, (int)((value & 0xFFFF000000000000L)>>>48)); } + @Deprecated public static float receiveFloat(float previousValue, int startIndex, int index, int value){ return Float.intBitsToFloat(receiveInteger(Float.floatToIntBits(previousValue),startIndex,index,value)); } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Param.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Param.java index f9c53090ff..cb189538d8 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Param.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Param.java @@ -16,10 +16,14 @@ import net.minecraft.item.ItemStack; public class GT_Container_Param extends GT_ContainerMetaTile_Machine { public int param = 0; - public double value0f = 0; - public double value1f = 0; - public double input0f = 0; - public double input1f = 0; + public double value0d = 0; + public double value1d = 0; + public double input0d = 0; + public double input1d = 0; + public long value0l = 0; + public long value1l = 0; + public long input0l = 0; + public long input1l = 0; public GT_Container_Param(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(aInventoryPlayer, aTileEntity); @@ -133,18 +137,18 @@ public class GT_Container_Param extends GT_ContainerMetaTile_Machine { return; } param = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).param; - value0f = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).value0D; - value1f = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).value1D; - input0f = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).input0D; - input1f = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).input1D; + value0d = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).value0D; + value1d = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).value1D; + input0d = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).input0D; + input1d = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).input1D; for (Object crafter : crafters) { ICrafting var1 = (ICrafting) crafter; Util.sendInteger(param,this,var1,100); - Util.sendDouble(value0f,this,var1,102); - Util.sendDouble(value1f,this,var1, 106); - Util.sendDouble(input0f,this,var1, 110); - Util.sendDouble(input1f,this,var1, 114); + Util.sendDouble(value0d,this,var1,102); + Util.sendDouble(value1d,this,var1, 106); + Util.sendDouble(input0d,this,var1, 110); + Util.sendDouble(input1d,this,var1, 114); } } @@ -161,25 +165,25 @@ public class GT_Container_Param extends GT_ContainerMetaTile_Machine { case 103: case 104: case 105: - value0f=Util.receiveDouble(value0f,102,par1,par2); + value0d =Double.longBitsToDouble(value0l=Util.receiveLong(value0l,102,par1,par2)); return; case 106: case 107: case 108: case 109: - value1f=Util.receiveDouble(value1f,106,par1,par2); + value1d =Double.longBitsToDouble(value1l=Util.receiveLong(value1l,106,par1,par2)); return; case 110: case 111: case 112: case 113: - input0f=Util.receiveDouble(input0f,110,par1,par2); + input0d =Double.longBitsToDouble(input0l=Util.receiveLong(input0l,110,par1,par2)); return; case 114: case 115: case 116: case 117: - input1f=Util.receiveDouble(input1f,114,par1,par2); + input1d =Double.longBitsToDouble(input1l=Util.receiveLong(input1l,114,par1,par2)); return; default: } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_ParamAdv.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_ParamAdv.java index e925ed91e8..b3b720732d 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_ParamAdv.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_ParamAdv.java @@ -17,10 +17,14 @@ import net.minecraft.item.ItemStack; public class GT_Container_ParamAdv extends GT_ContainerMetaTile_Machine { public int pointer=0; public int param = 0; - public double value1f = 0; - public double value0f = 0; - public double input0f = 0; - public double input1f = 0; + public double value1d = 0; + public double value0d = 0; + public double input0d = 0; + public double input1d = 0; + public long value0l = 0; + public long value1l = 0; + public long input0l = 0; + public long input1l = 0; public GT_Container_ParamAdv(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(aInventoryPlayer, aTileEntity); @@ -219,19 +223,19 @@ public class GT_Container_ParamAdv extends GT_ContainerMetaTile_Machine { return; } param = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).param; - value0f = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).value0D; - value1f = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).value1D; - input0f = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).input0D; - input1f = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).input1D; + value0d = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).value0D; + value1d = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).value1D; + input0d = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).input0D; + input1d = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).input1D; pointer = ((GT_MetaTileEntity_Hatch_Param) mTileEntity.getMetaTileEntity()).pointer; for (Object crafter : crafters) { ICrafting var1 = (ICrafting) crafter; Util.sendInteger(param,this,var1,100); - Util.sendDouble(value0f,this,var1,102); - Util.sendDouble(value1f,this,var1, 106); - Util.sendDouble(input0f,this,var1, 110); - Util.sendDouble(input1f,this,var1, 114); + Util.sendDouble(value0d,this,var1,102); + Util.sendDouble(value1d,this,var1, 106); + Util.sendDouble(input0d,this,var1, 110); + Util.sendDouble(input1d,this,var1, 114); Util.sendInteger(pointer,this,var1,118); } } @@ -249,25 +253,25 @@ public class GT_Container_ParamAdv extends GT_ContainerMetaTile_Machine { case 103: case 104: case 105: - value0f=Util.receiveDouble(value0f,102,par1,par2); + value0d =Double.longBitsToDouble(value0l=Util.receiveLong(value0l,102,par1,par2)); return; case 106: case 107: case 108: case 109: - value1f=Util.receiveDouble(value1f,106,par1,par2); + value1d =Double.longBitsToDouble(value1l=Util.receiveLong(value1l,106,par1,par2)); return; case 110: case 111: case 112: case 113: - input0f=Util.receiveDouble(input0f,110,par1,par2); + input0d =Double.longBitsToDouble(input0l=Util.receiveLong(input0l,110,par1,par2)); return; case 114: case 115: case 116: case 117: - input1f=Util.receiveDouble(input1f,114,par1,par2); + input1d =Double.longBitsToDouble(input1l=Util.receiveLong(input1l,114,par1,par2)); return; case 118: case 119: diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_ParamText.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_ParamText.java index 43eea1a123..7b6f97981f 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_ParamText.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_ParamText.java @@ -21,10 +21,14 @@ import java.util.Objects; public class GT_Container_ParamText extends GT_ContainerMetaTile_Machine { public int param = 0; - public double value0f = 0; - public double value1f = 0; - public double input0f = 0; - public double input1f = 0; + public double value0d = 0; + public double value1d = 0; + public double input0d = 0; + public double input1d = 0; + public long value0l = 0; + public long value1l = 0; + public long input0l = 0; + public long input1l = 0; public String value0s=""; public String value1s=""; @@ -85,17 +89,17 @@ public class GT_Container_ParamText extends GT_ContainerMetaTile_Machine { return; } param = ((GT_MetaTileEntity_Hatch_ParamText) mTileEntity.getMetaTileEntity()).param; - value0f = ((GT_MetaTileEntity_Hatch_ParamText) mTileEntity.getMetaTileEntity()).value0D; - value1f = ((GT_MetaTileEntity_Hatch_ParamText) mTileEntity.getMetaTileEntity()).value1D; - input0f = ((GT_MetaTileEntity_Hatch_ParamText) mTileEntity.getMetaTileEntity()).input0D; - input1f = ((GT_MetaTileEntity_Hatch_ParamText) mTileEntity.getMetaTileEntity()).input1D; + value0d = ((GT_MetaTileEntity_Hatch_ParamText) mTileEntity.getMetaTileEntity()).value0D; + value1d = ((GT_MetaTileEntity_Hatch_ParamText) mTileEntity.getMetaTileEntity()).value1D; + input0d = ((GT_MetaTileEntity_Hatch_ParamText) mTileEntity.getMetaTileEntity()).input0D; + input1d = ((GT_MetaTileEntity_Hatch_ParamText) mTileEntity.getMetaTileEntity()).input1D; for (Object crafter : crafters) { ICrafting var1 = (ICrafting) crafter; Util.sendInteger(param,this,var1,100); - Util.sendDouble(value0f,this,var1,102); - Util.sendDouble(value1f,this,var1, 106); - Util.sendDouble(input0f,this,var1, 110); - Util.sendDouble(input1f,this,var1, 114); + Util.sendDouble(value0d,this,var1,102); + Util.sendDouble(value1d,this,var1, 106); + Util.sendDouble(input0d,this,var1, 110); + Util.sendDouble(input1d,this,var1, 114); } if(!Objects.equals(value0s,((GT_MetaTileEntity_Hatch_ParamText) mTileEntity.getMetaTileEntity()).value0s) || !Objects.equals(value0s,((GT_MetaTileEntity_Hatch_ParamText) mTileEntity.getMetaTileEntity()).value0s)){ @@ -125,25 +129,25 @@ public class GT_Container_ParamText extends GT_ContainerMetaTile_Machine { case 103: case 104: case 105: - value0f=Util.receiveDouble(value0f,102,par1,par2); + value0d =Double.longBitsToDouble(value0l=Util.receiveLong(value0l,102,par1,par2)); return; case 106: case 107: case 108: case 109: - value1f=Util.receiveDouble(value1f,106,par1,par2); + value1d =Double.longBitsToDouble(value1l=Util.receiveLong(value1l,106,par1,par2)); return; case 110: case 111: case 112: case 113: - input0f=Util.receiveDouble(input0f,110,par1,par2); + input0d =Double.longBitsToDouble(input0l=Util.receiveLong(input0l,110,par1,par2)); return; case 114: case 115: case 116: case 117: - input1f=Util.receiveDouble(input1f,114,par1,par2); + input1d =Double.longBitsToDouble(input1l=Util.receiveLong(input1l,114,par1,par2)); return; default: } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Param.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Param.java index bf63eaa24f..52f0832cb2 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Param.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Param.java @@ -21,14 +21,14 @@ public class GT_GUIContainer_Param extends GT_GUIContainerMetaTile_Machine { if (mContainer != null) { TecTechFontRender.INSTANCE.drawSplitString("Parameters: " + ((GT_Container_Param) mContainer).param, 46, 7, 167, 0xffffff); Locale locale= Locale.getDefault(); - TecTechFontRender.INSTANCE.drawSplitString("\u24EA\u2b07" + String.format(locale, "%+.5E", ((GT_Container_Param) mContainer).input0f), 46, 16, 167, 0x22ddff); - TecTechFontRender.INSTANCE.drawSplitString("\u2460\u2b07" + String.format(locale, "%+.5E", ((GT_Container_Param) mContainer).input1f), 46, 24, 167, 0x00ffff); - TecTechFontRender.INSTANCE.drawSplitString("\u24EA\u2b06" + String.format(locale, "%+.5E", ((GT_Container_Param) mContainer).value0f), 46, 33, 167, 0x00bbff); - TecTechFontRender.INSTANCE.drawSplitString("\u2460\u2b06" + String.format(locale, "%+.5E", ((GT_Container_Param) mContainer).value1f), 46, 41, 167, 0x0077ff); + TecTechFontRender.INSTANCE.drawSplitString("\u24EA\u2b07" + String.format(locale, "%+.5E", ((GT_Container_Param) mContainer).input0d), 46, 16, 167, 0x22ddff); + TecTechFontRender.INSTANCE.drawSplitString("\u2460\u2b07" + String.format(locale, "%+.5E", ((GT_Container_Param) mContainer).input1d), 46, 24, 167, 0x00ffff); + TecTechFontRender.INSTANCE.drawSplitString("\u24EA\u2b06" + String.format(locale, "%+.5E", ((GT_Container_Param) mContainer).value0d), 46, 33, 167, 0x00bbff); + TecTechFontRender.INSTANCE.drawSplitString("\u2460\u2b06" + String.format(locale, "%+.5E", ((GT_Container_Param) mContainer).value1d), 46, 41, 167, 0x0077ff); GL11.glPushMatrix(); GL11.glScalef(.5f,.5f,.5f); - TecTechFontRender.INSTANCE.drawSplitString("\u24EA\u2b06" + Util.longBitsToShortString(Double.doubleToLongBits(((GT_Container_Param) mContainer).value0f)), 92, 100, 334, 0x00bbff); - TecTechFontRender.INSTANCE.drawSplitString("\u2460\u2b06" + Util.longBitsToShortString(Double.doubleToLongBits(((GT_Container_Param) mContainer).value1f)), 92, 116, 334, 0x0077ff); + TecTechFontRender.INSTANCE.drawSplitString("\u24EA\u2b06" + Util.longBitsToShortString(Double.doubleToLongBits(((GT_Container_Param) mContainer).value0d)), 92, 100, 334, 0x00bbff); + TecTechFontRender.INSTANCE.drawSplitString("\u2460\u2b06" + Util.longBitsToShortString(Double.doubleToLongBits(((GT_Container_Param) mContainer).value1d)), 92, 116, 334, 0x0077ff); GL11.glPopMatrix(); } else { TecTechFontRender.INSTANCE.drawSplitString("Parameters", 46, 7, 167, 0xffffff); diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_ParamAdv.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_ParamAdv.java index a682323f8c..ca92f0496e 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_ParamAdv.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_ParamAdv.java @@ -21,14 +21,14 @@ public class GT_GUIContainer_ParamAdv extends GT_GUIContainerMetaTile_Machine { if (mContainer != null) { TecTechFontRender.INSTANCE.drawSplitString("Parameters X: " + ((GT_Container_ParamAdv) mContainer).param, 46, 7, 167, 0xffffff); Locale locale = Locale.getDefault(); - TecTechFontRender.INSTANCE.drawSplitString("\u24EA\u2b07" + String.format(locale, "%+.5E", (((GT_Container_ParamAdv) mContainer).input0f)), 46, 16, 167, 0x22ddff); - TecTechFontRender.INSTANCE.drawSplitString("\u2460\u2b07" + String.format(locale, "%+.5E", (((GT_Container_ParamAdv) mContainer).input1f)), 46, 24, 167, 0x00ffff); - TecTechFontRender.INSTANCE.drawSplitString("\u24EA\u2b06" + String.format(locale, "%+.5E", (((GT_Container_ParamAdv) mContainer).value0f)), 46, 33, 167, 0x00bbff); - TecTechFontRender.INSTANCE.drawSplitString("\u2460\u2b06" + String.format(locale, "%+.5E", (((GT_Container_ParamAdv) mContainer).value1f)), 46, 41, 167, 0x0077ff); + TecTechFontRender.INSTANCE.drawSplitString("\u24EA\u2b07" + String.format(locale, "%+.5E", (((GT_Container_ParamAdv) mContainer).input0d)), 46, 16, 167, 0x22ddff); + TecTechFontRender.INSTANCE.drawSplitString("\u2460\u2b07" + String.format(locale, "%+.5E", (((GT_Container_ParamAdv) mContainer).input1d)), 46, 24, 167, 0x00ffff); + TecTechFontRender.INSTANCE.drawSplitString("\u24EA\u2b06" + String.format(locale, "%+.5E", (((GT_Container_ParamAdv) mContainer).value0d)), 46, 33, 167, 0x00bbff); + TecTechFontRender.INSTANCE.drawSplitString("\u2460\u2b06" + String.format(locale, "%+.5E", (((GT_Container_ParamAdv) mContainer).value1d)), 46, 41, 167, 0x0077ff); GL11.glPushMatrix(); GL11.glScalef(.5f,.5f,.5f); - TecTechFontRender.INSTANCE.drawSplitString("\u24EA\u2b06" + Util.longBitsToShortString(Double.doubleToLongBits(((GT_Container_ParamAdv) mContainer).value0f)), 92, 100, 334, 0x00bbff); - TecTechFontRender.INSTANCE.drawSplitString("\u2460\u2b06" + Util.longBitsToShortString(Double.doubleToLongBits(((GT_Container_ParamAdv) mContainer).value1f)), 92, 116, 334, 0x0077ff); + TecTechFontRender.INSTANCE.drawSplitString("\u24EA\u2b06" + Util.longBitsToShortString(Double.doubleToLongBits(((GT_Container_ParamAdv) mContainer).value0d)), 92, 100, 334, 0x00bbff); + TecTechFontRender.INSTANCE.drawSplitString("\u2460\u2b06" + Util.longBitsToShortString(Double.doubleToLongBits(((GT_Container_ParamAdv) mContainer).value1d)), 92, 116, 334, 0x0077ff); GL11.glPopMatrix(); TecTechFontRender.INSTANCE.drawSplitString("Pointer " + Integer.toHexString(((GT_Container_ParamAdv) mContainer).pointer | 0x10000).substring(1), 46, 66, 167, 0x0033ff); } else { diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_ParamText.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_ParamText.java index ed1f1acdee..2b17563db0 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_ParamText.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_ParamText.java @@ -17,7 +17,7 @@ import static gregtech.api.enums.GT_Values.RES_PATH_GUI; public class GT_GUIContainer_ParamText extends GT_GUIContainerMetaTile_Machine { private GuiTextField value0tb; - private GuiTextField valie1tb; + private GuiTextField value1tb; public GT_GUIContainer_ParamText(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(new GT_Container_ParamText(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "ParametrizerText.png"); @@ -28,8 +28,8 @@ public class GT_GUIContainer_ParamText extends GT_GUIContainerMetaTile_Machine { super.initGui(); value0tb = new GuiTextField(TecTechFontRender.INSTANCE, (this.width - 176) / 2 + 12 + 14, (this.height - 166) / 2 + 26, 156 - 18, 12); value0tb.setMaxStringLength(80); - valie1tb = new GuiTextField(TecTechFontRender.INSTANCE, (this.width - 176) / 2 + 12 + 14, (this.height - 166) / 2 + 41, 156 - 18, 12); - valie1tb.setMaxStringLength(80); + value1tb = new GuiTextField(TecTechFontRender.INSTANCE, (this.width - 176) / 2 + 12 + 14, (this.height - 166) / 2 + 41, 156 - 18, 12); + value1tb.setMaxStringLength(80); updateValues(); } @@ -37,15 +37,15 @@ public class GT_GUIContainer_ParamText extends GT_GUIContainerMetaTile_Machine { public void onGuiClosed() { super.onGuiClosed(); value0tb.setFocused(false); - valie1tb.setFocused(false); + value1tb.setFocused(false); updateValues(); } @Override protected void keyTyped(char p_73869_1_, int p_73869_2_) { value0tb.textboxKeyTyped(p_73869_1_, p_73869_2_); - valie1tb.textboxKeyTyped(p_73869_1_, p_73869_2_); - if ((p_73869_2_ != 1 && p_73869_2_ != this.mc.gameSettings.keyBindInventory.getKeyCode()) || (!value0tb.isFocused() && !valie1tb.isFocused())) { + value1tb.textboxKeyTyped(p_73869_1_, p_73869_2_); + if ((p_73869_2_ != 1 && p_73869_2_ != this.mc.gameSettings.keyBindInventory.getKeyCode()) || (!value0tb.isFocused() && !value1tb.isFocused())) { super.keyTyped(p_73869_1_, p_73869_2_); } updateValues(); @@ -55,21 +55,21 @@ public class GT_GUIContainer_ParamText extends GT_GUIContainerMetaTile_Machine { public void updateScreen() { super.updateScreen(); value0tb.updateCursorCounter(); - valie1tb.updateCursorCounter(); + value1tb.updateCursorCounter(); } @Override public void drawScreen(int par1, int par2, float par3) { super.drawScreen(par1, par2, par3); value0tb.drawTextBox(); - valie1tb.drawTextBox(); + value1tb.drawTextBox(); } @Override protected void mouseClicked(int p_73864_1_, int p_73864_2_, int p_73864_3_) { super.mouseClicked(p_73864_1_, p_73864_2_, p_73864_3_); value0tb.mouseClicked(p_73864_1_, p_73864_2_, p_73864_3_); - valie1tb.mouseClicked(p_73864_1_, p_73864_2_, p_73864_3_); + value1tb.mouseClicked(p_73864_1_, p_73864_2_, p_73864_3_); updateValues(); } @@ -80,8 +80,8 @@ public class GT_GUIContainer_ParamText extends GT_GUIContainerMetaTile_Machine { Locale locale = Locale.getDefault(); TecTechFontRender.INSTANCE.drawSplitString("\u24EA\u2b06", 10, 29, 16, 0x00bbff); TecTechFontRender.INSTANCE.drawSplitString("\u2460\u2b06", 10, 44, 16, 0x0077ff); - TecTechFontRender.INSTANCE.drawSplitString("\u24EA\u2b07" + String.format(locale, "%+.5E", (((GT_Container_ParamText) mContainer).input0f)), 10, 56, 167, 0x22ddff); - TecTechFontRender.INSTANCE.drawSplitString("\u2460\u2b07" + String.format(locale, "%+.5E", (((GT_Container_ParamText) mContainer).input1f)), 10, 65, 167, 0x00ffff); + TecTechFontRender.INSTANCE.drawSplitString("\u24EA\u2b07" + String.format(locale, "%+.5E", (((GT_Container_ParamText) mContainer).input0d)), 10, 56, 167, 0x22ddff); + TecTechFontRender.INSTANCE.drawSplitString("\u2460\u2b07" + String.format(locale, "%+.5E", (((GT_Container_ParamText) mContainer).input1d)), 10, 65, 167, 0x00ffff); } else { TecTechFontRender.INSTANCE.drawSplitString("Parameters tXt", 46, 7, 167, 0xffffff); } @@ -116,7 +116,7 @@ public class GT_GUIContainer_ParamText extends GT_GUIContainerMetaTile_Machine { } if (!Objects.equals(((GT_MetaTileEntity_Hatch_ParamText) ((GT_Container_ParamText) mContainer).mTileEntity.getMetaTileEntity()).value0s, value0tb.getText())) { ((GT_Container_ParamText) mContainer).value0s = value0tb.getText(); - ((GT_Container_ParamText) mContainer).value0f = val; + ((GT_Container_ParamText) mContainer).value0d = val; ((GT_MetaTileEntity_Hatch_ParamText) ((GT_Container_ParamText) mContainer).mTileEntity.getMetaTileEntity()).value0s = value0tb.getText(); NetworkDispatcher.INSTANCE.sendToServer(new TextParametersMessage.ParametersTextUpdate( @@ -129,8 +129,8 @@ public class GT_GUIContainer_ParamText extends GT_GUIContainerMetaTile_Machine { } private void updateIn1() { - if (!valie1tb.isFocused()) { - String str = valie1tb.getText().toLowerCase(); + if (!value1tb.isFocused()) { + String str = value1tb.getText().toLowerCase(); double val; try { if (str.contains("b")) { @@ -142,16 +142,16 @@ public class GT_GUIContainer_ParamText extends GT_GUIContainerMetaTile_Machine { } else { val = Util.stringToDouble(str); } - if (!Objects.equals(((GT_MetaTileEntity_Hatch_ParamText) ((GT_Container_ParamText) mContainer).mTileEntity.getMetaTileEntity()).value1s, valie1tb.getText())) { - ((GT_Container_ParamText) mContainer).value1s = valie1tb.getText(); - ((GT_Container_ParamText) mContainer).value1f = val; - ((GT_MetaTileEntity_Hatch_ParamText) ((GT_Container_ParamText) mContainer).mTileEntity.getMetaTileEntity()).value1s = valie1tb.getText(); + if (!Objects.equals(((GT_MetaTileEntity_Hatch_ParamText) ((GT_Container_ParamText) mContainer).mTileEntity.getMetaTileEntity()).value1s, value1tb.getText())) { + ((GT_Container_ParamText) mContainer).value1s = value1tb.getText(); + ((GT_Container_ParamText) mContainer).value1d = val; + ((GT_MetaTileEntity_Hatch_ParamText) ((GT_Container_ParamText) mContainer).mTileEntity.getMetaTileEntity()).value1s = value1tb.getText(); NetworkDispatcher.INSTANCE.sendToServer(new TextParametersMessage.ParametersTextUpdate( (GT_MetaTileEntity_Hatch_ParamText) ((GT_Container_ParamText) mContainer).mTileEntity.getMetaTileEntity())); } } catch (Exception e) { - valie1tb.setText(((GT_MetaTileEntity_Hatch_ParamText) ((GT_Container_ParamText) mContainer).mTileEntity.getMetaTileEntity()).value1s); + value1tb.setText(((GT_MetaTileEntity_Hatch_ParamText) ((GT_Container_ParamText) mContainer).mTileEntity.getMetaTileEntity()).value1s); } } } @@ -163,6 +163,6 @@ public class GT_GUIContainer_ParamText extends GT_GUIContainerMetaTile_Machine { public void setTextIn1(String in1) { ((GT_Container_ParamText) mContainer).value1s = in1; - this.valie1tb.setText(in1); + this.value1tb.setText(in1); } } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_Container_MultiMachineEM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_Container_MultiMachineEM.java index dd2eb0a7be..c42c15bd8d 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_Container_MultiMachineEM.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_Container_MultiMachineEM.java @@ -15,7 +15,9 @@ public class GT_Container_MultiMachineEM extends GT_ContainerMetaTile_Machine { public LedStatus[] eParamsInStatus = LedStatus.makeArray(20,LedStatus.STATUS_UNDEFINED); public LedStatus[] eParamsOutStatus = LedStatus.makeArray(20,LedStatus.STATUS_UNDEFINED); public double[] eParamsIn = new double[20];//number I from parametrizers + public long[] eParamsInl = new long[20]; public double[] eParamsOut = new double[20];//number O to parametrizers + public long[] eParamsOutl = new long[20]; public byte eCertainMode = 5, eCertainStatus = 127; public boolean ePowerPass = false, eSafeVoid = false, allowedToWork = false; public final boolean ePowerPassButton, eSafeVoidButton, allowedToWorkButton; @@ -151,10 +153,10 @@ public class GT_Container_MultiMachineEM extends GT_ContainerMetaTile_Machine { allowedToWork = (par2 & 4) == 4; } else if(par1>=128 && par1<208){ int pos=(par1-128)>>2; - eParamsOut[pos]=Util.receiveDouble(eParamsOut[pos],par1&0xFFFFFFFC,par1,par2); + eParamsOut[pos]=Double.longBitsToDouble(eParamsOutl[pos]=Util.receiveLong(eParamsOutl[pos],par1&0xFFFFFFFC,par1,par2)); }else if(par1>=208 && par1<288){ int pos=(par1-208)>>2; - eParamsIn[pos]=Util.receiveDouble(eParamsIn[pos],par1&0xFFFFFFFC,par1,par2); + eParamsIn[pos]=Double.longBitsToDouble(eParamsInl[pos]=Util.receiveLong(eParamsInl[pos],par1&0xFFFFFFFC,par1,par2)); } } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/gui/GT_Container_DebugPollutor.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/gui/GT_Container_DebugPollutor.java index 3374d874d4..ebeb266c64 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/gui/GT_Container_DebugPollutor.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/gui/GT_Container_DebugPollutor.java @@ -15,8 +15,9 @@ import net.minecraft.item.ItemStack; public class GT_Container_DebugPollutor extends GT_ContainerMetaTile_Machine { - public int pollution =0; - public float anomaly =0; + public int pollution; + public float anomaly; + private int anomalyInt; public GT_Container_DebugPollutor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(aInventoryPlayer, aTileEntity); @@ -124,6 +125,7 @@ public class GT_Container_DebugPollutor GT_MetaTileEntity_DebugPollutor dpg = (GT_MetaTileEntity_DebugPollutor) mTileEntity.getMetaTileEntity(); pollution =dpg.pollution; anomaly =dpg.anomaly; + anomalyInt=Float.floatToIntBits(anomaly); for (Object crafter : crafters) { ICrafting var1 = (ICrafting) crafter; @@ -143,7 +145,7 @@ public class GT_Container_DebugPollutor break; case 102: case 103: - anomaly = Util.receiveFloat(anomaly,102,par1,par2); + anomaly = Float.intBitsToFloat(anomalyInt=Util.receiveInteger(anomalyInt,102,par1,par2)); break; } } -- cgit From e749b1e4aa03300d89c4fc4f7715febc45f03111 Mon Sep 17 00:00:00 2001 From: Tec Date: Fri, 25 Oct 2019 17:59:46 +0200 Subject: Add missing server side disables --- .../tectech/thing/item/DebugElementalInstanceContainer_EM.java | 5 ++++- .../technus/tectech/thing/item/ElementalDefinitionContainer_EM.java | 3 +++ .../tectech/thing/item/ElementalDefinitionScanStorage_EM.java | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/thing/item/DebugElementalInstanceContainer_EM.java b/src/main/java/com/github/technus/tectech/thing/item/DebugElementalInstanceContainer_EM.java index 61c6e3114a..4d88f321ed 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/DebugElementalInstanceContainer_EM.java +++ b/src/main/java/com/github/technus/tectech/thing/item/DebugElementalInstanceContainer_EM.java @@ -1,8 +1,8 @@ package com.github.technus.tectech.thing.item; import com.github.technus.tectech.CommonValues; -import com.github.technus.tectech.font.TecTechFontRender; import com.github.technus.tectech.Util; +import com.github.technus.tectech.font.TecTechFontRender; import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap; import com.github.technus.tectech.mechanics.elementalMatter.core.iElementalInstanceContainer; import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack; @@ -10,6 +10,7 @@ import com.github.technus.tectech.mechanics.elementalMatter.core.tElementalExcep import com.github.technus.tectech.mechanics.elementalMatter.core.templates.iElementalDefinition; import com.github.technus.tectech.thing.item.renderElemental.IElementalItem; import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.client.gui.FontRenderer; @@ -30,6 +31,7 @@ import java.util.TreeSet; import static com.github.technus.tectech.Reference.MODID; import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; import static com.github.technus.tectech.loader.gui.CreativeTabTecTech.creativeTabTecTech; +import static cpw.mods.fml.relauncher.Side.CLIENT; /** * Created by Tec on 15.03.2017. @@ -160,6 +162,7 @@ public final class DebugElementalInstanceContainer_EM extends Item implements IE } @Override + @SideOnly(CLIENT) public FontRenderer getFontRenderer(ItemStack stack) { return TecTechFontRender.INSTANCE; } diff --git a/src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionContainer_EM.java b/src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionContainer_EM.java index b5a9eacf68..c14e231fc9 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionContainer_EM.java +++ b/src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionContainer_EM.java @@ -7,6 +7,7 @@ import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalDefin import com.github.technus.tectech.mechanics.elementalMatter.core.tElementalException; import com.github.technus.tectech.thing.item.renderElemental.IElementalItem; import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.gui.FontRenderer; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; @@ -20,6 +21,7 @@ import java.util.List; import static com.github.technus.tectech.Reference.MODID; import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; import static com.github.technus.tectech.loader.gui.CreativeTabTecTech.creativeTabTecTech; +import static cpw.mods.fml.relauncher.Side.CLIENT; /** * Created by Tec on 15.03.2017. @@ -147,6 +149,7 @@ public final class ElementalDefinitionContainer_EM extends Item implements IElem } @Override + @SideOnly(CLIENT) public FontRenderer getFontRenderer(ItemStack stack) { return TecTechFontRender.INSTANCE; } diff --git a/src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionScanStorage_EM.java b/src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionScanStorage_EM.java index eb8663e1c2..a8f8a083a5 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionScanStorage_EM.java +++ b/src/main/java/com/github/technus/tectech/thing/item/ElementalDefinitionScanStorage_EM.java @@ -26,6 +26,7 @@ import java.util.List; import static com.github.technus.tectech.Reference.MODID; import static com.github.technus.tectech.loader.gui.CreativeTabTecTech.creativeTabTecTech; +import static cpw.mods.fml.relauncher.Side.CLIENT; /** * Created by Tec on 15.03.2017. @@ -151,6 +152,7 @@ public final class ElementalDefinitionScanStorage_EM extends Item implements IEl } @Override + @SideOnly(CLIENT) public FontRenderer getFontRenderer(ItemStack stack) { return TecTechFontRender.INSTANCE; } -- cgit From f39d2183ed9c6a09cc1162ab9156e9241e096a6e Mon Sep 17 00:00:00 2001 From: Technus Date: Fri, 1 Nov 2019 14:38:53 +0100 Subject: fixed fix for research station research --- build.properties | 4 +- .../tectech/nei/TT_NEI_ResearchHandler.java | 441 +-------------------- .../technus/tectech/nei/TT_NEI_ScannerHandler.java | 441 +-------------------- .../github/technus/tectech/recipe/TT_recipe.java | 2 + .../technus/tectech/recipe/TT_recipeAdder.java | 2 + .../multi/GT_MetaTileEntity_EM_research.java | 4 +- 6 files changed, 22 insertions(+), 872 deletions(-) (limited to 'src/main/java') diff --git a/build.properties b/build.properties index 3781376459..35c6c657ea 100644 --- a/build.properties +++ b/build.properties @@ -6,8 +6,8 @@ ic2.version=2.2.790-experimental codechickenlib.version=1.1.3.140 codechickencore.version=1.0.7.47 nei.version=1.0.5.120 -gregtech.jenkinsbuild=336 -gregtech.version=5.09.33.22 +gregtech.jenkinsbuild=345 +gregtech.version=5.09.33.23 cofhcore.version=[1.7.10]3.1.4-329-dev cofhlib.version=[1.7.10]1.0.3-175-dev diff --git a/src/main/java/com/github/technus/tectech/nei/TT_NEI_ResearchHandler.java b/src/main/java/com/github/technus/tectech/nei/TT_NEI_ResearchHandler.java index 74911fe67e..358d55be0e 100644 --- a/src/main/java/com/github/technus/tectech/nei/TT_NEI_ResearchHandler.java +++ b/src/main/java/com/github/technus/tectech/nei/TT_NEI_ResearchHandler.java @@ -37,9 +37,6 @@ import static com.github.technus.tectech.recipe.TT_recipeAdder.nullItem; import static gregtech.api.enums.ItemList.Display_Fluid; public class TT_NEI_ResearchHandler extends TemplateRecipeHandler { - public static final int sOffsetX = 5; - public static final int sOffsetY = 11; - static { GuiContainerManager.addInputHandler(new GT_RectHandler()); GuiContainerManager.addTooltipHandler(new GT_RectHandler()); @@ -118,7 +115,6 @@ public class TT_NEI_ResearchHandler extends TemplateRecipeHandler { } } } - CachedDefaultRecipe tNEIRecipe; } @Override @@ -153,7 +149,6 @@ public class TT_NEI_ResearchHandler extends TemplateRecipeHandler { } } } - CachedDefaultRecipe tNEIRecipe; } @Override @@ -386,439 +381,17 @@ public class TT_NEI_ResearchHandler extends TemplateRecipeHandler { mOutputs = new ArrayList<>(); mInputs = new ArrayList<>(); - + int tStartIndex = 0; - //switch (mRecipeMap.mUsualInputCount) { - //case 0: - // break; - //case 1: - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14+9)); - } - //tStartIndex++; - //break; - //case 2: - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 14)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14)); - // } - // tStartIndex++; - // break; - //case 3: - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 14)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 14)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14)); - // } - // tStartIndex++; - // break; - //case 4: - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 5)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 5)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 23)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 23)); - // } - // tStartIndex++; - // break; - //case 5: - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 5)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 5)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 5)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 23)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 23)); - // } - // tStartIndex++; - // break; - //case 6: - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 5)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 5)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 5)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 23)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 23)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 23)); - // } - // tStartIndex++; - // break; - //case 7: - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, -4)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, -4)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, -4)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 14)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 14)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 32)); - // } - // tStartIndex++; - // break; - //case 8: - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, -4)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, -4)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, -4)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 14)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 14)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 32)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 32)); - // } - // tStartIndex++; - // break; - //default: - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, -4)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, -4)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, -4)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 14)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 14)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 32)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 32)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 32)); - // } - // tStartIndex++; - //} + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14 + 9)); + } if (aRecipe.mSpecialItems != null) { mInputs.add(new FixedPositionedStack(aRecipe.mSpecialItems, 120, 52)); } - //tStartIndex = 0; - //switch (mRecipeMap.mUsualOutputCount) { - //case 0: - // break; - //case 1: - if (aRecipe.getOutput(tStartIndex) != null) { - mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 14+9, aRecipe.getOutputChance(tStartIndex))); - } - //tStartIndex++; - //break; - //case 2: - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 14, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 14, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // break; - //case 3: - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 14, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 14, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 14, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // break; - //case 4: - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 5, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 5, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 23, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 23, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // break; - //case 5: - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 5, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 5, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 5, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 23, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 23, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // break; - //case 6: - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 5, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 5, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 5, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 23, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 23, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 23, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // break; - //case 7: - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, -4, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, -4, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, -4, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 14, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 14, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 14, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 32, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // break; - //case 8: - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, -4, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, -4, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, -4, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 14, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 14, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 14, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 32, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 32, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // break; - //default: - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, -4, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, -4, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, -4, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 14, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 14, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 14, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 32, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 32, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 32, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - //} - //if ((aRecipe.mFluidInputs.length > 0) && (aRecipe.mFluidInputs[0] != null) && (aRecipe.mFluidInputs[0].getFluid() != null)) { - // this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[0], true), 48, 52)); - // if ((aRecipe.mFluidInputs.length > 1) && (aRecipe.mFluidInputs[1] != null) && (aRecipe.mFluidInputs[1].getFluid() != null)) { - // this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[1], true), 30, 52)); - // } - //} - //if (aRecipe.mFluidOutputs.length > 1) { - // if (aRecipe.mFluidOutputs[0] != null && (aRecipe.mFluidOutputs[0].getFluid() != null)) { - // this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[0], true), 120, 5)); - // } - // if (aRecipe.mFluidOutputs[1] != null && (aRecipe.mFluidOutputs[1].getFluid() != null)) { - // this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[1], true), 138, 5)); - // } - // if (aRecipe.mFluidOutputs.length > 2 && aRecipe.mFluidOutputs[2] != null && (aRecipe.mFluidOutputs[2].getFluid() != null)) { - // this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[2], true), 102, 23)); - // } - // if (aRecipe.mFluidOutputs.length > 3 && aRecipe.mFluidOutputs[3] != null && (aRecipe.mFluidOutputs[3].getFluid() != null)) { - // this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[3], true), 120, 23)); - // } - // if (aRecipe.mFluidOutputs.length > 4 && aRecipe.mFluidOutputs[4] != null && (aRecipe.mFluidOutputs[4].getFluid() != null)) { - // this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[4], true), 138, 23)); - // } - //} else if ((aRecipe.mFluidOutputs.length > 0) && (aRecipe.mFluidOutputs[0] != null) && (aRecipe.mFluidOutputs[0].getFluid() != null)) { - // this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[0], true), 102, 52)); - //} + if (aRecipe.getOutput(tStartIndex) != null) { + mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 14 + 9, aRecipe.getOutputChance(tStartIndex))); + } } @Override diff --git a/src/main/java/com/github/technus/tectech/nei/TT_NEI_ScannerHandler.java b/src/main/java/com/github/technus/tectech/nei/TT_NEI_ScannerHandler.java index 4ab8d46f5c..0c7651977e 100644 --- a/src/main/java/com/github/technus/tectech/nei/TT_NEI_ScannerHandler.java +++ b/src/main/java/com/github/technus/tectech/nei/TT_NEI_ScannerHandler.java @@ -37,9 +37,6 @@ import static com.github.technus.tectech.recipe.TT_recipeAdder.nullItem; import static gregtech.api.enums.ItemList.Display_Fluid; public class TT_NEI_ScannerHandler extends TemplateRecipeHandler { - public static final int sOffsetX = 5; - public static final int sOffsetY = 11; - static { GuiContainerManager.addInputHandler(new GT_RectHandler()); GuiContainerManager.addTooltipHandler(new GT_RectHandler()); @@ -118,7 +115,6 @@ public class TT_NEI_ScannerHandler extends TemplateRecipeHandler { } } } - CachedDefaultRecipe tNEIRecipe; } @Override @@ -153,7 +149,6 @@ public class TT_NEI_ScannerHandler extends TemplateRecipeHandler { } } } - CachedDefaultRecipe tNEIRecipe; } @Override @@ -386,439 +381,17 @@ public class TT_NEI_ScannerHandler extends TemplateRecipeHandler { mOutputs = new ArrayList<>(); mInputs = new ArrayList<>(); - + int tStartIndex = 0; - //switch (mRecipeMap.mUsualInputCount) { - //case 0: - // break; - //case 1: - if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14+9)); - } - //tStartIndex++; - //break; - //case 2: - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 14)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14)); - // } - // tStartIndex++; - // break; - //case 3: - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 14)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 14)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14)); - // } - // tStartIndex++; - // break; - //case 4: - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 5)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 5)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 23)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 23)); - // } - // tStartIndex++; - // break; - //case 5: - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 5)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 5)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 5)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 23)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 23)); - // } - // tStartIndex++; - // break; - //case 6: - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 5)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 5)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 5)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 23)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 23)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 23)); - // } - // tStartIndex++; - // break; - //case 7: - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, -4)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, -4)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, -4)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 14)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 14)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 32)); - // } - // tStartIndex++; - // break; - //case 8: - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, -4)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, -4)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, -4)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 14)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 14)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 32)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 32)); - // } - // tStartIndex++; - // break; - //default: - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, -4)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, -4)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, -4)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 14)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 14)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 32)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 32)); - // } - // tStartIndex++; - // if (aRecipe.getRepresentativeInput(tStartIndex) != null) { - // this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 32)); - // } - // tStartIndex++; - //} + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14 + 9)); + } if (aRecipe.mSpecialItems != null) { mInputs.add(new FixedPositionedStack(aRecipe.mSpecialItems, 120, 52)); } - //tStartIndex = 0; - //switch (mRecipeMap.mUsualOutputCount) { - //case 0: - // break; - //case 1: - if (aRecipe.getOutput(tStartIndex) != null) { - mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 14+9, aRecipe.getOutputChance(tStartIndex))); - } - //tStartIndex++; - //break; - //case 2: - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 14, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 14, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // break; - //case 3: - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 14, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 14, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 14, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // break; - //case 4: - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 5, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 5, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 23, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 23, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // break; - //case 5: - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 5, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 5, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 5, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 23, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 23, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // break; - //case 6: - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 5, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 5, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 5, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 23, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 23, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 23, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // break; - //case 7: - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, -4, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, -4, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, -4, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 14, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 14, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 14, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 32, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // break; - //case 8: - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, -4, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, -4, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, -4, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 14, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 14, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 14, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 32, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 32, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // break; - //default: - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, -4, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, -4, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, -4, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 14, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 14, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 14, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 32, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 32, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - // if (aRecipe.getOutput(tStartIndex) != null) { - // this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 32, aRecipe.getOutputChance(tStartIndex))); - // } - // tStartIndex++; - //} - //if ((aRecipe.mFluidInputs.length > 0) && (aRecipe.mFluidInputs[0] != null) && (aRecipe.mFluidInputs[0].getFluid() != null)) { - // this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[0], true), 48, 52)); - // if ((aRecipe.mFluidInputs.length > 1) && (aRecipe.mFluidInputs[1] != null) && (aRecipe.mFluidInputs[1].getFluid() != null)) { - // this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[1], true), 30, 52)); - // } - //} - //if (aRecipe.mFluidOutputs.length > 1) { - // if (aRecipe.mFluidOutputs[0] != null && (aRecipe.mFluidOutputs[0].getFluid() != null)) { - // this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[0], true), 120, 5)); - // } - // if (aRecipe.mFluidOutputs[1] != null && (aRecipe.mFluidOutputs[1].getFluid() != null)) { - // this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[1], true), 138, 5)); - // } - // if (aRecipe.mFluidOutputs.length > 2 && aRecipe.mFluidOutputs[2] != null && (aRecipe.mFluidOutputs[2].getFluid() != null)) { - // this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[2], true), 102, 23)); - // } - // if (aRecipe.mFluidOutputs.length > 3 && aRecipe.mFluidOutputs[3] != null && (aRecipe.mFluidOutputs[3].getFluid() != null)) { - // this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[3], true), 120, 23)); - // } - // if (aRecipe.mFluidOutputs.length > 4 && aRecipe.mFluidOutputs[4] != null && (aRecipe.mFluidOutputs[4].getFluid() != null)) { - // this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[4], true), 138, 23)); - // } - //} else if ((aRecipe.mFluidOutputs.length > 0) && (aRecipe.mFluidOutputs[0] != null) && (aRecipe.mFluidOutputs[0].getFluid() != null)) { - // this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[0], true), 102, 52)); - //} + if (aRecipe.getOutput(tStartIndex) != null) { + mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 14 + 9, aRecipe.getOutputChance(tStartIndex))); + } } @Override 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 b4dc5775d7..b0b349a268 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 @@ -9,6 +9,7 @@ import gregtech.api.util.GT_Recipe; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; +import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; @@ -167,6 +168,7 @@ public class TT_recipe extends GT_Recipe { public static class GT_Recipe_MapTT extends GT_Recipe.GT_Recipe_Map { public static GT_Recipe_MapTT sResearchableFakeRecipes =new GT_Recipe_MapTT(new HashSet<>(32), "gt.recipe.researchStation", "Research station", null, "gregtech:textures/gui/multimachines/ResearchFake", 1, 1,1,0,1,"", 1, "", true, false);//nei to false - using custom handler public static GT_Recipe_MapTT sScannableFakeRecipes = new GT_Recipe_MapTT(new HashSet<>(32),"gt.recipe.em_scanner","EM Scanner Research", null,"gregtech:textures/gui/multimachines/ResearchFake",1,1,1,0,1,"",1,"",true,false); + public static ArrayList sAssemblylineRecipes=new ArrayList<>(); public GT_Recipe_MapTT(Collection aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) { super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); 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 88e57fc3ab..b08265d2c5 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 @@ -52,6 +52,7 @@ public class TT_recipeAdder extends GT_RecipeAdder { TT_recipe.GT_Recipe_MapTT.sResearchableFakeRecipes.addFakeRecipe(false, new ItemStack[]{aResearchItem}, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Writes Research result")}, null, null, totalComputationRequired, researchEUt, researchAmperage| computationRequiredPerSec<<16); GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.addFakeRecipe(false, aInputs, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Reads Research result")}, aFluidInputs, null, assDuration, assEUt, 0,true); GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes.add(new GT_Recipe.GT_Recipe_AssemblyLine(CustomItemList.UnusedStuff.get(1), totalComputationRequired/computationRequiredPerSec, aInputs, aFluidInputs, aOutput, assDuration, assEUt)); + TT_recipe.GT_Recipe_MapTT.sAssemblylineRecipes.add(new GT_Recipe.GT_Recipe_AssemblyLine(aResearchItem, totalComputationRequired/computationRequiredPerSec, aInputs, aFluidInputs, aOutput, assDuration, assEUt)); return true; } @@ -117,6 +118,7 @@ public class TT_recipeAdder extends GT_RecipeAdder { TT_recipe.GT_Recipe_MapTT.sResearchableFakeRecipes.addFakeRecipe(false, new ItemStack[]{aResearchItem}, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Writes Research result")}, null, null, totalComputationRequired, researchEUt, researchAmperage| computationRequiredPerSec<<16); GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.addFakeRecipe(false,tInputs,new ItemStack[]{aOutput},new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Reads Research result")},aFluidInputs,null,assDuration,assEUt,0,tAlts,true); GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes.add(new GT_Recipe.GT_Recipe_AssemblyLine( CustomItemList.UnusedStuff.get(1), totalComputationRequired/computationRequiredPerSec, tInputs, aFluidInputs, aOutput, assDuration, assEUt, tAlts)); + TT_recipe.GT_Recipe_MapTT.sAssemblylineRecipes.add(new GT_Recipe.GT_Recipe_AssemblyLine( aResearchItem, totalComputationRequired/computationRequiredPerSec, tInputs, aFluidInputs, aOutput, assDuration, assEUt, tAlts)); return true; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java index 53dc178ef8..c78d314c07 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java @@ -273,7 +273,7 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB if (!eHolders.isEmpty() && eHolders.get(0).mInventory[0] != null) { holdItem = eHolders.get(0).mInventory[0].copy(); if (ItemList.Tool_DataStick.isStackEqual(itemStack, false, true)) { - for (GT_Recipe.GT_Recipe_AssemblyLine assRecipe : GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes) { + for (GT_Recipe.GT_Recipe_AssemblyLine assRecipe : TT_recipe.GT_Recipe_MapTT.sAssemblylineRecipes) { if (GT_Utility.areStacksEqual(assRecipe.mResearchItem, holdItem, true)) { tRecipe = assRecipe; //if found @@ -459,7 +459,7 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB tRecipe = null; if (holdItem != null) { if (ItemList.Tool_DataStick.isStackEqual(mInventory[1], false, true)) { - for (GT_Recipe.GT_Recipe_AssemblyLine tRecipe : GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes) { + for (GT_Recipe.GT_Recipe_AssemblyLine tRecipe : TT_recipe.GT_Recipe_MapTT.sAssemblylineRecipes) { if (GT_Utility.areStacksEqual(tRecipe.mResearchItem, holdItem, true)) { this.tRecipe = tRecipe; break; -- cgit