From eff844b6e222b578bc0baadbe84f94912cb819f7 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Tue, 21 Dec 2021 17:17:34 +0000 Subject: Add Multiblock Forge Hammer. Add base for Multiblock Molecular Transformer. --- .../textures/blocks/metro/TEXTURE_TECH_PANEL_E.png | Bin 0 -> 1488 bytes .../textures/blocks/metro/TEXTURE_TECH_PANEL_F.png | Bin 0 -> 837 bytes .../textures/blocks/metro/TEXTURE_TECH_PANEL_G.png | Bin 0 -> 671 bytes .../textures/blocks/metro/TEXTURE_TECH_PANEL_H.png | Bin 0 -> 668 bytes .../textures/blocks/metro/TEXTURE_TECH_PANEL_I.png | Bin 0 -> 749 bytes 5 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_E.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_F.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_G.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_H.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_I.png (limited to 'src/main/resources/assets/miscutils/textures') diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_E.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_E.png new file mode 100644 index 0000000000..9880dcab11 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_E.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_F.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_F.png new file mode 100644 index 0000000000..882115d975 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_F.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_G.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_G.png new file mode 100644 index 0000000000..3c19830902 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_G.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_H.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_H.png new file mode 100644 index 0000000000..b4bc37fbda Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_H.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_I.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_I.png new file mode 100644 index 0000000000..4a59e02f78 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_TECH_PANEL_I.png differ -- cgit From 580024a4f982602974bfbeb639067e93ec41d2fa Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Thu, 6 Jan 2022 14:22:19 +0000 Subject: Finished work on multiblock Molecular Transformer. Added single use API for adding MT recipes. --- .../api/helpers/GregtechPlusPlus_API.java | 10 + src/main/java/gtPlusPlus/core/block/ModBlocks.java | 1 + .../java/gtPlusPlus/core/config/ConfigHandler.java | 1 + src/main/java/gtPlusPlus/core/lib/CORE.java | 1 + .../nei/GT_NEI_MolecularTransformer.java | 2 +- .../xmod/gregtech/api/enums/GregtechItemList.java | 4 +- .../blocks/GregtechMetaSpecialMultiCasings.java | 15 +- .../blocks/GregtechMetaSpecialMultiCasings2.java | 99 ++++++++ .../common/blocks/textures/TexturesGtBlock.java | 10 + ...aTileEntity_IndustrialMolecularTransformer.java | 275 +++++++++------------ .../xmod/gregtech/loaders/Gregtech_Blocks.java | 1 + .../miscutils/textures/blocks/special/block_1.png | Bin 0 -> 532 bytes .../miscutils/textures/blocks/special/block_2.png | Bin 0 -> 552 bytes .../miscutils/textures/blocks/special/block_3.png | Bin 0 -> 535 bytes .../miscutils/textures/blocks/special/block_4.png | Bin 0 -> 545 bytes .../miscutils/textures/blocks/special/block_5.png | Bin 0 -> 722 bytes .../miscutils/textures/blocks/special/block_6.png | Bin 0 -> 725 bytes .../miscutils/textures/blocks/special/block_7.png | Bin 0 -> 716 bytes .../miscutils/textures/blocks/special/block_8.png | Bin 0 -> 730 bytes 19 files changed, 257 insertions(+), 162 deletions(-) create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java create mode 100644 src/main/resources/assets/miscutils/textures/blocks/special/block_1.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/special/block_2.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/special/block_3.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/special/block_4.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/special/block_5.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/special/block_6.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/special/block_7.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/special/block_8.png (limited to 'src/main/resources/assets/miscutils/textures') diff --git a/src/main/java/gtPlusPlus/api/helpers/GregtechPlusPlus_API.java b/src/main/java/gtPlusPlus/api/helpers/GregtechPlusPlus_API.java index 6fe4209efe..5cf323c7e2 100644 --- a/src/main/java/gtPlusPlus/api/helpers/GregtechPlusPlus_API.java +++ b/src/main/java/gtPlusPlus/api/helpers/GregtechPlusPlus_API.java @@ -5,6 +5,7 @@ import java.util.HashMap; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.data.WeightedCollection; import gtPlusPlus.api.objects.minecraft.multi.SpecialMultiBehaviour; +import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy_RTG; import gtPlusPlus.xmod.gregtech.api.util.SpecialBehaviourTooltipHandler; @@ -12,6 +13,15 @@ import net.minecraft.block.Block; import net.minecraft.item.ItemStack; public class GregtechPlusPlus_API { + + + public static class MolecularTransformer_API { + + public static boolean addRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEU) { + return CORE.RA.addMolecularTransformerRecipe(aInput, aOutput, aDuration, aEU, 1); + } + + } public static class Multiblock_API { diff --git a/src/main/java/gtPlusPlus/core/block/ModBlocks.java b/src/main/java/gtPlusPlus/core/block/ModBlocks.java index b51915bb7b..fdbb2bdf5b 100644 --- a/src/main/java/gtPlusPlus/core/block/ModBlocks.java +++ b/src/main/java/gtPlusPlus/core/block/ModBlocks.java @@ -50,6 +50,7 @@ public final class ModBlocks { public static Block blockCasings5Misc; public static Block blockCasingsTieredGTPP; public static Block blockSpecialMultiCasings; + public static Block blockSpecialMultiCasings2; public static Block blockCustomMachineCasings; public static Block blockMetaTileEntity; diff --git a/src/main/java/gtPlusPlus/core/config/ConfigHandler.java b/src/main/java/gtPlusPlus/core/config/ConfigHandler.java index 94193e8dab..0e88a20aac 100644 --- a/src/main/java/gtPlusPlus/core/config/ConfigHandler.java +++ b/src/main/java/gtPlusPlus/core/config/ConfigHandler.java @@ -229,6 +229,7 @@ public class ConfigHandler { pollutionPerSecondMultiTreeFarm = config.get("pollution", "pollutionPerSecondMultiTreeFarm", pollutionPerSecondMultiTreeFarm,"pollution rate in gibbl/s for the Tree growth simulator").getInt(pollutionPerSecondMultiTreeFarm); pollutionPerSecondMultiFrothFlotationCell = config.get("pollution", "pollutionPerSecondMultiFrothFlotationCell", pollutionPerSecondMultiFrothFlotationCell,"pollution rate in gibbl/s for the Flotation cell regulator").getInt(pollutionPerSecondMultiFrothFlotationCell); pollutionPerSecondMultiAutoCrafter = config.get("pollution", "pollutionPerSecondMultiAutoCrafter", pollutionPerSecondMultiAutoCrafter,"pollution rate in gibbl/s for the Large-Scale auto assembler v1.01").getInt(pollutionPerSecondMultiAutoCrafter); + pollutionPerSecondMultiMolecularTransformer = config.get("pollution", "pollutionPerSecondMultiMolecularTransformer", pollutionPerSecondMultiMolecularTransformer,"pollution rate in gibbl/s for the Multiblock Molecular Transformer").getInt(pollutionPerSecondMultiMolecularTransformer); pollutionPerSecondMultiThermalBoiler = config.get("pollution", "pollutionPerSecondMultiThermalBoiler", pollutionPerSecondMultiThermalBoiler,"pollution rate in gibbl/s for the Thermal boiler").getInt(pollutionPerSecondMultiThermalBoiler); pollutionPerSecondMultiAlgaePond = config.get("pollution", "pollutionPerSecondMultiAlgaePond", pollutionPerSecondMultiAlgaePond,"pollution rate in gibbl/s for the Algae farm").getInt(pollutionPerSecondMultiAlgaePond); basePollutionPerSecondSemiFluidGenerator = config.get("pollution", "basePollutionPerSecondSemiFluidGenerator", basePollutionPerSecondSemiFluidGenerator, "base pollution rate in gibbl/s for the single block semi fluid generators").getInt(basePollutionPerSecondSemiFluidGenerator); diff --git a/src/main/java/gtPlusPlus/core/lib/CORE.java b/src/main/java/gtPlusPlus/core/lib/CORE.java index cf5539e572..d805375e2d 100644 --- a/src/main/java/gtPlusPlus/core/lib/CORE.java +++ b/src/main/java/gtPlusPlus/core/lib/CORE.java @@ -300,6 +300,7 @@ public class CORE { public static int pollutionPerSecondMultiFrothFlotationCell = 0; public static int pollutionPerSecondMultiAutoCrafter = 500; public static int pollutionPerSecondMultiThermalBoiler = 700; + public static int pollutionPerSecondMultiMolecularTransformer = 1000; public static int pollutionPerSecondMultiAlgaePond = 0; //pollution single blocks public static int basePollutionPerSecondSemiFluidGenerator = 40; diff --git a/src/main/java/gtPlusPlus/nei/GT_NEI_MolecularTransformer.java b/src/main/java/gtPlusPlus/nei/GT_NEI_MolecularTransformer.java index 33672b8a76..fc2c16b423 100644 --- a/src/main/java/gtPlusPlus/nei/GT_NEI_MolecularTransformer.java +++ b/src/main/java/gtPlusPlus/nei/GT_NEI_MolecularTransformer.java @@ -28,7 +28,7 @@ public class GT_NEI_MolecularTransformer extends GTPP_NEI_DefaultHandler { drawText(10, 103, "Amperage: " + aRecipe.mSpecialValue, -16777216); } if (tDuration > 0) { - drawText(10, 113, "Time: " + (tDuration < 20 ? "< 1" : MathUtils.formatNumbers(Long.valueOf(tDuration / 20 / aRecipe.mSpecialValue))) + " secs", -16777216); + drawText(10, 113, "Time: " + (tDuration < 20 ? "< 1" : MathUtils.formatNumbers(Long.valueOf(tDuration / 20))) + " secs", -16777216); } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java index fd5d1fcff2..c5c4de002d 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java @@ -414,7 +414,9 @@ public enum GregtechItemList implements GregtechItemContainer { // Molecular Transformer Controller_MolecularTransformer, - Casing_MolecularTransformer, + Casing_Molecular_Transformer_1, + Casing_Molecular_Transformer_2, + Casing_Molecular_Transformer_3, // Big Steam Macerator Controller_SteamMaceratorMulti, diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java index 0eccd75b66..38d8b38f88 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java @@ -52,9 +52,9 @@ public class GregtechMetaSpecialMultiCasings extends GregtechMetaCasingBlocksAbs GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Thermally Insulated Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Flotation Cell Casings"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Reinforced Engine Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Molecular Containment Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "High Voltage Current Capacitor"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Particle Containment Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", ""); // Unused @@ -69,6 +69,9 @@ public class GregtechMetaSpecialMultiCasings extends GregtechMetaCasingBlocksAbs GregtechItemList.Casing_SolarTower_HeatContainment.set(new ItemStack(this, 1, 8)); GregtechItemList.Casing_Flotation_Cell.set(new ItemStack(this, 1, 9)); GregtechItemList.Casing_Reinforced_Engine_Casing.set(new ItemStack(this, 1, 10)); + GregtechItemList.Casing_Molecular_Transformer_1.set(new ItemStack(this, 1, 11)); + GregtechItemList.Casing_Molecular_Transformer_2.set(new ItemStack(this, 1, 12)); + GregtechItemList.Casing_Molecular_Transformer_3.set(new ItemStack(this, 1, 13)); } @Override @@ -105,6 +108,12 @@ public class GregtechMetaSpecialMultiCasings extends GregtechMetaCasingBlocksAbs return TexturesGtBlock.TEXTURE_CASING_FLOTATION.getIcon(); case 10: return TexturesGtBlock.Casing_Material_Talonite.getIcon(); + case 11: + return Textures.BlockIcons.MACHINE_CASING_RADIATIONPROOF.getIcon(); + case 12: + return TexturesGtBlock.Casing_Redox_5.getIcon(); + case 13: + return TexturesGtBlock.TEXTURE_MAGIC_PANEL_A.getIcon(); } return Textures.BlockIcons.RENDERING_ERROR.getIcon(); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java new file mode 100644 index 0000000000..7ec655dca5 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java @@ -0,0 +1,99 @@ +package gtPlusPlus.xmod.gregtech.common.blocks; + +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.Textures; +import gregtech.api.util.GT_LanguageManager; +import gregtech.common.blocks.GT_Material_Casings; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + + +public class GregtechMetaSpecialMultiCasings2 extends GregtechMetaCasingBlocksAbstract { + + public static class SpecialCasingItemBlock extends GregtechMetaCasingItems { + + public SpecialCasingItemBlock(Block par1) { + super(par1); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + int aMeta = aStack.getItemDamage(); + if (aMeta < 4) { + aList.add("Provides quantum stability"); + } + if (aMeta >= 4 && aMeta < 8) { + aList.add("Provides quantum modulation"); + } + super.addInformation(aStack, aPlayer, aList, aF3_H); + } + } + + public GregtechMetaSpecialMultiCasings2() { + super(SpecialCasingItemBlock.class, "gtplusplus.blockspecialcasings.3", GT_Material_Casings.INSTANCE); + for (byte i = 0; i < 16; i = (byte) (i + 1)) { + //TAE.registerTextures(new GT_CopiedBlockTexture(this, 6, i)); + // Don't register these Textures, They already exist within vanilla GT. (May not exist in 5.08) + } + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Resonance Chamber I"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Resonance Chamber II"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Resonance Chamber III"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Resonance Chamber IV"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Modulator I"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Modulator II"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Modulator III"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Modulator IV"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", ""); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", ""); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", ""); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", ""); // Unused + + //GregtechItemList.Casing_Turbine_Shaft.set(new ItemStack(this, 1, 0)); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) { + return getStaticIcon((byte) aSide, (byte) aWorld.getBlockMetadata(xCoord, yCoord, zCoord)); + } + + @Override + public IIcon getIcon(final int aSide, final int aMeta) { + return getStaticIcon((byte) aSide, (byte) aMeta); + } + + public static IIcon getStaticIcon(final byte aSide, final byte aMeta) { + switch (aMeta) { + case 0: + return TexturesGtBlock.Casing_Resonance_1.getIcon(); + case 1: + return TexturesGtBlock.Casing_Resonance_2.getIcon(); + case 2: + return TexturesGtBlock.Casing_Resonance_3.getIcon(); + case 3: + return TexturesGtBlock.Casing_Resonance_4.getIcon(); + case 4: + return TexturesGtBlock.Casing_Modulator_1.getIcon(); + case 5: + return TexturesGtBlock.Casing_Modulator_2.getIcon(); + case 6: + return TexturesGtBlock.Casing_Modulator_3.getIcon(); + case 7: + return TexturesGtBlock.Casing_Modulator_4.getIcon(); + + } + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java index 59e4f2e4b3..246f016202 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java @@ -247,6 +247,16 @@ public class TexturesGtBlock { public static final CustomIcon Casing_Redox_6 = new CustomIcon("redox/redox6"); //public static final CustomIcon Casing_Redox_7 = new CustomIcon("redox/redox7"); //public static final CustomIcon Casing_Redox_8 = new CustomIcon("redox/redox8"); + + // Special Block 2 + public static final CustomIcon Casing_Resonance_1 = new CustomIcon("special/block_1"); + public static final CustomIcon Casing_Resonance_2 = new CustomIcon("special/block_2"); + public static final CustomIcon Casing_Resonance_3 = new CustomIcon("special/block_3"); + public static final CustomIcon Casing_Resonance_4 = new CustomIcon("special/block_4"); + public static final CustomIcon Casing_Modulator_1 = new CustomIcon("special/block_5"); + public static final CustomIcon Casing_Modulator_2 = new CustomIcon("special/block_6"); + public static final CustomIcon Casing_Modulator_3 = new CustomIcon("special/block_7"); + public static final CustomIcon Casing_Modulator_4 = new CustomIcon("special/block_8"); //Centrifuge Casing private static final CustomIcon Internal_Casing_Centrifuge = new CustomIcon("TileEntities/MACHINE_CASING_CENTRIFUGE"); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMolecularTransformer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMolecularTransformer.java index b8e8a904b7..edbf0813ae 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMolecularTransformer.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMolecularTransformer.java @@ -1,21 +1,21 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.lazy; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import gregtech.api.enums.TAE; +import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; 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.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; @@ -32,24 +32,20 @@ import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.block.Block; import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; public class GregtechMetaTileEntity_IndustrialMolecularTransformer extends GregtechMeta_MultiBlockBase { - public static int CASING_TEXTURE_ID; - private int mCasing; - private IStructureDefinition STRUCTURE_DEFINITION = null; - + private static final int CASING_TEXTURE_ID = 48; + private int mCasing = 0; public GregtechMetaTileEntity_IndustrialMolecularTransformer(final int aID, final String aName, final String aNameRegional) { super(aID, aName, aNameRegional); - CASING_TEXTURE_ID = TAE.getIndexFromPage(2, 10); } public GregtechMetaTileEntity_IndustrialMolecularTransformer(final String aName) { super(aName); - CASING_TEXTURE_ID = TAE.getIndexFromPage(2, 10); } public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { @@ -66,95 +62,149 @@ public class GregtechMetaTileEntity_IndustrialMolecularTransformer extends Gregt GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); tt.addMachineType(getMachineType()) - .addInfo("Factory Grade Advanced Vacuum Freezer") - .addInfo("Speed: 200% | Eu Usage: 100% | Parallel: 4") + .addInfo("Changes the structure of items to produce new ones") + .addInfo("Speed: 100% | Eu Usage: 100%") + .addInfo("This multiblock cannot be overclocked") + .addInfo("Maximum 1x of each bus/hatch.") .addPollutionAmount(getPollutionPerSecond(null)) .addSeparator() - .beginStructureBlock(3, 3, 3, true) - .addController("Front Center") - .addCasingInfo("CASING", 10) - .addInputBus("Any Casing", 1) - .addOutputBus("Any Casing", 1) - .addInputHatch("Any Casing", 1) - .addOutputHatch("Any Casing", 1) - .addEnergyHatch("Any Casing", 1) - .addMaintenanceHatch("Any Casing", 1) - .addMufflerHatch("Any Casing", 1) + .beginStructureBlock(7, 7, 7, false) + .addController("Top Center") + .addCasingInfo("Robust Tungstensteel Machine Casing", 40) + .addCasingInfo("Tungstensteel Coils", 16) + .addCasingInfo("Molecular Containment Casing", 52) + .addCasingInfo("High Voltage Current Capacitor", 32) + .addCasingInfo("Particle Containment Casing", 4) + .addCasingInfo("Resonance Chamber I", 5) + .addCasingInfo("Modulator I", 4) + .addInputBus("Any Robust Tungstensteel Machine Casing", 1) + .addOutputBus("Any Robust Tungstensteel Machine Casing", 1) + .addEnergyHatch("Any Robust Tungstensteel Machine Casing", 1) + .addMaintenanceHatch("Any Robust Tungstensteel Machine Casing", 1) + .addMufflerHatch("Any Robust Tungstensteel Machine Casing", 1) .toolTipFinisher(CORE.GT_Tooltip_Builder); return tt; } + + private static final String STRUCTURE_PIECE_MAIN = "main"; + private IStructureDefinition STRUCTURE_DEFINITION = null; + @Override public IStructureDefinition getStructureDefinition() { + STRUCTURE_DEFINITION = null; if (STRUCTURE_DEFINITION == null) { STRUCTURE_DEFINITION = StructureDefinition.builder() - .addShape(mName, transpose(new String[][]{ - {"CCC", "CCC", "CCC"}, - {"C~C", "C-C", "CCC"}, - {"CCC", "CCC", "CCC"}, - })) - .addElement( - 'C', - ofChain( - ofHatchAdder( - GregtechMetaTileEntity_IndustrialMolecularTransformer::addIndustrialVacuumFreezerList, CASING_TEXTURE_ID, 1 - ), - onElementPass( - x -> ++x.mCasing, - ofBlock( - ModBlocks.blockCasings3Misc, 10 - ) - ) - ) - ) - .build(); + .addShape(STRUCTURE_PIECE_MAIN, (new String[][]{ + {" ", " ", " xxx ", " x~x ", " xxx ", " ", " "}, + {" ", " xxx ", " xyyyx ", " xyzyx ", " xyyyx ", " xxx ", " "}, + {" ", " xxx ", " xyyyx ", " xyzyx ", " xyyyx ", " xxx ", " "}, + {" ", " xxx ", " xyyyx ", " xyzyx ", " xyyyx ", " xxx ", " "}, + {" t ", " ttxtt ", " tyyyt ", "txyzyxt", " tyyyt ", " ttxtt ", " t "}, + {" c ", " ccecc ", " cxfxc ", "cefefec", " cxfxc ", " ccecc ", " c "}, + {" h ", " hhhhh ", " hhhhh ", "hhhhhhh", " hhhhh ", " hhhhh ", " h "}, + })) + + .addElement('x', ofBlock(getCasingBlock(), getCasingMeta())) + .addElement('y', ofBlock(getCasingBlock(), getCasingMeta2())) + .addElement('z', ofBlock(getCasingBlock(), getCasingMeta3())) + .addElement('e', ofBlock(getCasingBlock2(), 0)) + .addElement('f', ofBlock(getCasingBlock2(), 4)) + .addElement('c', ofBlock(getCoilBlock(), 3)) + .addElement('t', lazy(t -> onElementPass(x -> ++x.mCasing, ofBlock(getCasingBlock3(), getTungstenCasingMeta())))) + .addElement('h', lazy(t -> ofChain( + ofHatchAdder(GregtechMetaTileEntity_IndustrialMolecularTransformer::addGenericHatch, getCasingTextureIndex(), 1), + onElementPass(x -> ++x.mCasing, ofBlock(getCasingBlock3(), getTungstenCasingMeta())) + ))) + .build(); } return STRUCTURE_DEFINITION; } - + @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - buildPiece(mName , stackSize, hintsOnly, 1, 1, 0); + buildPiece(STRUCTURE_PIECE_MAIN , stackSize, hintsOnly, 3, 3, 0); } @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { mCasing = 0; - return checkPiece(mName, 1, 1, 0) && mCasing >= 10 && checkHatch(); + boolean aDidBuild = checkPiece(STRUCTURE_PIECE_MAIN, 3, 3, 0); + if (this.mInputBusses.size() != 1 || this.mOutputBusses.size() != 1 || this.mEnergyHatches.size() != 1) { + return false; + } + return aDidBuild && mCasing >= 40 && checkHatch(); + } + + protected static int getCasingTextureIndex() { + return CASING_TEXTURE_ID; } - public final boolean addIndustrialVacuumFreezerList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + protected static Block getCasingBlock() { + return ModBlocks.blockSpecialMultiCasings; + } + + protected static Block getCasingBlock2() { + return ModBlocks.blockSpecialMultiCasings2; + } + + protected static Block getCasingBlock3() { + return GregTech_API.sBlockCasings4; + } + + protected static Block getCoilBlock() { + return GregTech_API.sBlockCasings5; + } + + protected static int getCasingMeta() { + return 11; + } + + protected static int getCasingMeta2() { + return 12; + } + + protected static int getCasingMeta3() { + return 13; + } + + protected static int getTungstenCasingMeta() { + return 0; + } + + public final boolean addGenericHatch(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { if (aTileEntity == null) { return false; - } else { + } + else { IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ - return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + } + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + } + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) { return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + } + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { return addToMachineList(aTileEntity, aBaseCasingIndex); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { + } + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) { return addToMachineList(aTileEntity, aBaseCasingIndex); } } + log("Bad Hatch"); return false; } - public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID), + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(44), new GT_RenderedTexture((IIconContainer) (aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active : TexturesGtBlock.Overlay_Machine_Controller_Advanced))}; } - return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID)}; + return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(44)}; } @Override @@ -182,65 +232,7 @@ public class GregtechMetaTileEntity_IndustrialMolecularTransformer extends Gregt @Override public boolean checkRecipe(final ItemStack aStack) { - return this.checkRecipeGeneric(4, 100, 100); - } - - @Override - public boolean checkRecipeGeneric( - ItemStack[] aItemInputs, FluidStack[] aFluidInputs, - int aMaxParallelRecipes, int aEUPercent, - int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe, boolean isPerpectOC) { - // Based on the Processing Array. A bit overkill, but very flexible. - - // Reset outputs and progress stats - this.mEUt = 0; - this.mMaxProgresstime = 0; - this.mOutputItems = new ItemStack[]{}; - this.mOutputFluids = new FluidStack[]{}; - - ItemStack[] tInputs = getCompactedInputs(); - FluidStack[] tFluids = new FluidStack[] {}; - - if (tInputs.length <= 0) { - log("Error 1"); - return false; - } - - long tVoltage = getMaxInputVoltage(); - log("Voltage: "+tVoltage); - byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - log("Tier: "+tTier); - GT_Recipe tRecipe = getRecipeMap().findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs); - - if (tRecipe == null || !tRecipe.isRecipeInputEqual(true, tFluids, tInputs)) { - log("Error 2"); - return false; - } - - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; - - calculateOverclockedNessMulti(tRecipe.mEUt*tRecipe.mSpecialValue, tRecipe.mDuration, 1, tVoltage); - //In case recipe is too OP for that machine - if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) { - log("Error 3"); - return false; - } - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); - } - log("EU/t: "+this.mEUt); - this.mMaxProgresstime = Math.max(mMaxProgresstime/tRecipe.mSpecialValue, 1); - log("Total Time: "+this.mMaxProgresstime); - if (tRecipe.mOutputs.length > 0) { - this.mOutputItems = tRecipe.mOutputs.clone(); - } - updateSlots(); - // Play sounds (GT++ addition - GT multiblocks play no sounds) - startProcess(); - - log("Running"); - return true; + return checkRecipeGeneric(1, 100, 100); } @Override @@ -258,7 +250,7 @@ public class GregtechMetaTileEntity_IndustrialMolecularTransformer extends Gregt } public int getPollutionPerSecond(final ItemStack aStack) { - return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialVacuumFreezer; + return CORE.ConfigSwitches.pollutionPerSecondMultiMolecularTransformer; } public int getDamageToComponent(final ItemStack aStack) { @@ -270,43 +262,12 @@ public class GregtechMetaTileEntity_IndustrialMolecularTransformer extends Gregt } @Override - public boolean drainEnergyInput(long aEU) { - if (aEU <= 0) { - return true; - } - for (GT_MetaTileEntity_Hatch tHatch : this.mAllEnergyHatches) { - if (isValidMetaTileEntity(tHatch)) { - if (tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(aEU, false)) { - return true; - } - } - } - return false; - } - - @Override - public long getMaxInputVoltage() { - long rVoltage = 0; - for (GT_MetaTileEntity_Hatch tHatch : mAllEnergyHatches) { - if (isValidMetaTileEntity(tHatch)) { - rVoltage += tHatch.getBaseMetaTileEntity().getInputVoltage(); - } - } - return rVoltage; - } - - /** - * Called every tick the Machine runs - */ - @Override - public boolean onRunningTick(ItemStack aStack) { - if (mEUt < 0) { - if (!drainEnergyInput(((long) -mEUt * 10000) / Math.max(1000, mEfficiency))) { - criticalStopMachine(); - return false; - } - } - return true; - } + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPreTick(aBaseMetaTileEntity, aTick); + // Fix GT bug + if (this.getBaseMetaTileEntity().getFrontFacing() != 1) { + this.getBaseMetaTileEntity().setFrontFacing((byte) 1); + } + } } \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java index e918d8015e..d2fb97010a 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java @@ -16,6 +16,7 @@ public class Gregtech_Blocks { ModBlocks.blockCasingsTieredGTPP = new GregtechMetaTieredCasingBlocks1(); ModBlocks.blockSpecialMultiCasings = new GregtechMetaSpecialMultiCasings(); + ModBlocks.blockSpecialMultiCasings2 = new GregtechMetaSpecialMultiCasings2(); ModBlocks.blockCustomMachineCasings = new GregtechMetaSpecialMachineCasings(); } diff --git a/src/main/resources/assets/miscutils/textures/blocks/special/block_1.png b/src/main/resources/assets/miscutils/textures/blocks/special/block_1.png new file mode 100644 index 0000000000..2d497c1f81 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/special/block_1.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/special/block_2.png b/src/main/resources/assets/miscutils/textures/blocks/special/block_2.png new file mode 100644 index 0000000000..efec483a20 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/special/block_2.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/special/block_3.png b/src/main/resources/assets/miscutils/textures/blocks/special/block_3.png new file mode 100644 index 0000000000..c6376014e2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/special/block_3.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/special/block_4.png b/src/main/resources/assets/miscutils/textures/blocks/special/block_4.png new file mode 100644 index 0000000000..55c42584ba Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/special/block_4.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/special/block_5.png b/src/main/resources/assets/miscutils/textures/blocks/special/block_5.png new file mode 100644 index 0000000000..6b2c6a77b1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/special/block_5.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/special/block_6.png b/src/main/resources/assets/miscutils/textures/blocks/special/block_6.png new file mode 100644 index 0000000000..446478f1de Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/special/block_6.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/special/block_7.png b/src/main/resources/assets/miscutils/textures/blocks/special/block_7.png new file mode 100644 index 0000000000..a8f51c0b68 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/special/block_7.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/special/block_8.png b/src/main/resources/assets/miscutils/textures/blocks/special/block_8.png new file mode 100644 index 0000000000..08afad396a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/special/block_8.png differ -- cgit From 1520d231ffda1fbb11be3baea3e860bb77a02559 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Fri, 7 Jan 2022 05:06:11 +0000 Subject: Added new overlay for the Data Orb Repository. --- .../GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java | 4 ++-- .../gregtech/common/blocks/textures/TexturesGtBlock.java | 2 ++ .../textures/blocks/iconsets/Overlay_DataOrb.png | Bin 0 -> 525 bytes 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Overlay_DataOrb.png (limited to 'src/main/resources/assets/miscutils/textures') diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java index cf187a8b92..67a6fc7aeb 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java @@ -42,12 +42,12 @@ public class GT_MetaTileEntity_Hatch_ElementalDataOrbHolder extends GT_MetaTileE @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Cyber_Interface)}; + return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Data_Orb)}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Cyber_Interface)}; + return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Data_Orb)}; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java index 246f016202..4f878dc074 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java @@ -431,6 +431,8 @@ public class TexturesGtBlock { // Catalyst Bus private static final CustomIcon Internal_Overlay_Bus_Catalyst = new CustomIcon("iconsets/OVERLAY_CATALYSTS"); public static final CustomIcon Overlay_Bus_Catalyst = Internal_Overlay_Bus_Catalyst; + // Data Orb Hatch + public static final CustomIcon Overlay_Hatch_Data_Orb = new CustomIcon("iconsets/Overlay_DataOrb"); // RTG Hatch private static final CustomIcon Internal_Overlay_Hatch_RTG_Off = new CustomIcon("iconsets/OVERLAY_ENERGY_RTG_OFF"); public static final CustomIcon Overlay_Hatch_RTG_Off = Internal_Overlay_Hatch_RTG_Off; diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Overlay_DataOrb.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Overlay_DataOrb.png new file mode 100644 index 0000000000..8df008a8bc Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Overlay_DataOrb.png differ -- cgit From 7363cc786be60ed62fa7b5accd9f7ece51c2b45a Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Fri, 7 Jan 2022 13:20:06 +0000 Subject: Added some new overlays. --- .../common/blocks/textures/TexturesGtBlock.java | 14 +++++++++++++- .../textures/blocks/iconsets/OVERLAY_COBBLE.png | Bin 0 -> 515 bytes .../textures/blocks/iconsets/OVERLAY_CONNECTOR.png | Bin 0 -> 401 bytes .../miscutils/textures/blocks/iconsets/OVERLAY_FIRE.png | Bin 0 -> 500 bytes .../textures/blocks/iconsets/OVERLAY_GRINDER.png | Bin 0 -> 237 bytes .../miscutils/textures/blocks/iconsets/OVERLAY_GT.png | Bin 0 -> 243 bytes .../miscutils/textures/blocks/iconsets/OVERLAY_ICE.png | Bin 0 -> 216 bytes .../textures/blocks/iconsets/OVERLAY_IMPLOSION.png | Bin 0 -> 431 bytes .../miscutils/textures/blocks/iconsets/OVERLAY_LAPO.png | Bin 0 -> 450 bytes .../textures/blocks/iconsets/Overlay_DataOrb.png | Bin 525 -> 501 bytes 10 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_COBBLE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_CONNECTOR.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FIRE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_GRINDER.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_GT.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ICE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_IMPLOSION.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_LAPO.png (limited to 'src/main/resources/assets/miscutils/textures') diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java index 4f878dc074..36aa53b0b3 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java @@ -431,8 +431,20 @@ public class TexturesGtBlock { // Catalyst Bus private static final CustomIcon Internal_Overlay_Bus_Catalyst = new CustomIcon("iconsets/OVERLAY_CATALYSTS"); public static final CustomIcon Overlay_Bus_Catalyst = Internal_Overlay_Bus_Catalyst; + + + public static final CustomIcon Overlay_Cobble = new CustomIcon("iconsets/OVERLAY_COBBLE"); + public static final CustomIcon Overlay_Connector = new CustomIcon("iconsets/OVERLAY_CONNECTOR"); + public static final CustomIcon Overlay_Fire = new CustomIcon("iconsets/OVERLAY_FIRE"); + public static final CustomIcon Overlay_Grinder = new CustomIcon("iconsets/OVERLAY_GRINDER"); + public static final CustomIcon Overlay_GT_Logo = new CustomIcon("iconsets/OVERLAY_GT"); + public static final CustomIcon Overlay_Ice = new CustomIcon("iconsets/OVERLAY_ICE"); + public static final CustomIcon Overlay_Implosion = new CustomIcon("iconsets/OVERLAY_IMPLOSION"); + // Lapo Orb Hatch + public static final CustomIcon Overlay_Hatch_Lapo_Orb = new CustomIcon("iconsets/OVERLAY_LAPO"); // Data Orb Hatch - public static final CustomIcon Overlay_Hatch_Data_Orb = new CustomIcon("iconsets/Overlay_DataOrb"); + public static final CustomIcon Overlay_Hatch_Data_Orb = new CustomIcon("iconsets/OVERYLAY_DATAORB"); + // RTG Hatch private static final CustomIcon Internal_Overlay_Hatch_RTG_Off = new CustomIcon("iconsets/OVERLAY_ENERGY_RTG_OFF"); public static final CustomIcon Overlay_Hatch_RTG_Off = Internal_Overlay_Hatch_RTG_Off; diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_COBBLE.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_COBBLE.png new file mode 100644 index 0000000000..6b3bdee64e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_COBBLE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_CONNECTOR.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_CONNECTOR.png new file mode 100644 index 0000000000..91385fe0b1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_CONNECTOR.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FIRE.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FIRE.png new file mode 100644 index 0000000000..2ed6d34918 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_FIRE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_GRINDER.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_GRINDER.png new file mode 100644 index 0000000000..b62d2b59fa Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_GRINDER.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_GT.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_GT.png new file mode 100644 index 0000000000..d81efabf11 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_GT.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ICE.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ICE.png new file mode 100644 index 0000000000..a693664179 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_ICE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_IMPLOSION.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_IMPLOSION.png new file mode 100644 index 0000000000..537aa06353 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_IMPLOSION.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_LAPO.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_LAPO.png new file mode 100644 index 0000000000..82109b7dd2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_LAPO.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Overlay_DataOrb.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Overlay_DataOrb.png index 8df008a8bc..f2bdf0ad4a 100644 Binary files a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Overlay_DataOrb.png and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Overlay_DataOrb.png differ -- cgit From d579f2d2b41922dbee4c2146833b257bfeab4ecd Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Fri, 7 Jan 2022 13:21:20 +0000 Subject: Renamed Data Orb Overlay. --- .../gregtech/common/blocks/textures/TexturesGtBlock.java | 2 +- .../textures/blocks/iconsets/OVERLAY_DATA_ORB.png | Bin 0 -> 501 bytes .../textures/blocks/iconsets/Overlay_DataOrb.png | Bin 501 -> 0 bytes 3 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_DATA_ORB.png delete mode 100644 src/main/resources/assets/miscutils/textures/blocks/iconsets/Overlay_DataOrb.png (limited to 'src/main/resources/assets/miscutils/textures') diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java index 36aa53b0b3..2fa63e4568 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java @@ -443,7 +443,7 @@ public class TexturesGtBlock { // Lapo Orb Hatch public static final CustomIcon Overlay_Hatch_Lapo_Orb = new CustomIcon("iconsets/OVERLAY_LAPO"); // Data Orb Hatch - public static final CustomIcon Overlay_Hatch_Data_Orb = new CustomIcon("iconsets/OVERYLAY_DATAORB"); + public static final CustomIcon Overlay_Hatch_Data_Orb = new CustomIcon("iconsets/OVERYLAY_DATA_ORB"); // RTG Hatch private static final CustomIcon Internal_Overlay_Hatch_RTG_Off = new CustomIcon("iconsets/OVERLAY_ENERGY_RTG_OFF"); diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_DATA_ORB.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_DATA_ORB.png new file mode 100644 index 0000000000..f2bdf0ad4a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/iconsets/OVERLAY_DATA_ORB.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Overlay_DataOrb.png b/src/main/resources/assets/miscutils/textures/blocks/iconsets/Overlay_DataOrb.png deleted file mode 100644 index f2bdf0ad4a..0000000000 Binary files a/src/main/resources/assets/miscutils/textures/blocks/iconsets/Overlay_DataOrb.png and /dev/null differ -- cgit From 53da73a35860acd285baa0ccab5aef4ff4f6bd98 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Fri, 7 Jan 2022 16:24:37 +0000 Subject: Rewrote and readded Bronze/Advanced Workbenches using GT Meta Tile system. --- src/main/java/gtPlusPlus/core/block/ModBlocks.java | 17 +- .../core/block/machine/Machine_Workbench.java | 152 ------ .../block/machine/Machine_WorkbenchAdvanced.java | 111 ----- .../core/container/Container_Workbench.java | 413 ---------------- .../container/Container_WorkbenchAdvanced.java | 377 -------------- .../gtPlusPlus/core/gui/machine/GUI_Workbench.java | 81 --- .../core/gui/machine/GUI_WorkbenchAdvanced.java | 42 -- .../java/gtPlusPlus/core/handler/GuiHandler.java | 43 +- .../core/item/general/ItemBlueprint.java | 6 +- .../core/tileentities/ModTileEntities.java | 14 +- .../tileentities/machines/TileEntityWorkbench.java | 172 ------- .../machines/TileEntityWorkbenchAdvanced.java | 245 --------- .../workbench/GT_Container_AdvancedWorkbench.java | 124 +++++ .../workbench/GT_Container_BronzeWorkbench.java | 120 +++++ .../GT_GUIContainer_AdvancedWorkbench.java | 84 ++++ .../workbench/GT_GUIContainer_BronzeWorkbench.java | 13 + .../common/blocks/textures/TexturesGtBlock.java | 17 +- .../GregtechMetaTileEntity_SteamCompressor.java | 163 ++++++ .../GT_MetaTileEntity_AdvancedCraftingTable.java | 550 +++++++++++++++++++++ .../GT_MetaTileEntity_BronzeCraftingTable.java | 91 ++++ .../registration/gregtech/Gregtech4Content.java | 17 +- .../blocks/TileEntities/gt4/bronze_bottom.png | Bin 0 -> 377 bytes .../blocks/TileEntities/gt4/bronze_side.png | Bin 0 -> 395 bytes .../blocks/TileEntities/gt4/bronze_top.png | Bin 0 -> 359 bytes .../TileEntities/gt4/bronze_top_crafting.png | Bin 0 -> 237 bytes .../TileEntities/gt4/machine_top_crafting.png | Bin 0 -> 263 bytes 26 files changed, 1227 insertions(+), 1625 deletions(-) delete mode 100644 src/main/java/gtPlusPlus/core/block/machine/Machine_Workbench.java delete mode 100644 src/main/java/gtPlusPlus/core/block/machine/Machine_WorkbenchAdvanced.java delete mode 100644 src/main/java/gtPlusPlus/core/container/Container_Workbench.java delete mode 100644 src/main/java/gtPlusPlus/core/container/Container_WorkbenchAdvanced.java delete mode 100644 src/main/java/gtPlusPlus/core/gui/machine/GUI_Workbench.java delete mode 100644 src/main/java/gtPlusPlus/core/gui/machine/GUI_WorkbenchAdvanced.java delete mode 100644 src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbench.java delete mode 100644 src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbenchAdvanced.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_Container_AdvancedWorkbench.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_Container_BronzeWorkbench.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_GUIContainer_AdvancedWorkbench.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_GUIContainer_BronzeWorkbench.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamCompressor.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_AdvancedCraftingTable.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_BronzeCraftingTable.java create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_bottom.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_side.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_top.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_top_crafting.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_top_crafting.png (limited to 'src/main/resources/assets/miscutils/textures') diff --git a/src/main/java/gtPlusPlus/core/block/ModBlocks.java b/src/main/java/gtPlusPlus/core/block/ModBlocks.java index fdbb2bdf5b..a716366601 100644 --- a/src/main/java/gtPlusPlus/core/block/ModBlocks.java +++ b/src/main/java/gtPlusPlus/core/block/ModBlocks.java @@ -13,11 +13,22 @@ import gtPlusPlus.core.block.general.PlayerDoors; import gtPlusPlus.core.block.general.antigrief.BlockWitherProof; import gtPlusPlus.core.block.general.redstone.BlockGenericRedstoneDetector; import gtPlusPlus.core.block.general.redstone.BlockGenericRedstoneTest; -import gtPlusPlus.core.block.machine.*; +import gtPlusPlus.core.block.machine.CircuitProgrammer; +import gtPlusPlus.core.block.machine.DecayablesChest; +import gtPlusPlus.core.block.machine.EggBox; +import gtPlusPlus.core.block.machine.FishTrap; +import gtPlusPlus.core.block.machine.HeliumGenerator; +import gtPlusPlus.core.block.machine.Machine_ModularityTable; +import gtPlusPlus.core.block.machine.Machine_PestKiller; +import gtPlusPlus.core.block.machine.Machine_PooCollector; +import gtPlusPlus.core.block.machine.Machine_ProjectTable; +import gtPlusPlus.core.block.machine.Machine_RoundRobinator; +import gtPlusPlus.core.block.machine.Machine_SuperJukebox; +import gtPlusPlus.core.block.machine.Machine_TradeTable; +import gtPlusPlus.core.block.machine.VolumetricFlaskSetter; import gtPlusPlus.core.block.machine.bedrock.Mining_Head_Fake; import gtPlusPlus.core.block.machine.bedrock.Mining_Pipe_Fake; import gtPlusPlus.core.fluids.FluidRegistryHandler; -import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; import net.minecraft.block.Block; import net.minecraft.block.material.Material; @@ -110,8 +121,6 @@ public final class ModBlocks { FluidRegistryHandler.registerFluids(); //Workbench - blockWorkbench = new Machine_Workbench().setHardness(1.5F); - blockWorkbenchAdvanced = new Machine_WorkbenchAdvanced().setHardness(2.5F); blockHeliumGenerator = new HeliumGenerator(); blockFirePit = new FirePit(); blockFishTrap = new FishTrap(); diff --git a/src/main/java/gtPlusPlus/core/block/machine/Machine_Workbench.java b/src/main/java/gtPlusPlus/core/block/machine/Machine_Workbench.java deleted file mode 100644 index 5c08612042..0000000000 --- a/src/main/java/gtPlusPlus/core/block/machine/Machine_Workbench.java +++ /dev/null @@ -1,152 +0,0 @@ -package gtPlusPlus.core.block.machine; - -import cpw.mods.fml.common.Optional; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import gtPlusPlus.GTplusplus; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import ic2.core.item.tool.ItemToolWrench; - -@Optional.Interface(iface = "crazypants.enderio.api.tool.ITool", modid = "EnderIO") -public class Machine_Workbench extends BlockContainer -{ - @SideOnly(Side.CLIENT) - private IIcon textureTop; - @SideOnly(Side.CLIENT) - private IIcon textureBottom; - @SideOnly(Side.CLIENT) - private IIcon textureFront; - - @SuppressWarnings("deprecation") - public Machine_Workbench() - { - super(Material.iron); - this.setBlockName("blockWorkbenchGT"); - this.setCreativeTab(AddToCreativeTab.tabMachines); - GameRegistry.registerBlock(this, "blockWorkbenchGT"); - LanguageRegistry.addName(this, "Bronze Workbench"); - - } - - /** - * Gets the block's texture. Args: side, meta - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) - { - return p_149691_1_ == 1 ? this.textureTop : (p_149691_1_ == 0 ? this.textureBottom : ((p_149691_1_ != 2) && (p_149691_1_ != 4) ? this.blockIcon : this.textureFront)); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister p_149651_1_) - { - this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "bronze_side_cabinet"); - this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "bronze_top_crafting"); - this.textureBottom = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "bronze_side"); - this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "bronze_side_cabinet"); - } - - /** - * Called upon block activation (right click on the block.) - */ - @Override - public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) - { - - ItemStack heldItem = null; - if (world.isRemote){ - heldItem = PlayerUtils.getItemStackInPlayersHand(); - } - - boolean holdingWrench = false; - - if (heldItem != null){ - holdingWrench = isWrench(heldItem); - } - - if (world.isRemote) { - return true; - } - - final TileEntity te = world.getTileEntity(x, y, z); - if ((te != null) && (te instanceof TileEntityWorkbench)) - { - if (!holdingWrench){ - player.openGui(GTplusplus.instance, 3, world, x, y, z); - return true; - } - Logger.INFO("Holding a Wrench, doing wrench things instead."); - } - return false; - } - - @Override - public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { - return new TileEntityWorkbench(); - } - - public static boolean isWrench(final ItemStack item){ - if (item.getItem() instanceof ItemToolWrench){ - return true; - } - if (LoadedMods.BuildCraft){ - return checkBuildcraftWrench(item); - } - if (LoadedMods.EnderIO){ - return checkEnderIOWrench(item); - } - return false; - } - - @Optional.Method(modid = "EnderIO") - private static boolean checkEnderIOWrench(final ItemStack item) { - if (ReflectionUtils.doesClassExist("crazypants.enderio.api.tool.ITool")) { - Class wrenchClass; - wrenchClass = ReflectionUtils.getClass("crazypants.enderio.api.tool.ITool"); - if (wrenchClass.isInstance(item.getItem())) { - return true; - } - } - return false; - } - - @Optional.Method(modid = "Buildcraft") - private static boolean checkBuildcraftWrench(final ItemStack item) { - if (ReflectionUtils.doesClassExist("buildcraft.api.tools.IToolWrench")) { - Class wrenchClass; - wrenchClass = ReflectionUtils.getClass("buildcraft.api.tools.IToolWrench"); - if (wrenchClass.isInstance(item.getItem())) { - return true; - } - } - return false; - } - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { - return false; - } - -} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/block/machine/Machine_WorkbenchAdvanced.java b/src/main/java/gtPlusPlus/core/block/machine/Machine_WorkbenchAdvanced.java deleted file mode 100644 index af2f9f82e0..0000000000 --- a/src/main/java/gtPlusPlus/core/block/machine/Machine_WorkbenchAdvanced.java +++ /dev/null @@ -1,111 +0,0 @@ -package gtPlusPlus.core.block.machine; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbenchAdvanced; - -public class Machine_WorkbenchAdvanced extends BlockContainer -{ - @SideOnly(Side.CLIENT) - private IIcon textureTop; - @SideOnly(Side.CLIENT) - private IIcon textureBottom; - @SideOnly(Side.CLIENT) - private IIcon textureFront; - - @SuppressWarnings("deprecation") - public Machine_WorkbenchAdvanced() - { - super(Material.iron); - this.setBlockName("blockWorkbenchGTAdvanced"); - this.setCreativeTab(AddToCreativeTab.tabMachines); - GameRegistry.registerBlock(this, "blockWorkbenchGTAdvanced"); - LanguageRegistry.addName(this, "Advanced Workbench"); - - } - - /** - * Gets the block's texture. Args: side, meta - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final int p_149691_1_, final int p_149691_2_) - { - return p_149691_1_ == 1 ? this.textureTop : (p_149691_1_ == 0 ? this.textureBottom : ((p_149691_1_ != 2) && (p_149691_1_ != 4) ? this.blockIcon : this.textureFront)); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister p_149651_1_) - { - this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "machine_top"); - this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "cover_crafting"); - this.textureBottom = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "machine_top"); - this.textureFront = p_149651_1_.registerIcon(CORE.MODID + ":" + "TileEntities/" + "machine_top"); - } - - /** - * Called upon block activation (right click on the block.) - */ - @Override - public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int side, final float lx, final float ly, final float lz) - { - - /*final ItemStack heldItem = PlayerUtils.getItemStackInPlayersHand(player); - if (world.isRemote) { - return true; - } - boolean holdingWrench = false; - - if (heldItem != null){ - if (heldItem.getItem() instanceof ItemToolWrench){ - holdingWrench = true; - } - else if (heldItem.getItem() instanceof IToolWrench){ - holdingWrench = true; - } - else if (heldItem.getItem() instanceof ITool){ - holdingWrench = true; - } - else if (heldItem.getItem() instanceof GT_MetaGenerated_Tool){ - GT_MetaGenerated_Tool testTool = (GT_MetaGenerated_Tool) heldItem.getItem(); - if (testTool.canWrench(player, x, y, z)){ - holdingWrench = true; - } - } - else { - holdingWrench = false; - } - } - - - final TileEntity te = world.getTileEntity(x, y, z); - if ((te != null) && (te instanceof TileEntityWorkbenchAdvanced)) - { - if (!holdingWrench){ - player.openGui(GTplusplus.instance, 4, world, x, y, z); - return true; - } - Utils.LOG_INFO("Holding a Wrench, doing wrench things instead."); - }*/ - return false; - } - - @Override - public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { - return new TileEntityWorkbenchAdvanced(128000, 2); - } -} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/container/Container_Workbench.java b/src/main/java/gtPlusPlus/core/container/Container_Workbench.java deleted file mode 100644 index 55ef1a3d0c..0000000000 --- a/src/main/java/gtPlusPlus/core/container/Container_Workbench.java +++ /dev/null @@ -1,413 +0,0 @@ -package gtPlusPlus.core.container; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.*; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.world.World; - -import gregtech.api.gui.GT_Slot_Holo; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.interfaces.IItemBlueprint; -import gtPlusPlus.core.inventories.InventoryWorkbenchChest; -import gtPlusPlus.core.inventories.InventoryWorkbenchHoloSlots; -import gtPlusPlus.core.inventories.InventoryWorkbenchTools; -import gtPlusPlus.core.item.general.ItemBlueprint; -import gtPlusPlus.core.slots.*; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class Container_Workbench extends Container { - - protected TileEntityWorkbench tile_entity; - public InventoryCrafting craftMatrix = new InventoryCrafting(this, 3, 3); - public final InventoryWorkbenchChest inventoryChest; - public final InventoryWorkbenchTools inventoryTool; - public final InventoryWorkbenchHoloSlots inventoryHolo; - //public final InventoryWorkbenchHoloCrafting inventoryCrafting; - - private final World worldObj; - private final int posX; - private final int posY; - private final int posZ; - - public static int HoloSlotNumber = 6; - public static int InputSlotNumber = 0; //Number of Slots in the Crafting Grid - public static int StorageSlotNumber = 16; //Number of slots in storage area - public static int ToolSlotNumber = 5; // Number of slots in the tool area up top - public static int InOutputSlotNumber = InputSlotNumber + StorageSlotNumber + ToolSlotNumber + HoloSlotNumber; //Same plus Output Slot - public static int InventorySlotNumber = 36; //Inventory Slots (Inventory and Hotbar) - public static int InventoryOutSlotNumber = InventorySlotNumber + 1; //Inventory Slot Number + Output - public static int FullSlotNumber = InventorySlotNumber + InOutputSlotNumber; //All slots - - private final int slotOutput = 0; - private final int[] slotHolo = new int[5]; - private final int[] slotCrafting = new int[9]; - private final int[] slotStorage = new int[16]; - private final int[] slotTools = new int[5]; - - public void moveCraftingToChest(){ - //Check Chest Space - for (int i=0;i<9;i++){ - if (this.craftMatrix.getStackInSlot(i) != null){ - for (int r=0;r<16;r++){ - if ((this.inventoryChest.getStackInSlot(r) == null) || ((this.inventoryChest.getStackInSlot(r).getItem() == this.craftMatrix.getStackInSlot(i).getItem()) && ((64-this.craftMatrix.getStackInSlot(i).stackSize) <= (64-this.craftMatrix.getStackInSlot(i).stackSize)))){ - this.inventoryChest.setInventorySlotContents(r, this.craftMatrix.getStackInSlot(i)); - this.craftMatrix.setInventorySlotContents(i, null); - break; - } - } - } - } - //For Each Space or already existing itemstack, move one itemstack or fill current partial stack - //Remove old itemstack or partial stack from crafting grid - } - - public void moveChestToCrafting(){ - //Check Crafting items and slots - for (int i=0;i<9;i++){ - if ((this.craftMatrix.getStackInSlot(i) == null) || (this.craftMatrix.getStackInSlot(i).stackSize > 0)){ - for (int r=0;r<16;r++){ - if (this.inventoryChest.getStackInSlot(r) != null){ - this.craftMatrix.setInventorySlotContents(i, this.craftMatrix.getStackInSlot(r)); - this.inventoryChest.setInventorySlotContents(r, null); - } - } - } - } - //For Each already existing itemstack, fill current partial stack - //Remove partial stack from chest area - } - - - public Container_Workbench(final InventoryPlayer inventory, final TileEntityWorkbench tile){ - this.tile_entity = tile; - this.inventoryChest = tile.inventoryChest; - this.inventoryTool = tile.inventoryTool; - this.inventoryHolo = tile.inventoryHolo; - //this.inventoryCrafting = tile.inventoryCrafting; - - int var6; - int var7; - this.worldObj = tile.getWorldObj(); - this.posX = tile.xCoord; - this.posY = tile.yCoord; - this.posZ = tile.zCoord; - - int o=0; - - //Output slot - this.addSlotToContainer(new SlotOutput(inventory.player, this.craftMatrix, tile.inventoryCraftResult, 0, 136, 64)); - //Util Slots - this.addSlotToContainer(new SlotBlueprint(this.inventoryHolo, 1, 136, 28)); //Blueprint - this.addSlotToContainer(new SlotNoInput(this.inventoryHolo, 2, 154, 28)); //Hopper - this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 3, 154, 64, false, false, 64)); //Parking - //Holo Slots - this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 4, 154, 46, false, false, 1)); - this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 5, 136, 46, false, false, 1)); - - for (int i=1; i<6; i++){ - this.slotHolo[o] = o+1; - o++; - } - - o=0; - - this.updateCraftingMatrix(); - - //Crafting Grid - for (var6 = 0; var6 < 3; ++var6) - { - for (var7 = 0; var7 < 3; ++var7) - { - //this.addSlotToContainer(new Slot(this.craftMatrix, var7 + (var6 * 3), 82 + (var7 * 18), 28 + (var6 * 18))); - - /*if (this.inventoryCrafting.getStackInSlot(o) != null){ - this.craftMatrix.setInventorySlotContents(o, inventoryCrafting.getStackInSlot(o)); - this.inventoryCrafting.setInventorySlotContents(o, null); - } */ - this.slotCrafting[o] = o+6; - o++; - } - } - - o=0; - - //Storage Side - for (var6 = 0; var6 < 4; ++var6) - { - for (var7 = 0; var7 < 4; ++var7) - { - //Utils.LOG_WARNING("Adding slots at var:"+(var7 + var6 * 4)+" x:"+(8 + var7 * 18)+" y:"+(7 + var6 * 18)); - this.addSlotToContainer(new Slot(this.inventoryChest, var7 + (var6 * 4), 8 + (var7 * 18), 7 + (var6 * 18))); - this.slotStorage[o] = o+15; - o++; - } - } - - o=0; - - //Tool Slots - for (var6 = 0; var6 < 1; ++var6) - { - for (var7 = 0; var7 < 5; ++var7) - { - this.addSlotToContainer(new SlotGtTool(this.inventoryTool, var7 + (var6 * 3), 82 + (var7 * 18), 8 + (var6 * 18))); - this.slotTools[o] = o+31; - o++; - } - } - - //Player Inventory - for (var6 = 0; var6 < 3; ++var6) - { - for (var7 = 0; var7 < 9; ++var7) - { - this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18))); - } - } - - //Player Hotbar - for (var6 = 0; var6 < 9; ++var6) - { - this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142)); - } - - this.onCraftMatrixChanged(this.craftMatrix); - - } - - @Override - public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, final EntityPlayer aPlayer){ - - if (!aPlayer.worldObj.isRemote){ - if ((aSlotIndex == 999) || (aSlotIndex == -999)){ - //Utils.LOG_WARNING("??? - "+aSlotIndex); - } - - if (aSlotIndex == this.slotOutput){ - Logger.WARNING("Player Clicked on the output slot"); - //TODO - } - - for (final int x : this.slotHolo){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the Holo Grid"); - if (x == 1){ - Logger.WARNING("Player Clicked Blueprint slot in the Holo Grid"); - } - else if (x == 2){ - Logger.WARNING("Player Clicked Right Arrow slot in the Holo Grid"); - if (this.inventoryHolo.getStackInSlot(1) != null){ - Logger.WARNING("Found an ItemStack."); - if (this.inventoryHolo.getStackInSlot(1).getItem() instanceof IItemBlueprint){ - Logger.WARNING("Found a blueprint."); - final ItemStack tempBlueprint = this.inventoryHolo.getStackInSlot(1); - final ItemBlueprint tempItemBlueprint = (ItemBlueprint) tempBlueprint.getItem(); - if ((this.inventoryHolo.getStackInSlot(0) != null) && !tempItemBlueprint.hasBlueprint(tempBlueprint)){ - Logger.WARNING("Output slot was not empty."); - Logger.WARNING("Trying to manipulate NBT data on the blueprint stack, then replace it with the new one."); - tempItemBlueprint.setBlueprint(this.inventoryHolo.getStackInSlot(1), this.craftMatrix, this.inventoryHolo.getStackInSlot(0)); - final ItemStack newTempBlueprint = ItemUtils.getSimpleStack(tempItemBlueprint); - this.inventoryHolo.setInventorySlotContents(1, newTempBlueprint); - Logger.WARNING(ItemUtils.getArrayStackNames(tempItemBlueprint.getBlueprint(newTempBlueprint))); - } - else { - if (tempItemBlueprint.hasBlueprint(tempBlueprint)){ - Logger.WARNING("Blueprint already holds a recipe."); - } - else { - Logger.WARNING("Output slot was empty."); - } - } - } - else { - Logger.WARNING("ItemStack found was not a blueprint."); - } - } - else { - Logger.WARNING("No ItemStack found in Blueprint slot."); - } - } - else if (x == 3){ - Logger.WARNING("Player Clicked Big [P] slot in the Holo Grid"); - } - else if (x == 4){ - Logger.WARNING("Player Clicked Transfer to Crafting Grid slot in the Holo Grid"); - } - else if (x == 5){ - Logger.WARNING("Player Clicked Transfer to Storage Grid slot in the Holo Grid"); - } - } - } - - for (final int x : this.slotCrafting){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the crafting Grid"); - } - } - for (final int x : this.slotStorage){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the storage Grid"); - } - } - for (final int x : this.slotTools){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the tool Grid"); - } - } - } - //Utils.LOG_WARNING("Player Clicked slot "+aSlotIndex+" in the Grid"); - return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); - } - - private void updateCraftingMatrix() { - for (int i = 0; i < this.craftMatrix.getSizeInventory(); i++) { - //this.craftMatrix.setInventorySlotContents(i, this.tile_entity.inventoryCrafting.getStackInSlot(i)); - } - } - - @Override - public void onCraftMatrixChanged(final IInventory iiventory) { - this.tile_entity.inventoryCraftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.worldObj)); - } - - @Override - public void onContainerClosed(final EntityPlayer par1EntityPlayer) - { - super.onContainerClosed(par1EntityPlayer); - this.saveCraftingMatrix(); - } - - private void saveCraftingMatrix() { - for (int i = 0; i < this.craftMatrix.getSizeInventory(); i++) { - //this.tile_entity.inventoryCrafting.setInventorySlotContents(i, this.craftMatrix.getStackInSlot(i)); - } - } - - - - - /*@Override - public void onCraftMatrixChanged(IInventory par1IInventory){ - //Custom Recipe Handler - //craftResult.setInventorySlotContents(0, Workbench_CraftingHandler.getInstance().findMatchingRecipe(craftMatrix, worldObj)); - - //Vanilla CraftingManager - Utils.LOG_WARNING("checking crafting grid for a valid output."); - ItemStack temp = CraftingManager.getInstance().findMatchingRecipe(craftMatrix, worldObj); - if (temp != null){ - Utils.LOG_WARNING("Output found. "+temp.getDisplayName()+" x"+temp.stackSize); - craftResult.setInventorySlotContents(slotOutput, temp); - } - else { - Utils.LOG_WARNING("No Valid output found."); - craftResult.setInventorySlotContents(slotOutput, null); - } - }*/ - - /*@Override - public void onContainerClosed(EntityPlayer par1EntityPlayer) - { - for (int o=0; o= InOutputSlotNumber) && (par2 < InventoryOutSlotNumber)) - { - if (!this.mergeItemStack(var5, InventoryOutSlotNumber, FullSlotNumber, false)) - { - return null; - } - } - else if ((par2 >= InventoryOutSlotNumber) && (par2 < FullSlotNumber)) - { - if (!this.mergeItemStack(var5, InOutputSlotNumber, InventoryOutSlotNumber, false)) - { - return null; - } - } - else if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, false)) - { - return null; - } - - if (var5.stackSize == 0) - { - var4.putStack((ItemStack)null); - } - else - { - var4.onSlotChanged(); - } - - if (var5.stackSize == var3.stackSize) - { - return null; - } - - var4.onPickupFromSlot(par1EntityPlayer, var5); - } - - return var3; - } - - //Can merge Slot - @Override - public boolean func_94530_a(final ItemStack p_94530_1_, final Slot p_94530_2_) { - return (p_94530_2_.inventory != this.tile_entity.inventoryCraftResult) && super.func_94530_a(p_94530_1_, p_94530_2_); - } - - -} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/container/Container_WorkbenchAdvanced.java b/src/main/java/gtPlusPlus/core/container/Container_WorkbenchAdvanced.java deleted file mode 100644 index dc499c570f..0000000000 --- a/src/main/java/gtPlusPlus/core/container/Container_WorkbenchAdvanced.java +++ /dev/null @@ -1,377 +0,0 @@ -package gtPlusPlus.core.container; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.*; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.world.World; - -import gregtech.api.gui.GT_Slot_Holo; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.interfaces.IItemBlueprint; -import gtPlusPlus.core.inventories.*; -import gtPlusPlus.core.item.general.ItemBlueprint; -import gtPlusPlus.core.slots.*; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbenchAdvanced; -import gtPlusPlus.core.util.minecraft.ItemUtils; - -public class Container_WorkbenchAdvanced extends Container { - - protected TileEntityWorkbenchAdvanced tile_entity; - public InventoryCrafting craftMatrix = new InventoryCrafting(this, 3, 3); - public final InventoryWorkbenchChest inventoryChest; - public final InventoryWorkbenchToolsElectric inventoryTool; - public final InventoryWorkbenchHoloSlots inventoryHolo; - public final InventoryWorkbenchHoloCrafting inventoryCrafting; - - private final World worldObj; - private final int posX; - private final int posY; - private final int posZ; - - public static int HoloSlotNumber = 6; - public static int InputSlotNumber = 9; //Number of Slots in the Crafting Grid - public static int StorageSlotNumber = 16; //Number of slots in storage area - public static int ToolSlotNumber = 5; // Number of slots in the tool area up top - public static int InOutputSlotNumber = InputSlotNumber + StorageSlotNumber + ToolSlotNumber + HoloSlotNumber; //Same plus Output Slot - public static int InventorySlotNumber = 36; //Inventory Slots (Inventory and Hotbar) - public static int InventoryOutSlotNumber = InventorySlotNumber + 1; //Inventory Slot Number + Output - public static int FullSlotNumber = InventorySlotNumber + InOutputSlotNumber; //All slots - - private final int slotOutput = 0; - private final int[] slotHolo = new int[5]; - private final int[] slotCrafting = new int[9]; - private final int[] slotStorage = new int[16]; - private final int[] slotTools = new int[5]; - - public Container_WorkbenchAdvanced(final InventoryPlayer inventory, final TileEntityWorkbenchAdvanced tile){ - this.tile_entity = tile; - this.inventoryChest = tile.inventoryChest; - this.inventoryTool = tile.inventoryTool; - this.inventoryHolo = tile.inventoryHolo; - this.inventoryCrafting = tile.inventoryCrafting; - - int var6; - int var7; - this.worldObj = tile.getWorldObj(); - this.posX = tile.xCoord; - this.posY = tile.yCoord; - this.posZ = tile.zCoord; - - int o=0; - - //Output slot - this.addSlotToContainer(new SlotOutput(inventory.player, this.craftMatrix, tile.inventoryCraftResult, 0, 136, 64)); - //Util Slots - this.addSlotToContainer(new SlotBlueprint(this.inventoryHolo, 1, 136, 28)); //Blueprint - this.addSlotToContainer(new SlotNoInput(this.inventoryHolo, 2, 154, 28)); //Hopper - this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 3, 154, 64, false, false, 64)); //Parking - //Holo Slots - this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 4, 154, 46, false, false, 1)); - this.addSlotToContainer(new GT_Slot_Holo(this.inventoryHolo, 5, 136, 46, false, false, 1)); - - for (int i=1; i<6; i++){ - this.slotHolo[o] = o+1; - o++; - } - - o=0; - - this.updateCraftingMatrix(); - - //Crafting Grid - for (var6 = 0; var6 < 3; ++var6) - { - for (var7 = 0; var7 < 3; ++var7) - { - this.addSlotToContainer(new Slot(this.craftMatrix, var7 + (var6 * 3), 82 + (var7 * 18), 28 + (var6 * 18))); - - /*if (this.inventoryCrafting.getStackInSlot(o) != null){ - this.craftMatrix.setInventorySlotContents(o, inventoryCrafting.getStackInSlot(o)); - this.inventoryCrafting.setInventorySlotContents(o, null); - } */ - this.slotCrafting[o] = o+6; - o++; - } - } - - o=0; - - //Storage Side - for (var6 = 0; var6 < 4; ++var6) - { - for (var7 = 0; var7 < 4; ++var7) - { - //Utils.LOG_WARNING("Adding slots at var:"+(var7 + var6 * 4)+" x:"+(8 + var7 * 18)+" y:"+(7 + var6 * 18)); - this.addSlotToContainer(new Slot(this.inventoryChest, var7 + (var6 * 4), 8 + (var7 * 18), 7 + (var6 * 18))); - this.slotStorage[o] = o+15; - o++; - } - } - - o=0; - - //Tool Slots - for (var6 = 0; var6 < 1; ++var6) - { - for (var7 = 0; var7 < 5; ++var7) - { - this.addSlotToContainer(new SlotGtToolElectric(this.inventoryTool, var7 + (var6 * 3), 82 + (var7 * 18), 8 + (var6 * 18), 3, false)); - this.slotTools[o] = o+31; - o++; - } - } - - //Player Inventory - for (var6 = 0; var6 < 3; ++var6) - { - for (var7 = 0; var7 < 9; ++var7) - { - this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18))); - } - } - - //Player Hotbar - for (var6 = 0; var6 < 9; ++var6) - { - this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142)); - } - - this.onCraftMatrixChanged(this.craftMatrix); - - } - - @Override - public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, final EntityPlayer aPlayer){ - - if (!aPlayer.worldObj.isRemote){ - if ((aSlotIndex == 999) || (aSlotIndex == -999)){ - //Utils.LOG_WARNING("??? - "+aSlotIndex); - } - - if (aSlotIndex == this.slotOutput){ - Logger.WARNING("Player Clicked on the output slot"); - //TODO - } - - for (final int x : this.slotHolo){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the Holo Grid"); - if (x == 1){ - Logger.WARNING("Player Clicked Blueprint slot in the Holo Grid"); - } - else if (x == 2){ - Logger.WARNING("Player Clicked Right Arrow slot in the Holo Grid"); - if (this.inventoryHolo.getStackInSlot(1) != null){ - Logger.WARNING("Found an ItemStack."); - if (this.inventoryHolo.getStackInSlot(1).getItem() instanceof IItemBlueprint){ - Logger.WARNING("Found a blueprint."); - final ItemStack tempBlueprint = this.inventoryHolo.getStackInSlot(1); - final ItemBlueprint tempItemBlueprint = (ItemBlueprint) tempBlueprint.getItem(); - if ((this.inventoryHolo.getStackInSlot(0) != null) && !tempItemBlueprint.hasBlueprint(tempBlueprint)){ - Logger.WARNING("Output slot was not empty."); - Logger.WARNING("Trying to manipulate NBT data on the blueprint stack, then replace it with the new one."); - tempItemBlueprint.setBlueprint(this.inventoryHolo.getStackInSlot(1), this.craftMatrix, this.inventoryHolo.getStackInSlot(0)); - final ItemStack newTempBlueprint = ItemUtils.getSimpleStack(tempItemBlueprint); - this.inventoryHolo.setInventorySlotContents(1, newTempBlueprint); - Logger.WARNING(ItemUtils.getArrayStackNames(tempItemBlueprint.getBlueprint(newTempBlueprint))); - } - else { - if (tempItemBlueprint.hasBlueprint(tempBlueprint)){ - Logger.WARNING("Blueprint already holds a recipe."); - } - else { - Logger.WARNING("Output slot was empty."); - } - } - } - else { - Logger.WARNING("ItemStack found was not a blueprint."); - } - } - else { - Logger.WARNING("No ItemStack found in Blueprint slot."); - } - } - else if (x == 3){ - Logger.WARNING("Player Clicked Big [P] slot in the Holo Grid"); - } - else if (x == 4){ - Logger.WARNING("Player Clicked Transfer to Crafting Grid slot in the Holo Grid"); - } - else if (x == 5){ - Logger.WARNING("Player Clicked Transfer to Storage Grid slot in the Holo Grid"); - } - } - } - - for (final int x : this.slotCrafting){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the crafting Grid"); - } - } - for (final int x : this.slotStorage){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the storage Grid"); - } - } - for (final int x : this.slotTools){ - if (aSlotIndex == x){ - Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the tool Grid"); - } - } - } - //Utils.LOG_WARNING("Player Clicked slot "+aSlotIndex+" in the Grid"); - return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); - } - - private void updateCraftingMatrix() { - for (int i = 0; i < this.craftMatrix.getSizeInventory(); i++) { - this.craftMatrix.setInventorySlotContents(i, this.tile_entity.inventoryCrafting.getStackInSlot(i)); - } - } - - @Override - public void onCraftMatrixChanged(final IInventory iiventory) { - this.tile_entity.inventoryCraftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.worldObj)); - } - - @Override - public void onContainerClosed(final EntityPlayer par1EntityPlayer) - { - super.onContainerClosed(par1EntityPlayer); - this.saveCraftingMatrix(); - } - - private void saveCraftingMatrix() { - for (int i = 0; i < this.craftMatrix.getSizeInventory(); i++) { - this.tile_entity.inventoryCrafting.setInventorySlotContents(i, this.craftMatrix.getStackInSlot(i)); - } - } - - - - - /*@Override - public void onCraftMatrixChanged(IInventory par1IInventory){ - //Custom Recipe Handler - //craftResult.setInventorySlotContents(0, Workbench_CraftingHandler.getInstance().findMatchingRecipe(craftMatrix, worldObj)); - - //Vanilla CraftingManager - Utils.LOG_WARNING("checking crafting grid for a valid output."); - ItemStack temp = CraftingManager.getInstance().findMatchingRecipe(craftMatrix, worldObj); - if (temp != null){ - Utils.LOG_WARNING("Output found. "+temp.getDisplayName()+" x"+temp.stackSize); - craftResult.setInventorySlotContents(slotOutput, temp); - } - else { - Utils.LOG_WARNING("No Valid output found."); - craftResult.setInventorySlotContents(slotOutput, null); - } - }*/ - - /*@Override - public void onContainerClosed(EntityPlayer par1EntityPlayer) - { - for (int o=0; o= InOutputSlotNumber) && (par2 < InventoryOutSlotNumber)) - { - if (!this.mergeItemStack(var5, InventoryOutSlotNumber, FullSlotNumber, false)) - { - return null; - } - } - else if ((par2 >= InventoryOutSlotNumber) && (par2 < FullSlotNumber)) - { - if (!this.mergeItemStack(var5, InOutputSlotNumber, InventoryOutSlotNumber, false)) - { - return null; - } - } - else if (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber, false)) - { - return null; - } - - if (var5.stackSize == 0) - { - var4.putStack((ItemStack)null); - } - else - { - var4.onSlotChanged(); - } - - if (var5.stackSize == var3.stackSize) - { - return null; - } - - var4.onPickupFromSlot(par1EntityPlayer, var5); - } - - return var3; - } - - //Can merge Slot - @Override - public boolean func_94530_a(final ItemStack p_94530_1_, final Slot p_94530_2_) { - return (p_94530_2_.inventory != this.tile_entity.inventoryCraftResult) && super.func_94530_a(p_94530_1_, p_94530_2_); - } - - -} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/gui/machine/GUI_Workbench.java b/src/main/java/gtPlusPlus/core/gui/machine/GUI_Workbench.java deleted file mode 100644 index 861c2ba6b6..0000000000 --- a/src/main/java/gtPlusPlus/core/gui/machine/GUI_Workbench.java +++ /dev/null @@ -1,81 +0,0 @@ -package gtPlusPlus.core.gui.machine; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.ResourceLocation; - -import gtPlusPlus.core.container.Container_Workbench; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench; - -@SideOnly(Side.CLIENT) -public class GUI_Workbench extends GuiContainer { - - private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/BronzeCraftingTable.png"); - - public boolean moveItemsToChest = false; - public boolean moveItemsToCrafting = false; - - public GUI_Workbench(final InventoryPlayer player_inventory, final TileEntityWorkbench tile){ - super(new Container_Workbench(player_inventory, tile)); - } - - - @Override - protected void drawGuiContainerForegroundLayer(final int i, final int j){ - //this.fontRendererObj.drawString(I18n.format("Workbench", new Object[0]), 28, 6, 4210752); - //this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); - - } - - - @Override - protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ - GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - this.mc.renderEngine.bindTexture(craftingTableGuiTextures); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } - - - //This method is called when the Gui is first called! - @Override - public void initGui() - { - //You have to add this line for the Gui to function properly! - super.initGui(); - - //The parameters of GuiButton are(id, x, y, width, height, text); - //this.buttonList.add(new GuiButton( 1, 367, 132, 18, 18, "X")); - //this.buttonList.add(new GuiButton( 2, 385, 132, 18, 18, "Y")); - //NOTE: the id always has to be different or else it might get called twice or never! - - //Add any other buttons here too! - } - - @Override - protected void actionPerformed(final GuiButton B) - { - //If the button id is different, or you have mrs buttons, create another if block for that too! - if(B.id == 1){ - System.out.println("Trying to empty crafting grid to the storage compartment."); - //moveItemsToChest = true; - ((Container_Workbench) this.inventorySlots).moveCraftingToChest(); - } - else if(B.id == 2){ - System.out.println("Trying to move items into the crafting grid."); - //moveItemsToCrafting = true; - ((Container_Workbench) this.inventorySlots).moveChestToCrafting(); - } - - - } - -} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/gui/machine/GUI_WorkbenchAdvanced.java b/src/main/java/gtPlusPlus/core/gui/machine/GUI_WorkbenchAdvanced.java deleted file mode 100644 index 20183eb0b0..0000000000 --- a/src/main/java/gtPlusPlus/core/gui/machine/GUI_WorkbenchAdvanced.java +++ /dev/null @@ -1,42 +0,0 @@ -package gtPlusPlus.core.gui.machine; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.ResourceLocation; - -import gtPlusPlus.core.container.Container_WorkbenchAdvanced; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbenchAdvanced; - -@SideOnly(Side.CLIENT) -public class GUI_WorkbenchAdvanced extends GuiContainer { - - private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/AdvancedCraftingTable.png"); - - public GUI_WorkbenchAdvanced(final InventoryPlayer player_inventory, final TileEntityWorkbenchAdvanced tile){ - super(new Container_WorkbenchAdvanced(player_inventory, tile)); - } - - - @Override - protected void drawGuiContainerForegroundLayer(final int i, final int j){ - //this.fontRendererObj.drawString(I18n.format("Workbench", new Object[0]), 28, 6, 4210752); - //this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); - } - - - @Override - protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){ - GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - this.mc.renderEngine.bindTexture(craftingTableGuiTextures); - final int x = (this.width - this.xSize) / 2; - final int y = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); - } - -} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/handler/GuiHandler.java b/src/main/java/gtPlusPlus/core/handler/GuiHandler.java index 0567d6c5dd..1be3578ed0 100644 --- a/src/main/java/gtPlusPlus/core/handler/GuiHandler.java +++ b/src/main/java/gtPlusPlus/core/handler/GuiHandler.java @@ -5,7 +5,19 @@ import cpw.mods.fml.common.network.NetworkRegistry; import gtPlusPlus.GTplusplus; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.block.machine.Machine_SuperJukebox.TileEntitySuperJukebox; -import gtPlusPlus.core.container.*; +import gtPlusPlus.core.container.Container_BackpackBase; +import gtPlusPlus.core.container.Container_CircuitProgrammer; +import gtPlusPlus.core.container.Container_DecayablesChest; +import gtPlusPlus.core.container.Container_EggBox; +import gtPlusPlus.core.container.Container_FishTrap; +import gtPlusPlus.core.container.Container_Grindle; +import gtPlusPlus.core.container.Container_ModularityTable; +import gtPlusPlus.core.container.Container_PestKiller; +import gtPlusPlus.core.container.Container_ProjectTable; +import gtPlusPlus.core.container.Container_RoundRobinator; +import gtPlusPlus.core.container.Container_SuperJukebox; +import gtPlusPlus.core.container.Container_TradeTable; +import gtPlusPlus.core.container.Container_VolumetricFlaskSetter; import gtPlusPlus.core.container.box.LunchBoxContainer; import gtPlusPlus.core.container.box.MagicBagContainer; import gtPlusPlus.core.container.box.ToolBoxContainer; @@ -16,7 +28,17 @@ import gtPlusPlus.core.gui.item.GuiBaseGrindle; import gtPlusPlus.core.gui.item.box.LunchBoxGui; import gtPlusPlus.core.gui.item.box.MagicBagGui; import gtPlusPlus.core.gui.item.box.ToolBoxGui; -import gtPlusPlus.core.gui.machine.*; +import gtPlusPlus.core.gui.machine.GUI_CircuitProgrammer; +import gtPlusPlus.core.gui.machine.GUI_DecayablesChest; +import gtPlusPlus.core.gui.machine.GUI_EggBox; +import gtPlusPlus.core.gui.machine.GUI_FishTrap; +import gtPlusPlus.core.gui.machine.GUI_ModularityTable; +import gtPlusPlus.core.gui.machine.GUI_PestKiller; +import gtPlusPlus.core.gui.machine.GUI_ProjectTable; +import gtPlusPlus.core.gui.machine.GUI_RoundRobinator; +import gtPlusPlus.core.gui.machine.GUI_SuperJukebox; +import gtPlusPlus.core.gui.machine.GUI_TradeTable; +import gtPlusPlus.core.gui.machine.GUI_VolumetricFlaskSetter; import gtPlusPlus.core.interfaces.IGuiManager; import gtPlusPlus.core.inventories.BaseInventoryBackpack; import gtPlusPlus.core.inventories.BaseInventoryGrindle; @@ -24,14 +46,16 @@ import gtPlusPlus.core.inventories.box.LunchBoxInventory; import gtPlusPlus.core.inventories.box.MagicBagInventory; import gtPlusPlus.core.inventories.box.ToolBoxInventory; import gtPlusPlus.core.tileentities.base.TileEntityBase; -import gtPlusPlus.core.tileentities.general.*; +import gtPlusPlus.core.tileentities.general.TileEntityCircuitProgrammer; +import gtPlusPlus.core.tileentities.general.TileEntityDecayablesChest; +import gtPlusPlus.core.tileentities.general.TileEntityEggBox; +import gtPlusPlus.core.tileentities.general.TileEntityFishTrap; +import gtPlusPlus.core.tileentities.general.TileEntityVolumetricFlaskSetter; import gtPlusPlus.core.tileentities.machines.TileEntityModularityTable; import gtPlusPlus.core.tileentities.machines.TileEntityPestKiller; import gtPlusPlus.core.tileentities.machines.TileEntityProjectTable; import gtPlusPlus.core.tileentities.machines.TileEntityRoundRobinator; import gtPlusPlus.core.tileentities.machines.TileEntityTradeTable; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench; -import gtPlusPlus.core.tileentities.machines.TileEntityWorkbenchAdvanced; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChunkCoordinates; @@ -88,11 +112,10 @@ public class GuiHandler implements IGuiHandler { if (te != null) { if (ID == GUI4) { - return new Container_Workbench(player.inventory, (TileEntityWorkbench) te); + //return new Container_Workbench(player.inventory, (TileEntityWorkbench) te); } else if (ID == GUI5) { Logger.INFO("sad"); - return new Container_WorkbenchAdvanced(player.inventory, (TileEntityWorkbenchAdvanced) te); - + //return new Container_WorkbenchAdvanced(player.inventory, (TileEntityWorkbenchAdvanced) te); } else if (ID == GUI6) { return new Container_FishTrap(player.inventory, (TileEntityFishTrap) te); } else if (ID == GUI7) { @@ -154,10 +177,10 @@ public class GuiHandler implements IGuiHandler { if (te != null) { if (ID == GUI4) { - return new GUI_Workbench(player.inventory, (TileEntityWorkbench) te); + //return new GUI_Workbench(player.inventory, (TileEntityWorkbench) te); } else if (ID == GUI5) { Logger.INFO("sad"); - return new GUI_WorkbenchAdvanced(player.inventory, (TileEntityWorkbenchAdvanced) te); + //return new GUI_WorkbenchAdvanced(player.inventory, (TileEntityWorkbenchAdvanced) te); } else if (ID == GUI6) { return new GUI_FishTrap(player.inventory, (TileEntityFishTrap) te); } else if (ID == GUI7) { diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemBlueprint.java b/src/main/java/gtPlusPlus/core/item/general/ItemBlueprint.java index eded4e2585..5df17979a9 100644 --- a/src/main/java/gtPlusPlus/core/item/general/ItemBlueprint.java +++ b/src/main/java/gtPlusPlus/core/item/general/ItemBlueprint.java @@ -71,7 +71,7 @@ public class ItemBlueprint extends Item implements IItemBlueprint{ @Override public String getItemStackDisplayName(final ItemStack p_77653_1_) { - return "Blueprint [I am useless]"; + return "Blueprint"; } @Override @@ -103,7 +103,7 @@ public class ItemBlueprint extends Item implements IItemBlueprint{ ItemStack[] blueprint = new ItemStack[9]; if (itemStack.hasTagCompound()){ final NBTTagCompound nbt = itemStack.getTagCompound(); - final NBTTagList list = nbt.getTagList("Items", 10); + final NBTTagList list = nbt.getTagList("Inventory", 10); blueprint = new ItemStack[INV_SIZE]; for(int i = 0;i= 0) && (slot < this.inventoryCrafting.getSizeInventory())) { - this.inventoryCrafting.setInventorySlotContents(slot, ItemStack.loadItemStackFromNBT(tagCompound)); - } - }*/ - - - // Read craftingResult from NBT - final NBTTagCompound tagCraftResult = nbt.getCompoundTag("CraftingResult"); - this.inventoryCraftResult.setInventorySlotContents(0, ItemStack.loadItemStackFromNBT(tagCraftResult)); - - } - - @Override - public List getNetworkedFields(){ - final List ret = new Vector(2); - ret.add("facing"); - return ret; - } - - - @Override - public boolean wrenchCanSetFacing(final EntityPlayer entityPlayer, final int side) - { - return false; - } - - private short facing = 0; - public short prevFacing = 0; - - @Override - public void setFacing(final short facing1) - { - this.facing = facing1; - if (this.prevFacing != facing1) { - IC2.network.get().updateTileEntityField(this, "facing"); - } - this.prevFacing = facing1; - } - - @Override - public short getFacing() - { - return this.facing; - } - - - @Override - public boolean wrenchCanRemove(final EntityPlayer entityPlayer) - { - return true; - } - - @Override - public float getWrenchDropRate() - { - return 1.0F; - } - - @Override - public ItemStack getWrenchDrop(final EntityPlayer entityPlayer) - { - return new ItemStack(this.worldObj.getBlock(this.xCoord, this.yCoord, this.zCoord), 1, this.worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord)); - } - - @Override - public void onNetworkUpdate(final String field) { - - this.prevFacing = this.facing; - - } - - - -} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbenchAdvanced.java b/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbenchAdvanced.java deleted file mode 100644 index 264323388f..0000000000 --- a/src/main/java/gtPlusPlus/core/tileentities/machines/TileEntityWorkbenchAdvanced.java +++ /dev/null @@ -1,245 +0,0 @@ -package gtPlusPlus.core.tileentities.machines; - -import java.util.List; -import java.util.Vector; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.InventoryCraftResult; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.tileentity.TileEntity; - -import gtPlusPlus.core.inventories.*; -import ic2.api.energy.event.EnergyTileLoadEvent; -import ic2.api.energy.event.EnergyTileUnloadEvent; -import ic2.api.energy.tile.IEnergySink; -import ic2.api.network.INetworkDataProvider; -import ic2.api.network.INetworkUpdateListener; -import ic2.api.tile.IWrenchable; -import ic2.core.IC2; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.util.ForgeDirection; - -public class TileEntityWorkbenchAdvanced extends TileEntity implements IEnergySink, INetworkDataProvider, INetworkUpdateListener, IWrenchable{ - - //Credit to NovaViper in http://www.minecraftforge.net/forum/index.php?topic=26439.0 - Helped me restructure my Inventory system and now the crafting matrix works better. - - public InventoryWorkbenchChest inventoryChest; - public InventoryWorkbenchToolsElectric inventoryTool; - public InventoryWorkbenchHoloSlots inventoryHolo; - public InventoryWorkbenchHoloCrafting inventoryCrafting; - - public IInventory inventoryCraftResult = new InventoryCraftResult(); - - //Wrench Code - private short facing = 0; - public short prevFacing = 0; - - //E-Net Code - public double energy = 0.0D; - public int maxEnergy; - private boolean addedToEnergyNet = false; - private int tier; - private float guiChargeLevel; - - - public TileEntityWorkbenchAdvanced(final int maxenergy, final int tier1){ - this.inventoryTool = new InventoryWorkbenchToolsElectric();//number of slots - without product slot - this.inventoryChest = new InventoryWorkbenchChest();//number of slots - without product slot - this.inventoryHolo = new InventoryWorkbenchHoloSlots(); - this.inventoryCrafting = new InventoryWorkbenchHoloCrafting(); - this.canUpdate(); - - //Electric Stats - this.maxEnergy = maxenergy; - this.tier = tier1; - - } - - public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag) - { - if(!nbt.hasKey(tag)) - { - nbt.setTag(tag, new NBTTagCompound()); - } - return nbt.getCompoundTag(tag); - } - - @Override - public void writeToNBT(final NBTTagCompound nbt) - { - super.writeToNBT(nbt); - nbt.setDouble("energy", this.energy); - nbt.setShort("facing", this.facing); - - this.inventoryChest.writeToNBT(this.getTag(nbt, "ContentsChest")); - this.inventoryTool.writeToNBT(this.getTag(nbt, "ContentsTools")); - //inventoryCrafting.writeToNBT(getTag(nbt, "ContentsCrafting")); - this.inventoryHolo.writeToNBT(this.getTag(nbt, "ContentsHolo")); - - // Write Crafting Matrix to NBT - final NBTTagList craftingTag = new NBTTagList(); - for (int currentIndex = 0; currentIndex < this.inventoryCrafting.getSizeInventory(); ++currentIndex) { - if (this.inventoryCrafting.getStackInSlot(currentIndex) != null) { - final NBTTagCompound tagCompound = new NBTTagCompound(); - tagCompound.setByte("Slot", (byte) currentIndex); - this.inventoryCrafting.getStackInSlot(currentIndex).writeToNBT(tagCompound); - craftingTag.appendTag(tagCompound); - } - } - - nbt.setTag("CraftingMatrix", craftingTag); - // Write craftingResult to NBT - if (this.inventoryCraftResult.getStackInSlot(0) != null) { - nbt.setTag("CraftingResult", this.inventoryCraftResult.getStackInSlot(0).writeToNBT(new NBTTagCompound())); - } - - } - - @Override - public void readFromNBT(final NBTTagCompound nbt) - { - super.readFromNBT(nbt); - this.energy = nbt.getDouble("energy"); - - this.prevFacing = (this.facing = nbt.getShort("facing")); - - this.inventoryChest.readFromNBT(nbt.getCompoundTag("ContentsChest")); - this.inventoryTool.readFromNBT(nbt.getCompoundTag("ContentsTools")); - //inventoryCrafting.readFromNBT(nbt.getCompoundTag("ContentsCrafting")); - this.inventoryHolo.readFromNBT(nbt.getCompoundTag("ContentsHolo")); - - // Read in the Crafting Matrix from NBT - final NBTTagList craftingTag = nbt.getTagList("CraftingMatrix", 10); - this.inventoryCrafting = new InventoryWorkbenchHoloCrafting(); //TODO: magic number - for (int i = 0; i < craftingTag.tagCount(); ++i) { - final NBTTagCompound tagCompound = craftingTag.getCompoundTagAt(i); - final byte slot = tagCompound.getByte("Slot"); - if ((slot >= 0) && (slot < this.inventoryCrafting.getSizeInventory())) { - this.inventoryCrafting.setInventorySlotContents(slot, ItemStack.loadItemStackFromNBT(tagCompound)); - } - } - - - // Read craftingResult from NBT - final NBTTagCompound tagCraftResult = nbt.getCompoundTag("CraftingResult"); - this.inventoryCraftResult.setInventorySlotContents(0, ItemStack.loadItemStackFromNBT(tagCraftResult)); - - } - - @Override - public boolean acceptsEnergyFrom(final TileEntity emitter, final ForgeDirection direction) - { - return true; - } - - @Override - public double getDemandedEnergy() - { - return this.maxEnergy - this.energy; - } - - @Override - public int getSinkTier() - { - return this.tier; - } - - @Override - public double injectEnergy(final ForgeDirection directionFrom, final double amount, final double voltage) - { - if (this.energy >= this.maxEnergy) { - return amount; - } - this.energy += amount; - return 0.0D; - } - - public final float getChargeLevel() - { - return this.guiChargeLevel; - } - - public void setTier(final int tier1) - { - if (this.tier == tier1) { - return; - } - final boolean addedToENet = this.addedToEnergyNet; - if (addedToENet) - { - MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this)); - this.addedToEnergyNet = false; - } - this.tier = tier1; - - for (int i=0; i getNetworkedFields(){ - final List ret = new Vector(2); - ret.add("facing"); - return ret; - } - - - @Override - public boolean wrenchCanSetFacing(final EntityPlayer entityPlayer, final int side) - { - return false; - } - - @Override - public void setFacing(final short facing1) - { - this.facing = facing1; - if (this.prevFacing != facing1) { - IC2.network.get().updateTileEntityField(this, "facing"); - } - this.prevFacing = facing1; - } - - @Override - public short getFacing() - { - return this.facing; - } - - - @Override - public boolean wrenchCanRemove(final EntityPlayer entityPlayer) - { - return true; - } - - @Override - public float getWrenchDropRate() - { - return 1.0F; - } - - @Override - public ItemStack getWrenchDrop(final EntityPlayer entityPlayer) - { - return new ItemStack(this.worldObj.getBlock(this.xCoord, this.yCoord, this.zCoord), 1, this.worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord)); - } - - @Override - public void onNetworkUpdate(final String field) { - - this.prevFacing = this.facing; - - } - -} \ No newline at end of file diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_Container_AdvancedWorkbench.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_Container_AdvancedWorkbench.java new file mode 100644 index 0000000000..d7ec19a9ac --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_Container_AdvancedWorkbench.java @@ -0,0 +1,124 @@ +package gtPlusPlus.xmod.gregtech.api.gui.workbench; + +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.gui.GT_Slot_Holo; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.slots.SlotBlueprint; +import gtPlusPlus.core.slots.SlotElectric; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_AdvancedCraftingTable; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class GT_Container_AdvancedWorkbench extends GT_ContainerMetaTile_Machine { + + public GT_Container_AdvancedWorkbench(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + public void addSlots(InventoryPlayer aInventoryPlayer) { + addSlotToContainer(new Slot(mTileEntity, 0, 8, 8)); + addSlotToContainer(new Slot(mTileEntity, 1, 26, 8)); + addSlotToContainer(new Slot(mTileEntity, 2, 44, 8)); + addSlotToContainer(new Slot(mTileEntity, 3, 62, 8)); + addSlotToContainer(new Slot(mTileEntity, 4, 8, 26)); + addSlotToContainer(new Slot(mTileEntity, 5, 26, 26)); + addSlotToContainer(new Slot(mTileEntity, 6, 44, 26)); + addSlotToContainer(new Slot(mTileEntity, 7, 62, 26)); + addSlotToContainer(new Slot(mTileEntity, 8, 8, 44)); + addSlotToContainer(new Slot(mTileEntity, 9, 26, 44)); + addSlotToContainer(new Slot(mTileEntity, 10, 44, 44)); + addSlotToContainer(new Slot(mTileEntity, 11, 62, 44)); + addSlotToContainer(new Slot(mTileEntity, 12, 8, 62)); + addSlotToContainer(new Slot(mTileEntity, 13, 26, 62)); + addSlotToContainer(new Slot(mTileEntity, 14, 44, 62)); + addSlotToContainer(new Slot(mTileEntity, 15, 62, 62)); + + addSlotToContainer(new SlotElectric(mTileEntity, 16, 82, 8)); + addSlotToContainer(new SlotElectric(mTileEntity, 17, 100, 8)); + addSlotToContainer(new SlotElectric(mTileEntity, 18, 118, 8)); + addSlotToContainer(new SlotElectric(mTileEntity, 19, 136, 8)); + addSlotToContainer(new SlotElectric(mTileEntity, 20, 154, 8)); + + addSlotToContainer(new Slot(mTileEntity, 21, 82, 28)); + addSlotToContainer(new Slot(mTileEntity, 22, 100, 28)); + addSlotToContainer(new Slot(mTileEntity, 23, 118, 28)); + addSlotToContainer(new Slot(mTileEntity, 24, 82, 46)); + addSlotToContainer(new Slot(mTileEntity, 25, 100, 46)); + addSlotToContainer(new Slot(mTileEntity, 26, 118, 46)); + addSlotToContainer(new Slot(mTileEntity, 27, 82, 64)); + addSlotToContainer(new Slot(mTileEntity, 28, 100, 64)); + addSlotToContainer(new Slot(mTileEntity, 29, 118, 64)); + + addSlotToContainer(new Slot(mTileEntity, 33, 154, 28)); + addSlotToContainer(new Slot(mTileEntity, 34, 154, 64)); + + addSlotToContainer(new SlotBlueprint(mTileEntity, 30, 136, 28)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 31, 136, 64, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 32, 154, 46, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 32, 136, 46, false, false, 1)); + + } + + public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { + Logger.INFO("Clicked on slot "+aSlotIndex); + if (aSlotIndex < 21 || aSlotIndex > 35) return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + if (mTileEntity == null || mTileEntity.getMetaTileEntity() == null) return null; + try { + ItemStack tStack = ((Slot)inventorySlots.get(aSlotIndex)).getStack(); + if (tStack != null && tStack.stackSize <= 0 && !GT_Utility.areStacksEqual(tStack, aPlayer.inventory.getItemStack())) { + return null; + } + if (aSlotIndex == 32) { + if (aMouseclick == 0 && aShifthold == 1) { + ((GT_MetaTileEntity_AdvancedCraftingTable)mTileEntity.getMetaTileEntity()).setBluePrint(null); + return null; + } + } else if (aSlotIndex == 33) { + ItemStack tStack2, tCraftedStack = ((GT_MetaTileEntity_AdvancedCraftingTable)mTileEntity.getMetaTileEntity()).getCraftingOutput(); + if (tCraftedStack != null) { + if (aShifthold == 1) { + for (byte i = 0; i < aPlayer.inventory.mainInventory.length; i++) { + for (byte j = 0; j < tCraftedStack.getMaxStackSize() / tCraftedStack.stackSize && ((GT_MetaTileEntity_AdvancedCraftingTable)mTileEntity.getMetaTileEntity()).canDoCraftingOutput(); j++) { + if (!GT_Utility.areStacksEqual(tStack2 = ((GT_MetaTileEntity_AdvancedCraftingTable)mTileEntity.getMetaTileEntity()).getCraftingOutput(), tCraftedStack) || tStack.stackSize != tStack2.stackSize) return aPlayer.inventory.getItemStack(); + aPlayer.inventory.mainInventory[i] = (((GT_MetaTileEntity_AdvancedCraftingTable)mTileEntity.getMetaTileEntity()).consumeMaterials(aPlayer, aPlayer.inventory.mainInventory[i])); + } + } + } else { + if (aMouseclick == 0) { + if (((GT_MetaTileEntity_AdvancedCraftingTable)mTileEntity.getMetaTileEntity()).canDoCraftingOutput()) aPlayer.inventory.setItemStack(((GT_MetaTileEntity_AdvancedCraftingTable)mTileEntity.getMetaTileEntity()).consumeMaterials(aPlayer, aPlayer.inventory.getItemStack())); + return aPlayer.inventory.getItemStack(); + } else { + for (int i = 0; i < tCraftedStack.getMaxStackSize() / tCraftedStack.stackSize && ((GT_MetaTileEntity_AdvancedCraftingTable)mTileEntity.getMetaTileEntity()).canDoCraftingOutput(); i++) { + if (!GT_Utility.areStacksEqual(tStack2 = ((GT_MetaTileEntity_AdvancedCraftingTable)mTileEntity.getMetaTileEntity()).getCraftingOutput(), tCraftedStack) || tStack.stackSize != tStack2.stackSize) return aPlayer.inventory.getItemStack(); + aPlayer.inventory.setItemStack(((GT_MetaTileEntity_AdvancedCraftingTable)mTileEntity.getMetaTileEntity()).consumeMaterials(aPlayer, aPlayer.inventory.getItemStack())); + } + return aPlayer.inventory.getItemStack(); + } + } + } + return null; + } else if (aSlotIndex == 34) { + ((GT_MetaTileEntity_AdvancedCraftingTable)mTileEntity.getMetaTileEntity()).mFlushMode = true; + return null; + } else if (aSlotIndex == 35) { + ((GT_MetaTileEntity_AdvancedCraftingTable)mTileEntity.getMetaTileEntity()).sortIntoTheInputSlots(); + return null; + } + } catch(Throwable e) { + //GT_Log.log.catching(e); + } + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + + public int getSlotCount() { + return 33; + } + + public int getShiftClickSlotCount() { + return 21; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_Container_BronzeWorkbench.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_Container_BronzeWorkbench.java new file mode 100644 index 0000000000..f7cfd31e5d --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_Container_BronzeWorkbench.java @@ -0,0 +1,120 @@ +package gtPlusPlus.xmod.gregtech.api.gui.workbench; + +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.gui.GT_Slot_Holo; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_BronzeCraftingTable; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class GT_Container_BronzeWorkbench extends GT_ContainerMetaTile_Machine { + + public GT_Container_BronzeWorkbench(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + public void addSlots(InventoryPlayer aInventoryPlayer) { + addSlotToContainer(new Slot(mTileEntity, 0, 8, 8)); + addSlotToContainer(new Slot(mTileEntity, 1, 26, 8)); + addSlotToContainer(new Slot(mTileEntity, 2, 44, 8)); + addSlotToContainer(new Slot(mTileEntity, 3, 62, 8)); + addSlotToContainer(new Slot(mTileEntity, 4, 8, 26)); + addSlotToContainer(new Slot(mTileEntity, 5, 26, 26)); + addSlotToContainer(new Slot(mTileEntity, 6, 44, 26)); + addSlotToContainer(new Slot(mTileEntity, 7, 62, 26)); + addSlotToContainer(new Slot(mTileEntity, 8, 8, 44)); + addSlotToContainer(new Slot(mTileEntity, 9, 26, 44)); + addSlotToContainer(new Slot(mTileEntity, 10, 44, 44)); + addSlotToContainer(new Slot(mTileEntity, 11, 62, 44)); + addSlotToContainer(new Slot(mTileEntity, 12, 8, 62)); + addSlotToContainer(new Slot(mTileEntity, 13, 26, 62)); + addSlotToContainer(new Slot(mTileEntity, 14, 44, 62)); + addSlotToContainer(new Slot(mTileEntity, 15, 62, 62)); + + addSlotToContainer(new Slot(mTileEntity, 16, 82, 8)); + addSlotToContainer(new Slot(mTileEntity, 17, 100, 8)); + addSlotToContainer(new Slot(mTileEntity, 18, 118, 8)); + addSlotToContainer(new Slot(mTileEntity, 19, 136, 8)); + addSlotToContainer(new Slot(mTileEntity, 20, 154, 8)); + + addSlotToContainer(new Slot(mTileEntity, 21, 82, 28)); + addSlotToContainer(new Slot(mTileEntity, 22, 100, 28)); + addSlotToContainer(new Slot(mTileEntity, 23, 118, 28)); + addSlotToContainer(new Slot(mTileEntity, 24, 82, 46)); + addSlotToContainer(new Slot(mTileEntity, 25, 100, 46)); + addSlotToContainer(new Slot(mTileEntity, 26, 118, 46)); + addSlotToContainer(new Slot(mTileEntity, 27, 82, 64)); + addSlotToContainer(new Slot(mTileEntity, 28, 100, 64)); + addSlotToContainer(new Slot(mTileEntity, 29, 118, 64)); + + addSlotToContainer(new Slot(mTileEntity, 33, 154, 28)); + addSlotToContainer(new Slot(mTileEntity, 34, 154, 64)); + + addSlotToContainer(new Slot(mTileEntity, 30, 136, 28)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 31, 136, 64, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 32, 154, 46, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 32, 136, 46, false, false, 1)); + + } + + public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { + if (aSlotIndex < 21 || aSlotIndex > 35) return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + if (mTileEntity == null || mTileEntity.getMetaTileEntity() == null) return null; + try { + ItemStack tStack = ((Slot)inventorySlots.get(aSlotIndex)).getStack(); + if (tStack != null && tStack.stackSize <= 0 && !GT_Utility.areStacksEqual(tStack, aPlayer.inventory.getItemStack())) { + return null; + } + if (aSlotIndex == 32) { + if (aMouseclick == 0 && aShifthold == 1) { + ((GT_MetaTileEntity_BronzeCraftingTable)mTileEntity.getMetaTileEntity()).setBluePrint(null); + return null; + } + } else if (aSlotIndex == 33) { + ItemStack tStack2, tCraftedStack = ((GT_MetaTileEntity_BronzeCraftingTable)mTileEntity.getMetaTileEntity()).getCraftingOutput(); + if (tCraftedStack != null) { + if (aShifthold == 1) { + for (byte i = 0; i < aPlayer.inventory.mainInventory.length; i++) { + for (byte j = 0; j < tCraftedStack.getMaxStackSize() / tCraftedStack.stackSize && ((GT_MetaTileEntity_BronzeCraftingTable)mTileEntity.getMetaTileEntity()).canDoCraftingOutput(); j++) { + if (!GT_Utility.areStacksEqual(tStack2 = ((GT_MetaTileEntity_BronzeCraftingTable)mTileEntity.getMetaTileEntity()).getCraftingOutput(), tCraftedStack) || tStack.stackSize != tStack2.stackSize) return aPlayer.inventory.getItemStack(); + aPlayer.inventory.mainInventory[i] = (((GT_MetaTileEntity_BronzeCraftingTable)mTileEntity.getMetaTileEntity()).consumeMaterials(aPlayer, aPlayer.inventory.mainInventory[i])); + } + } + } else { + if (aMouseclick == 0) { + if (((GT_MetaTileEntity_BronzeCraftingTable)mTileEntity.getMetaTileEntity()).canDoCraftingOutput()) aPlayer.inventory.setItemStack(((GT_MetaTileEntity_BronzeCraftingTable)mTileEntity.getMetaTileEntity()).consumeMaterials(aPlayer, aPlayer.inventory.getItemStack())); + return aPlayer.inventory.getItemStack(); + } else { + for (int i = 0; i < tCraftedStack.getMaxStackSize() / tCraftedStack.stackSize && ((GT_MetaTileEntity_BronzeCraftingTable)mTileEntity.getMetaTileEntity()).canDoCraftingOutput(); i++) { + if (!GT_Utility.areStacksEqual(tStack2 = ((GT_MetaTileEntity_BronzeCraftingTable)mTileEntity.getMetaTileEntity()).getCraftingOutput(), tCraftedStack) || tStack.stackSize != tStack2.stackSize) return aPlayer.inventory.getItemStack(); + aPlayer.inventory.setItemStack(((GT_MetaTileEntity_BronzeCraftingTable)mTileEntity.getMetaTileEntity()).consumeMaterials(aPlayer, aPlayer.inventory.getItemStack())); + } + return aPlayer.inventory.getItemStack(); + } + } + } + return null; + } else if (aSlotIndex == 34) { + ((GT_MetaTileEntity_BronzeCraftingTable)mTileEntity.getMetaTileEntity()).mFlushMode = true; + return null; + } else if (aSlotIndex == 35) { + ((GT_MetaTileEntity_BronzeCraftingTable)mTileEntity.getMetaTileEntity()).sortIntoTheInputSlots(); + return null; + } + } catch(Throwable e) { + //GT_Log.log.catching(e); + } + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + + public int getSlotCount() { + return 33; + } + + public int getShiftClickSlotCount() { + return 21; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_GUIContainer_AdvancedWorkbench.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_GUIContainer_AdvancedWorkbench.java new file mode 100644 index 0000000000..fc3041f553 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_GUIContainer_AdvancedWorkbench.java @@ -0,0 +1,84 @@ +package gtPlusPlus.xmod.gregtech.api.gui.workbench; + +import java.util.ArrayList; +import java.util.List; + +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.sys.KeyboardUtils; +import net.minecraft.entity.player.InventoryPlayer; + +public class GT_GUIContainer_AdvancedWorkbench extends GT_GUIContainerMetaTile_Machine { + + private final String mLocalName; + + public GT_GUIContainer_AdvancedWorkbench(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aLocalName) { + super(new GT_Container_AdvancedWorkbench(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + "AdvancedCraftingTable.png"); + mLocalName = aLocalName; + } + + public GT_GUIContainer_AdvancedWorkbench(GT_ContainerMetaTile_Machine aContainer, String aLocalName, String aResource) { + super(aContainer, aResource); + mLocalName = aLocalName; + } + + @Override + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + //fontRendererObj.drawString(mLocalName, 8, 4, 4210752); + this.drawTooltip(par1, par2); + } + + private void drawTooltip(final int x2, final int y2) { + final int xStart = (this.width - this.xSize) / 2; + final int yStart = (this.height - this.ySize) / 2; + final int x3 = x2 - xStart; + final int y3 = y2 - yStart + 5; + final List list = new ArrayList(); + //154 - 172 + + if (KeyboardUtils.isShiftKeyDown()) { + if (y3 >= 30 && y3 <= 49) { + if (x3 >= 135 && x3 <= 154) { + list.add("Blueprint Slot"); + list.add("Shift+Lmb Sets to crafting output"); + } + if (x3 >= 153 && x3 <= 170) { + list.add("Extraction Slot"); + list.add("Things can always be pulled from here"); + } + } + if (y3 >= 50 && y3 <= 67) { + if (x3 >= 135 && x3 <= 152) { + list.add("Flush"); + list.add("Empty crafting grid back to storage"); + } + if (x3 >= 153 && x3 <= 170) { + list.add("Automation"); + list.add("Allows output while"); + list.add("crafting grid is full"); + } + } + if (y3 >= 68 && y3 <= 85){ + if (x3 >= 135 && x3 <= 152) { + list.add("Output Slot"); + } + if (x3 >= 153 && x3 <= 170) { + list.add("Free Parking"); + } + } + } + if (!list.isEmpty()) { + this.drawHoveringText(list, x3, y3, this.fontRendererObj); + } + } + + @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); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_GUIContainer_BronzeWorkbench.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_GUIContainer_BronzeWorkbench.java new file mode 100644 index 0000000000..178c9241f1 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/workbench/GT_GUIContainer_BronzeWorkbench.java @@ -0,0 +1,13 @@ +package gtPlusPlus.xmod.gregtech.api.gui.workbench; + +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.entity.player.InventoryPlayer; + +public class GT_GUIContainer_BronzeWorkbench extends GT_GUIContainer_AdvancedWorkbench { + + public GT_GUIContainer_BronzeWorkbench(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aLocalName) { + super(new GT_Container_BronzeWorkbench(aInventoryPlayer, aTileEntity), aLocalName, CORE.RES_PATH_GUI + "BronzeCraftingTable.png"); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java index 2fa63e4568..7653224fd2 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java @@ -402,10 +402,17 @@ public class TexturesGtBlock { public static final CustomIcon Overlay_FluidReactor_Top_Active = new CustomIcon("TileEntities/FluidReactor/OVERLAY_TOP_ACTIVE"); //Crafting Overlays - private static final CustomIcon Internal_Overlay_Crafting_Bronze = new CustomIcon("TileEntities/bronze_top_crafting"); - public static final CustomIcon Overlay_Crafting_Bronze = Internal_Overlay_Crafting_Bronze; - private static final CustomIcon Internal_Overlay_Crafting_Steel = new CustomIcon("TileEntities/cover_crafting"); - public static final CustomIcon Overlay_Crafting_Steel = Internal_Overlay_Crafting_Steel; + public static final CustomIcon Overlay_Crafting_Bronze = new CustomIcon("TileEntities/bronze_top_crafting"); + public static final CustomIcon Overlay_Crafting_Steel = new CustomIcon("TileEntities/cover_crafting"); + + public static final CustomIcon Casing_Workbench_Crafting_Overlay = new CustomIcon("TileEntities/gt4/bronze_top_crafting"); + public static final CustomIcon Casing_Workbench_Top = new CustomIcon("TileEntities/gt4/bronze_top"); + public static final CustomIcon Casing_Workbench_Side = new CustomIcon("TileEntities/gt4/bronze_side"); + public static final CustomIcon Casing_Workbench_Bottom = new CustomIcon("TileEntities/gt4/bronze_bottom"); + public static final CustomIcon Casing_Adv_Workbench_Crafting_Overlay = new CustomIcon("TileEntities/gt4/machine_top_crafting"); + public static final CustomIcon Casing_Adv_Workbench_Top = new CustomIcon("TileEntities/gt4/machine_top"); + public static final CustomIcon Casing_Adv_Workbench_Side = new CustomIcon("TileEntities/gt4/machine_side"); + public static final CustomIcon Casing_Adv_Workbench_Bottom = new CustomIcon("TileEntities/gt4/machine_bottom"); //Covers private static final CustomIcon Internal_Overlay_Overflow_Valve = new CustomIcon("iconsets/OVERLAY_OVERFLOW_VALVE"); @@ -443,7 +450,7 @@ public class TexturesGtBlock { // Lapo Orb Hatch public static final CustomIcon Overlay_Hatch_Lapo_Orb = new CustomIcon("iconsets/OVERLAY_LAPO"); // Data Orb Hatch - public static final CustomIcon Overlay_Hatch_Data_Orb = new CustomIcon("iconsets/OVERYLAY_DATA_ORB"); + public static final CustomIcon Overlay_Hatch_Data_Orb = new CustomIcon("iconsets/OVERLAY_DATA_ORB"); // RTG Hatch private static final CustomIcon Internal_Overlay_Hatch_RTG_Off = new CustomIcon("iconsets/OVERLAY_ENERGY_RTG_OFF"); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamCompressor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamCompressor.java new file mode 100644 index 0000000000..92190521cd --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamCompressor.java @@ -0,0 +1,163 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.steam; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.GregTech_API.sBlockCasings1; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Steam_BusInput; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Steam_BusOutput; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GT_MetaTileEntity_Hatch_CustomFluidBase; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_SteamMultiBase; +import net.minecraft.item.ItemStack; + +public class GregtechMetaTileEntity_SteamCompressor extends GregtechMeta_SteamMultiBase { + + private String mCasingName = "Bronze Plated Bricks"; + private IStructureDefinition STRUCTURE_DEFINITION = null; + private int mCasing; + + public GregtechMetaTileEntity_SteamCompressor(String aName) { + super(aName); + } + + public GregtechMetaTileEntity_SteamCompressor(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity arg0) { + return new GregtechMetaTileEntity_SteamCompressor(this.mName); + } + + @Override + protected GT_RenderedTexture getFrontOverlay() { + return new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_MACERATOR); + } + + @Override + protected GT_RenderedTexture getFrontOverlayActive() { + return new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_MACERATOR_ACTIVE); + } + + @Override + public String getMachineType() { + return "Compressor"; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Steam Macerator") + .addInfo("Macerates " + getMaxParallelRecipes() + " ores at a time") + .addSeparator() + .beginStructureBlock(3, 3, 3, true) + .addController("Front center") + .addCasingInfo(mCasingName, 14) + .addStructureHint("Input Bus (Steam)", 1) + .addStructureHint("Output Bus (Steam)", 1) + .addStructureHint("Steam Hatch", 1) + .toolTipFinisher(CORE.GT_Tooltip_Builder); + return tt; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCC", "CCC", "CCC", "CCC"}, + {"C~C", "C-C", "C-C", "CCC"}, + {"CCC", "CCC", "CCC", "CCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_SteamCompressor::addSteamMultiList, 10, 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + sBlockCasings1, 10 + ) + ) + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + public final boolean addSteamMultiList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_CustomFluidBase && aMetaTileEntity.getBaseMetaTileEntity().getMetaTileID() == 31040){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Steam_BusInput){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Steam_BusOutput){ + return addToMachineList(aTileEntity, aBaseCasingIndex); + } + } + return false; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName, stackSize, hintsOnly, 1, 1, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + fixAllMaintenanceIssue(); + return checkPiece(mName, 1, 1, 0) && mCasing >= 14; + } + + @Override + public int getMaxParallelRecipes() { + return 8; + } + + + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return GT_Recipe.GT_Recipe_Map.sCompressorRecipes; + } + + @Override + public ItemStack[] getOutputItems(GT_Recipe aRecipe) { + // Collect output item types + ItemStack[] tOutputItems = new ItemStack[1]; + for (int h = 0; h < 1; h++) { + if (aRecipe.getOutput(h) != null) { + tOutputItems[h] = aRecipe.getOutput(h).copy(); + tOutputItems[h].stackSize = 0; + } + } + return tOutputItems; + } + + @Override + public int getOutputCount(ItemStack[] aOutputs) { + return 1; + } + + + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_AdvancedCraftingTable.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_AdvancedCraftingTable.java new file mode 100644 index 0000000000..b5aa916e54 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_AdvancedCraftingTable.java @@ -0,0 +1,550 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.storage; + +import java.util.ArrayList; + +import gregtech.api.enums.GT_Values; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.item.general.ItemBlueprint; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.xmod.gregtech.api.gui.workbench.GT_Container_AdvancedWorkbench; +import gtPlusPlus.xmod.gregtech.api.gui.workbench.GT_GUIContainer_AdvancedWorkbench; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +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.nbt.NBTTagList; + +public class GT_MetaTileEntity_AdvancedCraftingTable extends GT_MetaTileEntity_BasicTank { + + public boolean mFlushMode = false; + + protected String mLocalName; + + public GT_MetaTileEntity_AdvancedCraftingTable(final int aID, final String aName, final String aNameRegional, final int aTier, final String aDescription) { + super(aID, aName, aNameRegional, aTier, 35, aDescription); + mLocalName = aNameRegional; + } + + public GT_MetaTileEntity_AdvancedCraftingTable(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) { + super(aName, aTier, 35, aDescription, aTextures); + } + + @Override + public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_AdvancedWorkbench(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_AdvancedWorkbench(aPlayerInventory, aBaseMetaTileEntity, mLocalName); + } + + @Override + public boolean isTransformerUpgradable() { + return true; + } + @Override + public boolean isSimpleMachine() { + return true; + } + @Override + public boolean isValidSlot(int aIndex) { + return aIndex < 31 || aIndex > 32; + } + @Override + public boolean isFacingValid(byte aFacing) { + return true; + } + @Override + public boolean isAccessAllowed(EntityPlayer aPlayer) { + return true; + } + @Override + public boolean isEnetInput() { + return isElectric(); + } + @Override + public boolean isInputFacing(byte aSide) { + return true; + } + @Override + public long maxEUInput() { + return isElectric() ? GT_Values.V[3] : 0; + } + @Override + public long maxEUStore() { + return isElectric() ? GT_Values.V[3] * 1024 : 0; + } + + @Override + public boolean isElectric() { + return isAdvanced(); + } + + @Override + public boolean isPneumatic() { + return false; + } + + @Override + public boolean isSteampowered() { + return false; + } + + @Override + public long maxAmperesIn() { + return isElectric() ? 2 : 0; + } + + @Override + public long getMinimumStoredEU() { + return isElectric() ? GT_Values.V[3] * 2 : 0; + } + + @Override + public int getSizeInventory() { + return 35; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_AdvancedCraftingTable(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) { + return true; + } + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + + @Override + public boolean doesFillContainers() { + return false; + } + @Override + public boolean doesEmptyContainers() { + return false; + } + @Override + public boolean canTankBeFilled() { + return true; + } + @Override + public boolean canTankBeEmptied() { + return true; + } + @Override + public boolean displaysItemStack() { + return false; + } + @Override + public boolean displaysStackSize() { + return false; + } + + public void sortIntoTheInputSlots() { + for (byte i = 21; i < 30; i++) + if (mInventory[i] != null) { + if (mInventory[i].stackSize == 0) { + mInventory[i] = null; + } + if (mInventory[i] != null) + for (byte j = 0; j < 16; j++) { + if (GT_Utility.areStacksEqual( + mInventory[i], mInventory[j] + )) { + GT_Utility.moveStackFromSlotAToSlotB( + getBaseMetaTileEntity(), getBaseMetaTileEntity(), i, j, (byte) 64, (byte) 1, (byte) 64, (byte) 1 + ); + } + } + if (mInventory[i] != null) + for (byte j = 0; j < 16; j++) { + if (mInventory[j] == null) { + GT_Utility.moveStackFromSlotAToSlotB( + getBaseMetaTileEntity(), getBaseMetaTileEntity(), i, j, (byte) 64, (byte) 1, (byte) 64, (byte) 1 + ); + } + } + } + } + + private void fillLiquidContainers() { + for (byte i = 16; i < 21 && mFluid != null; i++) { + ItemStack tOutput = GT_Utility.fillFluidContainer(mFluid, mInventory[i], false, true); + if (tOutput != null) { + if (mInventory[i].stackSize == 1) { + mFluid.amount -= GT_Utility.getFluidForFilledItem( + tOutput, true + ).amount * tOutput.stackSize; + mInventory[i] = tOutput; + } + else + for (byte j = 16; j < 21; j++) { + if (mInventory[j] == null || (GT_Utility.areStacksEqual( + tOutput, mInventory[j] + ) && mInventory[j].stackSize + + tOutput.stackSize <= tOutput.getMaxStackSize())) { + mFluid.amount -= GT_Utility.getFluidForFilledItem( + tOutput, true + ).amount * tOutput.stackSize; + getBaseMetaTileEntity().decrStackSize(i, 1); + if (mInventory[j] == null) { + mInventory[j] = tOutput; + } + else { + mInventory[j].stackSize++; + } + break; + } + } + if (mFluid != null && mFluid.amount <= 0) + mFluid = null; + } + } + if (mFluid != null && mFluid.amount <= 0) + mFluid = null; + } + + public void setBluePrint(ItemStack aStack) { + if (aStack == null) { + aStack = mInventory[30]; + Logger.INFO("Using Slot 30 supply."); + } + if (mInventory[31] == null || aStack == null || aStack.getItem() == null + || aStack.getItemDamage() != 0 || aStack.stackSize != 1 + || !(aStack.getItem() instanceof ItemBlueprint)) { + try { + Logger.INFO( + "Could not set Blueprint. Slot 31: " + + (mInventory[31] != null ? mInventory[31].getDisplayName() : "Null") + + ", aStack: "+(aStack != null ? aStack.getDisplayName() : "Null") + + ", Damage: "+(aStack != null ? aStack.getItemDamage() : "Null")); + } + catch (Throwable t) { + t.printStackTrace(); + } + return; + } + if (!aStack.getTagCompound().hasKey("Inventory")) { + NBTTagCompound tNBT = new NBTTagCompound(); + NBTTagList tNBT_ItemList = new NBTTagList(); + for (int i = 0; i < 9; i++) { + ItemStack tStack = mInventory[i + 21]; + if (tStack != null) { + NBTTagCompound tag = new NBTTagCompound(); + tag.setByte("Slot", (byte) i); + tStack.writeToNBT(tag); + tNBT_ItemList.appendTag(tag); + } + } + tNBT.setTag("Inventory", tNBT_ItemList); + tNBT.setBoolean("mBlueprint", true); + tNBT.setInteger("mID", MathUtils.randInt(1, Short.MAX_VALUE)); + tNBT.setString("mName", mInventory[31].getDisplayName()); + aStack.setTagCompound(tNBT); + Logger.INFO("Set NBT of crafting table to Stack in slot 30."); + } + else { + Logger.INFO("Blueprint already has recipe tags."); + } + + } + + public ItemStack getCraftingOutput() { + if (mInventory[30] != null && mInventory[30].getItem() != null + && mInventory[30].getItemDamage() == 0 + && mInventory[30].hasTagCompound() && mInventory[30].getItem() instanceof ItemBlueprint) { + //Logger.INFO("Getting Blueprint Data in slot 30. "+mInventory[30].getDisplayName()); + NBTTagCompound tNBT = mInventory[30].getTagCompound(); + NBTTagList tNBT_ItemList = tNBT.getTagList("Blueprint", 10); + for (int i = 0; i < tNBT_ItemList.tagCount() && i < 9; i++) { + NBTTagCompound tag = (NBTTagCompound) tNBT_ItemList.getCompoundTagAt( + i + ); + byte slot = tag.getByte("Slot"); + if (slot >= 0 && slot < 9 && mInventory[slot + 21] == null) { + mInventory[slot + 21] = GT_Utility.loadItem(tag); + if (mInventory[slot + 21] != null) + mInventory[slot + 21].stackSize = 0; + } + } + } + mInventory[31] = GT_ModHandler.getAllRecipeOutput( + getBaseMetaTileEntity().getWorld(), new ItemStack[]{ + mInventory[21], mInventory[22], mInventory[23], + mInventory[24], mInventory[25], mInventory[26], + mInventory[27], mInventory[28], mInventory[29] + } + ); + return mInventory[31]; + } + + public boolean canDoCraftingOutput() { + if (mInventory[31] == null) + return false; + for (ItemStack tStack : recipeContent()) { + if (tStack.stackSize > getAmountOf(tStack)) { + return false; + } + } + return true; + } + + private int getAmountOf(ItemStack aStack) { + int tAmount = 0; + for (byte i = 0; i < 30 && tAmount < 9; i++) { + if (GT_Utility.areStacksOrToolsEqual(aStack, mInventory[i])) { + tAmount += mInventory[i].stackSize; + } + } + return tAmount; + } + + private ArrayList recipeContent() { + ArrayList tList = new ArrayList(); + for (byte i = 21; i < 30; i++) { + if (mInventory[i] != null) { + boolean temp = false; + for (byte j = 0; j < tList.size(); j++) { + if (GT_Utility.areStacksOrToolsEqual( + mInventory[i], tList.get(j) + )) { + tList.get(j).stackSize++; + temp = true; + break; + } + } + if (!temp) + tList.add(GT_Utility.copy(1, mInventory[i])); + } + } + return tList; + } + + public ItemStack consumeMaterials(EntityPlayer aPlayer, ItemStack aHoldStack) { + if (mInventory[31] == null) + return aHoldStack; + if (aHoldStack != null) { + if (!GT_Utility.areStacksEqual(aHoldStack, mInventory[31])) + return aHoldStack; + if (aHoldStack.stackSize + + mInventory[31].stackSize > aHoldStack.getMaxStackSize()) + return aHoldStack; + } + for (byte i = 21; i < 30; i++) + if (mInventory[i] != null) { + for (byte j = 0; j <= i; j++) { + if (j < 21 || j == i) { + if (GT_Utility.areStacksOrToolsEqual( + mInventory[i], mInventory[j] + ) && mInventory[j].stackSize > 0) { + ItemStack tStack = GT_Utility.getContainerItem( + mInventory[j], true + ); + if (tStack == null + || (tStack.isItemStackDamageable() + && tStack.getItemDamage() >= tStack.getMaxDamage())) { + getBaseMetaTileEntity().decrStackSize(j, 1); + } + else if (mInventory[j].stackSize == 1) { + mInventory[j] = tStack; + } + else { + getBaseMetaTileEntity().decrStackSize(j, 1); + for (byte k = 0; k < 21; k++) { + if (mInventory[k] == null) { + mInventory[k] = tStack; + break; + } + else { + if (GT_Utility.areStacksEqual( + tStack, mInventory[k] + )) { + if (tStack.stackSize + + mInventory[k].stackSize <= mInventory[k].getMaxStackSize()) { + mInventory[k].stackSize += tStack.stackSize; + break; + } + } + } + } + } + break; + } + } + } + } + if (aHoldStack == null) { + aHoldStack = GT_Utility.copy(mInventory[31]); + aHoldStack.onCrafting( + getBaseMetaTileEntity().getWorld(), aPlayer, mInventory[31].stackSize + ); + } + else { + aHoldStack.stackSize += mInventory[31].stackSize; + aHoldStack.onCrafting( + getBaseMetaTileEntity().getWorld(), aPlayer, mInventory[31].stackSize + ); + } + + fillLiquidContainers(); + + return aHoldStack; + } + + @Override + public int rechargerSlotStartIndex() { + return 16; + } + + @Override + public int rechargerSlotCount() { + return 5; + } + + @Override + public long getOutputTier() { + return GT_Utility.getTier(getBaseMetaTileEntity().getInputVoltage()); + } + + @Override + public int getCapacity() { + return 64000; + } + + @Override + public int getTankPressure() { + return -100; + } + + @Override + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return aIndex == 33 || (mFlushMode && aIndex >= 21 && aIndex < 30); + } + + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + if (aIndex < 16) { + for (byte i = 0; i < 16; i++) + if (GT_Utility.areStacksOrToolsEqual(aStack, mInventory[i])) + return aIndex == i; + return true; + } + return false; + } + + @Override + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPreTick(aBaseMetaTileEntity, aTick); + getCraftingOutput(); + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + if (getBaseMetaTileEntity().isServerSide()) { + if (getBaseMetaTileEntity().hasInventoryBeenModified()) + getCraftingOutput(); + fillLiquidContainers(); + if (mFlushMode) { + mFlushMode = false; + for (byte i = 21; i < 30; i++) { + if (mInventory[i] != null) { + if (mInventory[i].stackSize == 0) { + mInventory[i] = null; + } + else { + mFlushMode = true; + break; + } + } + } + } + } + /*if (aTick % 100 == 0) { + for (int i = 0; i < this.mInventory.length; i++) { + ItemStack aSlot = mInventory[i]; + Logger.INFO("Slot "+i+" "+(aSlot != null ? "contains "+aSlot.getDisplayName() : "is empty")); + } + }*/ + } + + @Override + public String[] getDescription() { + return new String[] { + "For the very large Projects", + this.mDescription, + CORE.GT_Tooltip }; + } + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + final ITexture[][][] rTextures = new ITexture[10][17][]; + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = this.getFront(i); + rTextures[1][i + 1] = this.getBack(i); + rTextures[2][i + 1] = this.getBottom(i); + rTextures[3][i + 1] = this.getTop(i); + rTextures[4][i + 1] = this.getSides(i); + rTextures[5][i + 1] = this.getFront(i); + rTextures[6][i + 1] = this.getBack(i); + rTextures[7][i + 1] = this.getBottom(i); + rTextures[8][i + 1] = this.getTop(i); + rTextures[9][i + 1] = this.getSides(i); + } + return rTextures; + } + + protected boolean isAdvanced() { + return true; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, + final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 + : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + + 1]; + } + + public ITexture[] getFront(final byte aColor) { + return new ITexture[] { isAdvanced() ? new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Side) : new GT_RenderedTexture(TexturesGtBlock.Casing_Workbench_Side)}; + } + + public ITexture[] getBack(final byte aColor) { + return new ITexture[] { isAdvanced() ? new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Side) : new GT_RenderedTexture(TexturesGtBlock.Casing_Workbench_Side)}; + } + + public ITexture[] getBottom(final byte aColor) { + return new ITexture[] { isAdvanced() ? new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Bottom) : new GT_RenderedTexture(TexturesGtBlock.Casing_Workbench_Bottom)}; + } + + public ITexture[] getTop(final byte aColor) { + if (isAdvanced()) { + return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Top), + new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Crafting_Overlay) }; + } + else { + return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Workbench_Top), + new GT_RenderedTexture(TexturesGtBlock.Casing_Workbench_Crafting_Overlay) }; + } + } + + public ITexture[] getSides(final byte aColor) { + return new ITexture[] { isAdvanced() ? new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Side) : new GT_RenderedTexture(TexturesGtBlock.Casing_Workbench_Side)}; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_BronzeCraftingTable.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_BronzeCraftingTable.java new file mode 100644 index 0000000000..75d46cbb53 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_BronzeCraftingTable.java @@ -0,0 +1,91 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.storage; + +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.objects.GT_ItemStack; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.gui.workbench.GT_Container_BronzeWorkbench; +import gtPlusPlus.xmod.gregtech.api.gui.workbench.GT_GUIContainer_BronzeWorkbench; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; + +public class GT_MetaTileEntity_BronzeCraftingTable extends GT_MetaTileEntity_AdvancedCraftingTable { + + public GT_MetaTileEntity_BronzeCraftingTable(final int aID, final String aName, final String aNameRegional, final int aTier, final String aDescription) { + super(aID, aName, aNameRegional, aTier, aDescription); + } + + public GT_MetaTileEntity_BronzeCraftingTable(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + + @Override + public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_BronzeWorkbench(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_BronzeWorkbench(aPlayerInventory, aBaseMetaTileEntity, mLocalName); + } + + @Override + public boolean isTransformerUpgradable() { + return false; + } + + @Override + public boolean isInputFacing(byte aSide) { + return false; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_BronzeCraftingTable(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) { + return true; + } + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + + @SuppressWarnings("deprecation") + @Override + public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) { + return GregTech_API.getCoverBehavior(aStack.toStack()).isSimpleCover(); + } + + @Override + public int rechargerSlotStartIndex() { + return 0; + } + + @Override + public int rechargerSlotCount() { + return 0; + } + + @Override + public String[] getDescription() { + return new String[] { + "For the smaller Projects", + this.mDescription, + CORE.GT_Tooltip }; + } + + @Override + public int getCapacity() { + return 16000; + } + + @Override + protected boolean isAdvanced() { + return false; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java index 0817202e85..721dbd69c3 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java @@ -8,7 +8,14 @@ import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_TesseractTerminal; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GT4Entity_AutoCrafter; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GT4Entity_ThermalBoiler; -import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.*; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_AdvancedCraftingTable; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_BronzeCraftingTable; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.GT4Entity_Shelf; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.GT4Entity_Shelf_Compartment; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.GT4Entity_Shelf_Desk; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.GT4Entity_Shelf_FileCabinet; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.GT4Entity_Shelf_Iron; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.GT4Entity_Shelf_Large; public class Gregtech4Content { @@ -26,10 +33,10 @@ public class Gregtech4Content { private static void workbenches() { // Gregtech 4 Workbenches - //Utils.LOG_INFO("Gregtech 4 Content | Registering Workbenches."); - // Free //GregtechItemList.GT4_Workbench_Bronze.set(new - // GT_MetaTileEntity_BronzeCraftingTable(828, "workbench.bronze", - // "Bronze Workbench", 0).getStackForm(1L)); + Logger.INFO("Gregtech 4 Content | Registering Workbenches."); + GregtechItemList.GT4_Workbench_Bronze.set(new GT_MetaTileEntity_BronzeCraftingTable(29001, "workbench.basic", "Bronze Workbench", 0, "Stores 16000L of fluid").getStackForm(1L)); + GregtechItemList.GT4_Workbench_Advanced.set(new GT_MetaTileEntity_AdvancedCraftingTable(29002, "workbench.advanced", "Advanced Workbench", 3, "Stores 64000L of fluid").getStackForm(1L)); + } private static void tesseracts() { diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_bottom.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_bottom.png new file mode 100644 index 0000000000..faa25b4887 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_bottom.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_side.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_side.png new file mode 100644 index 0000000000..652245a61c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_side.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_top.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_top.png new file mode 100644 index 0000000000..568a7332ab Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_top.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_top_crafting.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_top_crafting.png new file mode 100644 index 0000000000..0e4219dbab Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/bronze_top_crafting.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_top_crafting.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_top_crafting.png new file mode 100644 index 0000000000..a8b157975c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/machine_top_crafting.png differ -- cgit From c7536873578a600131e5ca647fac664594efbfd3 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Sun, 9 Jan 2022 02:29:10 +0000 Subject: Ported some GT4 content: Added GT Crop Managers. Added GT Auto Crafting Tables. Added GT Inventory Managers. --- .../xmod/gregtech/api/enums/GregtechItemList.java | 28 + .../GT_Container_ElectricAutoWorkbench.java | 141 ++++ .../GT_Container_ElectricInventoryManager.java | 267 +++++++ .../GT_GUIContainer_ElectricAutoWorkbench.java | 59 ++ .../GT_GUIContainer_ElectricInventoryManager.java | 58 ++ .../api/gui/basic/GT_Container_CropHarvestor.java | 214 ++++++ .../gui/basic/GT_GUIContainer_CropHarvestor.java | 72 ++ .../common/blocks/textures/TexturesGtBlock.java | 45 ++ .../GT_MetaTileEntity_ElectricAutoWorkbench.java | 772 +++++++++++++++++++++ ...GT_MetaTileEntity_ElectricInventoryManager.java | 451 ++++++++++++ .../basic/GT_MetaTileEntity_CropHarvestor.java | 660 ++++++++++++++++++ .../GT_MetaTileEntity_AdvancedCraftingTable.java | 3 +- .../GT_MetaTileEntity_BronzeCraftingTable.java | 8 - .../registration/gregtech/Gregtech4Content.java | 42 +- .../blocks/TileEntities/gt4/OVERLAY_BLUE.png | Bin 0 -> 221 bytes .../TileEntities/gt4/OVERLAY_BLUE_REDSTONE.png | Bin 0 -> 243 bytes .../blocks/TileEntities/gt4/OVERLAY_BOXES.png | Bin 0 -> 203 bytes .../blocks/TileEntities/gt4/OVERLAY_CROP.png | Bin 0 -> 318 bytes .../blocks/TileEntities/gt4/OVERLAY_CYAN.png | Bin 0 -> 197 bytes .../TileEntities/gt4/OVERLAY_CYAN_REDSTONE.png | Bin 0 -> 226 bytes .../blocks/TileEntities/gt4/OVERLAY_GREEN.png | Bin 0 -> 204 bytes .../TileEntities/gt4/OVERLAY_GREEN_REDSTONE.png | Bin 0 -> 229 bytes .../blocks/TileEntities/gt4/OVERLAY_PURPLE.png | Bin 0 -> 190 bytes .../TileEntities/gt4/OVERLAY_PURPLE_REDSTONE.png | Bin 0 -> 208 bytes .../blocks/TileEntities/gt4/OVERLAY_RED.png | Bin 0 -> 209 bytes .../TileEntities/gt4/OVERLAY_RED_REDSTONE.png | Bin 0 -> 219 bytes .../TileEntities/gt4/OVERLAY_SIDE_CABINET.png | Bin 0 -> 416 bytes .../blocks/TileEntities/gt4/OVERLAY_YELLOW.png | Bin 0 -> 172 bytes .../TileEntities/gt4/OVERLAY_YELLOW_REDSTONE.png | Bin 0 -> 202 bytes .../assets/miscutils/textures/blocks/number/1.png | Bin 0 -> 682 bytes .../assets/miscutils/textures/blocks/number/10.png | Bin 0 -> 730 bytes .../assets/miscutils/textures/blocks/number/11.png | Bin 0 -> 663 bytes .../assets/miscutils/textures/blocks/number/12.png | Bin 0 -> 712 bytes .../assets/miscutils/textures/blocks/number/13.png | Bin 0 -> 745 bytes .../assets/miscutils/textures/blocks/number/14.png | Bin 0 -> 730 bytes .../assets/miscutils/textures/blocks/number/15.png | Bin 0 -> 734 bytes .../assets/miscutils/textures/blocks/number/16.png | Bin 0 -> 738 bytes .../assets/miscutils/textures/blocks/number/2.png | Bin 0 -> 732 bytes .../assets/miscutils/textures/blocks/number/3.png | Bin 0 -> 773 bytes .../assets/miscutils/textures/blocks/number/4.png | Bin 0 -> 739 bytes .../assets/miscutils/textures/blocks/number/5.png | Bin 0 -> 735 bytes .../assets/miscutils/textures/blocks/number/6.png | Bin 0 -> 752 bytes .../assets/miscutils/textures/blocks/number/7.png | Bin 0 -> 722 bytes .../assets/miscutils/textures/blocks/number/8.png | Bin 0 -> 767 bytes .../assets/miscutils/textures/blocks/number/9.png | Bin 0 -> 759 bytes .../miscutils/textures/gui/CropHarvestor.png | Bin 0 -> 3249 bytes .../textures/gui/ElectricAutoWorkbench.png | Bin 0 -> 5621 bytes .../miscutils/textures/gui/InventoryManager.png | Bin 0 -> 6812 bytes 48 files changed, 2809 insertions(+), 11 deletions(-) create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_Container_ElectricAutoWorkbench.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_Container_ElectricInventoryManager.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_GUIContainer_ElectricAutoWorkbench.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_GUIContainer_ElectricInventoryManager.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GT_Container_CropHarvestor.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GT_GUIContainer_CropHarvestor.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_ElectricAutoWorkbench.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_ElectricInventoryManager.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CropHarvestor.java create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_BLUE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_BLUE_REDSTONE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_BOXES.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_CROP.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_CYAN.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_CYAN_REDSTONE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_GREEN.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_GREEN_REDSTONE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_PURPLE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_PURPLE_REDSTONE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_RED.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_RED_REDSTONE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_SIDE_CABINET.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_YELLOW.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_YELLOW_REDSTONE.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/number/1.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/number/10.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/number/11.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/number/12.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/number/13.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/number/14.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/number/15.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/number/16.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/number/2.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/number/3.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/number/4.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/number/5.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/number/6.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/number/7.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/number/8.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/number/9.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/CropHarvestor.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/ElectricAutoWorkbench.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/InventoryManager.png (limited to 'src/main/resources/assets/miscutils/textures') diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java index c5c4de002d..8497c91ab1 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java @@ -532,6 +532,34 @@ public enum GregtechItemList implements GregtechItemContainer { //Gt4 Workbenches GT4_Workbench_Bronze, GT4_Workbench_Advanced, + + //GT4 automation + GT4_Electric_Auto_Workbench_LV, + GT4_Electric_Auto_Workbench_MV, + GT4_Electric_Auto_Workbench_HV, + GT4_Electric_Auto_Workbench_EV, + GT4_Electric_Auto_Workbench_IV, + GT4_Electric_Auto_Workbench_LuV, + GT4_Electric_Auto_Workbench_ZPM, + GT4_Electric_Auto_Workbench_UV, + GT4_Electric_Inventory_Manager_LV, + GT4_Electric_Inventory_Manager_MV, + GT4_Electric_Inventory_Manager_HV, + GT4_Electric_Inventory_Manager_EV, + GT4_Electric_Inventory_Manager_IV, + GT4_Electric_Inventory_Manager_LuV, + GT4_Electric_Inventory_Manager_ZPM, + GT4_Electric_Inventory_Manager_UV, + + //GT4 Crop Harvester + GT4_Crop_Harvester_LV, + GT4_Crop_Harvester_MV, + GT4_Crop_Harvester_HV, + GT4_Crop_Harvester_EV, + GT4_Crop_Harvester_IV, + GT4_Crop_Harvester_LuV, + GT4_Crop_Harvester_ZPM, + GT4_Crop_Harvester_UV, //Geothermal Engines diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_Container_ElectricAutoWorkbench.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_Container_ElectricAutoWorkbench.java new file mode 100644 index 0000000000..1af597c05a --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_Container_ElectricAutoWorkbench.java @@ -0,0 +1,141 @@ +package gtPlusPlus.xmod.gregtech.api.gui.automation; + +import com.google.gson.JsonObject; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.gui.GT_Slot_Holo; +import gregtech.api.gui.GT_Slot_Output; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_ElectricAutoWorkbench; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_CropHarvestor; +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_ElectricAutoWorkbench extends GT_ContainerMetaTile_Machine { + + public int mMode; + public int mThroughPut; + + public GT_Container_ElectricAutoWorkbench(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + public void addSlots(InventoryPlayer aInventoryPlayer) { + addSlotToContainer(new Slot(mTileEntity, 0, 8, 5)); + addSlotToContainer(new Slot(mTileEntity, 1, 26, 5)); + addSlotToContainer(new Slot(mTileEntity, 2, 44, 5)); + addSlotToContainer(new Slot(mTileEntity, 3, 8, 23)); + addSlotToContainer(new Slot(mTileEntity, 4, 26, 23)); + addSlotToContainer(new Slot(mTileEntity, 5, 44, 23)); + addSlotToContainer(new Slot(mTileEntity, 6, 8, 41)); + addSlotToContainer(new Slot(mTileEntity, 7, 26, 41)); + addSlotToContainer(new Slot(mTileEntity, 8, 44, 41)); + + addSlotToContainer(new GT_Slot_Output(mTileEntity, 9, 8, 60)); + addSlotToContainer(new GT_Slot_Output(mTileEntity, 10, 26, 60)); + addSlotToContainer(new GT_Slot_Output(mTileEntity, 11, 44, 60)); + addSlotToContainer(new GT_Slot_Output(mTileEntity, 12, 62, 60)); + addSlotToContainer(new GT_Slot_Output(mTileEntity, 13, 80, 60)); + addSlotToContainer(new GT_Slot_Output(mTileEntity, 14, 98, 60)); + addSlotToContainer(new GT_Slot_Output(mTileEntity, 15, 116, 60)); + addSlotToContainer(new GT_Slot_Output(mTileEntity, 16, 134, 60)); + addSlotToContainer(new GT_Slot_Output(mTileEntity, 17, 152, 60)); + + addSlotToContainer(new GT_Slot_Output(mTileEntity, 18, 152, 41)); + + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 19, 64, 6, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 20, 81, 6, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 21, 98, 6, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 22, 64, 23, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 23, 81, 23, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 24, 98, 23, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 25, 64, 40, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 26, 81, 40, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 27, 98, 40, false, false, 1)); + + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 28, 152, 5, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 29, 121, 41, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 29, 121, 5, false, false, 1)); + } + + public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { + if (aSlotIndex < 18) return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + + Slot tSlot = (Slot)inventorySlots.get(aSlotIndex); + if (tSlot != null) { + if (mTileEntity.getMetaTileEntity() == null) return null; + if (aSlotIndex > 18 && aSlotIndex < 28) { + ItemStack tStack = aPlayer.inventory.getItemStack(); + if (tStack != null) { + tStack = GT_Utility.copy(1, tStack); + } + tSlot.putStack(tStack); + return null; + } + if (aSlotIndex == 28) return null; + if (aSlotIndex == 29) { + if (aMouseclick == 0) { + ((GT_MetaTileEntity_ElectricAutoWorkbench)mTileEntity.getMetaTileEntity()).switchModeForward(); + } else { + ((GT_MetaTileEntity_ElectricAutoWorkbench)mTileEntity.getMetaTileEntity()).switchModeBackward(); + } + return null; + } + if (aSlotIndex == 30) { + ((GT_MetaTileEntity_ElectricAutoWorkbench)mTileEntity.getMetaTileEntity()).switchThrough(); + return null; + } + } + + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + + public int getSlotCount() { + return 19; + } + + public int getShiftClickSlotCount() { + return 9; + } + + @Override + public void detectAndSendChanges() { + super.detectAndSendChanges(); + if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) { + return; + } + mMode = ((GT_MetaTileEntity_ElectricAutoWorkbench) mTileEntity.getMetaTileEntity()).mMode; + mThroughPut = ((GT_MetaTileEntity_ElectricAutoWorkbench) mTileEntity.getMetaTileEntity()).mThroughPut; + for (Object crafter : this.crafters) { + ICrafting var1 = (ICrafting) crafter; + var1.sendProgressBarUpdate(this, 103, this.mMode); + var1.sendProgressBarUpdate(this, 104, this.mThroughPut); + } + } + + @Override + public void addCraftingToCrafters(ICrafting par1ICrafting) { + super.addCraftingToCrafters(par1ICrafting); + } + + @Override + @SideOnly(Side.CLIENT) + public void updateProgressBar(int par1, int par2) { + super.updateProgressBar(par1, par2); + switch (par1) { + case 103: + this.mMode = par2; + break; + case 104: + this.mThroughPut = par2; + break; + } + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_Container_ElectricInventoryManager.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_Container_ElectricInventoryManager.java new file mode 100644 index 0000000000..3e8f509dfd --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_Container_ElectricInventoryManager.java @@ -0,0 +1,267 @@ +package gtPlusPlus.xmod.gregtech.api.gui.automation; + +import java.util.Iterator; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.gui.GT_Slot_Holo; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_ElectricInventoryManager; +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; +import net.minecraftforge.oredict.OreDictionary; + +public class GT_Container_ElectricInventoryManager extends GT_ContainerMetaTile_Machine { + + public int[] mTargetDirections = new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + public int[] mRangeDirections = new int[]{0, 0, 0, 0}; + public int mTargetInOut; + public int mTargetEnergy; + + public GT_Container_ElectricInventoryManager(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + public void addSlots(InventoryPlayer aInventoryPlayer) { + addSlotToContainer(new Slot(mTileEntity, 0, 155, 5)); + addSlotToContainer(new Slot(mTileEntity, 1, 155, 23)); + addSlotToContainer(new Slot(mTileEntity, 2, 155, 41)); + + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 3, 5, 5, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 4, 5, 23, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 5, 5, 41, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 6, 61, 5, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 7, 61, 23, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 8, 61, 41, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 9, 80, 5, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 10, 80, 23, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 11, 80, 41, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 12, 136, 5, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 13, 136, 23, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 14, 136, 41, false, true, 1)); + + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 24, 5, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 24, 23, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 24, 41, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 42, 5, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 42, 23, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 42, 41, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 99, 5, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 99, 23, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 99, 41, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 117, 5, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 117, 23, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 117, 41, false, true, 1)); + + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 24, 60, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 42, 60, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 99, 60, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 117, 60, false, true, 1)); + + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 5, 60, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 61, 60, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 80, 60, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 15, 136, 60, false, true, 1)); + } + + public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { + if (aSlotIndex < 3 || aSlotIndex >= getAllSlotCount()) + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + Slot tSlot = (Slot) inventorySlots.get(aSlotIndex); + if (tSlot != null) { + if (mTileEntity.getMetaTileEntity() == null) + return null; + if (aSlotIndex < 15) { + ItemStack tStack = aPlayer.inventory.getItemStack(); + if (tStack != null) { + tStack = GT_Utility.copy(tStack); + if (aMouseclick != 0) { + tStack.setItemDamage(OreDictionary.WILDCARD_VALUE); + } + tSlot.putStack(tStack); + } + else { + if (tSlot.getStack() != null) { + if (aMouseclick == 0) { + tSlot.getStack().stackSize -= (aShifthold == 1 ? 8 : 1); + if (tSlot.getStack().stackSize <= 0) { + tSlot.putStack(null); + } + } + else { + tSlot.getStack().stackSize += (aShifthold == 1 ? 8 : 1); + if (tSlot.getStack().stackSize > tSlot.getStack().getMaxStackSize()) { + tSlot.getStack().stackSize = tSlot.getStack().getMaxStackSize(); + } + } + } + } + return null; + } + else if (aSlotIndex >= 27 && aSlotIndex <= 30) { + ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).iterateRangeDirection(aSlotIndex - 27); + } + else if (aSlotIndex >= 31 && aSlotIndex <= 34) { + ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).switchRangeEnergy(aSlotIndex - 31); + } + else if (aSlotIndex % 3 == 0) { + if (aMouseclick != 0) + ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).switchSlot1InOut((aSlotIndex - 15) / 3); + else + ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).iterateSlot1Direction((aSlotIndex - 15) / 3); + } + else if (aSlotIndex % 3 == 1) { + if (aMouseclick != 0) + ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).switchSlot2InOut((aSlotIndex - 16) / 3); + else + ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).iterateSlot2Direction((aSlotIndex - 16) / 3); + } + else if (aSlotIndex % 3 == 2) { + if (aMouseclick != 0) + ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).switchSlot3InOut((aSlotIndex - 17) / 3); + else + ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).iterateSlot3Direction((aSlotIndex - 17) / 3); + } + } + return null; + } + + public void detectAndSendChanges() { + super.detectAndSendChanges(); + if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) { + return; + } + mTargetDirections = new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + mRangeDirections = new int[]{0, 0, 0, 0}; + + mRangeDirections[0] = ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getRangeDirection(0); + mRangeDirections[1] = ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getRangeDirection(1); + mRangeDirections[2] = ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getRangeDirection(2); + mRangeDirections[3] = ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getRangeDirection(3); + + mTargetDirections[0] = ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot1Direction(0); + mTargetDirections[1] = ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot2Direction(0); + mTargetDirections[2] = ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot3Direction(0); + mTargetDirections[3] = ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot1Direction(1); + mTargetDirections[4] = ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot2Direction(1); + mTargetDirections[5] = ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot3Direction(1); + mTargetDirections[6] = ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot1Direction(2); + mTargetDirections[7] = ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot2Direction(2); + mTargetDirections[8] = ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot3Direction(2); + mTargetDirections[9] = ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot1Direction(3); + mTargetDirections[10] = ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot2Direction(3); + mTargetDirections[11] = ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot3Direction(3); + + mTargetInOut = 0; + mTargetInOut |= ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot1InOut(0) ? 1 << 0 : 0; + mTargetInOut |= ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot2InOut(0) ? 1 << 1 : 0; + mTargetInOut |= ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot3InOut(0) ? 1 << 2 : 0; + mTargetInOut |= ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot1InOut(1) ? 1 << 3 : 0; + mTargetInOut |= ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot2InOut(1) ? 1 << 4 : 0; + mTargetInOut |= ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot3InOut(1) ? 1 << 5 : 0; + mTargetInOut |= ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot1InOut(2) ? 1 << 6 : 0; + mTargetInOut |= ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot2InOut(2) ? 1 << 7 : 0; + mTargetInOut |= ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot3InOut(2) ? 1 << 8 : 0; + mTargetInOut |= ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot1InOut(3) ? 1 << 9 : 0; + mTargetInOut |= ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot2InOut(3) ? 1 << 10 : 0; + mTargetInOut |= ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getSlot3InOut(3) ? 1 << 11 : 0; + + mTargetEnergy = 0; + mTargetEnergy |= ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getRangeEnergy(0) ? 1 << 0 : 0; + mTargetEnergy |= ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getRangeEnergy(1) ? 1 << 1 : 0; + mTargetEnergy |= ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getRangeEnergy(2) ? 1 << 2 : 0; + mTargetEnergy |= ((GT_MetaTileEntity_ElectricInventoryManager) mTileEntity.getMetaTileEntity()).getRangeEnergy(3) ? 1 << 3 : 0; + + Iterator var2 = this.crafters.iterator(); + while (var2.hasNext()) { + ICrafting var1 = (ICrafting) var2.next(); + for (int i = 0; i < 12; i++) + var1.sendProgressBarUpdate(this, 100 + i, mTargetDirections[i]); + var1.sendProgressBarUpdate(this, 113, mTargetInOut); + var1.sendProgressBarUpdate(this, 114, mTargetEnergy); + for (int i = 0; i < 4; i++) + var1.sendProgressBarUpdate(this, 115 + i, mRangeDirections[i]); + } + } + + @Override + public void addCraftingToCrafters(ICrafting par1ICrafting) { + super.addCraftingToCrafters(par1ICrafting); + } + + @Override + @SideOnly(Side.CLIENT) + public void updateProgressBar(int par1, int par2) { + super.updateProgressBar(par1, par2); + switch (par1) { + case 100 : + mTargetDirections[0] = par2; + break; + case 101 : + mTargetDirections[1] = par2; + break; + case 102 : + mTargetDirections[2] = par2; + break; + case 103 : + mTargetDirections[3] = par2; + break; + case 104 : + mTargetDirections[4] = par2; + break; + case 105 : + mTargetDirections[5] = par2; + break; + case 106 : + mTargetDirections[6] = par2; + break; + case 107 : + mTargetDirections[7] = par2; + break; + case 108 : + mTargetDirections[8] = par2; + break; + case 109 : + mTargetDirections[9] = par2; + break; + case 110 : + mTargetDirections[10] = par2; + break; + case 111 : + mTargetDirections[11] = par2; + break; + + case 113 : + mTargetInOut = par2; + break; + case 114 : + mTargetEnergy = par2; + break; + case 115 : + mRangeDirections[0] = par2; + break; + case 116 : + mRangeDirections[1] = par2; + break; + case 117 : + mRangeDirections[2] = par2; + break; + case 118 : + mRangeDirections[3] = par2; + break; + } + } + + public int getSlotCount() { + return 3; + } + + public int getShiftClickSlotCount() { + return 3; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_GUIContainer_ElectricAutoWorkbench.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_GUIContainer_ElectricAutoWorkbench.java new file mode 100644 index 0000000000..7d381c0e8a --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_GUIContainer_ElectricAutoWorkbench.java @@ -0,0 +1,59 @@ +package gtPlusPlus.xmod.gregtech.api.gui.automation; + +import java.util.ArrayList; +import java.util.List; + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.gui.basic.GT_Container_CropHarvestor; +import net.minecraft.entity.player.InventoryPlayer; + +public class GT_GUIContainer_ElectricAutoWorkbench extends GT_GUIContainerMetaTile_Machine { + + private static final String[] mModeText = new String[] {"Normal Crafting Table", "???", "1x1", "2x2", "3x3", "Unifier", "Dust", "???", "Hammer?", "Circle"}; + + public GT_GUIContainer_ElectricAutoWorkbench(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(new GT_Container_ElectricAutoWorkbench(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + "ElectricAutoWorkbench.png"); + } + + @Override + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + drawTooltip(par1, par2); + } + + @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) { + int tMode = ((GT_Container_ElectricAutoWorkbench)mContainer).mMode; + if (tMode != 0) drawTexturedModalRect(x + 120, y + 40, tMode*18, 166, 18, 18); + tMode = ((GT_Container_ElectricAutoWorkbench)mContainer).mThroughPut; + drawTexturedModalRect(x + 120, y + 4, tMode*18, 184, 18, 18); + } + } + + private void drawTooltip(final int x2, final int y2) { + final int xStart = (this.width - this.xSize) / 2; + final int yStart = (this.height - this.ySize) / 2; + final int x3 = x2 - xStart; + final int y3 = y2 - yStart + 5; + List list = new ArrayList<>(); + String[] mModeText = new String[] {"Normal Crafting Table", "???", "1x1", "2x2", "3x3", "Unifier", "Dust", "???", "Hammer?", "Circle"}; + if (y3 >= 45 && y3 <= 62) { + if (x3 >= 120 && x3 <= 137) { + list.add("Mode: "+mModeText[((GT_Container_ElectricAutoWorkbench) mContainer).mMode]); + /*switch (((GT_Container_ElectricAutoWorkbench) mContainer).mMode) { + case 0: + list.add("Mode: "); + }*/ + } + } + if (!list.isEmpty()) + drawHoveringText(list, x3, y3, fontRendererObj); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_GUIContainer_ElectricInventoryManager.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_GUIContainer_ElectricInventoryManager.java new file mode 100644 index 0000000000..cf57d3faf1 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/automation/GT_GUIContainer_ElectricInventoryManager.java @@ -0,0 +1,58 @@ +package gtPlusPlus.xmod.gregtech.api.gui.automation; + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.entity.player.InventoryPlayer; + +public class GT_GUIContainer_ElectricInventoryManager extends GT_GUIContainerMetaTile_Machine { + + public GT_GUIContainer_ElectricInventoryManager(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(new GT_Container_ElectricInventoryManager(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + "InventoryManager.png"); + } + + @Override + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + + } + + @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) { + drawTexturedModalRect(x + 4, y + 4, ((GT_Container_ElectricInventoryManager)mContainer).mRangeDirections[0]*18, 202, 18, 54); + drawTexturedModalRect(x + 60, y + 4, ((GT_Container_ElectricInventoryManager)mContainer).mRangeDirections[1]*18, 202, 18, 54); + drawTexturedModalRect(x + 79, y + 4, ((GT_Container_ElectricInventoryManager)mContainer).mRangeDirections[2]*18, 202, 18, 54); + drawTexturedModalRect(x + 135, y + 4, ((GT_Container_ElectricInventoryManager)mContainer).mRangeDirections[3]*18, 202, 18, 54); + + drawTexturedModalRect(x + 23, y + 59, ((GT_Container_ElectricInventoryManager)mContainer).mRangeDirections[0]*18+126, 166, 18, 18); + drawTexturedModalRect(x + 41, y + 59, ((GT_Container_ElectricInventoryManager)mContainer).mRangeDirections[1]*18+126, 166, 18, 18); + drawTexturedModalRect(x + 98, y + 59, ((GT_Container_ElectricInventoryManager)mContainer).mRangeDirections[2]*18+126, 166, 18, 18); + drawTexturedModalRect(x + 116, y + 59, ((GT_Container_ElectricInventoryManager)mContainer).mRangeDirections[3]*18+126, 166, 18, 18); + + drawTexturedModalRect(x + 4, y + 59, 108, (((GT_Container_ElectricInventoryManager)mContainer).mTargetEnergy & 1)!=0?184:166, 18, 18); + drawTexturedModalRect(x + 60, y + 59, 108, (((GT_Container_ElectricInventoryManager)mContainer).mTargetEnergy & 2)!=0?184:166, 18, 18); + drawTexturedModalRect(x + 79, y + 59, 108, (((GT_Container_ElectricInventoryManager)mContainer).mTargetEnergy & 4)!=0?184:166, 18, 18); + drawTexturedModalRect(x + 135, y + 59, 108, (((GT_Container_ElectricInventoryManager)mContainer).mTargetEnergy & 8)!=0?184:166, 18, 18); + + int i = -1; + + drawTexturedModalRect(x + 23, y + 4, ((GT_Container_ElectricInventoryManager)mContainer).mTargetDirections[++i]*18, (((GT_Container_ElectricInventoryManager)mContainer).mTargetInOut&(1< 0) { + drawTexturedModalRect(x + 47, y + 61 - tScale, 204, 54 - tScale, 10, tScale); + }; + + } + + private void drawTooltip(int x2, int y2) { + int xStart = (width - xSize) / 2; + int yStart = (height - ySize) / 2; + int x = x2 - xStart; + int y = y2 - yStart + 5; + List list = new ArrayList<>(); + if (y >= 68 && y <= 85) { + if (x >= 47 && x <= 64) { + if (((GT_Container_CropHarvestor) mContainer).mModeAlternative) { + list.add("Disable Hydration/Fertilizing/Weed-EX"); + } + else { + list.add("Enable Hydration/Fertilizing/Weed-EX"); + } + } + } + if (y >= 12 && y <= 66) { + if (x >= 47 && x <= 56) { + int aWater = ((GT_Container_CropHarvestor) mContainer).mWaterRealAmount; + list.add("Water: "+aWater+"L / "+((GT_Container_CropHarvestor) mContainer).mTileEntity.getMetaTileEntity().getCapacity()+"L"); + } + } + if (!list.isEmpty()) + drawHoveringText(list, x, y, fontRendererObj); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java index 7653224fd2..8195837a65 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java @@ -414,6 +414,51 @@ public class TexturesGtBlock { public static final CustomIcon Casing_Adv_Workbench_Side = new CustomIcon("TileEntities/gt4/machine_side"); public static final CustomIcon Casing_Adv_Workbench_Bottom = new CustomIcon("TileEntities/gt4/machine_bottom"); + + public static final CustomIcon Casing_Electric_Auto_Workbench_Side = new CustomIcon("TileEntities/gt4/OVERLAY_SIDE_CABINET"); + + public static final CustomIcon Casing_CropHarvester_Cutter = new CustomIcon("TileEntities/gt4/OVERLAY_CROP"); + public static final CustomIcon Casing_CropHarvester_Boxes = new CustomIcon("TileEntities/gt4/OVERLAY_BOXES"); + + public static final CustomIcon Casing_InventoryManagaer_Cyan = new CustomIcon("TileEntities/gt4/OVERLAY_CYAN"); + public static final CustomIcon Casing_InventoryManagaer_Green = new CustomIcon("TileEntities/gt4/OVERLAY_GREEN"); + public static final CustomIcon Casing_InventoryManagaer_Purple = new CustomIcon("TileEntities/gt4/OVERLAY_PURPLE"); + public static final CustomIcon Casing_InventoryManagaer_Red = new CustomIcon("TileEntities/gt4/OVERLAY_RED"); + public static final CustomIcon Casing_InventoryManagaer_Yellow = new CustomIcon("TileEntities/gt4/OVERLAY_YELLOW"); + public static final CustomIcon Casing_InventoryManagaer_Blue = new CustomIcon("TileEntities/gt4/OVERLAY_BLUE"); + + public static final CustomIcon Casing_InventoryManagaer_Cyan_Redstone = new CustomIcon("TileEntities/gt4/OVERLAY_CYAN_REDSTONE"); + public static final CustomIcon Casing_InventoryManagaer_Green_Redstone = new CustomIcon("TileEntities/gt4/OVERLAY_GREEN_REDSTONE"); + public static final CustomIcon Casing_InventoryManagaer_Purple_Redstone = new CustomIcon("TileEntities/gt4/OVERLAY_PURPLE_REDSTONE"); + public static final CustomIcon Casing_InventoryManagaer_Red_Redstone = new CustomIcon("TileEntities/gt4/OVERLAY_RED_REDSTONE"); + public static final CustomIcon Casing_InventoryManagaer_Yellow_Redstone = new CustomIcon("TileEntities/gt4/OVERLAY_YELLOW_REDSTONE"); + public static final CustomIcon Casing_InventoryManagaer_Blue_Redstone = new CustomIcon("TileEntities/gt4/OVERLAY_BLUE_REDSTONE"); + + private static final CustomIcon Casing_Test_1 = new CustomIcon("number/1"); + private static final CustomIcon Casing_Test_2 = new CustomIcon("number/2"); + private static final CustomIcon Casing_Test_3 = new CustomIcon("number/3"); + private static final CustomIcon Casing_Test_4 = new CustomIcon("number/4"); + private static final CustomIcon Casing_Test_5 = new CustomIcon("number/5"); + private static final CustomIcon Casing_Test_6 = new CustomIcon("number/6"); + private static final CustomIcon Casing_Test_7 = new CustomIcon("number/7"); + private static final CustomIcon Casing_Test_8 = new CustomIcon("number/8"); + private static final CustomIcon Casing_Test_9 = new CustomIcon("number/9"); + private static final CustomIcon Casing_Test_10 = new CustomIcon("number/10"); + private static final CustomIcon Casing_Test_11 = new CustomIcon("number/11"); + private static final CustomIcon Casing_Test_12 = new CustomIcon("number/12"); + private static final CustomIcon Casing_Test_13 = new CustomIcon("number/13"); + private static final CustomIcon Casing_Test_14 = new CustomIcon("number/14"); + private static final CustomIcon Casing_Test_15 = new CustomIcon("number/15"); + private static final CustomIcon Casing_Test_16 = new CustomIcon("number/16"); + + public static final CustomIcon[] TEST_NUMBER = new CustomIcon[] { + Casing_Test_1, Casing_Test_2, Casing_Test_3, Casing_Test_4, + Casing_Test_5, Casing_Test_6, Casing_Test_7, Casing_Test_8, + Casing_Test_9, Casing_Test_10, Casing_Test_11, Casing_Test_12, + Casing_Test_13, Casing_Test_14, Casing_Test_15, Casing_Test_16 + + }; + //Covers private static final CustomIcon Internal_Overlay_Overflow_Valve = new CustomIcon("iconsets/OVERLAY_OVERFLOW_VALVE"); public static final CustomIcon Overlay_Overflow_Valve = Internal_Overlay_Overflow_Valve; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_ElectricAutoWorkbench.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_ElectricAutoWorkbench.java new file mode 100644 index 0000000000..7b223f8245 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_ElectricAutoWorkbench.java @@ -0,0 +1,772 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.automation; + +import java.util.ArrayList; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.Textures; +import gregtech.api.enums.Textures.BlockIcons; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.gui.automation.GT_Container_ElectricAutoWorkbench; +import gtPlusPlus.xmod.gregtech.api.gui.automation.GT_GUIContainer_ElectricAutoWorkbench; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.oredict.OreDictionary; + +public class GT_MetaTileEntity_ElectricAutoWorkbench extends GT_MetaTileEntity_BasicTank { + + public int mMode = 0, mCurrentSlot = 0, mThroughPut = 0, mTicksUntilNextUpdate = 20; + public boolean mLastCraftSuccessful = false; + protected String mLocalName; + + public GT_MetaTileEntity_ElectricAutoWorkbench(final int aID, final int aTier, final String aDescription) { + super(aID, "basicmachine.automation.autoworkbench.0"+aTier, "Auto Workbench ("+GT_Values.VN[aTier]+")", aTier, 30, aDescription); + mLocalName = "Auto Workbench ("+GT_Values.VN[aTier]+")"; + } + + public GT_MetaTileEntity_ElectricAutoWorkbench(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) { + super(aName, aTier, 30, aDescription, aTextures); + } + + @Override + public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_ElectricAutoWorkbench(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_ElectricAutoWorkbench(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public boolean isTransformerUpgradable() { + return true; + } + + @Override + public boolean isOverclockerUpgradable() { + return false; + } + + @Override + public boolean isSimpleMachine() { + return false; + } + + @Override + public boolean isValidSlot(int aIndex) { + return aIndex < 19; + } + + @Override + public boolean isFacingValid(byte aFacing) { + return true; + } + + @Override + public boolean isEnetInput() { + return true; + } + + @Override + public boolean isEnetOutput() { + return true; + } + + @Override + public boolean isInputFacing(byte aSide) { + return !isOutputFacing(aSide); + } + + @Override + public boolean isOutputFacing(byte aSide) { + return aSide == getBaseMetaTileEntity().getBackFacing(); + } + + @Override + public boolean isTeleporterCompatible() { + return false; + } + + @Override + public long maxEUInput() { + return GT_Values.V[mTier]; + } + + @Override + public long maxEUOutput() { + return mThroughPut % 2 == 0 ? GT_Values.V[mTier] : 0; + } + + @Override + public long getMinimumStoredEU() { + return GT_Values.V[this.mTier]; + } + + @Override + public long maxEUStore() { + return GT_Values.V[this.mTier] * (this.mTier * GT_Values.V[this.mTier]); + } + + @Override + public int getSizeInventory() { + return 30; + } + + @Override + public boolean isAccessAllowed(EntityPlayer aPlayer) { + return true; + } + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) { + return true; + } + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_ElectricAutoWorkbench(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setInteger("mMode", mMode); + aNBT.setInteger("mThroughPut", mThroughPut); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + mMode = aNBT.getInteger("mMode"); + mThroughPut = aNBT.getInteger("mThroughPut"); + } + + @Override + public boolean doesFillContainers() { + return false; + } + + @Override + public boolean doesEmptyContainers() { + return false; + } + + @Override + public boolean canTankBeFilled() { + return true; + } + + @Override + public boolean canTankBeEmptied() { + return true; + } + + @Override + public boolean displaysItemStack() { + return false; + } + + @Override + public boolean displaysStackSize() { + return false; + } + + @Override + public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) { + return aSide != getBaseMetaTileEntity().getFrontFacing() && aSide != getBaseMetaTileEntity().getBackFacing(); + } + + private static final int MAX_MODES = 10; + + public void switchModeForward() { + mMode = (mMode + 1) % MAX_MODES; + switchMode(); + } + + public void switchModeBackward() { + mMode--; + if (mMode < 0) mMode = MAX_MODES-1; + switchMode(); + } + + private void switchMode() { + mInventory[28] = null; + } + + public void switchThrough() { + mThroughPut = (mThroughPut + 1) % 4; + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + if (getBaseMetaTileEntity().isAllowedToWork() && getBaseMetaTileEntity().isServerSide() && getBaseMetaTileEntity().getUniversalEnergyStored() >= (mMode==5||mMode==6?128:2048) && (getBaseMetaTileEntity().hasWorkJustBeenEnabled() || --mTicksUntilNextUpdate<1)) { + mTicksUntilNextUpdate = 32; + + for (byte i = 19; i < 28; i++) { + if (mInventory[i] != null && mInventory[i].isItemStackDamageable() && mInventory[i].getItem().hasContainerItem()) { + mInventory[i].setItemDamage(OreDictionary.WILDCARD_VALUE); + } + } + + if (mInventory[18] == null) { + for (byte i = 0; i < 18 && mFluid != null; i++) { + ItemStack tOutput = GT_Utility.fillFluidContainer(mFluid, mInventory[i], false, true); + if (tOutput != null) { + for (byte j = 0; j < 9; j++) { + if (mInventory[j] == null || (GT_Utility.areStacksEqual(tOutput, mInventory[j]) && mInventory[j].stackSize + tOutput.stackSize <= tOutput.getMaxStackSize())) { + mFluid.amount -= GT_Utility.getFluidForFilledItem(tOutput, true).amount * tOutput.stackSize; + getBaseMetaTileEntity().decrStackSize(i, 1); + if (mInventory[j] == null) { + mInventory[j] = tOutput; + } else { + mInventory[j].stackSize++; + } + if (mFluid.amount <= 0) mFluid = null; + break; + } + } + } + } + + ItemStack[] tRecipe = new ItemStack[9]; + ItemStack tTempStack = null, tOutput = null; + + if (mInventory[17] != null && mThroughPut < 2 && mMode != 0) { + if (mInventory[18] == null) { + mInventory[18] = mInventory[17]; + mInventory[17] = null; + } + } else { + if (!mLastCraftSuccessful) { + mCurrentSlot = (mCurrentSlot+1)%18; + for (int i = 0; i < 17 && mInventory[mCurrentSlot] == null; i++) + mCurrentSlot = (mCurrentSlot+1)%18; + } + switch (mMode) { + case 0: + if (mInventory[mCurrentSlot] != null && !isItemTypeOrItsEmptyLiquidContainerInCraftingGrid(mInventory[mCurrentSlot])) { + if (mInventory[18] == null && mThroughPut < 2 && mCurrentSlot < 8) { + mInventory[18] = mInventory[mCurrentSlot]; + mInventory[mCurrentSlot] = null; + mTicksUntilNextUpdate = 1; + } + break; + } + for (int i = 0; i < 9; i++) { + tRecipe[i] = mInventory[i+19]; + if (tRecipe[i] != null) { + tRecipe[i] = GT_Utility.copy(tRecipe[i]); + tRecipe[i].stackSize = 1; + } + } + break; + case 1: + if (isItemTypeOrItsEmptyLiquidContainerInCraftingGrid(mInventory[mCurrentSlot])) { + if (mInventory[18] == null && mThroughPut < 2) { + mInventory[18] = mInventory[mCurrentSlot]; + mInventory[mCurrentSlot] = null; + mTicksUntilNextUpdate = 1; + } + break; + } + tTempStack = GT_Utility.copy(mInventory[mCurrentSlot]); + tTempStack.stackSize = 1; + tRecipe[0] = tTempStack; + if (GT_ModHandler.getAllRecipeOutput(getBaseMetaTileEntity().getWorld(), tRecipe) == null) { + tRecipe[1] = tTempStack; + tRecipe[3] = tTempStack; + tRecipe[4] = tTempStack; + } else break; + if (GT_ModHandler.getAllRecipeOutput(getBaseMetaTileEntity().getWorld(), tRecipe) == null) { + tRecipe[2] = tTempStack; + tRecipe[5] = tTempStack; + tRecipe[6] = tTempStack; + tRecipe[7] = tTempStack; + tRecipe[8] = tTempStack; + } else break; + if (GT_ModHandler.getAllRecipeOutput(getBaseMetaTileEntity().getWorld(), tRecipe) == null) { + if (mInventory[18] == null) { + mInventory[18] = mInventory[mCurrentSlot]; + mInventory[mCurrentSlot] = null; + mTicksUntilNextUpdate = 1; + } + break; + } + break; + case 2: + if (isItemTypeOrItsEmptyLiquidContainerInCraftingGrid(mInventory[mCurrentSlot])) { + if (mInventory[18] == null && mThroughPut < 2) { + mInventory[18] = mInventory[mCurrentSlot]; + mInventory[mCurrentSlot] = null; + mTicksUntilNextUpdate = 1; + } + break; + } + tTempStack = GT_Utility.copy(mInventory[mCurrentSlot]); + tTempStack.stackSize = 1; + tRecipe[0] = tTempStack; + if (GT_ModHandler.getAllRecipeOutput(getBaseMetaTileEntity().getWorld(), tRecipe) == null) { + if (mInventory[18] == null) { + mInventory[18] = mInventory[mCurrentSlot]; + mInventory[mCurrentSlot] = null; + mTicksUntilNextUpdate = 1; + } + break; + } + break; + case 3: + if (isItemTypeOrItsEmptyLiquidContainerInCraftingGrid(mInventory[mCurrentSlot])) { + if (mInventory[18] == null && mThroughPut < 2) { + mInventory[18] = mInventory[mCurrentSlot]; + mInventory[mCurrentSlot] = null; + mTicksUntilNextUpdate = 1; + } + break; + } + tTempStack = GT_Utility.copy(mInventory[mCurrentSlot]); + tTempStack.stackSize = 1; + tRecipe[0] = tTempStack; + tRecipe[1] = tTempStack; + tRecipe[3] = tTempStack; + tRecipe[4] = tTempStack; + if (GT_ModHandler.getAllRecipeOutput(getBaseMetaTileEntity().getWorld(), tRecipe) == null) { + if (mInventory[18] == null) { + mInventory[18] = mInventory[mCurrentSlot]; + mInventory[mCurrentSlot] = null; + mTicksUntilNextUpdate = 1; + } + break; + } + break; + case 4: + if (isItemTypeOrItsEmptyLiquidContainerInCraftingGrid(mInventory[mCurrentSlot])) { + if (mInventory[18] == null && mThroughPut < 2) { + mInventory[18] = mInventory[mCurrentSlot]; + mInventory[mCurrentSlot] = null; + mTicksUntilNextUpdate = 1; + } + break; + } + tTempStack = GT_Utility.copy(mInventory[mCurrentSlot]); + tTempStack.stackSize = 1; + tRecipe[0] = tTempStack; + tRecipe[1] = tTempStack; + tRecipe[2] = tTempStack; + tRecipe[3] = tTempStack; + tRecipe[4] = tTempStack; + tRecipe[5] = tTempStack; + tRecipe[6] = tTempStack; + tRecipe[7] = tTempStack; + tRecipe[8] = tTempStack; + if (GT_ModHandler.getAllRecipeOutput(getBaseMetaTileEntity().getWorld(), tRecipe) == null) { + if (mInventory[18] == null) { + mInventory[18] = mInventory[mCurrentSlot]; + mInventory[mCurrentSlot] = null; + mTicksUntilNextUpdate = 1; + } + break; + } + break; + case 5: + if (isItemTypeOrItsEmptyLiquidContainerInCraftingGrid(mInventory[mCurrentSlot])) { + if (mInventory[18] == null && mThroughPut < 2) { + mInventory[18] = mInventory[mCurrentSlot]; + mInventory[mCurrentSlot] = null; + mTicksUntilNextUpdate = 1; + } + break; + } + tTempStack = GT_Utility.copy(mInventory[mCurrentSlot]); + tTempStack.stackSize = 1; + tRecipe[0] = tTempStack; + + tOutput = GT_OreDictUnificator.get(true, tTempStack); + + if (tOutput != null && GT_Utility.areStacksEqual(tOutput, tTempStack)) tOutput = null; + + if (tOutput == null) { + tRecipe[0] = null; + if (mInventory[18] == null) { + mInventory[18] = mInventory[mCurrentSlot]; + mInventory[mCurrentSlot] = null; + mTicksUntilNextUpdate = 1; + } + } + break; + case 6: + if (isItemTypeOrItsEmptyLiquidContainerInCraftingGrid(mInventory[mCurrentSlot])) { + if (mInventory[18] == null && mThroughPut < 2) { + mInventory[18] = mInventory[mCurrentSlot]; + mInventory[mCurrentSlot] = null; + mTicksUntilNextUpdate = 1; + } + break; + } else if (OrePrefixes.dustSmall.contains(mInventory[mCurrentSlot])) { + tTempStack = GT_Utility.copy(mInventory[mCurrentSlot]); + tTempStack.stackSize = 1; + tRecipe[0] = tTempStack; + tRecipe[1] = tTempStack; + tRecipe[3] = tTempStack; + tRecipe[4] = tTempStack; + if (GT_ModHandler.getAllRecipeOutput(getBaseMetaTileEntity().getWorld(), tRecipe) == null) { + if (mInventory[18] == null) { + mInventory[18] = mInventory[mCurrentSlot]; + mInventory[mCurrentSlot] = null; + mTicksUntilNextUpdate = 1; + } + break; + } + } else if (OrePrefixes.dustTiny.contains(mInventory[mCurrentSlot])) { + tTempStack = GT_Utility.copy(mInventory[mCurrentSlot]); + tTempStack.stackSize = 1; + tRecipe[0] = tTempStack; + tRecipe[1] = tTempStack; + tRecipe[2] = tTempStack; + tRecipe[3] = tTempStack; + tRecipe[4] = tTempStack; + tRecipe[5] = tTempStack; + tRecipe[6] = tTempStack; + tRecipe[7] = tTempStack; + tRecipe[8] = tTempStack; + if (GT_ModHandler.getAllRecipeOutput(getBaseMetaTileEntity().getWorld(), tRecipe) == null) { + if (mInventory[18] == null) { + mInventory[18] = mInventory[mCurrentSlot]; + mInventory[mCurrentSlot] = null; + mTicksUntilNextUpdate = 1; + } + break; + } + } else { + if (mInventory[18] == null && mThroughPut < 2) { + mInventory[18] = mInventory[mCurrentSlot]; + mInventory[mCurrentSlot] = null; + mTicksUntilNextUpdate = 1; + } + break; + } + break; + case 7: + if (isItemTypeOrItsEmptyLiquidContainerInCraftingGrid(mInventory[mCurrentSlot]) || !OrePrefixes.nugget.contains(mInventory[mCurrentSlot])) { + if (mInventory[18] == null && mThroughPut < 2) { + mInventory[18] = mInventory[mCurrentSlot]; + mInventory[mCurrentSlot] = null; + mTicksUntilNextUpdate = 1; + } + break; + } + tTempStack = GT_Utility.copy(mInventory[mCurrentSlot]); + tTempStack.stackSize = 1; + tRecipe[0] = tTempStack; + tRecipe[1] = tTempStack; + tRecipe[2] = tTempStack; + tRecipe[3] = tTempStack; + tRecipe[4] = tTempStack; + tRecipe[5] = tTempStack; + tRecipe[6] = tTempStack; + tRecipe[7] = tTempStack; + tRecipe[8] = tTempStack; + if (GT_ModHandler.getAllRecipeOutput(getBaseMetaTileEntity().getWorld(), tRecipe) == null) { + if (mInventory[18] == null) { + mInventory[18] = mInventory[mCurrentSlot]; + mInventory[mCurrentSlot] = null; + mTicksUntilNextUpdate = 1; + } + break; + } + break; + case 8: + if (isItemTypeOrItsEmptyLiquidContainerInCraftingGrid(mInventory[mCurrentSlot]) || mInventory[mCurrentSlot].getItemDamage() <= 0 || !mInventory[mCurrentSlot].getItem().isRepairable()) { + if (mInventory[18] == null && mThroughPut < 2) { + mInventory[18] = mInventory[mCurrentSlot]; + mInventory[mCurrentSlot] = null; + mTicksUntilNextUpdate = 1; + } + break; + } + tTempStack = GT_Utility.copy(mInventory[mCurrentSlot]); + tTempStack.stackSize = 1; + for (int i = mCurrentSlot + 1; i < 18; i++) { + if (mInventory[i] != null && mInventory[i].getItem() == tTempStack.getItem() && mInventory[mCurrentSlot].getItemDamage()+mInventory[i].getItemDamage()>tTempStack.getMaxDamage()) { + tRecipe[0] = tTempStack; + tRecipe[1] = GT_Utility.copy(mInventory[i]); + if (GT_ModHandler.getAllRecipeOutput(getBaseMetaTileEntity().getWorld(), tRecipe) == null) { + if (mInventory[18] == null) { + mInventory[18] = mInventory[mCurrentSlot]; + mInventory[mCurrentSlot] = null; + mTicksUntilNextUpdate = 1; + } + } + break; + } + } + break; + case 9: + if (isItemTypeOrItsEmptyLiquidContainerInCraftingGrid(mInventory[mCurrentSlot])) { + if (mInventory[18] == null && mThroughPut < 2) { + mInventory[18] = mInventory[mCurrentSlot]; + mInventory[mCurrentSlot] = null; + mTicksUntilNextUpdate = 1; + } + break; + } + for (byte i = 0, j = 0; i < 18 && j < 9 && (j < 2 || GT_ModHandler.getAllRecipeOutput(getBaseMetaTileEntity().getWorld(), tRecipe) == null); i++) { + tRecipe[j] = mInventory[(mCurrentSlot+i)%18]; + if (tRecipe[j] != null) { + tRecipe[j] = GT_Utility.copy(tRecipe[j]); + tRecipe[j].stackSize = 1; + j++; + } + } + if (tRecipe[1] == null) tRecipe[0] = null; + break; + } + } + + if (tOutput == null) tOutput = GT_ModHandler.getAllRecipeOutput(getBaseMetaTileEntity().getWorld(), tRecipe); + + if (tOutput != null || mMode == 0) mInventory[28] = tOutput; + + if (tOutput == null) { + mLastCraftSuccessful = false; + } else { + if ((tTempStack = GT_OreDictUnificator.get(true, tOutput)) != null) { + tTempStack.stackSize = tOutput.stackSize; + tOutput = tTempStack; + } + + mInventory[28] = GT_Utility.copy(tOutput); + ArrayList tList = recipeContent(tRecipe), tContent = benchContent(); + if (tList.size() > 0 && tContent.size() > 0) { + + boolean success = (mMode==6||mMode==7||mInventory[17]==null); + for (byte i = 0; i < tList.size() && success; i++) { + success = false; + for (byte j = 0; j < tContent.size() && !success; j++) { + if (GT_Utility.areStacksEqual(tList.get(i), tContent.get(j))) { + if (tList.get(i).stackSize <= tContent.get(j).stackSize) { + success = true; + } + } + } + } + + if (success) { + mLastCraftSuccessful = true; + + for (byte i = 8; i > -1; i--) { + for (byte j = 17; j > -1; j--) { + if (tRecipe[i] != null && mInventory[j] != null) { + if (GT_Utility.areStacksEqual(tRecipe[i], mInventory[j])) { + ItemStack tStack = GT_Utility.getContainerItem(mInventory[j], true); + if (tStack != null) { + getBaseMetaTileEntity().decrStackSize(j, 1); + if (!tStack.isItemStackDamageable() || tStack.getItemDamage() < tStack.getMaxDamage()) { + for (byte k = 9; k < 18; k++) { + if (mInventory[k] == null) { + mInventory[k] = GT_Utility.copy(tStack); + break; + } else if (GT_Utility.areStacksEqual(mInventory[k], tStack) && mInventory[k].stackSize + tStack.stackSize <= tStack.getMaxStackSize()) { + mInventory[k].stackSize += tStack.stackSize; + break; + } + } + } + } else { + getBaseMetaTileEntity().decrStackSize(j, 1); + } + break; + } + } + } + } + + mInventory[18] = GT_Utility.copy(tOutput); + getBaseMetaTileEntity().decreaseStoredEnergyUnits(mMode==5||mMode==6||mMode==7?128:2048, true); + mTicksUntilNextUpdate = 1; + } else { + mLastCraftSuccessful = false; + if (mInventory[mMode==0?8:17] != null && mInventory[18] == null && mThroughPut < 2) { + mInventory[18] = mInventory[mMode==0?8:17]; + mInventory[mMode==0?8:17] = null; + mTicksUntilNextUpdate = 1; + } + } + } + + if (mInventory[18] == null && mThroughPut < 2) { + for (byte i = 0; i < 8; i++) { + for (byte j = i; ++j < 9;) { + if (GT_Utility.areStacksEqual(mInventory[i], mInventory[j]) && mInventory[i].getMaxStackSize() > 8) { + mInventory[18] = mInventory[j]; + mInventory[j] = null; + mTicksUntilNextUpdate = 1; + break; + } + } + } + } + } + } + + if (mThroughPut < 2) { + getBaseMetaTileEntity().decreaseStoredEnergyUnits(GT_Utility.moveOneItemStack(getBaseMetaTileEntity(), getBaseMetaTileEntity().getIInventoryAtSide(getBaseMetaTileEntity().getBackFacing()), getBaseMetaTileEntity().getBackFacing(), getBaseMetaTileEntity().getFrontFacing(), null, false, (byte)64, (byte)1, (byte)64, (byte)1)*10, true); + } + } + } + + private boolean isItemTypeOrItsEmptyLiquidContainerInCraftingGrid(ItemStack aStack) { + if (aStack == null) return true; + for (byte i = 19; i < 28; i++) { + if (mInventory[i] != null) { + if (GT_Utility.areStacksEqual(mInventory[i], aStack)) return true; + if (GT_Utility.areStacksEqual(GT_Utility.getContainerForFilledItem(mInventory[i], true), aStack)) return true; + } + } + return false; + } + + private ArrayList recipeContent(ItemStack[] tRecipe) { + ArrayList tList = new ArrayList(); + for (byte i = 0; i < 9; i++) { + if (tRecipe[i] != null) { + boolean temp = false; + for (byte j = 0; j < tList.size(); j++) { + if (GT_Utility.areStacksEqual(tRecipe[i], tList.get(j))) { + tList.get(j).stackSize++; + temp = true; + break; + } + } + if (!temp) tList.add(GT_Utility.copy(1, tRecipe[i])); + } + } + return tList; + } + + private ArrayList benchContent() { + ArrayList tList = new ArrayList(); + for (byte i = 0; i < 18; i++) { + if (mInventory[i] != null) { + boolean temp = false; + for (byte j = 0; j < tList.size(); j++) { + if (GT_Utility.areStacksEqual(mInventory[i], mInventory[j])) { + tList.get(j).stackSize += mInventory[i].stackSize; + temp = true; + break; + } + } + if (!temp) tList.add(GT_Utility.copy(mInventory[i])); + } + } + return tList; + } + + @Override + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return mMode==0?aIndex>=10:aIndex>=18; + } + + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return mMode==0?aIndex<9:aIndex<18; + } + + /*@Override + public int getTextureIndex(byte aSide, byte aFacing, boolean aActive, boolean aRedstone) { + if (aSide == aFacing) + return 112; + if (GT_Utility.getOppositeSide(aSide) == aFacing) + return 113; + return 114; + }*/ + + @Override + public int getCapacity() { + return 16000; + } + + @Override + public int getTankPressure() { + return -100; + } + + @Override + public String[] getDescription() { + return new String[] { + "Automatic Crafting Table Mk III", + //this.mDescription, + CORE.GT_Tooltip }; + } + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + final ITexture[][][] rTextures = new ITexture[10][17][]; + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = this.getFront(i); + rTextures[1][i + 1] = this.getBack(i); + rTextures[2][i + 1] = this.getBottom(i); + rTextures[3][i + 1] = this.getTop(i); + rTextures[4][i + 1] = this.getSides(i); + rTextures[5][i + 1] = this.getFront(i); + rTextures[6][i + 1] = this.getBack(i); + rTextures[7][i + 1] = this.getBottom(i); + rTextures[8][i + 1] = this.getTop(i); + rTextures[9][i + 1] = this.getSides(i); + } + return rTextures; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, + final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return this.mTextures[0][aColorIndex + 1]; + } + else if (GT_Utility.getOppositeSide(aSide) == aFacing) { + return this.mTextures[1][aColorIndex + 1]; + } + else { + return this.mTextures[4][aColorIndex + 1]; + } + /*return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 + : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1];*/ + } + + public ITexture[] getFront(final byte aColor) { + return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Crafting_Overlay)}; + } + + public ITexture[] getBack(final byte aColor) { + return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(BlockIcons.OVERLAY_PIPE)}; + } + + public ITexture[] getBottom(final byte aColor) { + return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], }; + } + + public ITexture[] getTop(final byte aColor) { + return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Crafting_Overlay) }; + } + + public ITexture[] getSides(final byte aColor) { + return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Crafting_Overlay)}; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_ElectricInventoryManager.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_ElectricInventoryManager.java new file mode 100644 index 0000000000..732996de71 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_ElectricInventoryManager.java @@ -0,0 +1,451 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.automation; + +import java.util.ArrayList; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.api.gui.automation.GT_Container_ElectricInventoryManager; +import gtPlusPlus.xmod.gregtech.api.gui.automation.GT_GUIContainer_ElectricInventoryManager; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; + +public class GT_MetaTileEntity_ElectricInventoryManager extends GT_MetaTileEntity_TieredMachineBlock { + + public int[] mSlotRange = new int[4]; + public boolean mWorkedLastTick = false; + protected String mLocalName; + + public GT_MetaTileEntity_ElectricInventoryManager(final int aID, final int aTier, final String aDescription) { + super(aID, "basicmachine.automation.inventorymanager.0" + aTier, "Electric Inventory Manager (" + GT_Values.VN[aTier] + ")", aTier, 16, aDescription); + mLocalName = "Auto Workbench (" + GT_Values.VN[aTier] + ")"; + } + + public GT_MetaTileEntity_ElectricInventoryManager(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) { + super(aName, aTier, 16, aDescription, aTextures); + } + + @Override + public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_ElectricInventoryManager(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_ElectricInventoryManager(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public boolean isTransformerUpgradable() { + return true; + } + + @Override + public boolean isOverclockerUpgradable() { + return false; + } + + @Override + public boolean isSimpleMachine() { + return false; + } + @Override + public boolean isFacingValid(byte aFacing) { + return true; + } + + @Override + public boolean isEnetInput() { + return true; + } + + @Override + public boolean isEnetOutput() { + return true; + } + + @Override + public long maxEUInput() { + return GT_Values.V[mTier]; + } + + @Override + public long maxEUOutput() { + return GT_Values.V[mTier]; + } + + @Override + public long getMinimumStoredEU() { + return GT_Values.V[this.mTier]; + } + + @Override + public long maxEUStore() { + return GT_Values.V[this.mTier] * (this.mTier * GT_Values.V[this.mTier]); + } + + @Override + public long maxAmperesIn() { + return 4; + } + + @Override + public long maxAmperesOut() { + return 4; + } + + @Override + public boolean isValidSlot(int aIndex) { + return aIndex < 3; + } + + @Override + public boolean isInputFacing(byte aSide) { + return !isOutputFacing(aSide); + } + + @Override + public boolean isOutputFacing(byte aSide) { + for (int i = 0; i < mSlotRange.length; i++) { + if (aSide == getRangeDirection(i) && getRangeEnergy(i)) { + return true; + } + } + return false; + } + + @Override + public int getSizeInventory() { + return 16; + } + + @Override + public boolean isAccessAllowed(EntityPlayer aPlayer) { + return true; + } + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) { + return true; + } + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_ElectricInventoryManager(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setInteger("mSlotRange0", mSlotRange[0]); + aNBT.setInteger("mSlotRange1", mSlotRange[1]); + aNBT.setInteger("mSlotRange2", mSlotRange[2]); + aNBT.setInteger("mSlotRange3", mSlotRange[3]); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + mSlotRange[0] = aNBT.getInteger("mSlotRange0"); + mSlotRange[1] = aNBT.getInteger("mSlotRange1"); + mSlotRange[2] = aNBT.getInteger("mSlotRange2"); + mSlotRange[3] = aNBT.getInteger("mSlotRange3"); + } + + public void iterateRangeDirection(int aIndex) { + mSlotRange[aIndex] = (mSlotRange[aIndex] & ~7) | (((mSlotRange[aIndex] & 7) + 1) % 6); + } + + public void switchRangeEnergy(int aIndex) { + mSlotRange[aIndex] = (mSlotRange[aIndex] & ~8) | ((mSlotRange[aIndex] & 8) > 0 ? 0 : 8); + } + + public void iterateSlot1Direction(int aIndex) { + mSlotRange[aIndex] = (mSlotRange[aIndex] & ~112) | (((((mSlotRange[aIndex] & 112) >> 4) + 1) % 6) << 4); + } + + public void iterateSlot2Direction(int aIndex) { + mSlotRange[aIndex] = (mSlotRange[aIndex] & ~896) | (((((mSlotRange[aIndex] & 896) >> 7) + 1) % 6) << 7); + } + + public void iterateSlot3Direction(int aIndex) { + mSlotRange[aIndex] = (mSlotRange[aIndex] & ~7168) | (((((mSlotRange[aIndex] & 7168) >> 10) + 1) % 6) << 10); + } + + public void switchSlot1InOut(int aIndex) { + mSlotRange[aIndex] = (mSlotRange[aIndex] & ~8192) | ((mSlotRange[aIndex] & 8192) > 0 ? 0 : 8192); + } + + public void switchSlot2InOut(int aIndex) { + mSlotRange[aIndex] = (mSlotRange[aIndex] & ~16384) | ((mSlotRange[aIndex] & 16384) > 0 ? 0 : 16384); + } + + public void switchSlot3InOut(int aIndex) { + mSlotRange[aIndex] = (mSlotRange[aIndex] & ~32768) | ((mSlotRange[aIndex] & 32768) > 0 ? 0 : 32768); + } + + public byte getRangeDirection(int aIndex) { + return (byte) (mSlotRange[aIndex] & 7); + } + + public byte getSlot1Direction(int aIndex) { + return (byte) ((mSlotRange[aIndex] & 112) >> 4); + } + + public byte getSlot2Direction(int aIndex) { + return (byte) ((mSlotRange[aIndex] & 896) >> 7); + } + + public byte getSlot3Direction(int aIndex) { + return (byte) ((mSlotRange[aIndex] & 7168) >> 10); + } + + public boolean getRangeEnergy(int aIndex) { + return (mSlotRange[aIndex] & 8) > 0; + } + + public boolean getSlot1InOut(int aIndex) { + return (mSlotRange[aIndex] & 8192) > 0; + } + + public boolean getSlot2InOut(int aIndex) { + return (mSlotRange[aIndex] & 16384) > 0; + } + + public boolean getSlot3InOut(int aIndex) { + return (mSlotRange[aIndex] & 32768) > 0; + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + if (getBaseMetaTileEntity().isAllowedToWork() && getBaseMetaTileEntity().isServerSide() && getBaseMetaTileEntity().getUniversalEnergyStored() >= 5000 + && (getBaseMetaTileEntity().hasWorkJustBeenEnabled() || getBaseMetaTileEntity().getTimer() % 100 == 0 || mWorkedLastTick || getBaseMetaTileEntity().hasInventoryBeenModified())) { + mWorkedLastTick = false; + + IInventory[] tTileEntities = new IInventory[]{ + getBaseMetaTileEntity().getIInventoryAtSide((byte) 0), getBaseMetaTileEntity().getIInventoryAtSide((byte) 1), getBaseMetaTileEntity().getIInventoryAtSide((byte) 2), + getBaseMetaTileEntity().getIInventoryAtSide((byte) 3), getBaseMetaTileEntity().getIInventoryAtSide((byte) 4), getBaseMetaTileEntity().getIInventoryAtSide((byte) 5), null, null + }; + + int tCost = 0; + + for (int i = 0; i < 4; i++) { + if (tTileEntities[getRangeDirection(i)] != null) { + ArrayList tList = new ArrayList(); + ItemStack tStack; + tList.add(null); + + tStack = mInventory[3 + i * 3 + 0]; + if (tStack == null) { + if (getSlot1InOut(i)) + tCost += 5 + * GT_Utility.moveOneItemStack(getBaseMetaTileEntity(), tTileEntities[getRangeDirection(i)], getSlot1Direction(i), getSlot1Direction(i), null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1); + else + tCost += 5 + * GT_Utility.moveOneItemStack(tTileEntities[getRangeDirection(i)], getBaseMetaTileEntity(), getSlot1Direction(i), getSlot1Direction(i), null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1); + } + else { + tList.set(0, tStack); + if (getSlot1InOut(i)) + tCost += 5 + * GT_Utility.moveOneItemStack(getBaseMetaTileEntity(), tTileEntities[getRangeDirection(i)], getSlot1Direction(i), getSlot1Direction(i), tList, false, (byte) tStack.stackSize, (byte) 1, (byte) 64, (byte) 1); + else + tCost += 5 + * GT_Utility.moveOneItemStack(tTileEntities[getRangeDirection(i)], getBaseMetaTileEntity(), getSlot1Direction(i), getSlot1Direction(i), tList, false, (byte) tStack.stackSize, (byte) 1, (byte) 64, (byte) 1); + } + + tStack = mInventory[3 + i * 3 + 1]; + if (tStack == null) { + if (getSlot2InOut(i)) + tCost += 5 + * GT_Utility.moveOneItemStack(getBaseMetaTileEntity(), tTileEntities[getRangeDirection(i)], getSlot2Direction(i), getSlot2Direction(i), null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1); + else + tCost += 5 + * GT_Utility.moveOneItemStack(tTileEntities[getRangeDirection(i)], getBaseMetaTileEntity(), getSlot2Direction(i), getSlot2Direction(i), null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1); + } + else { + tList.set(0, tStack); + if (getSlot2InOut(i)) + tCost += 5 + * GT_Utility.moveOneItemStack(getBaseMetaTileEntity(), tTileEntities[getRangeDirection(i)], getSlot2Direction(i), getSlot2Direction(i), tList, false, (byte) tStack.stackSize, (byte) 1, (byte) 64, (byte) 1); + else + tCost += 5 + * GT_Utility.moveOneItemStack(tTileEntities[getRangeDirection(i)], getBaseMetaTileEntity(), getSlot2Direction(i), getSlot2Direction(i), tList, false, (byte) tStack.stackSize, (byte) 1, (byte) 64, (byte) 1); + } + + tStack = mInventory[3 + i * 3 + 2]; + if (tStack == null) { + if (getSlot3InOut(i)) + tCost += 5 + * GT_Utility.moveOneItemStack(getBaseMetaTileEntity(), tTileEntities[getRangeDirection(i)], getSlot3Direction(i), getSlot3Direction(i), null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1); + else + tCost += 5 + * GT_Utility.moveOneItemStack(tTileEntities[getRangeDirection(i)], getBaseMetaTileEntity(), getSlot3Direction(i), getSlot3Direction(i), null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1); + } + else { + tList.set(0, tStack); + if (getSlot3InOut(i)) + tCost += 5 + * GT_Utility.moveOneItemStack(getBaseMetaTileEntity(), tTileEntities[getRangeDirection(i)], getSlot3Direction(i), getSlot3Direction(i), tList, false, (byte) tStack.stackSize, (byte) 1, (byte) 64, (byte) 1); + else + tCost += 5 + * GT_Utility.moveOneItemStack(tTileEntities[getRangeDirection(i)], getBaseMetaTileEntity(), getSlot3Direction(i), getSlot3Direction(i), tList, false, (byte) tStack.stackSize, (byte) 1, (byte) 64, (byte) 1); + } + } + } + + if (tCost > 0) { + mWorkedLastTick = true; + getBaseMetaTileEntity().decreaseStoredEnergyUnits(tCost, true); + } + } + } + + @Override + public String[] getDescription() { + return new String[]{ + "It's simpler than you think. I promise.", this.mDescription, CORE.GT_Tooltip + }; + } + + /*@Override + public int getTextureIndex(byte aSide, byte aFacing, boolean aActive, boolean aRedstone) { + switch (aSide) { + case 0: return 113 + (aRedstone?8:0); + case 1: return 112 + (aRedstone?8:0); + case 2: return 116 + (aRedstone?8:0); + case 3: return 213 + (aRedstone?8:0); + case 4: return 212 + (aRedstone?8:0); + case 5: return 117 + (aRedstone?8:0); + } + return 0; + }*/ + + @Override + public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) { + return false; + } + + @Override + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return true; + } + + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return true; + } + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + final ITexture[][][] rTextures = new ITexture[16][17][]; + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = this.getBottom(i); + rTextures[1][i + 1] = this.getTop(i); + rTextures[2][i + 1] = this.getNegativeZ(i); + rTextures[3][i + 1] = this.getPositiveZ(i); + rTextures[4][i + 1] = this.getNegativeX(i); + rTextures[5][i + 1] = this.getPositiveX(i); + rTextures[6][i + 1] = this.getBottomRedstone(i); + rTextures[7][i + 1] = this.getTopRedstone(i); + rTextures[8][i + 1] = this.getNegativeZRedstone(i); + rTextures[9][i + 1] = this.getPositiveZRedstone(i); + rTextures[10][i + 1] = this.getNegativeXRedstone(i); + rTextures[11][i + 1] = this.getPositiveXRedstone(i); + } + return rTextures; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + return this.mTextures[!aRedstone ? aSide : aSide + 6][aColorIndex < 0 ? 0 : aColorIndex]; + } + + public ITexture[] getBottom(final byte aColor) { + return new ITexture[]{ + Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Red) + }; + } + + public ITexture[] getTop(final byte aColor) { + return new ITexture[]{ + Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Green) + }; + } + + public ITexture[] getNegativeZ(final byte aColor) { + return new ITexture[]{ + Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Blue) + }; + } + + public ITexture[] getPositiveZ(final byte aColor) { + return new ITexture[]{ + Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Cyan) + }; + } + + public ITexture[] getNegativeX(final byte aColor) { + return new ITexture[]{ + Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Purple) + }; + } + + public ITexture[] getPositiveX(final byte aColor) { + return new ITexture[]{ + Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Yellow) + }; + } + + public ITexture[] getBottomRedstone(final byte aColor) { + return new ITexture[]{ + Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Red_Redstone) + }; + } + + public ITexture[] getTopRedstone(final byte aColor) { + return new ITexture[]{ + Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Green_Redstone) + }; + } + + public ITexture[] getNegativeZRedstone(final byte aColor) { + return new ITexture[]{ + Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Blue_Redstone) + }; + } + + public ITexture[] getPositiveZRedstone(final byte aColor) { + return new ITexture[]{ + Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Cyan_Redstone) + }; + } + + public ITexture[] getNegativeXRedstone(final byte aColor) { + return new ITexture[]{ + Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Purple_Redstone) + }; + } + + public ITexture[] getPositiveXRedstone(final byte aColor) { + return new ITexture[]{ + Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Yellow_Redstone) + }; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CropHarvestor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CropHarvestor.java new file mode 100644 index 0000000000..678ca46204 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CropHarvestor.java @@ -0,0 +1,660 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Iterator; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.api.gui.basic.GT_Container_CropHarvestor; +import gtPlusPlus.xmod.gregtech.api.gui.basic.GT_GUIContainer_CropHarvestor; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import ic2.api.crops.CropCard; +import ic2.api.crops.ICropTile; +import ic2.core.item.DamageHandler; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; + +public class GT_MetaTileEntity_CropHarvestor extends GT_MetaTileEntity_BasicTank { + + protected String mLocalName; + + private static final int SLOT_WEEDEX_1 = 1; + private static final int SLOT_WEEDEX_2 = 2; + private static final int SLOT_FERT_1 = 3; + private static final int SLOT_FERT_4 = 6; + private static final int SLOT_OUTPUT_START = 7; + + public boolean mModeAlternative = false; + + public GT_MetaTileEntity_CropHarvestor(final int aID, final int aTier, final String aDescription) { + super(aID, "basicmachine.cropharvester.0"+aTier, "Crop Manager ("+GT_Values.VN[aTier]+")", aTier, 21, aDescription); + mLocalName = "Crop Manager ("+GT_Values.VN[aTier]+")"; + } + + public GT_MetaTileEntity_CropHarvestor(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) { + super(aName, aTier, 21, aDescription, aTextures); + mLocalName = "Crop Manager ("+GT_Values.VN[aTier]+")"; + } + + @Override + public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_CropHarvestor(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_CropHarvestor(aPlayerInventory, aBaseMetaTileEntity, mLocalName); + } + + @Override + public boolean isTransformerUpgradable() { + return true; + } + + @Override + public boolean isOverclockerUpgradable() { + return true; + } + + @Override + public boolean isSimpleMachine() { + return true; + } + + @Override + public boolean isAccessAllowed(EntityPlayer aPlayer) { + return true; + } + + @Override + public boolean isInputFacing(byte aSide) { + return true; + } + + @Override + public boolean isEnetInput() { + return true; + } + + @Override + public boolean isElectric() { + return true; + } + + @Override + public long maxAmperesIn() { + return 8; + } + + @Override + public long getMinimumStoredEU() { + return GT_Values.V[this.mTier]; + } + + @Override + public long maxEUStore() { + return GT_Values.V[this.mTier] * (this.mTier * GT_Values.V[this.mTier]); + } + + @Override + public long maxEUInput() { + return GT_Values.V[mTier]; + } + + @Override + public int getCapacity() { + return 32000 * mTier; + } + + @Override + public int getTankPressure() { + return -100; + } + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) { + return true; + } + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_CropHarvestor(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + @Override + public int getSizeInventory() { + return 21; + } + + private static final int getRange(int aTier) { + switch(aTier) { + case 1: + return 1; + case 2: + return 5; + case 3: + return 9; + case 4: + return 13; + case 5: + return 17; + case 6: + return 21; + case 7: + return 25; + case 8: + return 29; + case 9: + return 33; + default: + return 0; + } + } + + private HashSet mCropCache = new HashSet(); + private boolean mInvalidCache = false; + + public boolean doesInventoryHaveSpace() { + for (int i = SLOT_OUTPUT_START; i < this.getSizeInventory(); i++) { + if (this.mInventory[i] == null || this.mInventory[i].stackSize < 64) { + return true; + } + } + return false; + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + if (getBaseMetaTileEntity().isServerSide() && getBaseMetaTileEntity().isAllowedToWork() && (getBaseMetaTileEntity().hasWorkJustBeenEnabled() || aTick % 100 == 0)) { + if (this.getBaseMetaTileEntity().getUniversalEnergyStored() >= getMinimumStoredEU()) { + + int aTileX = this.getBaseMetaTileEntity().getXCoord(); + int aTileY = this.getBaseMetaTileEntity().getXCoord(); + int aTileZ = this.getBaseMetaTileEntity().getXCoord(); + + int aRadius = 10 + getRange(mTier); + int aSide = (aRadius-1)/2; + ArrayList aAllDrops = new ArrayList(); + + if (mCropCache.isEmpty() || aTick % 1200 == 0 || mInvalidCache) { + if (!mCropCache.isEmpty()) { + mCropCache.clear(); + } + //Logger.INFO("Looking for crops."); + for (int y = 0; y <= 2; y++) { + for (int x = (-aSide); x <= aSide; x++) { + for (int z = (-aSide); z <= aSide; z++) { + TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityOffset(x, y, z); + if (tTileEntity != null && tTileEntity instanceof ICropTile) { + ICropTile tCrop = (ICropTile) tTileEntity; + mCropCache.add(tCrop); + } + } + } + } + } + + //Process Cache + if (doesInventoryHaveSpace()) { + for (ICropTile tCrop : mCropCache) { + if (tCrop == null) { + mInvalidCache = true; + break; + } + CropCard aCrop = tCrop.getCrop(); + if (aCrop != null) { + //Logger.INFO("Found "+aCrop.displayName()+" at offset "+x+", "+y+", "+z); + if (!aCrop.canGrow(tCrop) && aCrop.canBeHarvested(tCrop)) { + if (getBaseMetaTileEntity().decreaseStoredEnergyUnits(maxEUInput(), true)) { + ItemStack[] aHarvest = tCrop.harvest_automated(true); + if (aHarvest != null && aHarvest.length > 0) { + for (ItemStack aStack : aHarvest) { + if (aStack.stackSize > 0) { + if (mTier * 5 > MathUtils.randInt(1, 100)) { + aStack.stackSize += Math.floor(tCrop.getGain()/10); + Logger.INFO("Bonus output given for "+aCrop.displayName()); + } + Logger.INFO("Harvested "+aCrop.displayName()); + aAllDrops.add(aStack); + } + } + } + } + } + if (this.mModeAlternative) { + processSecondaryFunctions(tCrop); + } + } + } + + if (!aAllDrops.isEmpty()) { + Logger.INFO("Handling "+aAllDrops.size()+" Harvests"); + Iterator iter = aAllDrops.iterator(); + while (iter.hasNext()) { + ItemStack aDrop = iter.next(); + if (ItemUtils.checkForInvalidItems(aDrop)) { + + for (int i = SLOT_OUTPUT_START; i < this.getSizeInventory(); i++) { + if (this.mInventory[i] != null) { + //Logger.INFO("Slot "+i+" contains "+this.mInventory[i].getDisplayName()); + if (GT_Utility.areStacksEqual(aDrop, mInventory[i], false)) { + //Same + if (mInventory[i].stackSize < 64 && (mInventory[i].stackSize + aDrop.stackSize <= 64)) { + //can merge + //Logger.INFO("Slot "+i+" size: "+mInventory[i].stackSize+" + Drop Size: "+aDrop.stackSize+" = "+(mInventory[i].stackSize + aDrop.stackSize)); + mInventory[i].stackSize += aDrop.stackSize; + break; + } + else if (mInventory[i].stackSize < 64 && (mInventory[i].stackSize + aDrop.stackSize > 64)) { + //can merge + //Logger.INFO("Slot "+i+" size: "+mInventory[i].stackSize+" + Drop Size: "+aDrop.stackSize+" = "+(mInventory[i].stackSize + aDrop.stackSize)); + int aRemainder = mInventory[i].stackSize + aDrop.stackSize - 64; + Logger.INFO("Remainder: "+aRemainder+", Continuing."); + mInventory[i].stackSize = 64; + aDrop.stackSize = aRemainder; + continue; + } + else { + //Logger.INFO("Slot "+i+" size: 64, Continuing."); + continue; + } + } + } + else { + //Logger.INFO("Slot "+i+" is empty, setting to "+aDrop.getDisplayName()+" x"+aDrop.stackSize); + this.mInventory[i] = aDrop; + break; + } + } + } + + } + } + } + } + } + } + + public boolean hasFertilizer() { + for (int i = SLOT_FERT_1; i <= SLOT_FERT_4; i++) { + if (this.mInventory[i] != null) { + return true; + } + } + return false; + } + + public boolean consumeFertilizer(boolean aSimulate) { + if (hasFertilizer()) { + for (int i = SLOT_FERT_1; i <= SLOT_FERT_4; i++) { + if (this.mInventory[i] != null) { + consume(i, 1, aSimulate); + return true; + } + } + } + return false; + } + + public boolean hasWeedEX() { + for (int i = SLOT_WEEDEX_1; i <= SLOT_WEEDEX_2; i++) { + if (this.mInventory[i] != null) { + return true; + } + } + return false; + } + + public boolean consumeWeedEX(boolean aSimulate) { + if (hasWeedEX()) { + for (int i = SLOT_WEEDEX_1; i <= SLOT_WEEDEX_2; i++) { + if (this.mInventory[i] != null) { + damage(i, 1, aSimulate); + return true; + } + } + } + return false; + } + + public void processSecondaryFunctions(ICropTile aCrop) { + if (!mModeAlternative) { + return; + } + if (hasFertilizer() && consumeFertilizer(true) && this.getBaseMetaTileEntity().getUniversalEnergyStored() >= getMinimumStoredEU() && getBaseMetaTileEntity().decreaseStoredEnergyUnits(maxEUInput(), true) && applyFertilizer(aCrop)) { + if (consumeFertilizer(false)) { + //Logger.INFO("Consumed Fert."); + } + } + if (this.getFluidAmount() > 0 && this.getBaseMetaTileEntity().getUniversalEnergyStored() >= getMinimumStoredEU() && getBaseMetaTileEntity().decreaseStoredEnergyUnits(maxEUInput(), true) && applyHydration(aCrop)) { + //Logger.INFO("Consumed Water."); + } + if (hasWeedEX() && consumeWeedEX(true) && this.getBaseMetaTileEntity().getUniversalEnergyStored() >= getMinimumStoredEU() && getBaseMetaTileEntity().decreaseStoredEnergyUnits(maxEUInput(), true) && applyWeedEx(aCrop)) { + if (consumeWeedEX(false)) { + //Logger.INFO("Consumed Weed-EX."); + } + } + } + + + public boolean applyWeedEx(ICropTile aCrop) { + if (aCrop.getWeedExStorage() < 150) { + aCrop.setWeedExStorage(aCrop.getWeedExStorage() + 50); + boolean triggerDecline; + triggerDecline = aCrop.getWorld().rand.nextInt(3) == 0; + if (aCrop.getCrop() != null && aCrop.getCrop().isWeed(aCrop) && aCrop.getWeedExStorage() >= 75 && triggerDecline) { + switch (aCrop.getWorld().rand.nextInt(5)) { + case 0 : + if (aCrop.getGrowth() > 0) { + aCrop.setGrowth((byte) (aCrop.getGrowth() - 1)); + } + case 1 : + if (aCrop.getGain() > 0) { + aCrop.setGain((byte) (aCrop.getGain() - 1)); + } + default : + if (aCrop.getResistance() > 0) { + aCrop.setResistance((byte) (aCrop.getResistance() - 1)); + } + } + } + return true; + } else { + return false; + } + } + + public boolean applyFertilizer(ICropTile aCrop) { + if (aCrop.getNutrientStorage() >= 100) { + return false; + } else { + //Logger.INFO("Current Nutrient: "+aCrop.getNutrientStorage()+" for "+aCrop.getCrop().displayName()); + aCrop.setNutrientStorage(100); + return true; + } + } + + public boolean applyHydration(ICropTile aCrop) { + if (aCrop.getHydrationStorage() >= 200 || this.getFluidAmount() == 0) { + //Logger.INFO("Hydration Max"); + return false; + } else { + int apply = 200 - aCrop.getHydrationStorage(); + if (this.getFluidAmount() >= 0) { + int drain = 0; + if (this.getFluidAmount() >= apply) { + drain = apply; + } + else { + drain = this.getFluidAmount(); + } + this.mFluid.amount -= drain; + if (this.mFluid.amount <= 0) { + this.mFluid = null; + } + //Logger.INFO("Did Hydrate"); + aCrop.setHydrationStorage(aCrop.getHydrationStorage() + drain); + return true; + } + else { + //Logger.INFO("No water?"); + return false; + } + } + } + + public boolean consume(int aSlot, int amount, boolean simulate) { + ItemStack stack = this.mInventory[aSlot]; + if (stack != null && stack.stackSize >= amount) { + int currentAmount = Math.min(amount, stack.stackSize); + amount -= currentAmount; + if (!simulate) { + if (stack.stackSize == currentAmount) { + this.mInventory[aSlot] = null; + } else { + stack.stackSize -= currentAmount; + } + } + else { + return amount >= 0; + } + return true; + } + return false; + } + + public ItemStack damage(int aSlot, int amount, boolean simulate) { + ItemStack ret = null; + int damageApplied = 0; + ItemStack stack = this.mInventory[aSlot]; + Item item = stack.getItem(); + if (stack != null && item.isDamageable() && (ret == null + || stack.getItem() == ret.getItem() && ItemStack.areItemStackTagsEqual(stack, ret))) { + if (simulate) { + stack = stack.copy(); + } + int maxDamage = DamageHandler.getMaxDamage(stack); + while (amount > 0 && stack.stackSize > 0) { + int currentAmount = Math.min(amount, maxDamage - DamageHandler.getDamage(stack)); + DamageHandler.damage(stack, currentAmount, null); + damageApplied += currentAmount; + amount -= currentAmount; + if (DamageHandler.getDamage(stack) >= maxDamage) { + --stack.stackSize; + DamageHandler.setDamage(stack, 0); + } + + if (ret == null) { + ret = stack.copy(); + } + } + if (stack.stackSize == 0 && !simulate) { + this.mInventory[aSlot] = null; + } + } + + if (ret != null) { + int i = DamageHandler.getMaxDamage(ret); + ret.stackSize = damageApplied / i; + DamageHandler.setDamage(ret, damageApplied % i); + } + return ret; + } + + @Override + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return aStack != null && aIndex >= SLOT_OUTPUT_START && aIndex < this.getSizeInventory(); + } + + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + if (aStack != null) { + if (aStack.getItem().getUnlocalizedName().equals("ic2.itemFertilizer")) { + return aIndex >= SLOT_FERT_1 && aIndex <= SLOT_FERT_4; + } + else if (aStack.getItem().getUnlocalizedName().equals("ic2.itemWeedEx")) { + return aIndex >= SLOT_WEEDEX_1 && aIndex <= SLOT_WEEDEX_2; + } + } + return false; + } + + @Override + public String[] getDescription() { + int aRadius = 10 + getRange(mTier); + int aSide = (aRadius-1)/2; + return new String[] { + this.mDescription, + "Secondary mode can Hydrate/Fertilize/Weed-EX", + "Consumes "+maxEUInput()+"eu per harvest", + "Can harvest 2 blocks above", + "Radius: "+aSide+" each side ("+aRadius+"x3x"+aRadius+")", + "Has "+(mTier * 5)+"% chance for extra drops", + "Holds "+this.getCapacity()+"L of Water", + CORE.GT_Tooltip + }; + } + + @Override + public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) { + return true; + } + + /*@Override + public int getTextureIndex(byte aSide, byte aFacing, boolean aActive, boolean aRedstone) { + if (aSide == aFacing) + return 118+(aRedstone?8:0); + if (GT_Utility.getOppositeSide(aSide) == aFacing) + return 113+(aRedstone?8:0); + + int tIndex = 128+(aRedstone?8:0); + + switch (aFacing) { + case 0: + return tIndex+64; + case 1: + return tIndex+32; + case 2: switch (aSide) { + case 0: return tIndex+32; + case 1: return tIndex+32; + case 4: return tIndex+16; + case 5: return tIndex+48; + } + case 3: switch (aSide) { + case 0: return tIndex+64; + case 1: return tIndex+64; + case 4: return tIndex+48; + case 5: return tIndex+16; + } + case 4: switch (aSide) { + case 0: return tIndex+16; + case 1: return tIndex+16; + case 2: return tIndex+48; + case 3: return tIndex+16; + } + case 5: switch (aSide) { + case 0: return tIndex+48; + case 1: return tIndex+48; + case 2: return tIndex+16; + case 3: return tIndex+48; + } + } + return tIndex; + } */ + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + final ITexture[][][] rTextures = new ITexture[10][17][]; + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = this.getFront(i); + rTextures[1][i + 1] = this.getBack(i); + rTextures[2][i + 1] = this.getBottom(i); + rTextures[3][i + 1] = this.getTop(i); + rTextures[4][i + 1] = this.getSides(i); + rTextures[5][i + 1] = this.getFront(i); + rTextures[6][i + 1] = this.getBack(i); + rTextures[7][i + 1] = this.getBottom(i); + rTextures[8][i + 1] = this.getTop(i); + rTextures[9][i + 1] = this.getSides(i); + } + return rTextures; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, + final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == 0 || aSide == 1) { + return this.mTextures[3][aColorIndex + 1]; + } + else { + return this.mTextures[4][aColorIndex + 1]; + } + /*return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 + : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + + 1];*/ + } + + public ITexture[] getFront(final byte aColor) { + return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_CropHarvester_Cutter)}; + } + + public ITexture[] getBack(final byte aColor) { + return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_CropHarvester_Cutter)}; + } + + public ITexture[] getBottom(final byte aColor) { + return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_CropHarvester_Boxes)}; + } + + public ITexture[] getTop(final byte aColor) { + return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_CropHarvester_Boxes)}; + } + + public ITexture[] getSides(final byte aColor) { + return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_CropHarvester_Cutter)}; + } + + @Override + public boolean doesFillContainers() { + return false; + } + + @Override + public boolean doesEmptyContainers() { + return false; + } + + @Override + public boolean canTankBeFilled() { + return true; + } + + @Override + public boolean canTankBeEmptied() { + return false; + } + + @Override + public boolean displaysItemStack() { + return false; + } + + @Override + public boolean displaysStackSize() { + return false; + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setBoolean("mModeAlternative", mModeAlternative); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + mModeAlternative = aNBT.getBoolean("mModeAlternative"); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_AdvancedCraftingTable.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_AdvancedCraftingTable.java index b5aa916e54..0b815bfae7 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_AdvancedCraftingTable.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_AdvancedCraftingTable.java @@ -485,7 +485,8 @@ public class GT_MetaTileEntity_AdvancedCraftingTable extends GT_MetaTileEntity_B @Override public String[] getDescription() { return new String[] { - "For the very large Projects", + isAdvanced() ? "For the very large Projects" : "For the smaller Projects", + "Hold Shift in GUI to see slot usage", this.mDescription, CORE.GT_Tooltip }; } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_BronzeCraftingTable.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_BronzeCraftingTable.java index 75d46cbb53..f421d391c0 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_BronzeCraftingTable.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_BronzeCraftingTable.java @@ -71,14 +71,6 @@ public class GT_MetaTileEntity_BronzeCraftingTable extends GT_MetaTileEntity_Adv return 0; } - @Override - public String[] getDescription() { - return new String[] { - "For the smaller Projects", - this.mDescription, - CORE.GT_Tooltip }; - } - @Override public int getCapacity() { return 16000; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java index 721dbd69c3..a0a4c8a749 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java @@ -1,11 +1,15 @@ package gtPlusPlus.xmod.gregtech.registration.gregtech; +import gregtech.api.GregTech_API; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_ElectricAutoWorkbench; +import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_ElectricInventoryManager; import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_TesseractGenerator; import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_TesseractTerminal; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_CropHarvestor; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GT4Entity_AutoCrafter; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GT4Entity_ThermalBoiler; import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_AdvancedCraftingTable; @@ -23,21 +27,55 @@ public class Gregtech4Content { public static void run() { if (LoadedMods.Gregtech) { + Logger.INFO("Max MTE: "+GregTech_API.METATILEENTITIES.length+" | "+GregTech_API.MAXIMUM_METATILE_IDS); workbenches(); thermalBoiler(); multiCrafter(); tesseracts(); shelves(); + basic(); + automation(); } } private static void workbenches() { // Gregtech 4 Workbenches Logger.INFO("Gregtech 4 Content | Registering Workbenches."); - GregtechItemList.GT4_Workbench_Bronze.set(new GT_MetaTileEntity_BronzeCraftingTable(29001, "workbench.basic", "Bronze Workbench", 0, "Stores 16000L of fluid").getStackForm(1L)); - GregtechItemList.GT4_Workbench_Advanced.set(new GT_MetaTileEntity_AdvancedCraftingTable(29002, "workbench.advanced", "Advanced Workbench", 3, "Stores 64000L of fluid").getStackForm(1L)); + GregtechItemList.GT4_Workbench_Bronze.set(new GT_MetaTileEntity_BronzeCraftingTable(31081, "workbench.basic", "Bronze Workbench", 0, "Stores 16000L of fluid").getStackForm(1L)); + GregtechItemList.GT4_Workbench_Advanced.set(new GT_MetaTileEntity_AdvancedCraftingTable(31082, "workbench.advanced", "Advanced Workbench", 3, "Stores 64000L of fluid").getStackForm(1L)); } + + private static void automation() { + GregtechItemList.GT4_Electric_Auto_Workbench_LV.set(new GT_MetaTileEntity_ElectricAutoWorkbench(31091, 1, "Automatic crafting machine").getStackForm(1L)); + GregtechItemList.GT4_Electric_Auto_Workbench_MV.set(new GT_MetaTileEntity_ElectricAutoWorkbench(31092, 2, "Automatic crafting machine").getStackForm(1L)); + GregtechItemList.GT4_Electric_Auto_Workbench_HV.set(new GT_MetaTileEntity_ElectricAutoWorkbench(31093, 3, "Automatic crafting machine").getStackForm(1L)); + GregtechItemList.GT4_Electric_Auto_Workbench_LV.set(new GT_MetaTileEntity_ElectricAutoWorkbench(31094, 4, "Automatic crafting machine").getStackForm(1L)); + GregtechItemList.GT4_Electric_Auto_Workbench_IV.set(new GT_MetaTileEntity_ElectricAutoWorkbench(31095, 5, "Automatic crafting machine").getStackForm(1L)); + GregtechItemList.GT4_Electric_Auto_Workbench_LuV.set(new GT_MetaTileEntity_ElectricAutoWorkbench(31096, 6, "Automatic crafting machine").getStackForm(1L)); + GregtechItemList.GT4_Electric_Auto_Workbench_ZPM.set(new GT_MetaTileEntity_ElectricAutoWorkbench(31097, 7, "Automatic crafting machine").getStackForm(1L)); + GregtechItemList.GT4_Electric_Auto_Workbench_UV.set(new GT_MetaTileEntity_ElectricAutoWorkbench(31098, 8, "Automatic crafting machine").getStackForm(1L)); + + GregtechItemList.GT4_Electric_Inventory_Manager_LV.set(new GT_MetaTileEntity_ElectricInventoryManager(31101, 1, "Manages your inventory and stuff").getStackForm(1L)); + GregtechItemList.GT4_Electric_Inventory_Manager_MV.set(new GT_MetaTileEntity_ElectricInventoryManager(31102, 2, "Manages your inventory and stuff").getStackForm(1L)); + GregtechItemList.GT4_Electric_Inventory_Manager_HV.set(new GT_MetaTileEntity_ElectricInventoryManager(31103, 3, "Manages your inventory and stuff").getStackForm(1L)); + GregtechItemList.GT4_Electric_Inventory_Manager_EV.set(new GT_MetaTileEntity_ElectricInventoryManager(31104, 4, "Manages your inventory and stuff").getStackForm(1L)); + GregtechItemList.GT4_Electric_Inventory_Manager_IV.set(new GT_MetaTileEntity_ElectricInventoryManager(31105, 5, "Manages your inventory and stuff").getStackForm(1L)); + GregtechItemList.GT4_Electric_Inventory_Manager_LuV.set(new GT_MetaTileEntity_ElectricInventoryManager(31106, 6, "Manages your inventory and stuff").getStackForm(1L)); + GregtechItemList.GT4_Electric_Inventory_Manager_ZPM.set(new GT_MetaTileEntity_ElectricInventoryManager(31107, 7, "Manages your inventory and stuff").getStackForm(1L)); + GregtechItemList.GT4_Electric_Inventory_Manager_UV.set(new GT_MetaTileEntity_ElectricInventoryManager(31108, 8, "Manages your inventory and stuff").getStackForm(1L)); + } + + private static void basic() { + GregtechItemList.GT4_Crop_Harvester_LV.set(new GT_MetaTileEntity_CropHarvestor(31111, 1, "Harvests the Cropsticks in front of it").getStackForm(1L)); + GregtechItemList.GT4_Crop_Harvester_MV.set(new GT_MetaTileEntity_CropHarvestor(31112, 2, "Harvests the Cropsticks in front of it").getStackForm(1L)); + GregtechItemList.GT4_Crop_Harvester_HV.set(new GT_MetaTileEntity_CropHarvestor(31113, 3, "Harvests the Cropsticks in front of it").getStackForm(1L)); + GregtechItemList.GT4_Crop_Harvester_EV.set(new GT_MetaTileEntity_CropHarvestor(31114, 4, "Harvests the Cropsticks in front of it").getStackForm(1L)); + GregtechItemList.GT4_Crop_Harvester_IV.set(new GT_MetaTileEntity_CropHarvestor(31115, 5, "Harvests the Cropsticks in front of it").getStackForm(1L)); + GregtechItemList.GT4_Crop_Harvester_LuV.set(new GT_MetaTileEntity_CropHarvestor(31116, 6, "Harvests the Cropsticks in front of it").getStackForm(1L)); + GregtechItemList.GT4_Crop_Harvester_ZPM.set(new GT_MetaTileEntity_CropHarvestor(31117, 7, "Harvests the Cropsticks in front of it").getStackForm(1L)); + GregtechItemList.GT4_Crop_Harvester_UV.set(new GT_MetaTileEntity_CropHarvestor(31118, 8, "Harvests the Cropsticks in front of it").getStackForm(1L)); + } private static void tesseracts() { // Gregtech 4 Tesseracts diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_BLUE.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_BLUE.png new file mode 100644 index 0000000000..19456fb462 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_BLUE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_BLUE_REDSTONE.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_BLUE_REDSTONE.png new file mode 100644 index 0000000000..870d09e8f2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_BLUE_REDSTONE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_BOXES.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_BOXES.png new file mode 100644 index 0000000000..553c674b58 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_BOXES.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_CROP.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_CROP.png new file mode 100644 index 0000000000..f6dec1fccf Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_CROP.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_CYAN.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_CYAN.png new file mode 100644 index 0000000000..ba9dfee948 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_CYAN.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_CYAN_REDSTONE.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_CYAN_REDSTONE.png new file mode 100644 index 0000000000..61d7b97402 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_CYAN_REDSTONE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_GREEN.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_GREEN.png new file mode 100644 index 0000000000..00614a28ee Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_GREEN.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_GREEN_REDSTONE.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_GREEN_REDSTONE.png new file mode 100644 index 0000000000..15e5e3807e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_GREEN_REDSTONE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_PURPLE.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_PURPLE.png new file mode 100644 index 0000000000..89a22fde86 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_PURPLE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_PURPLE_REDSTONE.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_PURPLE_REDSTONE.png new file mode 100644 index 0000000000..2b577185f7 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_PURPLE_REDSTONE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_RED.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_RED.png new file mode 100644 index 0000000000..78f0f3a7b7 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_RED.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_RED_REDSTONE.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_RED_REDSTONE.png new file mode 100644 index 0000000000..120c04d087 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_RED_REDSTONE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_SIDE_CABINET.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_SIDE_CABINET.png new file mode 100644 index 0000000000..6ed62a002d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_SIDE_CABINET.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_YELLOW.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_YELLOW.png new file mode 100644 index 0000000000..0f26874430 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_YELLOW.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_YELLOW_REDSTONE.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_YELLOW_REDSTONE.png new file mode 100644 index 0000000000..eacf4df06f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/OVERLAY_YELLOW_REDSTONE.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/number/1.png b/src/main/resources/assets/miscutils/textures/blocks/number/1.png new file mode 100644 index 0000000000..106e6e0d05 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/number/1.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/number/10.png b/src/main/resources/assets/miscutils/textures/blocks/number/10.png new file mode 100644 index 0000000000..169ce8c5f8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/number/10.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/number/11.png b/src/main/resources/assets/miscutils/textures/blocks/number/11.png new file mode 100644 index 0000000000..bf43b17391 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/number/11.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/number/12.png b/src/main/resources/assets/miscutils/textures/blocks/number/12.png new file mode 100644 index 0000000000..9a0b758056 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/number/12.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/number/13.png b/src/main/resources/assets/miscutils/textures/blocks/number/13.png new file mode 100644 index 0000000000..956d49540e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/number/13.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/number/14.png b/src/main/resources/assets/miscutils/textures/blocks/number/14.png new file mode 100644 index 0000000000..23133d3134 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/number/14.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/number/15.png b/src/main/resources/assets/miscutils/textures/blocks/number/15.png new file mode 100644 index 0000000000..07e60e9fee Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/number/15.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/number/16.png b/src/main/resources/assets/miscutils/textures/blocks/number/16.png new file mode 100644 index 0000000000..4cf29a3598 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/number/16.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/number/2.png b/src/main/resources/assets/miscutils/textures/blocks/number/2.png new file mode 100644 index 0000000000..aa8f532163 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/number/2.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/number/3.png b/src/main/resources/assets/miscutils/textures/blocks/number/3.png new file mode 100644 index 0000000000..fdc79c3699 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/number/3.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/number/4.png b/src/main/resources/assets/miscutils/textures/blocks/number/4.png new file mode 100644 index 0000000000..bc77ccf7be Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/number/4.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/number/5.png b/src/main/resources/assets/miscutils/textures/blocks/number/5.png new file mode 100644 index 0000000000..d32b0d02e8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/number/5.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/number/6.png b/src/main/resources/assets/miscutils/textures/blocks/number/6.png new file mode 100644 index 0000000000..a7fe7400a9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/number/6.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/number/7.png b/src/main/resources/assets/miscutils/textures/blocks/number/7.png new file mode 100644 index 0000000000..8b6cec6694 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/number/7.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/number/8.png b/src/main/resources/assets/miscutils/textures/blocks/number/8.png new file mode 100644 index 0000000000..d2f992d6c5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/number/8.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/number/9.png b/src/main/resources/assets/miscutils/textures/blocks/number/9.png new file mode 100644 index 0000000000..24151f645c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/number/9.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/CropHarvestor.png b/src/main/resources/assets/miscutils/textures/gui/CropHarvestor.png new file mode 100644 index 0000000000..39a39c1423 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/CropHarvestor.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/ElectricAutoWorkbench.png b/src/main/resources/assets/miscutils/textures/gui/ElectricAutoWorkbench.png new file mode 100644 index 0000000000..74b2edbb82 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/ElectricAutoWorkbench.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/InventoryManager.png b/src/main/resources/assets/miscutils/textures/gui/InventoryManager.png new file mode 100644 index 0000000000..dfebd41ab3 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/InventoryManager.png differ -- cgit From c1690b7dc678b54c263f6f4e854093673990ebb4 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Sun, 9 Jan 2022 04:18:03 +0000 Subject: Added more GT4 content: Redstone Lamp Redstone Display Redstone Scale Redstone Button Panel --- .../xmod/gregtech/api/enums/GregtechItemList.java | 5 + .../common/blocks/textures/TexturesGtBlock.java | 16 ++ .../redstone/GT_MetaTileEntity_RedstoneBase.java | 118 ++++++++++++ .../GT_MetaTileEntity_RedstoneButtonPanel.java | 207 +++++++++++++++++++++ .../redstone/GT_MetaTileEntity_RedstoneLamp.java | 75 ++++++++ .../GT_MetaTileEntity_RedstoneStrengthDisplay.java | 144 ++++++++++++++ .../GT_MetaTileEntity_RedstoneStrengthScale.java | 50 +++++ .../registration/gregtech/Gregtech4Content.java | 17 ++ .../TileEntities/gt4/redstone/ButtonPanel/0.png | Bin 0 -> 254 bytes .../TileEntities/gt4/redstone/ButtonPanel/1.png | Bin 0 -> 250 bytes .../TileEntities/gt4/redstone/ButtonPanel/10.png | Bin 0 -> 253 bytes .../TileEntities/gt4/redstone/ButtonPanel/11.png | Bin 0 -> 248 bytes .../TileEntities/gt4/redstone/ButtonPanel/12.png | Bin 0 -> 249 bytes .../TileEntities/gt4/redstone/ButtonPanel/13.png | Bin 0 -> 249 bytes .../TileEntities/gt4/redstone/ButtonPanel/14.png | Bin 0 -> 249 bytes .../TileEntities/gt4/redstone/ButtonPanel/15.png | Bin 0 -> 244 bytes .../TileEntities/gt4/redstone/ButtonPanel/16.png | Bin 0 -> 174 bytes .../TileEntities/gt4/redstone/ButtonPanel/17.png | Bin 0 -> 211 bytes .../TileEntities/gt4/redstone/ButtonPanel/18.png | Bin 0 -> 202 bytes .../TileEntities/gt4/redstone/ButtonPanel/19.png | Bin 0 -> 206 bytes .../TileEntities/gt4/redstone/ButtonPanel/2.png | Bin 0 -> 255 bytes .../TileEntities/gt4/redstone/ButtonPanel/20.png | Bin 0 -> 206 bytes .../TileEntities/gt4/redstone/ButtonPanel/21.png | Bin 0 -> 192 bytes .../TileEntities/gt4/redstone/ButtonPanel/22.png | Bin 0 -> 199 bytes .../TileEntities/gt4/redstone/ButtonPanel/23.png | Bin 0 -> 205 bytes .../TileEntities/gt4/redstone/ButtonPanel/24.png | Bin 0 -> 202 bytes .../TileEntities/gt4/redstone/ButtonPanel/25.png | Bin 0 -> 209 bytes .../TileEntities/gt4/redstone/ButtonPanel/26.png | Bin 0 -> 183 bytes .../TileEntities/gt4/redstone/ButtonPanel/27.png | Bin 0 -> 204 bytes .../TileEntities/gt4/redstone/ButtonPanel/28.png | Bin 0 -> 202 bytes .../TileEntities/gt4/redstone/ButtonPanel/29.png | Bin 0 -> 207 bytes .../TileEntities/gt4/redstone/ButtonPanel/3.png | Bin 0 -> 248 bytes .../TileEntities/gt4/redstone/ButtonPanel/30.png | Bin 0 -> 201 bytes .../TileEntities/gt4/redstone/ButtonPanel/31.png | Bin 0 -> 181 bytes .../TileEntities/gt4/redstone/ButtonPanel/32.png | Bin 0 -> 190 bytes .../TileEntities/gt4/redstone/ButtonPanel/33.png | Bin 0 -> 224 bytes .../TileEntities/gt4/redstone/ButtonPanel/34.png | Bin 0 -> 225 bytes .../TileEntities/gt4/redstone/ButtonPanel/35.png | Bin 0 -> 223 bytes .../TileEntities/gt4/redstone/ButtonPanel/36.png | Bin 0 -> 225 bytes .../TileEntities/gt4/redstone/ButtonPanel/37.png | Bin 0 -> 233 bytes .../TileEntities/gt4/redstone/ButtonPanel/38.png | Bin 0 -> 235 bytes .../TileEntities/gt4/redstone/ButtonPanel/39.png | Bin 0 -> 225 bytes .../TileEntities/gt4/redstone/ButtonPanel/4.png | Bin 0 -> 252 bytes .../TileEntities/gt4/redstone/ButtonPanel/40.png | Bin 0 -> 225 bytes .../TileEntities/gt4/redstone/ButtonPanel/41.png | Bin 0 -> 232 bytes .../TileEntities/gt4/redstone/ButtonPanel/42.png | Bin 0 -> 225 bytes .../TileEntities/gt4/redstone/ButtonPanel/43.png | Bin 0 -> 233 bytes .../TileEntities/gt4/redstone/ButtonPanel/44.png | Bin 0 -> 235 bytes .../TileEntities/gt4/redstone/ButtonPanel/45.png | Bin 0 -> 234 bytes .../TileEntities/gt4/redstone/ButtonPanel/46.png | Bin 0 -> 234 bytes .../TileEntities/gt4/redstone/ButtonPanel/47.png | Bin 0 -> 190 bytes .../TileEntities/gt4/redstone/ButtonPanel/48.png | Bin 0 -> 513 bytes .../TileEntities/gt4/redstone/ButtonPanel/49.png | Bin 0 -> 510 bytes .../TileEntities/gt4/redstone/ButtonPanel/5.png | Bin 0 -> 253 bytes .../TileEntities/gt4/redstone/ButtonPanel/50.png | Bin 0 -> 505 bytes .../TileEntities/gt4/redstone/ButtonPanel/51.png | Bin 0 -> 503 bytes .../TileEntities/gt4/redstone/ButtonPanel/52.png | Bin 0 -> 508 bytes .../TileEntities/gt4/redstone/ButtonPanel/53.png | Bin 0 -> 507 bytes .../TileEntities/gt4/redstone/ButtonPanel/54.png | Bin 0 -> 506 bytes .../TileEntities/gt4/redstone/ButtonPanel/55.png | Bin 0 -> 506 bytes .../TileEntities/gt4/redstone/ButtonPanel/56.png | Bin 0 -> 505 bytes .../TileEntities/gt4/redstone/ButtonPanel/57.png | Bin 0 -> 504 bytes .../TileEntities/gt4/redstone/ButtonPanel/58.png | Bin 0 -> 504 bytes .../TileEntities/gt4/redstone/ButtonPanel/59.png | Bin 0 -> 503 bytes .../TileEntities/gt4/redstone/ButtonPanel/6.png | Bin 0 -> 252 bytes .../TileEntities/gt4/redstone/ButtonPanel/60.png | Bin 0 -> 504 bytes .../TileEntities/gt4/redstone/ButtonPanel/61.png | Bin 0 -> 505 bytes .../TileEntities/gt4/redstone/ButtonPanel/62.png | Bin 0 -> 525 bytes .../TileEntities/gt4/redstone/ButtonPanel/63.png | Bin 0 -> 499 bytes .../TileEntities/gt4/redstone/ButtonPanel/7.png | Bin 0 -> 248 bytes .../TileEntities/gt4/redstone/ButtonPanel/8.png | Bin 0 -> 250 bytes .../TileEntities/gt4/redstone/ButtonPanel/9.png | Bin 0 -> 252 bytes .../blocks/TileEntities/gt4/redstone/Display/0.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Display/1.png | Bin 0 -> 822 bytes .../TileEntities/gt4/redstone/Display/10.png | Bin 0 -> 822 bytes .../TileEntities/gt4/redstone/Display/100.png | Bin 0 -> 192 bytes .../TileEntities/gt4/redstone/Display/101.png | Bin 0 -> 195 bytes .../TileEntities/gt4/redstone/Display/102.png | Bin 0 -> 190 bytes .../TileEntities/gt4/redstone/Display/103.png | Bin 0 -> 197 bytes .../TileEntities/gt4/redstone/Display/104.png | Bin 0 -> 186 bytes .../TileEntities/gt4/redstone/Display/105.png | Bin 0 -> 189 bytes .../TileEntities/gt4/redstone/Display/106.png | Bin 0 -> 188 bytes .../TileEntities/gt4/redstone/Display/107.png | Bin 0 -> 191 bytes .../TileEntities/gt4/redstone/Display/108.png | Bin 0 -> 189 bytes .../TileEntities/gt4/redstone/Display/109.png | Bin 0 -> 184 bytes .../TileEntities/gt4/redstone/Display/11.png | Bin 0 -> 822 bytes .../TileEntities/gt4/redstone/Display/110.png | Bin 0 -> 185 bytes .../TileEntities/gt4/redstone/Display/111.png | Bin 0 -> 182 bytes .../TileEntities/gt4/redstone/Display/112.png | Bin 0 -> 202 bytes .../TileEntities/gt4/redstone/Display/113.png | Bin 0 -> 222 bytes .../TileEntities/gt4/redstone/Display/114.png | Bin 0 -> 227 bytes .../TileEntities/gt4/redstone/Display/115.png | Bin 0 -> 240 bytes .../TileEntities/gt4/redstone/Display/116.png | Bin 0 -> 244 bytes .../TileEntities/gt4/redstone/Display/117.png | Bin 0 -> 238 bytes .../TileEntities/gt4/redstone/Display/118.png | Bin 0 -> 244 bytes .../TileEntities/gt4/redstone/Display/119.png | Bin 0 -> 242 bytes .../TileEntities/gt4/redstone/Display/12.png | Bin 0 -> 822 bytes .../TileEntities/gt4/redstone/Display/120.png | Bin 0 -> 242 bytes .../TileEntities/gt4/redstone/Display/121.png | Bin 0 -> 245 bytes .../TileEntities/gt4/redstone/Display/122.png | Bin 0 -> 241 bytes .../TileEntities/gt4/redstone/Display/123.png | Bin 0 -> 244 bytes .../TileEntities/gt4/redstone/Display/124.png | Bin 0 -> 239 bytes .../TileEntities/gt4/redstone/Display/125.png | Bin 0 -> 230 bytes .../TileEntities/gt4/redstone/Display/126.png | Bin 0 -> 234 bytes .../TileEntities/gt4/redstone/Display/127.png | Bin 0 -> 199 bytes .../TileEntities/gt4/redstone/Display/128.png | Bin 0 -> 183 bytes .../TileEntities/gt4/redstone/Display/129.png | Bin 0 -> 215 bytes .../TileEntities/gt4/redstone/Display/13.png | Bin 0 -> 822 bytes .../TileEntities/gt4/redstone/Display/130.png | Bin 0 -> 218 bytes .../TileEntities/gt4/redstone/Display/131.png | Bin 0 -> 233 bytes .../TileEntities/gt4/redstone/Display/132.png | Bin 0 -> 228 bytes .../TileEntities/gt4/redstone/Display/133.png | Bin 0 -> 232 bytes .../TileEntities/gt4/redstone/Display/134.png | Bin 0 -> 229 bytes .../TileEntities/gt4/redstone/Display/135.png | Bin 0 -> 227 bytes .../TileEntities/gt4/redstone/Display/136.png | Bin 0 -> 226 bytes .../TileEntities/gt4/redstone/Display/137.png | Bin 0 -> 230 bytes .../TileEntities/gt4/redstone/Display/138.png | Bin 0 -> 234 bytes .../TileEntities/gt4/redstone/Display/139.png | Bin 0 -> 220 bytes .../TileEntities/gt4/redstone/Display/14.png | Bin 0 -> 822 bytes .../TileEntities/gt4/redstone/Display/140.png | Bin 0 -> 236 bytes .../TileEntities/gt4/redstone/Display/141.png | Bin 0 -> 224 bytes .../TileEntities/gt4/redstone/Display/142.png | Bin 0 -> 222 bytes .../TileEntities/gt4/redstone/Display/143.png | Bin 0 -> 183 bytes .../TileEntities/gt4/redstone/Display/15.png | Bin 0 -> 822 bytes .../TileEntities/gt4/redstone/Display/16.png | Bin 0 -> 174 bytes .../TileEntities/gt4/redstone/Display/17.png | Bin 0 -> 171 bytes .../TileEntities/gt4/redstone/Display/18.png | Bin 0 -> 175 bytes .../TileEntities/gt4/redstone/Display/19.png | Bin 0 -> 166 bytes .../blocks/TileEntities/gt4/redstone/Display/2.png | Bin 0 -> 822 bytes .../TileEntities/gt4/redstone/Display/20.png | Bin 0 -> 185 bytes .../TileEntities/gt4/redstone/Display/21.png | Bin 0 -> 179 bytes .../TileEntities/gt4/redstone/Display/22.png | Bin 0 -> 171 bytes .../TileEntities/gt4/redstone/Display/23.png | Bin 0 -> 185 bytes .../TileEntities/gt4/redstone/Display/24.png | Bin 0 -> 162 bytes .../TileEntities/gt4/redstone/Display/25.png | Bin 0 -> 175 bytes .../TileEntities/gt4/redstone/Display/26.png | Bin 0 -> 175 bytes .../TileEntities/gt4/redstone/Display/27.png | Bin 0 -> 176 bytes .../TileEntities/gt4/redstone/Display/28.png | Bin 0 -> 177 bytes .../TileEntities/gt4/redstone/Display/29.png | Bin 0 -> 181 bytes .../blocks/TileEntities/gt4/redstone/Display/3.png | Bin 0 -> 822 bytes .../TileEntities/gt4/redstone/Display/30.png | Bin 0 -> 169 bytes .../TileEntities/gt4/redstone/Display/31.png | Bin 0 -> 177 bytes .../TileEntities/gt4/redstone/Display/32.png | Bin 0 -> 175 bytes .../TileEntities/gt4/redstone/Display/33.png | Bin 0 -> 171 bytes .../TileEntities/gt4/redstone/Display/34.png | Bin 0 -> 187 bytes .../TileEntities/gt4/redstone/Display/35.png | Bin 0 -> 174 bytes .../TileEntities/gt4/redstone/Display/36.png | Bin 0 -> 197 bytes .../TileEntities/gt4/redstone/Display/37.png | Bin 0 -> 185 bytes .../TileEntities/gt4/redstone/Display/38.png | Bin 0 -> 169 bytes .../TileEntities/gt4/redstone/Display/39.png | Bin 0 -> 194 bytes .../blocks/TileEntities/gt4/redstone/Display/4.png | Bin 0 -> 822 bytes .../TileEntities/gt4/redstone/Display/40.png | Bin 0 -> 167 bytes .../TileEntities/gt4/redstone/Display/41.png | Bin 0 -> 185 bytes .../TileEntities/gt4/redstone/Display/42.png | Bin 0 -> 172 bytes .../TileEntities/gt4/redstone/Display/43.png | Bin 0 -> 169 bytes .../TileEntities/gt4/redstone/Display/44.png | Bin 0 -> 180 bytes .../TileEntities/gt4/redstone/Display/45.png | Bin 0 -> 167 bytes .../TileEntities/gt4/redstone/Display/46.png | Bin 0 -> 189 bytes .../TileEntities/gt4/redstone/Display/47.png | Bin 0 -> 182 bytes .../TileEntities/gt4/redstone/Display/48.png | Bin 0 -> 188 bytes .../TileEntities/gt4/redstone/Display/49.png | Bin 0 -> 210 bytes .../blocks/TileEntities/gt4/redstone/Display/5.png | Bin 0 -> 822 bytes .../TileEntities/gt4/redstone/Display/50.png | Bin 0 -> 212 bytes .../TileEntities/gt4/redstone/Display/51.png | Bin 0 -> 212 bytes .../TileEntities/gt4/redstone/Display/52.png | Bin 0 -> 210 bytes .../TileEntities/gt4/redstone/Display/53.png | Bin 0 -> 193 bytes .../TileEntities/gt4/redstone/Display/54.png | Bin 0 -> 210 bytes .../TileEntities/gt4/redstone/Display/55.png | Bin 0 -> 205 bytes .../TileEntities/gt4/redstone/Display/56.png | Bin 0 -> 209 bytes .../TileEntities/gt4/redstone/Display/57.png | Bin 0 -> 206 bytes .../TileEntities/gt4/redstone/Display/58.png | Bin 0 -> 207 bytes .../TileEntities/gt4/redstone/Display/59.png | Bin 0 -> 212 bytes .../blocks/TileEntities/gt4/redstone/Display/6.png | Bin 0 -> 822 bytes .../TileEntities/gt4/redstone/Display/60.png | Bin 0 -> 211 bytes .../TileEntities/gt4/redstone/Display/61.png | Bin 0 -> 206 bytes .../TileEntities/gt4/redstone/Display/62.png | Bin 0 -> 213 bytes .../TileEntities/gt4/redstone/Display/63.png | Bin 0 -> 181 bytes .../TileEntities/gt4/redstone/Display/64.png | Bin 0 -> 182 bytes .../TileEntities/gt4/redstone/Display/65.png | Bin 0 -> 184 bytes .../TileEntities/gt4/redstone/Display/66.png | Bin 0 -> 194 bytes .../TileEntities/gt4/redstone/Display/67.png | Bin 0 -> 197 bytes .../TileEntities/gt4/redstone/Display/68.png | Bin 0 -> 198 bytes .../TileEntities/gt4/redstone/Display/69.png | Bin 0 -> 206 bytes .../blocks/TileEntities/gt4/redstone/Display/7.png | Bin 0 -> 822 bytes .../TileEntities/gt4/redstone/Display/70.png | Bin 0 -> 211 bytes .../TileEntities/gt4/redstone/Display/71.png | Bin 0 -> 210 bytes .../TileEntities/gt4/redstone/Display/72.png | Bin 0 -> 208 bytes .../TileEntities/gt4/redstone/Display/73.png | Bin 0 -> 221 bytes .../TileEntities/gt4/redstone/Display/74.png | Bin 0 -> 208 bytes .../TileEntities/gt4/redstone/Display/75.png | Bin 0 -> 199 bytes .../TileEntities/gt4/redstone/Display/76.png | Bin 0 -> 197 bytes .../TileEntities/gt4/redstone/Display/77.png | Bin 0 -> 199 bytes .../TileEntities/gt4/redstone/Display/78.png | Bin 0 -> 186 bytes .../TileEntities/gt4/redstone/Display/79.png | Bin 0 -> 183 bytes .../blocks/TileEntities/gt4/redstone/Display/8.png | Bin 0 -> 822 bytes .../TileEntities/gt4/redstone/Display/80.png | Bin 0 -> 192 bytes .../TileEntities/gt4/redstone/Display/81.png | Bin 0 -> 196 bytes .../TileEntities/gt4/redstone/Display/82.png | Bin 0 -> 196 bytes .../TileEntities/gt4/redstone/Display/83.png | Bin 0 -> 198 bytes .../TileEntities/gt4/redstone/Display/84.png | Bin 0 -> 199 bytes .../TileEntities/gt4/redstone/Display/85.png | Bin 0 -> 201 bytes .../TileEntities/gt4/redstone/Display/86.png | Bin 0 -> 203 bytes .../TileEntities/gt4/redstone/Display/87.png | Bin 0 -> 203 bytes .../TileEntities/gt4/redstone/Display/88.png | Bin 0 -> 208 bytes .../TileEntities/gt4/redstone/Display/89.png | Bin 0 -> 202 bytes .../blocks/TileEntities/gt4/redstone/Display/9.png | Bin 0 -> 822 bytes .../TileEntities/gt4/redstone/Display/90.png | Bin 0 -> 207 bytes .../TileEntities/gt4/redstone/Display/91.png | Bin 0 -> 203 bytes .../TileEntities/gt4/redstone/Display/92.png | Bin 0 -> 203 bytes .../TileEntities/gt4/redstone/Display/93.png | Bin 0 -> 201 bytes .../TileEntities/gt4/redstone/Display/94.png | Bin 0 -> 202 bytes .../TileEntities/gt4/redstone/Display/95.png | Bin 0 -> 190 bytes .../TileEntities/gt4/redstone/Display/96.png | Bin 0 -> 183 bytes .../TileEntities/gt4/redstone/Display/97.png | Bin 0 -> 190 bytes .../TileEntities/gt4/redstone/Display/98.png | Bin 0 -> 188 bytes .../TileEntities/gt4/redstone/Display/99.png | Bin 0 -> 193 bytes .../blocks/TileEntities/gt4/redstone/Lamp/off.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Lamp/on.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/0.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/1.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/10.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/11.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/12.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/13.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/14.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/15.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/16.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/17.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/18.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/19.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/2.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/20.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/21.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/22.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/23.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/24.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/25.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/26.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/27.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/28.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/29.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/3.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/30.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/31.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/4.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/5.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/6.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/7.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/8.png | Bin 0 -> 822 bytes .../blocks/TileEntities/gt4/redstone/Scale/9.png | Bin 0 -> 822 bytes .../redstone/machine_bottom_redstone_main_off.png | Bin 0 -> 179 bytes .../redstone/machine_bottom_redstone_main_on.png | Bin 0 -> 178 bytes .../gt4/redstone/machine_bottom_redstone_off.png | Bin 0 -> 169 bytes .../gt4/redstone/machine_bottom_redstone_on.png | Bin 0 -> 162 bytes .../redstone/machine_side_redstone_main_off.png | Bin 0 -> 172 bytes .../gt4/redstone/machine_side_redstone_main_on.png | Bin 0 -> 172 bytes .../gt4/redstone/machine_side_redstone_off.png | Bin 0 -> 165 bytes .../gt4/redstone/machine_side_redstone_on.png | Bin 0 -> 158 bytes .../gt4/redstone/machine_top_redstone_main_off.png | Bin 0 -> 179 bytes .../gt4/redstone/machine_top_redstone_main_on.png | Bin 0 -> 178 bytes .../gt4/redstone/machine_top_redstone_off.png | Bin 0 -> 169 bytes .../gt4/redstone/machine_top_redstone_on.png | Bin 0 -> 162 bytes 262 files changed, 632 insertions(+) create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneBase.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneButtonPanel.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneLamp.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneStrengthDisplay.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneStrengthScale.java create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/0.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/1.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/10.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/11.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/12.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/13.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/14.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/15.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/16.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/17.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/18.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/19.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/2.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/20.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/21.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/22.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/23.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/24.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/25.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/26.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/27.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/28.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/29.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/3.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/30.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/31.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/32.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/33.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/34.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/35.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/36.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/37.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/38.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/39.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/4.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/40.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/41.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/42.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/43.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/44.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/45.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/46.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/47.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/48.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/49.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/5.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/50.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/51.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/52.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/53.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/54.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/55.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/56.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/57.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/58.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/59.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/6.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/60.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/61.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/62.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/63.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/7.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/8.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/9.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/0.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/1.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/10.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/100.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/101.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/102.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/103.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/104.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/105.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/106.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/107.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/108.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/109.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/11.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/110.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/111.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/112.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/113.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/114.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/115.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/116.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/117.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/118.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/119.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/12.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/120.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/121.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/122.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/123.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/124.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/125.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/126.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/127.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/128.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/129.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/13.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/130.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/131.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/132.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/133.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/134.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/135.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/136.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/137.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/138.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/139.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/14.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/140.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/141.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/142.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/143.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/15.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/16.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/17.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/18.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/19.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/2.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/20.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/21.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/22.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/23.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/24.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/25.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/26.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/27.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/28.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/29.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/3.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/30.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/31.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/32.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/33.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/34.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/35.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/36.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/37.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/38.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/39.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/4.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/40.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/41.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/42.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/43.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/44.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/45.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/46.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/47.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/48.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/49.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/5.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/50.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/51.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/52.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/53.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/54.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/55.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/56.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/57.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/58.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/59.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/6.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/60.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/61.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/62.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/63.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/64.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/65.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/66.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/67.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/68.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/69.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/7.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/70.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/71.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/72.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/73.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/74.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/75.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/76.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/77.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/78.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/79.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/8.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/80.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/81.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/82.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/83.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/84.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/85.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/86.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/87.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/88.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/89.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/9.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/90.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/91.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/92.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/93.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/94.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/95.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/96.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/97.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/98.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/99.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Lamp/off.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Lamp/on.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/0.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/1.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/10.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/11.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/12.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/13.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/14.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/15.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/16.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/17.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/18.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/19.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/2.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/20.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/21.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/22.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/23.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/24.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/25.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/26.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/27.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/28.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/29.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/3.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/30.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/31.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/4.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/5.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/6.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/7.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/8.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/9.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_bottom_redstone_main_off.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_bottom_redstone_main_on.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_bottom_redstone_off.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_bottom_redstone_on.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_side_redstone_main_off.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_side_redstone_main_on.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_side_redstone_off.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_side_redstone_on.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_top_redstone_main_off.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_top_redstone_main_on.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_top_redstone_off.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_top_redstone_on.png (limited to 'src/main/resources/assets/miscutils/textures') diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java index 8497c91ab1..7a7ae278c0 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java @@ -528,6 +528,11 @@ public enum GregtechItemList implements GregtechItemContainer { //infinite Items Infinite_Item_Chest, + //GT4 Redstone + GT4_Redstone_Lamp, + GT4_Redstone_Button_Panel, + GT4_Redstone_Scale, + GT4_Redstone_Display, //Gt4 Workbenches GT4_Workbench_Bronze, diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java index 8195837a65..84c0686d61 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java @@ -415,6 +415,22 @@ public class TexturesGtBlock { public static final CustomIcon Casing_Adv_Workbench_Bottom = new CustomIcon("TileEntities/gt4/machine_bottom"); + public static final CustomIcon Casing_Redstone_Top_Off = new CustomIcon("TileEntities/gt4/redstone/machine_top_redstone_off"); + public static final CustomIcon Casing_Redstone_Top_Main_Off = new CustomIcon("TileEntities/gt4/redstone/machine_top_redstone_main_off"); + public static final CustomIcon Casing_Redstone_Top_On = new CustomIcon("TileEntities/gt4/redstone/machine_top_redstone_on"); + public static final CustomIcon Casing_Redstone_Top_Main_On = new CustomIcon("TileEntities/gt4/redstone/machine_top_redstone_main_on"); + + public static final CustomIcon Casing_Redstone_Side_Off = new CustomIcon("TileEntities/gt4/redstone/machine_side_redstone_off"); + public static final CustomIcon Casing_Redstone_Side_Main_Off = new CustomIcon("TileEntities/gt4/redstone/machine_side_redstone_main_off"); + public static final CustomIcon Casing_Redstone_Side_On = new CustomIcon("TileEntities/gt4/redstone/machine_side_redstone_on"); + public static final CustomIcon Casing_Redstone_Side_Main_On = new CustomIcon("TileEntities/gt4/redstone/machine_side_redstone_main_on"); + + public static final CustomIcon Casing_Redstone_Bottom_Off = new CustomIcon("TileEntities/gt4/redstone/machine_bottom_redstone_off"); + public static final CustomIcon Casing_Redstone_Bottom_Main_Off = new CustomIcon("TileEntities/gt4/redstone/machine_bottom_redstone_main_off"); + public static final CustomIcon Casing_Redstone_Bottom_On = new CustomIcon("TileEntities/gt4/redstone/machine_bottom_redstone_on"); + public static final CustomIcon Casing_Redstone_Bottom_Main_On = new CustomIcon("TileEntities/gt4/redstone/machine_bottom_redstone_main_on"); + + public static final CustomIcon Casing_Electric_Auto_Workbench_Side = new CustomIcon("TileEntities/gt4/OVERLAY_SIDE_CABINET"); public static final CustomIcon Casing_CropHarvester_Cutter = new CustomIcon("TileEntities/gt4/OVERLAY_CROP"); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneBase.java new file mode 100644 index 0000000000..8c02f08c65 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneBase.java @@ -0,0 +1,118 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.redstone; + +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; +import gregtech.api.objects.GT_ItemStack; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +public abstract class GT_MetaTileEntity_RedstoneBase extends GT_MetaTileEntity_TieredMachineBlock { + + protected int mOpenerCount; + + public GT_MetaTileEntity_RedstoneBase(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String aDescription, ITexture... aTextures) { + super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription, aTextures); + } + + public GT_MetaTileEntity_RedstoneBase(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String[] aDescription, ITexture... aTextures) { + super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription, aTextures); + } + + public GT_MetaTileEntity_RedstoneBase(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aInvSlotCount, aDescription, aTextures); + } + + public GT_MetaTileEntity_RedstoneBase(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aInvSlotCount, aDescription, aTextures); + } + + @Override + public final boolean isSimpleMachine() { + return false; + } + + @Override + public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) { + return aSide != getBaseMetaTileEntity().getFrontFacing(); + } + + @Override + public final boolean isValidSlot(int aIndex) { + return false; + } + + @Override + public final boolean isFacingValid(byte aFacing) { + return true; + } + + @Override + public final boolean isAccessAllowed(EntityPlayer aPlayer) { + return true; + } + + @Override + public abstract void saveNBTData(NBTTagCompound aNBT); + + @Override + public abstract void loadNBTData(NBTTagCompound aNBT); + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { + return true; + } + + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, gregtech.api.interfaces.tileentity.IGregTechTileEntity aBaseMetaTileEntity) { + return null; + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, gregtech.api.interfaces.tileentity.IGregTechTileEntity aBaseMetaTileEntity) { + return null; + } + + @Override + public final void onOpenGUI() { + super.onOpenGUI(); + mOpenerCount++; + } + + @Override + public final void onCloseGUI() { + super.onCloseGUI(); + mOpenerCount--; + } + + public final boolean hasRedstoneSignal() { + for (byte i=0;i<6;i++) { + if (getBaseMetaTileEntity().getOutputRedstoneSignal(i) > 0) { + return true; + } + } + return false; + } + + @Override + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return false; + } + + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return false; + } + + @Override + public String[] getDescription() { + return new String[]{ + this.mDescription, + CORE.GT_Tooltip + }; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneButtonPanel.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneButtonPanel.java new file mode 100644 index 0000000000..0c0cc44d93 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneButtonPanel.java @@ -0,0 +1,207 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.redstone; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.nbt.NBTTagCompound; + +public class GT_MetaTileEntity_RedstoneButtonPanel extends GT_MetaTileEntity_RedstoneBase { + + public byte mRedstoneStrength = 0, mType = 0, mUpdate = 0; + + public static TexturesGtBlock.CustomIcon[] sIconList = new TexturesGtBlock.CustomIcon[64]; + + static { + for (int i=0;i<64;i++) { + sIconList[i] = new CustomIcon("TileEntities/gt4/redstone/ButtonPanel/"+i); + } + } + + public GT_MetaTileEntity_RedstoneButtonPanel(int aID) { + super(aID, "redstone.button.panel", "Button Panel", 5, 0, "Right-click with Screwdriver to change Button Design"); + } + + public GT_MetaTileEntity_RedstoneButtonPanel(final String aName, String aDescription, final ITexture[][][] aTextures) { + super(aName, 5, 0, aDescription, aTextures); + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_RedstoneButtonPanel(this.mName, mDescription, this.mTextures); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setByte("mRedstoneStrength", mRedstoneStrength); + aNBT.setByte("mType", mType); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + mRedstoneStrength = aNBT.getByte("mRedstoneStrength"); + mType = aNBT.getByte("mType"); + } + + @Override + public void onValueUpdate(byte aValue) { + mRedstoneStrength = (byte)(aValue & 15); + mType = (byte)(aValue >>> 4); + } + + @Override + public byte getUpdateData() { + return (byte)((mRedstoneStrength & 15) | (mType << 4)); + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) { + if (aSide == getBaseMetaTileEntity().getFrontFacing()) { + if (getBaseMetaTileEntity().isServerSide()) { + mUpdate = 2; + switch (mType) { + case 0: default: + switch (aSide) { + case 0: case 1: + mRedstoneStrength = (byte)((byte)( aX*4) + 4 * (byte)( aZ*4)); + break; + case 2: + mRedstoneStrength = (byte)((byte)(4-aX*4) + 4 * (byte)(4-aY*4)); + break; + case 3: + mRedstoneStrength = (byte)((byte)( aX*4) + 4 * (byte)(4-aY*4)); + break; + case 4: + mRedstoneStrength = (byte)((byte)( aZ*4) + 4 * (byte)(4-aY*4)); + break; + case 5: + mRedstoneStrength = (byte)((byte)(4-aZ*4) + 4 * (byte)(4-aY*4)); + break; + } + break; + case 1: + switch (aSide) { + case 0: case 1: + mRedstoneStrength = (byte)(mRedstoneStrength ^ (1 << (((byte)( aX*2) + 2 * (byte)( aZ*2))))); + break; + case 2: + mRedstoneStrength = (byte)(mRedstoneStrength ^ (1 << (((byte)(2-aX*2) + 2 * (byte)(2-aY*2))))); + break; + case 3: + mRedstoneStrength = (byte)(mRedstoneStrength ^ (1 << (((byte)( aX*2) + 2 * (byte)(2-aY*2))))); + break; + case 4: + mRedstoneStrength = (byte)(mRedstoneStrength ^ (1 << (((byte)( aZ*2) + 2 * (byte)(2-aY*2))))); + break; + case 5: + mRedstoneStrength = (byte)(mRedstoneStrength ^ (1 << (((byte)(2-aZ*2) + 2 * (byte)(2-aY*2))))); + break; + } + break; + case 2: + switch (aSide) { + case 0: case 1: + mRedstoneStrength = (byte)(mRedstoneStrength ^ (1 << ((byte)( aZ*4)))); + break; + case 2: + mRedstoneStrength = (byte)(mRedstoneStrength ^ (1 << ((byte)(4-aY*4)))); + break; + case 3: + mRedstoneStrength = (byte)(mRedstoneStrength ^ (1 << ((byte)(4-aY*4)))); + break; + case 4: + mRedstoneStrength = (byte)(mRedstoneStrength ^ (1 << ((byte)(4-aY*4)))); + break; + case 5: + mRedstoneStrength = (byte)(mRedstoneStrength ^ (1 << ((byte)(4-aY*4)))); + break; + } + break; + } + } + return true; + } + return false; + } + + @Override + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if (getBaseMetaTileEntity().isServerSide()) { + getBaseMetaTileEntity().setGenericRedstoneOutput(true); + if (mUpdate > 0) { + mUpdate--; + } + else if (getBaseMetaTileEntity().isAllowedToWork()) { + mRedstoneStrength = 0; + } + for (byte i = 0; i < 6; i++) { + getBaseMetaTileEntity().setStrongOutputRedstoneSignal(i, i == getBaseMetaTileEntity().getFrontFacing()?(byte)0:mRedstoneStrength); + getBaseMetaTileEntity().setInternalOutputRedstoneSignal(i, i == getBaseMetaTileEntity().getFrontFacing()?(byte)0:mRedstoneStrength); + } + } + } + + @Override + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (aSide == getBaseMetaTileEntity().getFrontFacing()) mType=(byte)((mType+1)%3); + } + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + final ITexture[][][] rTextures = new ITexture[10][17][]; + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = this.getFront(i); + rTextures[1][i + 1] = this.getSides(i); + rTextures[2][i + 1] = this.getBottom(i); + rTextures[3][i + 1] = this.getTop(i); + rTextures[4][i + 1] = this.getSides(i); + rTextures[5][i + 1] = this.getFront(i); + rTextures[6][i + 1] = this.getSidesActive(i); + rTextures[7][i + 1] = this.getBottomActive(i); + rTextures[8][i + 1] = this.getTopActive(i); + rTextures[9][i + 1] = this.getSidesActive(i); + } + return rTextures; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], new GT_RenderedTexture(sIconList[mType*16+mRedstoneStrength])}; + } + return this.mTextures[(aActive || hasRedstoneSignal() ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; + } + + public ITexture[] getFront(final byte aColor) { + return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + } + + public ITexture[] getTop(final byte aColor) { + return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Top_Main_Off)}; + } + + public ITexture[] getTopActive(final byte aColor) { + return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Top_Main_On)}; + } + + public ITexture[] getBottom(final byte aColor) { + return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Bottom_Main_Off)}; + } + + public ITexture[] getBottomActive(final byte aColor) { + return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Bottom_Main_On)}; + } + + public ITexture[] getSides(final byte aColor) { + return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Side_Main_Off)}; + } + + public ITexture[] getSidesActive(final byte aColor) { + return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Side_Main_On)}; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneLamp.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneLamp.java new file mode 100644 index 0000000000..81517c83b9 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneLamp.java @@ -0,0 +1,75 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.redstone; + +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; +import net.minecraft.nbt.NBTTagCompound; + +public class GT_MetaTileEntity_RedstoneLamp extends GT_MetaTileEntity_RedstoneBase { + + public byte mRedstoneStrength = 0, mType = 0; + public static TexturesGtBlock.CustomIcon[] sIconList = new TexturesGtBlock.CustomIcon[2]; + + static { + sIconList[0] = new CustomIcon("TileEntities/gt4/redstone/Lamp/off"); + sIconList[1] = new CustomIcon("TileEntities/gt4/redstone/Lamp/on"); + } + + public GT_MetaTileEntity_RedstoneLamp(int aID) { + super(aID, "redstone.lamp", "Redstone Controlled Lamp", 0, 0, "Redstone Controlled Lamp"); + } + + public GT_MetaTileEntity_RedstoneLamp(final String aName, String aDescription, final ITexture[][][] aTextures) { + super(aName, 0, 0, aDescription, aTextures); + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_RedstoneLamp(this.mName, mDescription, this.mTextures); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + + } + + @Override + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if (getBaseMetaTileEntity().isAllowedToWork() && getBaseMetaTileEntity().isServerSide()) { + getBaseMetaTileEntity().setLightValue(getBaseMetaTileEntity().getStrongestRedstone()); + getBaseMetaTileEntity().setActive(getBaseMetaTileEntity().getStrongestRedstone()>0); + } + } + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + final ITexture[][][] rTextures = new ITexture[10][17][]; + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = this.getSides(i); + rTextures[1][i + 1] = this.getSidesActive(i); + } + return rTextures; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + return this.mTextures[(aActive ? 1 : 0)][aColorIndex + 1]; + } + + public ITexture[] getSides(final byte aColor) { + return new ITexture[] {new GT_RenderedTexture(sIconList[0])}; + } + + public ITexture[] getSidesActive(final byte aColor) { + return new ITexture[] {new GT_RenderedTexture(sIconList[1])}; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneStrengthDisplay.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneStrengthDisplay.java new file mode 100644 index 0000000000..1f65385793 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneStrengthDisplay.java @@ -0,0 +1,144 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.redstone; + +import gregtech.api.enums.Textures; +import gregtech.api.enums.Textures.BlockIcons; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.nbt.NBTTagCompound; + +public class GT_MetaTileEntity_RedstoneStrengthDisplay extends GT_MetaTileEntity_RedstoneBase { + + public byte mRedstoneStrength = 0, mType = 0; + public static TexturesGtBlock.CustomIcon[] sIconList = new TexturesGtBlock.CustomIcon[144]; + + static { + for (int i=0;i<144;i++) { + sIconList[i] = new CustomIcon("TileEntities/gt4/redstone/Display/"+i); + } + } + + public GT_MetaTileEntity_RedstoneStrengthDisplay(int aID, String aUnlocal, String aLocal, String aDescription) { + super(aID, aUnlocal, aLocal, 5, 0, aDescription); + } + + public GT_MetaTileEntity_RedstoneStrengthDisplay(final String aName, String aDescription, final ITexture[][][] aTextures) { + super(aName, 5, 0, aDescription, aTextures); + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_RedstoneStrengthDisplay(this.mName, mDescription, this.mTextures); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setByte("mRedstoneStrength", mRedstoneStrength); + aNBT.setByte("mType", mType); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + mRedstoneStrength = aNBT.getByte("mRedstoneStrength"); + mType = aNBT.getByte("mType"); + } + + @Override + public void onValueUpdate(byte aValue) { + mRedstoneStrength = (byte) (aValue & 15); + mType = (byte) (aValue >>> 4); + } + + @Override + public byte getUpdateData() { + return (byte) ((mRedstoneStrength & 15) | (mType << 4)); + } + + @Override + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPreTick(aBaseMetaTileEntity, aTick); + if (getBaseMetaTileEntity().isAllowedToWork() && getBaseMetaTileEntity().isServerSide()) { + mRedstoneStrength = getBaseMetaTileEntity().getStrongestRedstone(); + } + } + + /*@Override + public int getTextureIndex(byte aSide, byte aFacing, boolean aActive, boolean aRedstone) { + if (aSide == 0) + return aRedstone ? 60 : 59; + if (aSide == 1) + return aRedstone ? 58 : 57; + return aRedstone ? 62 : 61; + }*/ + + @Override + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (aSide == getBaseMetaTileEntity().getFrontFacing()) + mType = (byte) ((mType + 1) % 6); + } + + /*@Override + public IIcon getTextureIcon(byte aSide, byte aFacing, boolean aActive, boolean aRedstone) { + return aSide == aFacing ? sIconList[mType * 16 + mRedstoneStrength] : null; + }*/ + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + final ITexture[][][] rTextures = new ITexture[10][17][]; + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = this.getFront(i); + rTextures[1][i + 1] = this.getSides(i); + rTextures[2][i + 1] = this.getBottom(i); + rTextures[3][i + 1] = this.getTop(i); + rTextures[4][i + 1] = this.getSides(i); + rTextures[5][i + 1] = this.getFront(i); + rTextures[6][i + 1] = this.getSidesActive(i); + rTextures[7][i + 1] = this.getBottomActive(i); + rTextures[8][i + 1] = this.getTopActive(i); + rTextures[9][i + 1] = this.getSidesActive(i); + } + return rTextures; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], new GT_RenderedTexture(sIconList[mType * 16 + mRedstoneStrength])}; + } + return this.mTextures[(aActive || hasRedstoneSignal() ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; + } + + public ITexture[] getFront(final byte aColor) { + return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1]}; + } + + public ITexture[] getTop(final byte aColor) { + return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Top_Off)}; + } + + public ITexture[] getTopActive(final byte aColor) { + return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Top_On)}; + } + + public ITexture[] getBottom(final byte aColor) { + return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Bottom_Off)}; + } + + public ITexture[] getBottomActive(final byte aColor) { + return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Bottom_On)}; + } + + public ITexture[] getSides(final byte aColor) { + return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Side_Off)}; + } + + public ITexture[] getSidesActive(final byte aColor) { + return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Redstone_Side_On)}; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneStrengthScale.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneStrengthScale.java new file mode 100644 index 0000000000..efa3763370 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneStrengthScale.java @@ -0,0 +1,50 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.redstone; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; +import net.minecraft.entity.player.EntityPlayer; + +public class GT_MetaTileEntity_RedstoneStrengthScale extends GT_MetaTileEntity_RedstoneStrengthDisplay { + + public static TexturesGtBlock.CustomIcon[] sIconList = new TexturesGtBlock.CustomIcon[32]; + + static { + for (int i=0;i<32;i++) { + sIconList[i] = new CustomIcon("TileEntities/gt4/redstone/Scale/"+i); + } + } + + public GT_MetaTileEntity_RedstoneStrengthScale(int aID) { + super(aID, "redstone.display.scale", "Redstone Scale", "Redstone Strength on a Scale"); + } + + public GT_MetaTileEntity_RedstoneStrengthScale(final String aName, String aDescription, final ITexture[][][] aTextures) { + super(aName, aDescription, aTextures); + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_RedstoneStrengthScale(this.mName, mDescription, this.mTextures); + } + + @Override + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (aSide == getBaseMetaTileEntity().getFrontFacing()) + mType = (byte) ((mType + 1) % 2); + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], new GT_RenderedTexture(sIconList[mType * 16 + mRedstoneStrength])}; + } + return this.mTextures[(aActive || hasRedstoneSignal() ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java index a0a4c8a749..6741a3e433 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java @@ -12,6 +12,10 @@ import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_CropHarvestor; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GT4Entity_AutoCrafter; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GT4Entity_ThermalBoiler; +import gtPlusPlus.xmod.gregtech.common.tileentities.redstone.GT_MetaTileEntity_RedstoneButtonPanel; +import gtPlusPlus.xmod.gregtech.common.tileentities.redstone.GT_MetaTileEntity_RedstoneLamp; +import gtPlusPlus.xmod.gregtech.common.tileentities.redstone.GT_MetaTileEntity_RedstoneStrengthDisplay; +import gtPlusPlus.xmod.gregtech.common.tileentities.redstone.GT_MetaTileEntity_RedstoneStrengthScale; import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_AdvancedCraftingTable; import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_BronzeCraftingTable; import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.GT4Entity_Shelf; @@ -35,6 +39,7 @@ public class Gregtech4Content { shelves(); basic(); automation(); + redstone(); } } @@ -46,7 +51,17 @@ public class Gregtech4Content { } + private static void redstone() { + Logger.INFO("Gregtech 4 Content | Registering Redstone Blocks."); + GregtechItemList.GT4_Redstone_Lamp.set(new GT_MetaTileEntity_RedstoneLamp(31120).getStackForm(1L)); + GregtechItemList.GT4_Redstone_Button_Panel.set(new GT_MetaTileEntity_RedstoneButtonPanel(31121).getStackForm(1L)); + GregtechItemList.GT4_Redstone_Scale.set(new GT_MetaTileEntity_RedstoneStrengthScale(31122).getStackForm(1L)); + GregtechItemList.GT4_Redstone_Display.set(new GT_MetaTileEntity_RedstoneStrengthDisplay(31123, "redstone.display.strength", "Redstone Display", "Displays Redstone Strength").getStackForm(1L)); + + } + private static void automation() { + Logger.INFO("Gregtech 4 Content | Registering Auto Workbenches."); GregtechItemList.GT4_Electric_Auto_Workbench_LV.set(new GT_MetaTileEntity_ElectricAutoWorkbench(31091, 1, "Automatic crafting machine").getStackForm(1L)); GregtechItemList.GT4_Electric_Auto_Workbench_MV.set(new GT_MetaTileEntity_ElectricAutoWorkbench(31092, 2, "Automatic crafting machine").getStackForm(1L)); GregtechItemList.GT4_Electric_Auto_Workbench_HV.set(new GT_MetaTileEntity_ElectricAutoWorkbench(31093, 3, "Automatic crafting machine").getStackForm(1L)); @@ -56,6 +71,7 @@ public class Gregtech4Content { GregtechItemList.GT4_Electric_Auto_Workbench_ZPM.set(new GT_MetaTileEntity_ElectricAutoWorkbench(31097, 7, "Automatic crafting machine").getStackForm(1L)); GregtechItemList.GT4_Electric_Auto_Workbench_UV.set(new GT_MetaTileEntity_ElectricAutoWorkbench(31098, 8, "Automatic crafting machine").getStackForm(1L)); + Logger.INFO("Gregtech 4 Content | Registering Inventory Managers."); GregtechItemList.GT4_Electric_Inventory_Manager_LV.set(new GT_MetaTileEntity_ElectricInventoryManager(31101, 1, "Manages your inventory and stuff").getStackForm(1L)); GregtechItemList.GT4_Electric_Inventory_Manager_MV.set(new GT_MetaTileEntity_ElectricInventoryManager(31102, 2, "Manages your inventory and stuff").getStackForm(1L)); GregtechItemList.GT4_Electric_Inventory_Manager_HV.set(new GT_MetaTileEntity_ElectricInventoryManager(31103, 3, "Manages your inventory and stuff").getStackForm(1L)); @@ -67,6 +83,7 @@ public class Gregtech4Content { } private static void basic() { + Logger.INFO("Gregtech 4 Content | Registering Crop Managers."); GregtechItemList.GT4_Crop_Harvester_LV.set(new GT_MetaTileEntity_CropHarvestor(31111, 1, "Harvests the Cropsticks in front of it").getStackForm(1L)); GregtechItemList.GT4_Crop_Harvester_MV.set(new GT_MetaTileEntity_CropHarvestor(31112, 2, "Harvests the Cropsticks in front of it").getStackForm(1L)); GregtechItemList.GT4_Crop_Harvester_HV.set(new GT_MetaTileEntity_CropHarvestor(31113, 3, "Harvests the Cropsticks in front of it").getStackForm(1L)); diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/0.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/0.png new file mode 100644 index 0000000000..10d882e13f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/0.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/1.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/1.png new file mode 100644 index 0000000000..b4cf1ad1c5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/1.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/10.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/10.png new file mode 100644 index 0000000000..5be386c991 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/10.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/11.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/11.png new file mode 100644 index 0000000000..4d2770d6ea Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/11.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/12.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/12.png new file mode 100644 index 0000000000..dda5b9f70c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/12.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/13.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/13.png new file mode 100644 index 0000000000..08083ce68d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/13.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/14.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/14.png new file mode 100644 index 0000000000..d368a109ba Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/14.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/15.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/15.png new file mode 100644 index 0000000000..974026d8c1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/15.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/16.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/16.png new file mode 100644 index 0000000000..64797504ea Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/16.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/17.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/17.png new file mode 100644 index 0000000000..ed3ba22f03 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/17.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/18.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/18.png new file mode 100644 index 0000000000..0822a9ff9e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/18.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/19.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/19.png new file mode 100644 index 0000000000..d17c80290e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/19.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/2.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/2.png new file mode 100644 index 0000000000..02b703dd72 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/2.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/20.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/20.png new file mode 100644 index 0000000000..4d789dcd34 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/20.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/21.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/21.png new file mode 100644 index 0000000000..1a86034ee6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/21.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/22.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/22.png new file mode 100644 index 0000000000..5b614c2b75 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/22.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/23.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/23.png new file mode 100644 index 0000000000..e5c64819ce Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/23.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/24.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/24.png new file mode 100644 index 0000000000..9cd772a7bc Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/24.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/25.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/25.png new file mode 100644 index 0000000000..758f3a5925 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/25.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/26.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/26.png new file mode 100644 index 0000000000..582a7226ea Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/26.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/27.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/27.png new file mode 100644 index 0000000000..bf8bee95fd Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/27.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/28.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/28.png new file mode 100644 index 0000000000..59ec6fc494 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/28.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/29.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/29.png new file mode 100644 index 0000000000..0ebf3022a1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/29.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/3.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/3.png new file mode 100644 index 0000000000..726b97e140 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/3.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/30.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/30.png new file mode 100644 index 0000000000..a5b703fcd6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/30.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/31.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/31.png new file mode 100644 index 0000000000..49b84b97a4 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/31.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/32.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/32.png new file mode 100644 index 0000000000..c6fd476b1a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/32.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/33.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/33.png new file mode 100644 index 0000000000..0300e86059 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/33.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/34.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/34.png new file mode 100644 index 0000000000..5ef3e61175 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/34.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/35.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/35.png new file mode 100644 index 0000000000..8e077d1d7d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/35.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/36.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/36.png new file mode 100644 index 0000000000..5aff3c93de Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/36.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/37.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/37.png new file mode 100644 index 0000000000..c3cad83294 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/37.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/38.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/38.png new file mode 100644 index 0000000000..87b3fb5225 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/38.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/39.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/39.png new file mode 100644 index 0000000000..10798b86d8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/39.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/4.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/4.png new file mode 100644 index 0000000000..ad834b3576 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/4.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/40.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/40.png new file mode 100644 index 0000000000..ce6321458d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/40.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/41.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/41.png new file mode 100644 index 0000000000..d5a2428eb1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/41.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/42.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/42.png new file mode 100644 index 0000000000..70317dd7a7 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/42.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/43.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/43.png new file mode 100644 index 0000000000..3c61345b63 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/43.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/44.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/44.png new file mode 100644 index 0000000000..764853abfa Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/44.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/45.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/45.png new file mode 100644 index 0000000000..7c7c30d998 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/45.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/46.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/46.png new file mode 100644 index 0000000000..367a85067b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/46.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/47.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/47.png new file mode 100644 index 0000000000..52de50d2b2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/47.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/48.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/48.png new file mode 100644 index 0000000000..f283ec79b2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/48.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/49.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/49.png new file mode 100644 index 0000000000..426c42b558 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/49.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/5.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/5.png new file mode 100644 index 0000000000..011bee76c3 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/5.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/50.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/50.png new file mode 100644 index 0000000000..7b23d35271 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/50.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/51.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/51.png new file mode 100644 index 0000000000..b930b49af3 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/51.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/52.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/52.png new file mode 100644 index 0000000000..6e73111695 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/52.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/53.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/53.png new file mode 100644 index 0000000000..98d2cdb4c5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/53.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/54.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/54.png new file mode 100644 index 0000000000..5db3a982ea Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/54.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/55.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/55.png new file mode 100644 index 0000000000..00b697cdf7 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/55.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/56.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/56.png new file mode 100644 index 0000000000..0464a70a58 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/56.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/57.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/57.png new file mode 100644 index 0000000000..e70c013912 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/57.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/58.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/58.png new file mode 100644 index 0000000000..e9938feff2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/58.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/59.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/59.png new file mode 100644 index 0000000000..890f09f231 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/59.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/6.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/6.png new file mode 100644 index 0000000000..42eeda7b4e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/6.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/60.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/60.png new file mode 100644 index 0000000000..94db5b9946 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/60.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/61.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/61.png new file mode 100644 index 0000000000..6efa02daf2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/61.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/62.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/62.png new file mode 100644 index 0000000000..3983966fda Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/62.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/63.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/63.png new file mode 100644 index 0000000000..7f14006fe7 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/63.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/7.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/7.png new file mode 100644 index 0000000000..edd4a94aee Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/7.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/8.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/8.png new file mode 100644 index 0000000000..1a63ac762c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/8.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/9.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/9.png new file mode 100644 index 0000000000..9964ac7486 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/ButtonPanel/9.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/0.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/0.png new file mode 100644 index 0000000000..aac94f4d6c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/0.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/1.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/1.png new file mode 100644 index 0000000000..4571bca877 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/1.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/10.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/10.png new file mode 100644 index 0000000000..2391919c11 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/10.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/100.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/100.png new file mode 100644 index 0000000000..644ed36a90 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/100.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/101.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/101.png new file mode 100644 index 0000000000..b67da08aed Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/101.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/102.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/102.png new file mode 100644 index 0000000000..1d8c4e2490 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/102.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/103.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/103.png new file mode 100644 index 0000000000..eace1e1e7e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/103.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/104.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/104.png new file mode 100644 index 0000000000..e63d77edad Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/104.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/105.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/105.png new file mode 100644 index 0000000000..63f45d2287 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/105.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/106.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/106.png new file mode 100644 index 0000000000..6c571f8e58 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/106.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/107.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/107.png new file mode 100644 index 0000000000..204a0aa231 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/107.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/108.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/108.png new file mode 100644 index 0000000000..4c927a85f2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/108.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/109.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/109.png new file mode 100644 index 0000000000..9fa6010d04 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/109.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/11.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/11.png new file mode 100644 index 0000000000..ee82155436 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/11.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/110.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/110.png new file mode 100644 index 0000000000..7bd92aaa6e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/110.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/111.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/111.png new file mode 100644 index 0000000000..70a75f9600 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/111.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/112.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/112.png new file mode 100644 index 0000000000..22220a9ba6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/112.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/113.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/113.png new file mode 100644 index 0000000000..0d40f42170 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/113.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/114.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/114.png new file mode 100644 index 0000000000..e4ea8065da Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/114.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/115.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/115.png new file mode 100644 index 0000000000..43541eeeb2 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/115.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/116.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/116.png new file mode 100644 index 0000000000..c8d30df85a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/116.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/117.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/117.png new file mode 100644 index 0000000000..349f3114af Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/117.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/118.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/118.png new file mode 100644 index 0000000000..8f07eb15cc Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/118.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/119.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/119.png new file mode 100644 index 0000000000..bb75cda218 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/119.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/12.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/12.png new file mode 100644 index 0000000000..907c77700e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/12.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/120.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/120.png new file mode 100644 index 0000000000..7ca146e829 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/120.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/121.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/121.png new file mode 100644 index 0000000000..52019a127f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/121.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/122.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/122.png new file mode 100644 index 0000000000..0021064944 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/122.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/123.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/123.png new file mode 100644 index 0000000000..16a2322abb Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/123.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/124.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/124.png new file mode 100644 index 0000000000..3728d698e5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/124.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/125.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/125.png new file mode 100644 index 0000000000..338086ea34 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/125.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/126.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/126.png new file mode 100644 index 0000000000..cf92e50fe1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/126.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/127.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/127.png new file mode 100644 index 0000000000..44f46489f4 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/127.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/128.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/128.png new file mode 100644 index 0000000000..cd3d00ed5d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/128.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/129.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/129.png new file mode 100644 index 0000000000..e15af0cd81 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/129.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/13.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/13.png new file mode 100644 index 0000000000..16a9298fa0 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/13.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/130.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/130.png new file mode 100644 index 0000000000..236b4b80b9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/130.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/131.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/131.png new file mode 100644 index 0000000000..2146a21dcb Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/131.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/132.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/132.png new file mode 100644 index 0000000000..8e6c4b7fab Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/132.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/133.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/133.png new file mode 100644 index 0000000000..968baf1add Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/133.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/134.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/134.png new file mode 100644 index 0000000000..5a9274232f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/134.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/135.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/135.png new file mode 100644 index 0000000000..0fd7625761 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/135.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/136.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/136.png new file mode 100644 index 0000000000..9f16c39367 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/136.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/137.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/137.png new file mode 100644 index 0000000000..15eb15c7e0 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/137.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/138.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/138.png new file mode 100644 index 0000000000..4e86dfaf93 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/138.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/139.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/139.png new file mode 100644 index 0000000000..790c0d4a74 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/139.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/14.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/14.png new file mode 100644 index 0000000000..5c2827b117 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/14.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/140.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/140.png new file mode 100644 index 0000000000..0a2f07d9fe Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/140.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/141.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/141.png new file mode 100644 index 0000000000..6ad3543609 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/141.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/142.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/142.png new file mode 100644 index 0000000000..65942b572f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/142.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/143.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/143.png new file mode 100644 index 0000000000..7ee3b4c91d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/143.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/15.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/15.png new file mode 100644 index 0000000000..8291c9a39c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/15.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/16.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/16.png new file mode 100644 index 0000000000..2a8779fb61 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/16.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/17.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/17.png new file mode 100644 index 0000000000..1ddd1f6ad5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/17.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/18.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/18.png new file mode 100644 index 0000000000..ac0dcc3f76 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/18.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/19.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/19.png new file mode 100644 index 0000000000..1d2101a43a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/19.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/2.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/2.png new file mode 100644 index 0000000000..e412953793 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/2.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/20.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/20.png new file mode 100644 index 0000000000..e5d71c3965 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/20.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/21.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/21.png new file mode 100644 index 0000000000..ad8cb864ba Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/21.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/22.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/22.png new file mode 100644 index 0000000000..751662e049 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/22.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/23.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/23.png new file mode 100644 index 0000000000..142c713efe Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/23.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/24.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/24.png new file mode 100644 index 0000000000..5e1097bf80 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/24.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/25.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/25.png new file mode 100644 index 0000000000..391d12d2cd Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/25.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/26.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/26.png new file mode 100644 index 0000000000..5dc9635b3a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/26.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/27.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/27.png new file mode 100644 index 0000000000..03fcb8285b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/27.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/28.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/28.png new file mode 100644 index 0000000000..01d8912612 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/28.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/29.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/29.png new file mode 100644 index 0000000000..7755b75e4a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/29.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/3.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/3.png new file mode 100644 index 0000000000..cf3107aecd Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/3.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/30.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/30.png new file mode 100644 index 0000000000..fb1e7714cf Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/30.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/31.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/31.png new file mode 100644 index 0000000000..38e66ff784 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/31.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/32.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/32.png new file mode 100644 index 0000000000..20083e41ae Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/32.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/33.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/33.png new file mode 100644 index 0000000000..bbcd289595 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/33.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/34.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/34.png new file mode 100644 index 0000000000..cb5c142713 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/34.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/35.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/35.png new file mode 100644 index 0000000000..50e459ac1e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/35.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/36.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/36.png new file mode 100644 index 0000000000..741ca3ac20 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/36.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/37.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/37.png new file mode 100644 index 0000000000..64af38a224 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/37.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/38.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/38.png new file mode 100644 index 0000000000..de2abc3646 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/38.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/39.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/39.png new file mode 100644 index 0000000000..ff782c55c4 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/39.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/4.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/4.png new file mode 100644 index 0000000000..10de7d0317 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/4.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/40.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/40.png new file mode 100644 index 0000000000..b35c8b37e3 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/40.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/41.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/41.png new file mode 100644 index 0000000000..1da7e74566 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/41.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/42.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/42.png new file mode 100644 index 0000000000..aaab388552 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/42.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/43.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/43.png new file mode 100644 index 0000000000..3581670fb5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/43.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/44.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/44.png new file mode 100644 index 0000000000..d4422e227b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/44.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/45.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/45.png new file mode 100644 index 0000000000..f24d8c84e3 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/45.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/46.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/46.png new file mode 100644 index 0000000000..7a32bac3cb Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/46.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/47.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/47.png new file mode 100644 index 0000000000..19667bb6be Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/47.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/48.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/48.png new file mode 100644 index 0000000000..13d8bd9307 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/48.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/49.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/49.png new file mode 100644 index 0000000000..5874834cf1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/49.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/5.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/5.png new file mode 100644 index 0000000000..0a1c52ad33 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/5.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/50.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/50.png new file mode 100644 index 0000000000..7d30aba7b6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/50.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/51.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/51.png new file mode 100644 index 0000000000..63991ec562 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/51.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/52.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/52.png new file mode 100644 index 0000000000..07824b69dc Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/52.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/53.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/53.png new file mode 100644 index 0000000000..e01ce3cb2e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/53.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/54.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/54.png new file mode 100644 index 0000000000..0cc8baaf9a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/54.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/55.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/55.png new file mode 100644 index 0000000000..dd20f55350 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/55.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/56.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/56.png new file mode 100644 index 0000000000..8e5d6fc552 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/56.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/57.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/57.png new file mode 100644 index 0000000000..cf867dbb2f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/57.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/58.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/58.png new file mode 100644 index 0000000000..2986bea8f6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/58.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/59.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/59.png new file mode 100644 index 0000000000..52f08e5a5b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/59.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/6.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/6.png new file mode 100644 index 0000000000..2768d1935f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/6.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/60.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/60.png new file mode 100644 index 0000000000..d27ed3ed00 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/60.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/61.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/61.png new file mode 100644 index 0000000000..55f19a1f1b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/61.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/62.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/62.png new file mode 100644 index 0000000000..588c573775 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/62.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/63.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/63.png new file mode 100644 index 0000000000..761953786f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/63.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/64.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/64.png new file mode 100644 index 0000000000..f863c2635e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/64.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/65.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/65.png new file mode 100644 index 0000000000..a9052658b6 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/65.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/66.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/66.png new file mode 100644 index 0000000000..4b7af976a5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/66.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/67.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/67.png new file mode 100644 index 0000000000..ac293cd370 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/67.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/68.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/68.png new file mode 100644 index 0000000000..5ead585025 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/68.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/69.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/69.png new file mode 100644 index 0000000000..74e2a6b31b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/69.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/7.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/7.png new file mode 100644 index 0000000000..5fd2f744a9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/7.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/70.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/70.png new file mode 100644 index 0000000000..b571a65158 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/70.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/71.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/71.png new file mode 100644 index 0000000000..88a39782ac Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/71.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/72.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/72.png new file mode 100644 index 0000000000..23752aea81 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/72.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/73.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/73.png new file mode 100644 index 0000000000..8d74fb171f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/73.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/74.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/74.png new file mode 100644 index 0000000000..946544c42d Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/74.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/75.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/75.png new file mode 100644 index 0000000000..f457d249da Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/75.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/76.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/76.png new file mode 100644 index 0000000000..5fd30ed50f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/76.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/77.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/77.png new file mode 100644 index 0000000000..c846c18e86 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/77.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/78.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/78.png new file mode 100644 index 0000000000..91d8c1e291 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/78.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/79.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/79.png new file mode 100644 index 0000000000..7f3bb56a09 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/79.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/8.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/8.png new file mode 100644 index 0000000000..9f408b7dbf Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/8.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/80.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/80.png new file mode 100644 index 0000000000..60c0c9041e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/80.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/81.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/81.png new file mode 100644 index 0000000000..62fde6b46c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/81.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/82.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/82.png new file mode 100644 index 0000000000..b4885d28ed Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/82.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/83.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/83.png new file mode 100644 index 0000000000..3e00f22271 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/83.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/84.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/84.png new file mode 100644 index 0000000000..5350e00ac0 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/84.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/85.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/85.png new file mode 100644 index 0000000000..aab39c408c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/85.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/86.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/86.png new file mode 100644 index 0000000000..6150482d1f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/86.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/87.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/87.png new file mode 100644 index 0000000000..8f9a554135 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/87.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/88.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/88.png new file mode 100644 index 0000000000..e8ef3944be Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/88.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/89.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/89.png new file mode 100644 index 0000000000..0129fd6b32 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/89.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/9.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/9.png new file mode 100644 index 0000000000..166abf574e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/9.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/90.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/90.png new file mode 100644 index 0000000000..b7146ab582 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/90.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/91.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/91.png new file mode 100644 index 0000000000..fd663e0718 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/91.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/92.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/92.png new file mode 100644 index 0000000000..ff071f2eaa Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/92.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/93.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/93.png new file mode 100644 index 0000000000..bed5021da3 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/93.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/94.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/94.png new file mode 100644 index 0000000000..997fc2835f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/94.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/95.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/95.png new file mode 100644 index 0000000000..78900cf455 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/95.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/96.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/96.png new file mode 100644 index 0000000000..82cf7f8776 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/96.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/97.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/97.png new file mode 100644 index 0000000000..8e1754bea8 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/97.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/98.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/98.png new file mode 100644 index 0000000000..e88435698c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/98.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/99.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/99.png new file mode 100644 index 0000000000..77314ce820 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Display/99.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Lamp/off.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Lamp/off.png new file mode 100644 index 0000000000..e24f9ff199 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Lamp/off.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Lamp/on.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Lamp/on.png new file mode 100644 index 0000000000..6f4745f516 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Lamp/on.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/0.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/0.png new file mode 100644 index 0000000000..99e41e3fbf Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/0.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/1.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/1.png new file mode 100644 index 0000000000..c1bf500e05 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/1.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/10.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/10.png new file mode 100644 index 0000000000..5a196e3a1f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/10.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/11.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/11.png new file mode 100644 index 0000000000..974338f8b9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/11.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/12.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/12.png new file mode 100644 index 0000000000..ffb2619f16 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/12.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/13.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/13.png new file mode 100644 index 0000000000..18889c5d4f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/13.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/14.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/14.png new file mode 100644 index 0000000000..f2babfe8ef Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/14.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/15.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/15.png new file mode 100644 index 0000000000..b6a47cab6c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/15.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/16.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/16.png new file mode 100644 index 0000000000..fb19d35e39 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/16.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/17.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/17.png new file mode 100644 index 0000000000..1f26a011ff Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/17.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/18.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/18.png new file mode 100644 index 0000000000..38c8494bcb Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/18.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/19.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/19.png new file mode 100644 index 0000000000..f0a57c9542 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/19.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/2.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/2.png new file mode 100644 index 0000000000..af2372797c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/2.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/20.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/20.png new file mode 100644 index 0000000000..99bb2485b5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/20.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/21.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/21.png new file mode 100644 index 0000000000..90c66a8a1e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/21.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/22.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/22.png new file mode 100644 index 0000000000..43236b0090 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/22.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/23.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/23.png new file mode 100644 index 0000000000..e7a9e84fc0 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/23.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/24.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/24.png new file mode 100644 index 0000000000..f15026ec0f Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/24.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/25.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/25.png new file mode 100644 index 0000000000..a1fd4d6c12 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/25.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/26.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/26.png new file mode 100644 index 0000000000..650e2a28ea Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/26.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/27.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/27.png new file mode 100644 index 0000000000..a9a833c72a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/27.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/28.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/28.png new file mode 100644 index 0000000000..297c509211 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/28.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/29.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/29.png new file mode 100644 index 0000000000..bfa0569cb0 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/29.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/3.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/3.png new file mode 100644 index 0000000000..9238c4d418 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/3.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/30.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/30.png new file mode 100644 index 0000000000..dac28502eb Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/30.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/31.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/31.png new file mode 100644 index 0000000000..c92456a0b9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/31.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/4.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/4.png new file mode 100644 index 0000000000..4483223ff3 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/4.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/5.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/5.png new file mode 100644 index 0000000000..4bd0c30028 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/5.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/6.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/6.png new file mode 100644 index 0000000000..af066c32cf Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/6.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/7.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/7.png new file mode 100644 index 0000000000..06742246f9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/7.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/8.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/8.png new file mode 100644 index 0000000000..793f5b8b82 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/8.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/9.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/9.png new file mode 100644 index 0000000000..53a53221cd Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/Scale/9.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_bottom_redstone_main_off.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_bottom_redstone_main_off.png new file mode 100644 index 0000000000..24f983dbc5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_bottom_redstone_main_off.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_bottom_redstone_main_on.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_bottom_redstone_main_on.png new file mode 100644 index 0000000000..1b31323313 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_bottom_redstone_main_on.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_bottom_redstone_off.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_bottom_redstone_off.png new file mode 100644 index 0000000000..1a0d063865 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_bottom_redstone_off.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_bottom_redstone_on.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_bottom_redstone_on.png new file mode 100644 index 0000000000..2c2d01db7a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_bottom_redstone_on.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_side_redstone_main_off.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_side_redstone_main_off.png new file mode 100644 index 0000000000..14d33b6e4b Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_side_redstone_main_off.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_side_redstone_main_on.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_side_redstone_main_on.png new file mode 100644 index 0000000000..baa8fff68a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_side_redstone_main_on.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_side_redstone_off.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_side_redstone_off.png new file mode 100644 index 0000000000..9751d83585 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_side_redstone_off.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_side_redstone_on.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_side_redstone_on.png new file mode 100644 index 0000000000..53d80ccab9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_side_redstone_on.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_top_redstone_main_off.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_top_redstone_main_off.png new file mode 100644 index 0000000000..24f983dbc5 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_top_redstone_main_off.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_top_redstone_main_on.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_top_redstone_main_on.png new file mode 100644 index 0000000000..1b31323313 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_top_redstone_main_on.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_top_redstone_off.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_top_redstone_off.png new file mode 100644 index 0000000000..1a0d063865 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_top_redstone_off.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_top_redstone_on.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_top_redstone_on.png new file mode 100644 index 0000000000..2c2d01db7a Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/redstone/machine_top_redstone_on.png differ -- cgit From 13b79706b6eddef6118453bf51782ad01b3e8328 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Sun, 9 Jan 2022 17:49:52 +0000 Subject: Partially implemented Computer Cube. Fix Multis wanting Mufflers when pollution = 0. Fix getMethodName potentially crawling too far up the stack. --- src/main/java/gtPlusPlus/core/lib/CORE.java | 49 +- .../core/util/reflect/ReflectionUtils.java | 3 + .../java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java | 2 + .../xmod/gregtech/api/enums/GregtechItemList.java | 1 + .../gui/computer/GT_Container_ComputerCube.java | 314 +++++++ .../gui/computer/GT_GUIContainer_ComputerCube.java | 133 +++ .../base/GregtechMeta_MultiBlockBase.java | 2 +- .../common/blocks/textures/TexturesGtBlock.java | 1 + .../computer/GT_ComputercubeDescription.java | 189 ++++ .../misc/GT_TileEntity_ComputerCube.java | 986 +++++++++++++++++++++ .../registration/gregtech/Gregtech4Content.java | 9 + .../textures/blocks/TileEntities/gt4/computer.png | Bin 0 -> 822 bytes .../assets/miscutils/textures/gui/computer/0.png | Bin 0 -> 3702 bytes .../assets/miscutils/textures/gui/computer/1.png | Bin 0 -> 4237 bytes .../assets/miscutils/textures/gui/computer/2.png | Bin 0 -> 3481 bytes .../assets/miscutils/textures/gui/computer/3.png | Bin 0 -> 4278 bytes .../assets/miscutils/textures/gui/computer/4.png | Bin 0 -> 4307 bytes .../assets/miscutils/textures/gui/computer/5.png | Bin 0 -> 4072 bytes .../assets/miscutils/textures/gui/computer/6.png | Bin 0 -> 4294 bytes .../miscutils/textures/gui/computer/Redstone.png | Bin 0 -> 2877 bytes 20 files changed, 1666 insertions(+), 23 deletions(-) create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_Container_ComputerCube.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_GUIContainer_ComputerCube.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_ComputercubeDescription.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/GT_TileEntity_ComputerCube.java create mode 100644 src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/computer.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/computer/0.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/computer/1.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/computer/2.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/computer/3.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/computer/4.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/computer/5.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/computer/6.png create mode 100644 src/main/resources/assets/miscutils/textures/gui/computer/Redstone.png (limited to 'src/main/resources/assets/miscutils/textures') diff --git a/src/main/java/gtPlusPlus/core/lib/CORE.java b/src/main/java/gtPlusPlus/core/lib/CORE.java index d805375e2d..bb0df9d5fb 100644 --- a/src/main/java/gtPlusPlus/core/lib/CORE.java +++ b/src/main/java/gtPlusPlus/core/lib/CORE.java @@ -333,28 +333,33 @@ public class CORE { } public static final void crash(String aReason) { - Logger.INFO("=========================================================="); - Logger.INFO("[GT++ CRASH]"); - Logger.INFO("=========================================================="); - Logger.INFO("Oooops..."); - Logger.INFO("This should only happy in a development environment or when something really bad happens."); - Logger.INFO("Reason: "+aReason); - Logger.INFO("=========================================================="); - Logger.INFO("Called from: "+ReflectionUtils.getMethodName(1)); - Logger.INFO(ReflectionUtils.getMethodName(2)); - Logger.INFO(ReflectionUtils.getMethodName(3)); - Logger.INFO(ReflectionUtils.getMethodName(4)); - Logger.INFO(ReflectionUtils.getMethodName(5)); - Logger.INFO(ReflectionUtils.getMethodName(6)); - Logger.INFO(ReflectionUtils.getMethodName(7)); - Logger.INFO(ReflectionUtils.getMethodName(8)); - Logger.INFO(ReflectionUtils.getMethodName(9)); - Logger.INFO(ReflectionUtils.getMethodName(10)); - Logger.INFO(ReflectionUtils.getMethodName(11)); - Logger.INFO(ReflectionUtils.getMethodName(12)); - Logger.INFO(ReflectionUtils.getMethodName(13)); - Logger.INFO(ReflectionUtils.getMethodName(14)); - Logger.INFO(ReflectionUtils.getMethodName(15)); + try { + Logger.INFO("=========================================================="); + Logger.INFO("[GT++ CRASH]"); + Logger.INFO("=========================================================="); + Logger.INFO("Oooops..."); + Logger.INFO("This should only happy in a development environment or when something really bad happens."); + Logger.INFO("Reason: "+aReason); + Logger.INFO("=========================================================="); + Logger.INFO("Called from: "+ReflectionUtils.getMethodName(1)); + Logger.INFO(ReflectionUtils.getMethodName(2)); + Logger.INFO(ReflectionUtils.getMethodName(3)); + Logger.INFO(ReflectionUtils.getMethodName(4)); + Logger.INFO(ReflectionUtils.getMethodName(5)); + Logger.INFO(ReflectionUtils.getMethodName(6)); + Logger.INFO(ReflectionUtils.getMethodName(7)); + Logger.INFO(ReflectionUtils.getMethodName(8)); + Logger.INFO(ReflectionUtils.getMethodName(9)); + Logger.INFO(ReflectionUtils.getMethodName(10)); + Logger.INFO(ReflectionUtils.getMethodName(11)); + Logger.INFO(ReflectionUtils.getMethodName(12)); + Logger.INFO(ReflectionUtils.getMethodName(13)); + Logger.INFO(ReflectionUtils.getMethodName(14)); + Logger.INFO(ReflectionUtils.getMethodName(15)); + } + catch (Throwable t) { + t.printStackTrace(); + } FMLCommonHandler.instance().exitJava(0, true); } diff --git a/src/main/java/gtPlusPlus/core/util/reflect/ReflectionUtils.java b/src/main/java/gtPlusPlus/core/util/reflect/ReflectionUtils.java index 1ef925f793..aaec2024e4 100644 --- a/src/main/java/gtPlusPlus/core/util/reflect/ReflectionUtils.java +++ b/src/main/java/gtPlusPlus/core/util/reflect/ReflectionUtils.java @@ -335,6 +335,9 @@ public class ReflectionUtils { public static String getMethodName(final int depth) { final StackTraceElement[] ste = new Throwable().getStackTrace(); //System. out.println(ste[ste.length-depth].getClassName()+"#"+ste[ste.length-depth].getMethodName()); + if (ste.length < depth) { + return "No valid stack."; + } return ste[depth+1].getMethodName(); } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java b/src/main/java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java index d42ea35a78..999d80199f 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java @@ -54,6 +54,7 @@ import gtPlusPlus.xmod.gregtech.api.world.GTPP_Worldgen; import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; import gtPlusPlus.xmod.gregtech.common.StaticFields59; import gtPlusPlus.xmod.gregtech.common.blocks.fluid.GregtechFluidHandler; +import gtPlusPlus.xmod.gregtech.common.computer.GT_ComputercubeDescription; import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMTE_ElementalDuplicator; import gtPlusPlus.xmod.gregtech.loaders.Gregtech_Blocks; @@ -176,6 +177,7 @@ public class HANDLER_GT { convertPyroToCokeOven(); generateElementalDuplicatorRecipes(); Meta_GT_Proxy.fixIC2FluidNames(); + GT_ComputercubeDescription.addStandardDescriptions(); RecipeLoader_AlgaeFarm.generateRecipes(); if (LoadedMods.AdvancedSolarPanel) { RecipeLoader_MolecularTransformer.run(); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java index 7a7ae278c0..c61195a9e8 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java @@ -105,6 +105,7 @@ public enum GregtechItemList implements GregtechItemContainer { //Computer Cube Gregtech_Computer_Cube, + Gregtech_Computer_Cube_Machine, //Casings for batteries Battery_Casing_Gem_1, Battery_Casing_Gem_2, diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_Container_ComputerCube.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_Container_ComputerCube.java new file mode 100644 index 0000000000..5c5c7961d8 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_Container_ComputerCube.java @@ -0,0 +1,314 @@ +package gtPlusPlus.xmod.gregtech.api.gui.computer; + +import java.util.Iterator; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.gui.GT_Slot_Holo; +import gregtech.api.gui.GT_Slot_Output; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_ModHandler; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_ElectricInventoryManager; +import gtPlusPlus.xmod.gregtech.common.tileentities.misc.GT_TileEntity_ComputerCube; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; + +public class GT_Container_ComputerCube extends GT_ContainerMetaTile_Machine { + + public int mEUOut; + + public int mHeat; + + public int mMaxHeat; + + public int mHEM; + + public int mExplosionStrength; + + public int mEU; + + public int mProgress; + + public int mID; + + public GT_Container_ComputerCube(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, int aID) { + super(aInventoryPlayer, aTileEntity); + mID = ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mMode; + } + + public void addSlots(InventoryPlayer aInventoryPlayer) { + int y; + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 58, 156 + ((this.mID == 5) ? 50 : 0), 4, false, false, 1)); + switch (this.mID) { + case 1: + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 58, 156, 86, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 58, 156, 70, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 58, 156, 54, false, false, 1)); + for (y = 0; y < 6; y++) { + for (int x = 0; x < 9; x++) + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, x + y * 9, 5 + x * 16, 5 + y * 16, false, false, 64)); + } + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 113, 153, 28, false, false, 64)); + break; + case 2: + addSlotToContainer(new Slot((IInventory)this.mTileEntity, 54, 8, 28)); + addSlotToContainer(new Slot((IInventory)this.mTileEntity, 55, 26, 28)); + addSlotToContainer(new GT_Slot_Output((IInventory)this.mTileEntity, 56, 134, 28)); + addSlotToContainer(new GT_Slot_Output((IInventory)this.mTileEntity, 57, 152, 28)); + break; + case 3: + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 58, 88, 65, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 58, 104, 65, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 59, 122, 35, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 60, 92, 5, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 61, 122, 5, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 62, 152, 35, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 63, 122, 65, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 64, 92, 35, false, false, 64)); + break; + case 4: + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 58, 88, 65, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 58, 104, 65, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 59, 122, 5, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 60, 122, 65, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 61, 152, 35, false, false, 64)); + break; + case 5: + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 58, 190, 146, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 58, 206, 146, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 59, 206, 38, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 60, 206, 56, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 61, 206, 74, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 62, 206, 92, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 63, 206, 110, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 64, 153, 7, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 65, 169, 7, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 66, 185, 7, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 67, 153, 23, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 68, 169, 23, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 69, 185, 23, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 70, 153, 39, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 71, 169, 39, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 72, 185, 39, false, false, 64)); + break; + case 6: + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 58, 88, 65, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 58, 104, 65, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 59, 122, 35, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 60, 92, 5, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 61, 122, 5, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 62, 152, 35, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 63, 122, 65, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo((IInventory)this.mTileEntity, 64, 92, 35, false, false, 64)); + break; + } + } + + public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { + Logger.INFO("Clicked slot "+aSlotIndex); + if (aSlotIndex < 0) { + Logger.INFO(""); + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + if (this.mID != ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mMode) { + Logger.INFO("This ID: "+mID+", Tile: "+((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mMode); + return null; + } + Slot tSlot = (Slot) this.inventorySlots.get(aSlotIndex); + ItemStack tStack = tSlot.getStack(); + if (tSlot == null) { + Logger.INFO("Null Slot?"); + } + else { + Logger.INFO("Good Slot!"); + if (aSlotIndex == 0) { + Logger.INFO("Slot is 0"); + if (aMouseclick == 0) { + Logger.INFO("Forward"); + ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchModeForward(); + } else { + Logger.INFO("Backwards"); + ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchModeBackward(); + } + //aPlayer.openGui(CORE.MODID, GT_BlockMetaID_Machine.getComputerCubeGUIID((TileEntity)this.mTileEntity), this.mTileEntity.getWorld(), this.mTileEntity.getXCoord(), this.mTileEntity.getYCoord(), this.mTileEntity.getZCoord()); + } else if (aSlotIndex <= 2 && this.mID == 3) { + if (aSlotIndex == 1) { + ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchCentrifugePageBackward(); + onCraftMatrixChanged((IInventory)this.mTileEntity); + } else if (aSlotIndex == 2) { + ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchCentrifugePageForward(); + onCraftMatrixChanged((IInventory)this.mTileEntity); + } + } else if (aSlotIndex <= 2 && this.mID == 6) { + if (aSlotIndex == 1) { + ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchElectrolyzerPageBackward(); + onCraftMatrixChanged((IInventory)this.mTileEntity); + } else if (aSlotIndex == 2) { + ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchElectrolyzerPageForward(); + onCraftMatrixChanged((IInventory)this.mTileEntity); + } + } else if (aSlotIndex <= 2 && this.mID == 4) { + if (aSlotIndex == 1) { + ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchFusionPageBackward(); + onCraftMatrixChanged((IInventory)this.mTileEntity); + } else if (aSlotIndex == 2) { + ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchFusionPageForward(); + onCraftMatrixChanged((IInventory)this.mTileEntity); + } + } else if (aSlotIndex <= 2 && this.mID == 5) { + if (aSlotIndex == 1) { + ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchDescriptionPageBackward(); + onCraftMatrixChanged((IInventory)this.mTileEntity); + } else if (aSlotIndex == 2) { + ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchDescriptionPageForward(); + onCraftMatrixChanged((IInventory)this.mTileEntity); + } + } else if (aSlotIndex <= 58 && this.mID == 1) { + if (aSlotIndex == 1) { + ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchNuclearReactor(); + onCraftMatrixChanged((IInventory)this.mTileEntity); + } else if (aSlotIndex == 2) { + ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).loadNuclearReactor(); + onCraftMatrixChanged((IInventory)this.mTileEntity); + } else if (aSlotIndex == 3) { + ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).saveNuclearReactor(); + } else { + if (aShifthold == 1) { + tSlot.putStack(null); + return null; + } + if (aMouseclick == 0) { + if (tStack == null) { + if (getSlot(58).getStack() != null && aSlotIndex != 58) { + tSlot.putStack(getSlot(58).getStack().copy()); + } else { + tSlot.putStack(new ItemStack(GT_TileEntity_ComputerCube.sReactorList.get(0).mItem, 1)); + } + return null; + } + for (int i = 1; i < GT_TileEntity_ComputerCube.sReactorList.size(); i++) { + if (GT_TileEntity_ComputerCube.sReactorList.get(i - 1).mItem == tStack.getItem()) { + tSlot.putStack(new ItemStack(GT_TileEntity_ComputerCube.sReactorList.get(i).mItem, 1, 0)); + if (tSlot.getStack() != null && tSlot.getStack().getItem() == GT_ModHandler.getIC2Item("reactorIsotopeCell", 1).getItem()) + tSlot.getStack().setItemDamage(tSlot.getStack().getMaxDamage() - 1); + return null; + } + } + tSlot.putStack(null); + return null; + } + if (tStack == null) + return null; + if (tStack.stackSize < tStack.getMaxStackSize()) { + tStack.stackSize++; + return null; + } + tStack.stackSize = 1; + return null; + } + } else { + Logger.INFO("Super 2"); + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + } + Logger.INFO("???"); + return null; + } + + public boolean doesBindPlayerInventory() { + return (this.mID != 1 && this.mID != 5); + } + + public void detectAndSendChanges() { + super.detectAndSendChanges(); + if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) { + return; + } + //this.mID = ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mMode; + this.mEUOut = ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mEUOut; + this.mHeat = ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mHeat; + this.mMaxHeat = ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mMaxHeat; + this.mHEM = (int)(((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mHEM * 10000.0F); + this.mExplosionStrength = (int)(((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mExplosionStrength * 100.0F); + this.mEU = ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mEU; + this.mProgress = ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mProgress; + Iterator var2 = this.crafters.iterator(); + while (var2.hasNext()) { + ICrafting var1 = var2.next(); + var1.sendProgressBarUpdate((Container)this, 101, this.mEUOut); + var1.sendProgressBarUpdate((Container)this, 102, this.mHeat & 0xFFFF); + var1.sendProgressBarUpdate((Container)this, 103, this.mMaxHeat & 0xFFFF); + var1.sendProgressBarUpdate((Container)this, 104, this.mHEM); + var1.sendProgressBarUpdate((Container)this, 105, this.mExplosionStrength); + var1.sendProgressBarUpdate((Container)this, 106, this.mHeat >>> 16); + var1.sendProgressBarUpdate((Container)this, 107, this.mMaxHeat >>> 16); + var1.sendProgressBarUpdate((Container)this, 108, this.mEU & 0xFFFF); + var1.sendProgressBarUpdate((Container)this, 109, this.mEU >>> 16); + var1.sendProgressBarUpdate((Container)this, 110, this.mProgress); + //var1.sendProgressBarUpdate((Container)this, 111, this.mEUOut); + } + } + + @SideOnly(Side.CLIENT) + public void updateProgressBar(int par1, int par2) { + super.updateProgressBar(par1, par2); + switch (par1) { + case 101: + this.mEUOut = par2; + break; + case 102: + this.mHeat = this.mHeat & 0xFFFF0000 | par2; + break; + case 103: + this.mMaxHeat = this.mMaxHeat & 0xFFFF0000 | par2; + break; + case 104: + this.mHEM = par2; + break; + case 105: + this.mExplosionStrength = par2; + break; + case 106: + this.mHeat = this.mHeat & 0xFFFF | par2 << 16; + break; + case 107: + this.mMaxHeat = this.mMaxHeat & 0xFFFF | par2 << 16; + break; + case 108: + this.mEU = this.mEU & 0xFFFF0000 | par2; + case 109: + this.mEU = this.mEU & 0xFFFF | par2 << 16; + break; + case 110: + this.mProgress = par2; + break; + case 111: + //this.mID = par2; + break; + } + } + + public int getSlotStartIndex() { + return 1; + } + + public int getSlotCount() { + return (this.mID == 2) ? 4 : 0; + } + + public int getShiftClickSlotCount() { + return (this.mID == 2) ? 2 : 0; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_GUIContainer_ComputerCube.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_GUIContainer_ComputerCube.java new file mode 100644 index 0000000000..0006ce8823 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_GUIContainer_ComputerCube.java @@ -0,0 +1,133 @@ +package gtPlusPlus.xmod.gregtech.api.gui.computer; + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.gregtech.common.computer.GT_ComputercubeDescription; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; + +public class GT_GUIContainer_ComputerCube extends GT_GUIContainerMetaTile_Machine { + public GT_GUIContainer_ComputerCube(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aBaseMetaTileEntity, int aID) { + super(new GT_Container_ComputerCube(aInventoryPlayer, aBaseMetaTileEntity, aID), CORE.RES_PATH_GUI + "computer/"+aID+".png"); + if (aID == 5) + this.xSize += 50; + } + + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + GT_Container_ComputerCube tContainer = (GT_Container_ComputerCube) this.mContainer; + //GT_TileEntity_ComputerCube tTileEntity = (GT_TileEntity_ComputerCube) tContainer.mTileEntity; + if (tContainer != null) + switch (tContainer.mID) { + case 0 : + this.fontRendererObj.drawString("G.L.A.D.-OS", 64, 61, 16448255); + this.fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752); + break; + case 1 : + this.fontRendererObj.drawString("Reactorstats:", 7, 108, 16448255); + this.fontRendererObj.drawString(toNumber(tContainer.mEU) + "EU at " + tContainer.mEUOut + "EU/t", 7, 120, 16448255); + this.fontRendererObj.drawString("HEM: " + (tContainer.mHEM / 10000.0F), 7, 128, 16448255); + this.fontRendererObj.drawString(toNumber(tContainer.mHeat) + "/" + toNumber(tContainer.mMaxHeat) + "Heat", 7, 136, 16448255); + this.fontRendererObj.drawString("Explosionpower: " + (tContainer.mExplosionStrength / 100.0F), 7, 144, 16448255); + this.fontRendererObj.drawString("Runtime: " + ((tContainer.mEUOut > 0) ? ((tContainer.mEU / tContainer.mEUOut) / 20.0F) : 0.0F) + "secs", 7, 152, 16448255); + break; + case 2 : + this.fontRendererObj.drawString("Scanner", 51, 7, 16448255); + if (tContainer.mProgress == 0) { + this.fontRendererObj.drawString("Can be used to", 51, 24, 16448255); + this.fontRendererObj.drawString("scan Seedbags", 51, 32, 16448255); + } + else { + this.fontRendererObj.drawString("Progress:", 51, 24, 16448255); + this.fontRendererObj.drawString(tContainer.mProgress + "%", 51, 32, 16448255); + } + this.fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752); + break; + case 3 : + this.fontRendererObj.drawString("Centrifuge", 7, 7, 16448255); + this.fontRendererObj.drawString("Recipe: " + (tContainer.mMaxHeat + 1) + "/" + GT_Recipe_Map.sCentrifugeRecipes.mRecipeList.size(), 7, 23, 16448255); + this.fontRendererObj.drawString("EU: " + toNumber(tContainer.mEU), 7, 31, 16448255); + break; + case 4 : + this.fontRendererObj.drawString("Fusionreactor", 7, 7, 16448255); + this.fontRendererObj.drawString("Recipe: " + (tContainer.mMaxHeat + 1) + "/" + GT_Recipe_Map.sFusionRecipes.mRecipeList.size(), 7, 23, 16448255); + this.fontRendererObj.drawString("Start: " + toNumber(tContainer.mEU) + "EU", 7, 31, 16448255); + this.fontRendererObj.drawString("EU/t: " + toNumber(tContainer.mEUOut), 7, 39, 16448255); + this.fontRendererObj.drawString(toNumber(tContainer.mHeat) + " Ticks", 7, 47, 16448255); + if (tContainer.mEUOut < 0) { + this.fontRendererObj.drawString("IN: " + toNumber(-tContainer.mEUOut * tContainer.mHeat) + "EU", 7, 55, 16448255); + break; + } + this.fontRendererObj.drawString("OUT: " + toNumber(tContainer.mEUOut * tContainer.mHeat) + "EU", 7, 55, 16448255); + break; + case 5 : + if (tContainer.mMaxHeat >= 0 && tContainer.mMaxHeat < GT_ComputercubeDescription.sDescriptions.size()) + for (int i = 0; i < ((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(tContainer.mMaxHeat)).mDescription.length; i++) { + if (i == 0) { + this.fontRendererObj.drawString(((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(tContainer.mMaxHeat)).mDescription[i], 7, 7, 16448255); + } + else { + this.fontRendererObj.drawString(((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(tContainer.mMaxHeat)).mDescription[i], 7, 7 + + 8 * i, 16448255); + } + } + break; + case 6 : + this.fontRendererObj.drawString("Electrolyzer", 7, 7, 16448255); + this.fontRendererObj.drawString("Recipe: " + (tContainer.mMaxHeat + 1) + "/" + GT_Recipe_Map.sElectrolyzerRecipes.mRecipeList.size(), 7, 23, 16448255); + this.fontRendererObj.drawString("EU: " + toNumber(tContainer.mEU), 7, 31, 16448255); + break; + } + } + + 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) { + GT_Container_ComputerCube tContainer = (GT_Container_ComputerCube) this.mContainer; + mGUIbackground = new ResourceLocation(mGUIbackgroundPath = CORE.RES_PATH_GUI + "computer/"+ ((GT_Container_ComputerCube) this.mContainer).mID + ".png"); + + switch (tContainer.mID) { + case 5 : + if (tContainer.mExplosionStrength != 0) + drawTexturedModalRect(x + 152, y + 6, 0, 166, 50, 50); + break; + } + } + + } + + public String toNumber(int aNumber) { + String tString = ""; + boolean temp = true, negative = false; + if (aNumber < 0) { + aNumber *= -1; + negative = true; + } + int i; + for (i = 1000000000; i > 0; i /= 10) { + int tDigit = aNumber / i % 10; + if (temp && tDigit != 0) + temp = false; + if (!temp) { + tString = tString + tDigit; + if (i != 1) { + int j; + for (j = i; j > 0;) { + if (j == 1) + tString = tString + ","; + j /= 1000; + } + } + } + } + if (tString.equals("")) + tString = "0"; + return negative ? ("-" + tString) : tString; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java index e2ca92d8b0..ec7115cb0f 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java @@ -1690,7 +1690,7 @@ public abstract class GregtechMeta_MultiBlockBase 0 ? !mMufflerHatches.isEmpty() : true); } public boolean addToMachineListInternal(ArrayList aList, final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java index 84c0686d61..8f68b646f9 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java @@ -432,6 +432,7 @@ public class TexturesGtBlock { public static final CustomIcon Casing_Electric_Auto_Workbench_Side = new CustomIcon("TileEntities/gt4/OVERLAY_SIDE_CABINET"); + public static final CustomIcon Casing_Computer_Cube = new CustomIcon("TileEntities/gt4/computer"); public static final CustomIcon Casing_CropHarvester_Cutter = new CustomIcon("TileEntities/gt4/OVERLAY_CROP"); public static final CustomIcon Casing_CropHarvester_Boxes = new CustomIcon("TileEntities/gt4/OVERLAY_BOXES"); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_ComputercubeDescription.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_ComputercubeDescription.java new file mode 100644 index 0000000000..ba48df1311 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/computer/GT_ComputercubeDescription.java @@ -0,0 +1,189 @@ +package gtPlusPlus.xmod.gregtech.common.computer; + +import java.util.ArrayList; + +import gregtech.api.enums.ItemList; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import net.minecraft.item.ItemStack; + +public class GT_ComputercubeDescription { + public static ArrayList sDescriptions = new ArrayList(); + + public String[] mDescription; + + public ItemStack[] mStacks; + + public GT_ComputercubeDescription(String[] aDescription, ItemStack[] aStacks) { + this.mDescription = aDescription; + this.mStacks = aStacks; + sDescriptions.add(this); + } + + public static void addStandardDescriptions() { + Logger.INFO("Adding Default Description Set of the Computer Cube"); + new GT_ComputercubeDescription(new String[] { + "Lightning Rod", "Also known as the Bane of", "Alblaka. The Lightning Rod", "enables you to gain Energy", "from Lightning! To set it up", "you just need the Block", "itself, 4 HV-Transformers", "and a crapton of Ironfences,", "which you then place on top", "of it. After that you have to", + "wait for a Thunderstorm and", "when you are lucky you get", "2.5 MFSU of Energy out of", "it. If a Rod is high enough", "then Rain is also enough to", "get stroke, but with less", "probability ofcourse." }, new ItemStack[] { + GT_ModHandler.getIC2Item("ironFence", 1), GT_ModHandler.getIC2Item("ironFence", 1), GT_ModHandler.getIC2Item("ironFence", 1), GT_ModHandler.getIC2Item("ironFence", 1), ItemList.Machine_IV_LightningRod.get(1), null, null, null, null, null, + null, null, null, null }); + new GT_ComputercubeDescription(new String[] { + "Quantum Chest", "You want to store tons of", "Materials into your Chests", "but you hate the Item limit", "of them? Not anymore! The", "Quantum Chest is able to", "store an INFINITE* amount", "of one single Item type per", "Chest.", "This Chest stores your Items", + "like Data and ever has a", "Stack of the Item ready for", "extraction. It is compatible", "with any Item that doesnt", "have a NBT-Tag. You ask what", "NBT is? I know it, thats enough.", "* = 2147483391" }, new ItemStack[] { + null, null, null, null, ItemList.Quantum_Chest_LV.get(1), null, null, null, null, null, + null, null, null, null }); + new GT_ComputercubeDescription(new String[] { + "Computer Cube", "The Device you are", "currently using. This Computer", "is running the G.L.A.D.-OS,", "which is containing many", "usefull Apps:", "- Reactor Planner", "- Seedbag Scanner", "- Recipelists for GT-Devices", "- ", + "- ", "- ", "- ", "- ", "And the Description List you", "are currently reading.", "~This Device has private Access~" }, new ItemStack[] { + null, null, null, null, GregtechItemList.Gregtech_Computer_Cube.get(1), null, null, null, null, null, + null, null, null, null }); + /* new GT_ComputercubeDescription(new String[] { + "UUM-Assembler", "It's like an automatic", "Crafting Table just for UUM", "It can store 20 UUM-Recipes", "and produces those on demand", "It costs 512EU per used piece", "of Universal-Usable-Matter(TM).", "The integrated Quantum Chest", "allows it to store all your", "UUM inside it.", + "Top and Bottom are for Input,", "while the Output is on the", "Sides. The Output is designed,", "to work with RP-Managers, so", "build it into your recursive", "Autocraftingsystem.", "" }, new ItemStack[] { + null, null, null, GT_ModHandler.getIC2Item("matter", 1), new ItemStack(GregTech_API.sBlockList[1], 1, 5), null, null, null, null, null, + null, null, null, null }); + new GT_ComputercubeDescription(new String[] { + "Sonictron", "You like Music? Then the", "Sonictron 9001 is your best", "choice! You can compose Alarms,", "Doorbell Sounds or boring", "Elevator Music, with the 64 Slots", "inside it. Just leftclick them", "to switch the Sound, rightclick", "them to switch the modulation", "and shiftclick to remove it.", + "Then apply Redstone to play", "With the mobile Version you can", "play sounds everywhere, after", "you copied them from a normal", "Sonictron via rightclicking", "Sneakrightclicking pastes", "Emits Redstone when finished." }, new ItemStack[] { + null, null, null, GregTech_API.getGregTechItem(32, 1, 0), new ItemStack(GregTech_API.sBlockList[1], 1, 6), null, null, null, null, null, + null, null, null, null }); + new GT_ComputercubeDescription(new String[] { + "L.E.S.U.", "The unlaggiest Multiblock ever!", "One Controllerblock, and as many", "'stupid' Storageblocks as you want.", "To use it, place one Controller", "and then place the LESU-Storages", "adjacent to it or other placed", "LESU-Storages. The Tier (max EU/t)", "of it depends on the amount of", "adjacent Storages. The", + "Storageblocks are NOT TileEntities,", "what means that they cause as much", "Lag as a random Dirtblock. And the", "Controller Block only checks ONCE", "for the Storages, so no", "Blockiterationlag, AT. ALL. Anyone,", "who says that they lag gets murdered!" }, new ItemStack[] { + null, null, null, new ItemStack(GregTech_API.sBlockList[0], 1, 6), new ItemStack(GregTech_API.sBlockList[1], 1, 7), null, null, null, null, null, + null, null, null, null }); + new GT_ComputercubeDescription(new String[] { + "I.D.S.U.", "The Interdimensional Storage Unit", "is a Device, which is like a", "wireless, crossdimensional and", "enderchestlike EU-Storage Block", "", "Every Player has one Network of", "these. The ID is determined by", "the Hashcode of the Name from the", "first Player, who opens it's GUI", + "", "It stores up to 1 Billion EU", "and emits EV. But you need at", "least two of them for Energy", "Transfer", "", "" }, new ItemStack[] { + null, null, null, null, new ItemStack(GregTech_API.sBlockList[1], 1, 8), null, null, null, null, null, + null, null, null, null }); + new GT_ComputercubeDescription(new String[] { + "A.E.S.U.", "The Adjustable Energy Storage Unit", "is like 10 MFSU and has an", "adjustable Output between 0 and", "2048EU/t. You could use it as a", "Transformer. It is Tier-IV, so", "it's basically needed to charge", "Energy Orbs and Lapotron Packs", "", "Not much else to say about it.", + "", "", "", "", "", "", "" }, new ItemStack[] { + null, null, null, null, new ItemStack(GregTech_API.sBlockList[1], 1, 9), null, null, null, null, null, + null, null, null, null }); + new GT_ComputercubeDescription(new String[] { + "Charge-O-Mat", "An automatable Charging Bench", "It puts (de-)charged Tools into", "the right Outputslots, which are", "accessible on the Sides of it.", "", "The Energy Orb inside stores enough", "to charge your QSuit almost instantly", "", "This is a Tier-V Charging Station", + "even when the Max-IN/OUT is only", "2048EU/t. It also charges your Armor", "when you are standing close to it.", "", "If you apply Redstone, then it", "decharges instead.", "" }, new ItemStack[] { + null, null, null, null, new ItemStack(GregTech_API.sBlockList[1], 1, 10), null, null, null, null, null, + null, null, null, null }); + new GT_ComputercubeDescription(new String[] { + "Centrifuge", "This is a Machine to seperate", "Isotopes.", "", "It has a maximum Consumption Rate", "of 5EU/t, and its Maxinput is", "32EU/t. The time it needs depends", "on the Recipe you use.", "", "It needs Tin Cells for some Recipes,", + "which you put in the Top Left Slot", "", "Top = Input", "Bottom = Tin Cells", "Side = Output", "", "You can pipe Lava into this Device" }, new ItemStack[] { + null, null, null, null, new ItemStack(GregTech_API.sBlockList[1], 1, 11), null, null, null, null, null, + null, null, null, null }); + new GT_ComputercubeDescription(new String[] { + "Electrolyzer", "This is a Machine to seperate", "Molecules and electrolyze", "Watercells.", "", "It has a maximum Consumption Rate", "of 128EU/t, and its Maxinput is", "128EU/t. The time it needs depends", "on the Recipe you use.", "", + "It needs Tin Cells for some Recipes,", "which you put in the Bottom Left Slot", "", "Top = Input", "Bottom = Tin Cells", "Side = Output", "" }, new ItemStack[] { + null, null, null, null, new ItemStack(GregTech_API.sBlockList[1], 1, 25), null, null, null, null, null, + null, null, null, null }); + new GT_ComputercubeDescription(new String[] { + "Grinder", "This Machines purpose is to", "macerate and grind Ores.", "It can ONLY grind Ores, don't", "try regular Macerator Recipes.", "It has a fixed Consumption Rate", "of 128EU/t, and its Maxinput is", "128EU/t. The time it needs is", "5 seconds per Ore Block", "It needs Water for most Recipes,", + "which you put in the Bottom Left Slot", "Top = Input", "Bottom = Water", "Side = Output", "Its a lagfree Multiblock Structure,", "so you need a special Machine Casing", "for this Device. (see GUI)" }, new ItemStack[] { + null, new ItemStack(Block.field_71943_B, 1), new ItemStack(GregTech_API.sBlockList[0], 1, 14), new ItemStack(GregTech_API.sBlockList[0], 1, 13), new ItemStack(GregTech_API.sBlockList[1], 1, 28), null, null, null, null, null, + null, null, null, null });*/ + new GT_ComputercubeDescription(new String[] { + "Electric Blast Furnace", "You may know the Blast Furnace", "of Railcraft. This one works", "similar, as it can also produce", "Steel out of Iron and Coal.", "", "Its heat Capacity depends on the", "used Machine Casings for building", "it. The better they are, the more", "Heat it can achieve.", + "", "Top = Input 1", "Bottom = Input 2", "Side = Output", "Its a lagfree Multiblock Structure,", "so you need a special Machine Casing", "for this Device. (see GUI)" }, new ItemStack[] { + null, null, null, null, ItemList.Machine_Multi_BlastFurnace.get(1), null, null, null, null, null, + null, null, null, null }); + /* new GT_ComputercubeDescription(new String[] { + "Sawmill", "This Device turns your Logs", "into more Planks, than a normal", "Steve can produce with his Hands.", "", "Its byproduct, Wood Pulp, can be", "compressed into special Planks,", "which are burning like Charcoal.", "", "It needs Water for most Recipes,", + "which you put in the Bottom Left Slot", "Top = Input", "Water Sides = Water", "Saw Side = Output", "Its a lagfree Multiblock Structure,", "so you need a special Machine Casing", "for this Device. (see GUI)" }, new ItemStack[] { + null, null, GT_MetaItem_Material.instance.getStack(15, 1), GT_MetaItem_Dust.instance.getStack(15, 1), new ItemStack(GregTech_API.sBlockList[1], 1, 32), null, null, null, null, null, + null, null, null, null });*/ + new GT_ComputercubeDescription(new String[] { + "Implosion Compressor", "You need to turn Dusts back", "into Gems? Or do you just want", "to make Iridium Plates?", "With a bit ITNT you can achieve", "that in this Device!", "", "We strongly recommend to use", "Flint Dust instead of Flints", "for making the ITNT.", + "", "Top = Input", "Explosion Sides = Output", "ITNT Side = ITNT Input", "Its a lagfree Multiblock Structure,", "so you need a special Machine Casing", "for this Device. (see GUI)" }, new ItemStack[] { + null, null, null, GT_ModHandler.getIC2Item("industrialTnt", 1, new ItemStack(net.minecraft.init.Blocks.tnt, 1)), ItemList.Machine_Multi_ImplosionCompressor.get(1), null, null, null, null, null, + null, null, null, null }); + /* new GT_ComputercubeDescription(new String[] { + "Superconductor", "Expensive, but superconducting", "nearly infinite EU/p and it has", "no Cableloss!", "Do not confuse this with the", "Superconductor Item!", "", "Supercondensator", "This is a special kind of Transformer", "It allows you to convert anything down", + "to 8192 EU/t, what is like a normal HVT.", "But if you apply Redstone to it then it", "outputs friggin 1000000EU/t!!!", "", "You also need it for the Fusion Reactor.", "Some Machines will require that high", "Voltage in a short period of time." }, new ItemStack[] { + null, null, GregTech_API.getGregTechItem(3, 1, 2), new ItemStack(GregTech_API.sBlockList[1], 1, 12), new ItemStack(GregTech_API.sBlockList[1], 1, 15), null, null, null, null, null, + null, null, null, null }); + new GT_ComputercubeDescription(new String[] { + "Player Detector", "This nice little Device is able", "to detect Players in a Range of", "16-Spherical Meters and a", "EU-Consumption of 2.5EU/t.", "", "It can be switched to 3 Diffrent", "Modes, to detect YOURSELF, OTHERS", "and ALL Players by Rightclicking it.", "", + "It doesnt detect regular Mobs.", "", "", "", "", "", "~This Device has private Access~" }, new ItemStack[] { + null, null, null, null, new ItemStack(GregTech_API.sBlockList[1], 1, 13), null, null, null, null, null, + null, null, null, null });*/ + new GT_ComputercubeDescription(new String[] { + "Matter Fabricator", "The Matter Fabricator is nothing", "else than a Mass Fabricator, which", "can ONLY run on Scrap and other", "Amplifiers.", "", "With the Default Config it is 100", "times more expensive than normal.", "Of course you can set the Config", "to 166666, to get your normal", + "Massfabricationrate back, or you", "could make Mass Fabrication even", "cheaper, if you really want to", "make Mass Fabrication that easy", "", "", "" }, new ItemStack[] { + null, null, null, GT_Utility.getFluidDisplayStack(FluidUtils.getUUA(1), false), ItemList.Machine_LV_Massfab.get(1), null, null, null, null, null, + null, null, null, null }); + new GT_ComputercubeDescription(new String[] { + "Electric Autocrafting Tables", "These are Crafting Tables for the", "common need of autocrafting in", "Factories. One Craft needs 5000EU to", "be performed, so you have actually to", "lay Wires to it. This Table is", "unique as its also able, to give you", "the used Capsulecellcontainers, made", "by Industrial Corp, back.", "You may use that behaviour to", + "craft anything releated to chemics,", "like the 2xKNO3-Recipe for Saltpeter.", "The 5 Modes are the following:", "1. Craft Recipe, 2. All 5 Modes", "3. Craft all as single Items", "4. 2x2-Grid and 5. a 3x3-Grid.", "It accepts only 32EU/p as Input." }, new ItemStack[] { + null, null, null, null, GregtechItemList.GT4_Electric_Auto_Workbench_LV.get(1), null, null, null, null, null, + null, null, null, null }); + /* new GT_ComputercubeDescription(new String[] { + "Automation with GregTech", "Translocators and Buffers are the", "newest Way to automate your Machines.", "Screw Buildcraft, these EU-wasting", "Devices are much more awesome.", "They output 32EU/t to their directed", "IN- and OUT-puts, making them usefull", "for things, like saving wires.", "Translocators are taking Stuff from", "the Block at their green Inputfacing", + "and putting it into the Block at the", "red Outputfacing. Buffers do the same,", "but the grab Items from their own", "Inventory, what makes them usefull", "as Pipe-replacement.", "Buffers also have Redstone Intelligence,", "which you can configure in their GUI." }, new ItemStack[] { + null, null, new ItemStack(GregTech_API.sBlockList[1], 1, 19), new ItemStack(GregTech_API.sBlockList[1], 1, 18), new ItemStack(GregTech_API.sBlockList[1], 1, 17), null, null, null, null, null, + null, null, null, null }); + new GT_ComputercubeDescription(new String[] { + "Silver Ore", "It's rarity is similar to Gold", "Silver can be used, to make", "Circuits cheaper, or you can use", "it for Redpowerstuff.", "", "", "", "", "", + "", "", "", "", "", "", "" }, new ItemStack[] { + null, null, GT_OreDictUnificator.get("dustSilver", 1), GregTech_API.getGregTechItem(0, 1, 17), new ItemStack(GregTech_API.sBlockList[2], 1, 1), null, null, null, null, null, + null, null, null, null }); + new GT_ComputercubeDescription(new String[] { + "Sapphires and Rubys", "These spawn exactly like Emeralds.", "But Rubies are found in Deserts,", "while Sapphires can be found in", "Oceans.", "", "They currently make only a cheaper", "Recipe for Energycrystals and", "Lapotroncrystals, but they are", "Redpower Compatible.", + "", "They also sometimes drop random", "other Gems, like Garnet for Ruby", "or green Sapphire for Sapphire", "in addition.", "", "" }, new ItemStack[] { + null, GregTech_API.getGregTechItem(0, 1, 32), new ItemStack(GregTech_API.sBlockList[2], 1, 3), GregTech_API.getGregTechItem(0, 1, 33), new ItemStack(GregTech_API.sBlockList[2], 1, 4), null, null, null, null, null, + null, null, null, null }); + new GT_ComputercubeDescription(new String[] { + "Bauxite Ore", "The Stuff out of which you can", "produce Aluminium and also", "Titanium.", "You find this Ore in Plains and", "Forests.", "", "If you think Aluminium is useless", "then note, that mobs NEVER spawn", "ontop of an Aluminium Block", + "(Same applies also for Silver-,", "Gem- and Iridium Blocks)", "Production Chain:", "macerating Bauxite Ore", "electrolyzing 24 Bauxite Dust", "smelting Aluminium Dust in a", "Blast Furnace" }, new ItemStack[] { + new ItemStack(GregTech_API.sBlockList[0], 1, 7), GregTech_API.getGregTechItem(0, 1, 18), GregTech_API.getGregTechItem(1, 1, 18), GregTech_API.getGregTechItem(1, 1, 17), new ItemStack(GregTech_API.sBlockList[2], 1, 5), null, null, null, null, null, + null, null, null, null }); + new GT_ComputercubeDescription(new String[] { + "Titanium", "Produced by centrifuging Bauxitedust", "as a byproduct, this Material can make", "anything much more resistant against", "damage, like Explosions.", "Blocks made of Titaniumingots have a", "large Blastresistance", "", "It can also be used to craft tons of", "mixed Metal Ingots", + "", "", "", "", "", "", "" }, new ItemStack[] { + new ItemStack(GregTech_API.sBlockList[0], 1, 8), GregTech_API.getGregTechItem(0, 1, 19), GregTech_API.getGregTechItem(1, 1, 19), GregTech_API.getGregTechItem(1, 1, 17), new ItemStack(GregTech_API.sBlockList[2], 1, 5), null, null, null, null, null, + null, null, null, null }); + new GT_ComputercubeDescription(new String[] { + "Iridium Ore", "You can find it only when you", "stripmine very large Areas with", "Quarries and such. There is only", "one in every 5th-10th Chunk.", "It's even more rare in Oceans!", "", "Some people disable the UUM-Recipe", "for Iridium, for making getting it", "an Achievement.", + "", "However Iridium Ore contains traces", "of Platinum, so it's best to use the", "Industrial Grinder for this Ore.", "", "", "" }, new ItemStack[] { + null, null, GT_OreDictUnificator.get("plateAlloyIridium", 1), GT_ModHandler.getIC2Item("iridiumOre", 1), new ItemStack(GregTech_API.sBlockList[2], 1, 2), null, null, null, null, null, + null, null, null, null }); + new GT_ComputercubeDescription(new String[] { + "Helium Coolant Cell", "These are just cheaper, than the", "Water based Coolant Cells, and can", "also hold six times more Heat.", "", "Helium Cells can also be used for", "making Luminators and Mininglasers", "", "", "", + "", "", "", "", "", "", "" }, new ItemStack[] { + GregTech_API.getGregTechItem(2, 1, 6), GregTech_API.getGregTechItem(2, 1, 3), GregTech_API.getGregTechItem(34, 1, 0), GregTech_API.getGregTechItem(35, 1, 0), GregTech_API.getGregTechItem(36, 1, 0), null, null, null, null, null, + null, null, null, null }); + new GT_ComputercubeDescription(new String[] { + "Destructopack", "Open its GUI via rightclick and", "dump all the useless Stuff from", "your Inventory into it, instead of", "littering Items into the World.", "", "", "", "", "", + "", "", "", "", "", "", "" }, new ItemStack[] { + null, null, null, null, GregTech_API.getGregTechItem(33, 1, 0), null, null, null, null, null, + null, null, null, null });*/ + new GT_ComputercubeDescription(new String[] { + "Data Orbs", "They store Data.", "", "Rightclick on a Computer Cube, to", "extract a Reactorplan", "", "Sneak-Rightclick on it, to insert", "a Reactorplan", "", "Works also with Sonictrons", + "", "", "", "", "", "", "" }, new ItemStack[] { + null, null, null, null, ItemList.Tool_DataOrb.get(1), null, null, null, null, null, + null, null, null, null }); + new GT_ComputercubeDescription(new String[] { + "Energy Orbs", "10Million EU in one Orb!", "", "This is a Tier-IV-Energystorage", "So a MFSU is not enough for it!", "", "Use it to create a Lapotron Pack,", "which is like an ultimate Lap Pack!", "", "", + "", "", "", "", "", "", "" }, new ItemStack[] { + null, null, null, ItemList.Energy_LapotronicOrb.get(1), null, null, null, null, null, null, + null, null, null, null }); + new GT_ComputercubeDescription(new String[] { + "Iridium Neutron Reflector", "It's used for Fusion Reactor Coils,", "and works like a normal one", "inside a Reactor, but it's also", "INDESTRUCTIBLE*.", "", "", "", "", "", + "", "", "", "", "", "", "* = for weardown" }, new ItemStack[] { + null, null, null, null, ItemList.Neutron_Reflector.get(1), null, null, null, null, null, + null, null, null, null }); + /*new GT_ComputercubeDescription(new String[] { + "Rock Cutter", "You want to get whole Blocks, but", "your Drill is not enchantable?", "The Rock Cutter has an awesome", "SilkTouch-III-Function!", "", "It works like a Drill, but you", "get the whole Block instead of", "'macerated' Ores!", "", + "Put those Blocks into a Macerator", "and double your Diamond Income!", "", "Or better. Use the Industrial", "Grinder to get even more", "Resources!", "" }, new ItemStack[] { + null, null, null, null, GregTech_API.getGregTechItem(46, 1, 0), null, null, null, null, null, + null, null, null, null }); + new GT_ComputercubeDescription(new String[] { + "Tesla Staff", "This completly untested PvP-Weapon", "destroys electric Armor in one hit", "", "The Energy Orb inside it must be", "fully charged to let this work.", "", "We are not responsible for any", "Electrocution Damage to yourself,", "while using it.", + "", "We also dont even know, if this", "Weapon has any effect AT ALL.", "", "", "", "" }, new ItemStack[] { + null, null, null, null, GregTech_API.getGregTechItem(47, 1, 0), null, null, null, null, null, + null, null, null, null });*/ + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/GT_TileEntity_ComputerCube.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/GT_TileEntity_ComputerCube.java new file mode 100644 index 0000000000..dd8c79a855 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/GT_TileEntity_ComputerCube.java @@ -0,0 +1,986 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.misc; + +import java.util.ArrayList; +import java.util.Collections; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.api.gui.computer.GT_Container_ComputerCube; +import gtPlusPlus.xmod.gregtech.api.gui.computer.GT_GUIContainer_ComputerCube; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import gtPlusPlus.xmod.gregtech.common.computer.GT_ComputercubeDescription; +import ic2.api.reactor.IReactor; +import ic2.api.reactor.IReactorComponent; +import ic2.core.Ic2Items; +import ic2.core.init.MainConfig; +import ic2.core.util.ConfigUtil; +import net.minecraft.entity.Entity; +import net.minecraft.entity.item.EntityItem; +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.ChunkCoordinates; +import net.minecraft.world.World; + +public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank implements IReactor { + + public static boolean mSeedscanner = true; + + public static boolean mReactorplanner = true; + + public static ArrayList sReactorList; + + public boolean mStarted = false; + + public int mMode = 0; + + public int mHeat = 0; + + public int mEUOut = 0; + + public int mMaxHeat = 10000; + + public int mEU = 0; + + public int mProgress = 0; + + public int mEUTimer = 0; + + public int mEULast1 = 0; + + public int mEULast2 = 0; + + public int mEULast3 = 0; + + public int mEULast4 = 0; + + public float mHEM = 1.0F, mExplosionStrength = 0.0F; + + private boolean mNeedsUpdate; + + public GT_TileEntity_ComputerCube(final int aID, final String aDescription) { + super(aID, "computer.cube", "Computer Cube", 5, 114, aDescription); + } + + public GT_TileEntity_ComputerCube(final String aName, final String aDescription, final ITexture[][][] aTextures) { + super(aName, 5, 114, aDescription, aTextures); + } + + @Override + public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + try { + return new GT_Container_ComputerCube(aPlayerInventory, aBaseMetaTileEntity, mMode); + } + catch (Throwable t) { + t.printStackTrace(); + return null; + } + } + + @Override + public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + try { + return new GT_GUIContainer_ComputerCube(aPlayerInventory, aBaseMetaTileEntity, mMode); + } + catch (Throwable t) { + t.printStackTrace(); + return null; + } + } + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) { + return true; + } + Logger.INFO("Did rmb."); + boolean aDidOpen = aBaseMetaTileEntity.openGUI(aPlayer); + Logger.INFO("Did open? "+aDidOpen); + return true; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_TileEntity_ComputerCube(this.mName, this.mDescription, this.mTextures); + } + + @Override + public boolean isAccessAllowed(EntityPlayer aPlayer) { + ItemStack tStack = aPlayer.getCurrentEquippedItem(); + if (tStack != null && ItemList.Tool_DataOrb.isStackEqual(tStack)) { + return false; + } + return true; + } + + @Override + public boolean isSimpleMachine() { + return true; + } + + @Override + public boolean isEnetInput() { + return true; + } + + @Override + public boolean isInputFacing(byte aDirection) { + return true; + } + + @Override + public long maxAmperesIn() { + return 4; + } + + @Override + public long maxEUInput() { + return GT_Values.V[2]; + } + + @Override + public long maxEUStore() { + return GT_Values.V[5] * 1024; + } + + @Override + public boolean ownerControl() { + return true; + } + + @Override + public int getSizeInventory() { + return 114; + } + + @Override + public boolean isValidSlot(int aIndex) { + return (aIndex > 53 && aIndex < 58); + } + + @Override + public boolean isFacingValid(byte aFacing) { + return true; + } + + public void saveNuclearReactor() { + for (int i = 0; i < 54; i++) { + if (this.mInventory[i] == null) { + this.mInventory[i + 59] = null; + } + else { + this.mInventory[i + 59] = this.mInventory[i].copy(); + } + } + } + + public void loadNuclearReactor() { + for (int i = 0; i < 54; i++) { + if (this.mInventory[i + 59] == null) { + this.mInventory[i] = null; + } + else { + this.mInventory[i] = this.mInventory[i + 59].copy(); + } + } + } + + public int getXCoord() { + return this.getBaseMetaTileEntity().getXCoord(); + } + + public int getYCoord() { + return this.getBaseMetaTileEntity().getYCoord(); + } + + public int getZCoord() { + return this.getBaseMetaTileEntity().getZCoord(); + } + + public void reset() { + this.mEU = 0; + this.mHeat = 0; + this.mEUOut = 0; + this.mMaxHeat = 10000; + this.mHEM = 1.0F; + this.mExplosionStrength = 0.0F; + this.mProgress = 0; + this.mInventory[113] = null; + int i; + for (i = 0; i < 54; i++) { + this.mInventory[i] = null; + this.mInventory[i + 59] = null; + } + for (i = 54; i < 58; i++) { + if (this.mInventory[i] != null) { + if (!this.getWorld().isRemote) + this.getWorld().spawnEntityInWorld((Entity) new EntityItem(this.getWorld(), this.getXCoord() + 0.5D, this.getYCoord() + 0.5D, this.getZCoord() + 0.5D, this.mInventory[i])); + this.mInventory[i] = null; + } + } + } + + public void switchModeForward() { + this.mMode = (this.mMode + 1) % 7; + switchMode(); + } + + public void switchModeBackward() { + this.mMode--; + if (this.mMode < 0) + this.mMode = 6; + switchMode(); + } + + private void switchMode() { + reset(); + if (this.mMode == 1 && !mReactorplanner) { + switchMode(); + return; + } + if (this.mMode == 2 && !mSeedscanner) { + switchMode(); + return; + } + if (this.mMode == 3) { + showCentrifugeRecipe(0); + } + if (this.mMode == 4) { + showFusionRecipe(0); + } + if (this.mMode == 5) { + showDescription(0); + } + if (this.mMode == 6) { + showElectrolyzerRecipe(0); + } + //this.getWorld().addBlockEvent(this.getXCoord(), this.getYCoord(), this.getZCoord(), (GregTech_API.sBlockList[1]), 10, this.mMode); + //this.getWorld().addBlockEvent(this.getXCoord(), this.getYCoord(), this.getZCoord(), (GregTech_API.sBlockList[1]), 11, this.mMaxHeat); + } + + public void showDescription(int aIndex) { + this.mExplosionStrength = 0.0F; + if (GT_ComputercubeDescription.sDescriptions.isEmpty()) { + return; + } + if (aIndex >= GT_ComputercubeDescription.sDescriptions.size() || aIndex < 0) + aIndex = 0; + if (((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(aIndex)).mStacks[0] == null) { + this.mInventory[59] = null; + } + else { + this.mInventory[59] = ((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(aIndex)).mStacks[0].copy(); + } + if (((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(aIndex)).mStacks[1] == null) { + this.mInventory[60] = null; + } + else { + this.mInventory[60] = ((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(aIndex)).mStacks[1].copy(); + } + if (((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(aIndex)).mStacks[2] == null) { + this.mInventory[61] = null; + } + else { + this.mInventory[61] = ((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(aIndex)).mStacks[2].copy(); + } + if (((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(aIndex)).mStacks[3] == null) { + this.mInventory[62] = null; + } + else { + this.mInventory[62] = ((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(aIndex)).mStacks[3].copy(); + } + if (((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(aIndex)).mStacks[4] == null) { + this.mInventory[63] = null; + } + else { + this.mInventory[63] = ((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(aIndex)).mStacks[4].copy(); + } + if (((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(aIndex)).mStacks[5] == null) { + this.mInventory[64] = null; + } + else { + this.mInventory[64] = ((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(aIndex)).mStacks[5].copy(); + this.mExplosionStrength = 100.0F; + } + if (((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(aIndex)).mStacks[6] == null) { + this.mInventory[65] = null; + } + else { + this.mInventory[65] = ((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(aIndex)).mStacks[6].copy(); + this.mExplosionStrength = 100.0F; + } + if (((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(aIndex)).mStacks[7] == null) { + this.mInventory[66] = null; + } + else { + this.mInventory[66] = ((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(aIndex)).mStacks[7].copy(); + this.mExplosionStrength = 100.0F; + } + if (((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(aIndex)).mStacks[8] == null) { + this.mInventory[67] = null; + } + else { + this.mInventory[67] = ((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(aIndex)).mStacks[8].copy(); + this.mExplosionStrength = 100.0F; + } + if (((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(aIndex)).mStacks[9] == null) { + this.mInventory[68] = null; + } + else { + this.mInventory[68] = ((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(aIndex)).mStacks[9].copy(); + this.mExplosionStrength = 100.0F; + } + if (((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(aIndex)).mStacks[10] == null) { + this.mInventory[69] = null; + } + else { + this.mInventory[69] = ((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(aIndex)).mStacks[10].copy(); + this.mExplosionStrength = 100.0F; + } + if (((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(aIndex)).mStacks[11] == null) { + this.mInventory[70] = null; + } + else { + this.mInventory[70] = ((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(aIndex)).mStacks[11].copy(); + this.mExplosionStrength = 100.0F; + } + if (((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(aIndex)).mStacks[12] == null) { + this.mInventory[71] = null; + } + else { + this.mInventory[71] = ((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(aIndex)).mStacks[12].copy(); + this.mExplosionStrength = 100.0F; + } + if (((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(aIndex)).mStacks[13] == null) { + this.mInventory[72] = null; + } + else { + this.mInventory[72] = ((GT_ComputercubeDescription) GT_ComputercubeDescription.sDescriptions.get(aIndex)).mStacks[13].copy(); + this.mExplosionStrength = 100.0F; + } + this.mMaxHeat = aIndex; + //this.getWorld().addBlockEvent(this.getXCoord(), this.getYCoord(), this.getZCoord(), GregTech_API.sBlockList[1], 11, this.mMaxHeat); + } + + public void switchDescriptionPageForward() { + if (++this.mMaxHeat >= GT_ComputercubeDescription.sDescriptions.size()) + this.mMaxHeat = 0; + showDescription(this.mMaxHeat); + } + + public void switchDescriptionPageBackward() { + if (--this.mMaxHeat < 0) + this.mMaxHeat = GT_ComputercubeDescription.sDescriptions.size() - 1; + showDescription(this.mMaxHeat); + } + + public void showCentrifugeRecipe(int aIndex) { + /* + if (aIndex >= GT_Recipe_Map.sCentrifugeRecipes.mRecipeList.size() || aIndex < 0) + aIndex = 0; + GT_Recipe tRecipe = GT_Recipe_Map.sCentrifugeRecipes.mRecipeList.get(aIndex); + if (tRecipe != null) { + if (tRecipe.mInput1 == null) { + this.mInventory[59] = null; + } + else { + this.mInventory[59] = tRecipe.mInput1.copy(); + } + if (tRecipe.mInput2 == null) { + this.mInventory[60] = null; + } + else { + this.mInventory[60] = tRecipe.mInput2.copy(); + } + if (tRecipe.mOutput1 == null) { + this.mInventory[61] = null; + } + else { + this.mInventory[61] = tRecipe.mOutput1.copy(); + } + if (tRecipe.mOutput2 == null) { + this.mInventory[62] = null; + } + else { + this.mInventory[62] = tRecipe.mOutput2.copy(); + } + if (tRecipe.mOutput3 == null) { + this.mInventory[63] = null; + } + else { + this.mInventory[63] = tRecipe.mOutput3.copy(); + } + if (tRecipe.mOutput4 == null) { + this.mInventory[64] = null; + } + else { + this.mInventory[64] = tRecipe.mOutput4.copy(); + } + this.mEU = tRecipe.mDuration * 5; + this.mMaxHeat = aIndex; + } + this.getWorld().addBlockEvent(this.xCoord, this.yCoord, this.zCoord, (GregTech_API.sBlockList[1]).field_71990_ca, 11, this.mMaxHeat); + */} + + public void switchCentrifugePageForward() { + if (++this.mMaxHeat >= GT_Recipe_Map.sCentrifugeRecipes.mRecipeList.size()) + this.mMaxHeat = 0; + // showCentrifugeRecipe(this.mMaxHeat); + } + + public void switchCentrifugePageBackward() { + if (--this.mMaxHeat < 0) + this.mMaxHeat = GT_Recipe_Map.sCentrifugeRecipes.mRecipeList.size() - 1; + // showCentrifugeRecipe(this.mMaxHeat); + } + + public void showElectrolyzerRecipe(int aIndex) { + /* + if (aIndex >= GT_Recipe_Map.sElectrolyzerRecipes.mRecipeList.size() || aIndex < 0) + aIndex = 0; + GT_Recipe tRecipe = GT_Recipe_Map.sElectrolyzerRecipes.get(aIndex); + if (tRecipe != null) { + if (tRecipe.mInput1 == null) { + this.mInventory[59] = null; + } + else { + this.mInventory[59] = tRecipe.mInput1.copy(); + } + if (tRecipe.mInput2 == null) { + this.mInventory[60] = null; + } + else { + this.mInventory[60] = tRecipe.mInput2.copy(); + } + if (tRecipe.mOutput1 == null) { + this.mInventory[61] = null; + } + else { + this.mInventory[61] = tRecipe.mOutput1.copy(); + } + if (tRecipe.mOutput2 == null) { + this.mInventory[62] = null; + } + else { + this.mInventory[62] = tRecipe.mOutput2.copy(); + } + if (tRecipe.mOutput3 == null) { + this.mInventory[63] = null; + } + else { + this.mInventory[63] = tRecipe.mOutput3.copy(); + } + if (tRecipe.mOutput4 == null) { + this.mInventory[64] = null; + } + else { + this.mInventory[64] = tRecipe.mOutput4.copy(); + } + this.mEU = tRecipe.mDuration * tRecipe.mEUt; + this.mMaxHeat = aIndex; + } + this.getWorld().addBlockEvent(this.xCoord, this.yCoord, this.zCoord, (GregTech_API.sBlockList[1]).field_71990_ca, 11, this.mMaxHeat); + */} + + public void switchElectrolyzerPageForward() { + if (++this.mMaxHeat >= GT_Recipe_Map.sElectrolyzerRecipes.mRecipeList.size()) + this.mMaxHeat = 0; + showElectrolyzerRecipe(this.mMaxHeat); + } + + public void switchElectrolyzerPageBackward() { + if (--this.mMaxHeat < 0) + this.mMaxHeat = GT_Recipe_Map.sElectrolyzerRecipes.mRecipeList.size() - 1; + showElectrolyzerRecipe(this.mMaxHeat); + } + + public static ArrayList sFusionReactorRecipes = new ArrayList(); + + public void showFusionRecipe(int aIndex) { + + if (sFusionReactorRecipes.isEmpty()) { + for (GT_Recipe aRecipe : GT_Recipe_Map.sFusionRecipes.mRecipeList) { + sFusionReactorRecipes.add(aRecipe); + } + Collections.sort(sFusionReactorRecipes); + } + + if (aIndex >= sFusionReactorRecipes.size() || aIndex < 0) { + aIndex = 0; + } + GT_Recipe tRecipe = sFusionReactorRecipes.get(aIndex); + if (tRecipe != null) { + if (tRecipe.mFluidInputs[0] == null) { + this.mInventory[59] = null; + } + else { + this.mInventory[59] = GT_Utility.getFluidDisplayStack(tRecipe.mFluidInputs[0], true); + } + if (tRecipe.mFluidInputs[1] == null) { + this.mInventory[60] = null; + } + else { + this.mInventory[60] = GT_Utility.getFluidDisplayStack(tRecipe.mFluidInputs[1], true); + } + if (tRecipe.mFluidOutputs[0] == null) { + this.mInventory[61] = null; + } + else { + this.mInventory[61] = GT_Utility.getFluidDisplayStack(tRecipe.mFluidOutputs[0], true); + } + this.mEU = tRecipe.mSpecialValue; + this.mEUOut = tRecipe.mEUt; + this.mHeat = tRecipe.mDuration; + this.mMaxHeat = aIndex; + } + //this.getWorld().addBlockEvent(this.getXCoord(), this.getYCoord(), this.getZCoord(), GregTech_API.sBlockList[1], 11, this.mMaxHeat); + } + + public void switchFusionPageForward() { + if (++this.mMaxHeat >= sFusionReactorRecipes.size()) + this.mMaxHeat = 0; + showFusionRecipe(this.mMaxHeat); + } + + public void switchFusionPageBackward() { + if (--this.mMaxHeat < 0) + this.mMaxHeat = sFusionReactorRecipes.size() - 1; + showFusionRecipe(this.mMaxHeat); + } + + public void switchNuclearReactor() { + if (this.mStarted) { + stopNuclearReactor(); + } + else { + startNuclearReactor(); + } + } + + public void startNuclearReactor() { + this.mStarted = true; + this.mHeat = 0; + this.mEU = 0; + } + + public void stopNuclearReactor() { + this.mStarted = false; + } + + public void storeAdditionalData(NBTTagCompound aNBT) { + aNBT.setInteger("mMode", this.mMode); + aNBT.setInteger("mProgress", this.mProgress); + aNBT.setBoolean("mStarted", this.mStarted); + aNBT.setInteger("mEU", this.mEU); + aNBT.setInteger("mHeat", this.mHeat); + aNBT.setInteger("mEUOut", this.mEUOut); + aNBT.setInteger("mMaxHeat", this.mMaxHeat); + aNBT.setFloat("mHEM", this.mHEM); + aNBT.setFloat("mExplosionStrength", this.mExplosionStrength); + } + + public void getAdditionalData(NBTTagCompound aNBT) { + this.mMode = aNBT.getInteger("mMode"); + this.mProgress = aNBT.getInteger("mProgress"); + this.mStarted = aNBT.getBoolean("mStarted"); + this.mEU = aNBT.getInteger("mEU"); + this.mHeat = aNBT.getInteger("mHeat"); + this.mEUOut = aNBT.getInteger("mEUOut"); + this.mMaxHeat = aNBT.getInteger("mMaxHeat"); + this.mHEM = aNBT.getFloat("mHEM"); + this.mExplosionStrength = aNBT.getFloat("mExplosionStrength"); + } + + public void onFirstTickUpdate() { + } + + @Override + public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { + super.onFirstTick(aBaseMetaTileEntity); + if (sReactorList == null) { + sReactorList = new ArrayList(); + + String[] aIc2Items = new String[]{ + "reactorUraniumSimple", "reactorUraniumDual", "reactorUraniumQuad", /*"reactorIsotopeCell",*/ "reactorReflector", "reactorReflectorThick", "reactorCoolantSimple", + "reactorCoolantTriple", "reactorCoolantSix", "reactorCondensator", "reactorCondensatorLap", "reactorPlating", "reactorPlatingHeat", "reactorPlatingExplosive", "reactorVent", + "reactorVentCore", "reactorVentGold", "reactorVentSpread", "reactorVentDiamond", "reactorHeatSwitch", "reactorHeatSwitchCore", "reactorHeatSwitchSpread", + "reactorHeatSwitchDiamond", /*"reactorHeatpack",*/ + }; + + for (String aItem : aIc2Items) { + ItemStack aStack = GT_ModHandler.getIC2Item(aItem, 1); + if (!ItemUtils.checkForInvalidItems(aStack)) { + Logger.INFO("Unable to find IC2 Item: " + aItem); + CORE.crash("Unable to find IC2 Item: " + aItem); + } + else { + sReactorList.add(new GT_ItemStack(aStack.copy())); + } + } + + ItemList[] aGtItems = new ItemList[]{ + ItemList.Neutron_Reflector, ItemList.Moxcell_1, ItemList.Moxcell_2, ItemList.Moxcell_4, ItemList.Uraniumcell_1, ItemList.Uraniumcell_2, ItemList.Uraniumcell_4, + ItemList.NaquadahCell_1, ItemList.NaquadahCell_2, ItemList.NaquadahCell_4, ItemList.ThoriumCell_1, ItemList.ThoriumCell_2, ItemList.ThoriumCell_4, ItemList.Reactor_Coolant_He_1, + ItemList.Reactor_Coolant_He_3, ItemList.Reactor_Coolant_He_6, ItemList.Reactor_Coolant_NaK_1, ItemList.Reactor_Coolant_NaK_3, ItemList.Reactor_Coolant_NaK_6, + }; + + for (ItemList aItem : aGtItems) { + sReactorList.add(new GT_ItemStack(aItem.get(1))); + } + + } + + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + if(this.getBaseMetaTileEntity().isClientSide()) { + this.getWorld().markBlockForUpdate(this.getXCoord(), this.getYCoord(), this.getZCoord()); + this.mNeedsUpdate = false; + } + else { + this.mNeedsUpdate = false; + } + if (this.getBaseMetaTileEntity().isServerSide()) { + if (this.mMode == 2) { + if (this.mInventory[55] == null) { + this.mInventory[55] = this.mInventory[54]; + this.mInventory[54] = null; + } + if (this.mInventory[57] == null) { + this.mInventory[57] = this.mInventory[56]; + this.mInventory[56] = null; + } + + if (mSeedscanner && this.mInventory[55] != null && GT_Utility.areStacksEqual(this.mInventory[55], Ic2Items.cropSeed, true) && this.mInventory[55].getTagCompound() != null) { + if (this.mInventory[55].getTagCompound().getByte("scan") < 4) { + if (this.mProgress >= 100) { + this.mInventory[55].getTagCompound().setByte("scan", (byte) 4); + this.mProgress = 0; + } + else if (this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(100, false)) { + this.mProgress++; + } + } + else { + this.mProgress = 0; + if (this.mInventory[56] == null) { + this.mInventory[56] = this.mInventory[55]; + this.mInventory[55] = null; + } + } + } + else { + this.mProgress = 0; + if (this.mInventory[56] == null) { + this.mInventory[56] = this.mInventory[55]; + this.mInventory[55] = null; + } + } + } + if (this.mMode == 1 && mReactorplanner && this.mStarted && this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(32, false)) + for (int i = 0; i < 25 && this.mStarted; i++) { + this.mEUOut = 0; + this.mMaxHeat = 10000; + this.mHEM = 1.0F; + this.mExplosionStrength = 10.0F; + float tMultiplier = 1.0F; + for (int y = 0; y < 6; y++) { + for (int x = 0; x < 9; x++) { + ItemStack tStack = getStackInSlot(x + y * 9); + if (tStack != null) + if (tStack.getItem() instanceof IReactorComponent) { + IReactorComponent tComponent = (IReactorComponent) tStack.getItem(); + tComponent.processChamber(this, tStack, x, y, false); //TODO + float tInfluence = ((IReactorComponent) tStack.getItem()).influenceExplosion(this, tStack); + if (tInfluence > 0.0F && tInfluence < 1.0F) { + tMultiplier *= tInfluence; + } + else { + this.mExplosionStrength += tInfluence; + } + } + else if (tStack.isItemEqual(GT_ModHandler.getIC2Item("nearDepletedUraniumCell", 1)) || tStack.isItemEqual(GT_ModHandler.getIC2Item("reEnrichedUraniumCell", 1))) { + stopNuclearReactor(); + } + else { + setInventorySlotContents(x + y * 9, (ItemStack) null); + } + } + } + this.mEUOut *= getReactorEUOutput(); + if ((this.mEUOut == 0 && this.mEUTimer++ > 20) || this.mHeat >= this.mMaxHeat) + stopNuclearReactor(); + if (this.mEUOut != 0) + this.mEUTimer = 0; + this.mExplosionStrength *= this.mHEM * tMultiplier; + this.mEU += this.mEUOut * 20; + int tEU = this.mEULast1; + this.mEULast1 = this.mEULast2; + this.mEULast2 = this.mEULast3; + this.mEULast3 = this.mEULast4; + this.mEULast4 = this.mEUOut; + this.mEUOut = (this.mEUOut + this.mEULast1 + this.mEULast2 + this.mEULast3 + tEU) / 5; + } + if (aTick % 20L == 0L) { + //this.getWorld().addBlockEvent(this.xCoord, this.yCoord, this.zCoord, (GregTech_API.sBlockList[1]).field_71990_ca, 10, this.mMode); + //this.getWorld().addBlockEvent(this.xCoord, this.yCoord, this.zCoord, (GregTech_API.sBlockList[1]).field_71990_ca, 11, this.mMaxHeat); + } + } + } + + private int getReactorEUOutput() { + return MathUtils.roundToClosestInt(getReactorEnergyOutput() * 5.0F * ConfigUtil.getFloat(MainConfig.get(), "balance/energy/generator/nuclear")); + } + + @Override + public void receiveClientEvent(byte aEventID, byte aValue) { + super.receiveClientEvent(aEventID, aValue); + if (this.getWorld().isRemote) + switch (aEventID) { + case 10 : + this.mNeedsUpdate = true; + this.mMode = aValue; + break; + case 11 : + this.mMaxHeat = aValue; + break; + } + return; + } + + @Override + public void onValueUpdate(byte aValue) { + super.onValueUpdate(aValue); + this.mNeedsUpdate = true; + } + + @Override + public void onMachineBlockUpdate() { + super.onMachineBlockUpdate(); + this.mNeedsUpdate = true; + } + + public boolean canInsertItem(int i, ItemStack itemstack, int j) { + return (this.mMode == 2) ? ((i == 54 || i == 55)) : false; + } + + public boolean canExtractItem(int i, ItemStack itemstack, int j) { + return (this.mMode == 2) ? ((i == 56 || i == 57)) : false; + } + + public String getInvName() { + return "GregTech_Computercube"; + } + + public int getTexture(int aSide, int aMeta) { + switch (this.mMode) { + case 0 : + return 8; + case 1 : + return 46; + case 2 : + return 45; + } + return 48; + } + + @Override + public ChunkCoordinates getPosition() { + return new ChunkCoordinates(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()); + } + + @Override + public int getHeat() { + return this.mHeat; + } + + @Override + public void setHeat(int aHeat) { + this.mHeat = aHeat; + } + + @Override + public int addHeat(int aAmount) { + this.mHeat += aAmount; + return this.mHeat; + } + + @Override + public int getMaxHeat() { + return this.mMaxHeat; + } + + @Override + public void setMaxHeat(int aMaxHeat) { + this.mMaxHeat = aMaxHeat; + } + + @Override + public float getHeatEffectModifier() { + return this.mHEM; + } + + @Override + public void setHeatEffectModifier(float aHEM) { + this.mHEM = aHEM; + } + + + public int addOutput(int aEnergy) { + this.mEUOut += aEnergy; + return this.mEUOut; + } + + @Override + public ItemStack getItemAt(int x, int y) { + if (x < 0 || x > 8 || y < 0 || y > 5) + return null; + return getStackInSlot(x + y * 9); + } + + @Override + public void setItemAt(int x, int y, ItemStack aStack) { + setInventorySlotContents(x + y * 9, aStack); + } + + @Override + public void explode() { + stopNuclearReactor(); + } + + @Override + public int getTickRate() { + return 1; + } + + @Override + public boolean produceEnergy() { + return true; + } + + public int getProgress() { + return this.mProgress; + } + + public int getMaxProgress() { + return (this.mProgress > 0) ? 100 : 0; + } + + @Override + public float addOutput(float aEnergy) { + this.mEUOut = (int) (this.mEUOut + aEnergy); + return this.mEUOut; + } + + @Override + public World getWorld() { + return this.getBaseMetaTileEntity().getWorld(); + } + + @Override + public void addEmitHeat(int heat) { + + } + + @Override + public float getReactorEnergyOutput() { + return this.mEUOut; + } + + @Override + public double getReactorEUEnergyOutput() { + return 0; + } + + @Override + public void setRedstoneSignal(boolean redstone) { + + } + + @Override + public boolean isFluidCooled() { + return false; + } + + + + @Override + public boolean doesFillContainers() { + return false; + } + + @Override + public boolean doesEmptyContainers() { + return false; + } + + @Override + public boolean canTankBeFilled() { + return false; + } + + @Override + public boolean canTankBeEmptied() { + return false; + } + + @Override + public boolean displaysItemStack() { + return false; + } + + @Override + public boolean displaysStackSize() { + return false; + } + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + final ITexture[][][] rTextures = new ITexture[10][17][]; + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = this.getFront(i); + rTextures[1][i + 1] = this.getSides(i); + rTextures[2][i + 1] = this.getSides(i); + rTextures[3][i + 1] = this.getSides(i); + rTextures[4][i + 1] = this.getSides(i); + rTextures[5][i + 1] = this.getFront(i); + rTextures[6][i + 1] = this.getSides(i); + rTextures[7][i + 1] = this.getSides(i); + rTextures[8][i + 1] = this.getSides(i); + rTextures[9][i + 1] = this.getSides(i); + } + return rTextures; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, + final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + return this.mTextures[(aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; + } + + public ITexture[] getFront(final byte aColor) { + return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_3)}; + } + + public ITexture[] getSides(final byte aColor) { + return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Computer_Cube)}; + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java index 6741a3e433..5c34ce70fe 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java @@ -5,6 +5,7 @@ import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.common.computer.GT_ComputercubeDescription; import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_ElectricAutoWorkbench; import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_ElectricInventoryManager; import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_TesseractGenerator; @@ -12,6 +13,7 @@ import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_CropHarvestor; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GT4Entity_AutoCrafter; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GT4Entity_ThermalBoiler; +import gtPlusPlus.xmod.gregtech.common.tileentities.misc.GT_TileEntity_ComputerCube; import gtPlusPlus.xmod.gregtech.common.tileentities.redstone.GT_MetaTileEntity_RedstoneButtonPanel; import gtPlusPlus.xmod.gregtech.common.tileentities.redstone.GT_MetaTileEntity_RedstoneLamp; import gtPlusPlus.xmod.gregtech.common.tileentities.redstone.GT_MetaTileEntity_RedstoneStrengthDisplay; @@ -40,9 +42,16 @@ public class Gregtech4Content { basic(); automation(); redstone(); + computer(); } } + + private static void computer() { + Logger.INFO("Gregtech 4 Content | Registering Computer Cube."); + GregtechItemList.Gregtech_Computer_Cube_Machine.set(new GT_TileEntity_ComputerCube(31130, "C-O-M-P-U-T-E-R").getStackForm(1L)); + } + private static void workbenches() { // Gregtech 4 Workbenches Logger.INFO("Gregtech 4 Content | Registering Workbenches."); diff --git a/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/computer.png b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/computer.png new file mode 100644 index 0000000000..76ebee594c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/TileEntities/gt4/computer.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/computer/0.png b/src/main/resources/assets/miscutils/textures/gui/computer/0.png new file mode 100644 index 0000000000..8f8a4a8f75 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/computer/0.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/computer/1.png b/src/main/resources/assets/miscutils/textures/gui/computer/1.png new file mode 100644 index 0000000000..249e8fc4f1 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/computer/1.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/computer/2.png b/src/main/resources/assets/miscutils/textures/gui/computer/2.png new file mode 100644 index 0000000000..a128743fef Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/computer/2.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/computer/3.png b/src/main/resources/assets/miscutils/textures/gui/computer/3.png new file mode 100644 index 0000000000..bf176cd722 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/computer/3.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/computer/4.png b/src/main/resources/assets/miscutils/textures/gui/computer/4.png new file mode 100644 index 0000000000..93156df2fe Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/computer/4.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/computer/5.png b/src/main/resources/assets/miscutils/textures/gui/computer/5.png new file mode 100644 index 0000000000..eb4dd0d086 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/computer/5.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/computer/6.png b/src/main/resources/assets/miscutils/textures/gui/computer/6.png new file mode 100644 index 0000000000..0eda26a397 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/computer/6.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/computer/Redstone.png b/src/main/resources/assets/miscutils/textures/gui/computer/Redstone.png new file mode 100644 index 0000000000..cd287a0a2e Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/computer/Redstone.png differ -- cgit From 8bde0c540d0f59923e2411356491b0f0dc0d5926 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Sat, 15 Jan 2022 18:22:32 +0000 Subject: Added recipes for Generator Array Controller, Multi Forge Hammer, Multi Molecular Transformer. Added recipes for Crop Managers, Inventory Managers, Electric Crafting Tables. Added recipes for Redstone Lamps, Redstone Gauges, Redstone Scales & Redstone Button Panels. Finished Multi Forge Hammer structure check. Changed tiering of Energy Crystal down to EV. --- .../core/item/crafting/ItemDummyResearch.java | 3 +- src/main/java/gtPlusPlus/core/material/ALLOY.java | 8 +- .../gtPlusPlus/core/recipe/RECIPES_Machines.java | 311 +++++++++++++++++++++ .../java/gtPlusPlus/core/recipe/common/CI.java | 11 + .../blocks/GregtechMetaSpecialMultiCasings.java | 2 +- .../common/blocks/textures/TexturesGtBlock.java | 3 +- ...egtechMetaTileEntity_IndustrialForgeHammer.java | 29 +- .../registration/gregtech/Gregtech4Content.java | 2 +- .../textures/blocks/metro/TEXTURE_MAGIC_B.png | Bin 0 -> 2174 bytes .../blocks/metro/TEXTURE_MAGIC_B.png.mcmeta | 6 + 10 files changed, 352 insertions(+), 23 deletions(-) create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_B.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_B.png.mcmeta (limited to 'src/main/resources/assets/miscutils/textures') diff --git a/src/main/java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java b/src/main/java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java index d8ddb26675..b7bf8a7c8e 100644 --- a/src/main/java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java +++ b/src/main/java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java @@ -29,7 +29,8 @@ public class ItemDummyResearch extends ItemGenericToken { RESEARCH_7_ADV_METALLURGY("Advanced Metallurgy", "Advanced Material Sciences!"), RESEARCH_8_TURBINE_AUTOMATION("Turbine Automation", "You really don't want to share this with anyone!"), RESEARCH_9_CLOAKING("Cloaking Technologies", "Sneaking around like a mouse"), - RESEARCH_10_SPARGING("Gas Sparging", "Blowing gas for results"); + RESEARCH_10_SPARGING("Gas Sparging", "Blowing gas for results"), + RESEARCH_11_MOLECULAR_TRANSFORMER("Molecular Transformation", "Turning things into something better"); diff --git a/src/main/java/gtPlusPlus/core/material/ALLOY.java b/src/main/java/gtPlusPlus/core/material/ALLOY.java index fd7547970c..ba0963397c 100644 --- a/src/main/java/gtPlusPlus/core/material/ALLOY.java +++ b/src/main/java/gtPlusPlus/core/material/ALLOY.java @@ -22,10 +22,10 @@ public final class ALLOY { "Energy Crystal", //Material Name MaterialState.SOLID, //State new short[]{228, 255, 0, 0}, //Material Colour - 5660, //Melting Point in C - 7735, //Boiling Point in C - 150, //Protons - 80, //Neutrons + 4660, //Melting Point in C + 5735, //Boiling Point in C + 90, //Protons + 40, //Neutrons true, //Uses Blast furnace? "⬟ ⯂ ⬢ ⬣ ⯃ ⯄", //Material Stacks with Percentage of required elements. diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java index 54a30327a8..f8c027bc40 100644 --- a/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java @@ -254,9 +254,320 @@ public class RECIPES_Machines { zyngen(); milling(); sparging(); + + gt4FarmManager(); + gt4Redstone(); + gt4Inventory(); + + multiGeneratorArray(); + multiForgeHammer(); + multiMolecularTransformer(); + multiXlTurbines(); + multiSolarTower(); + multiElementalDuplicator(); + + resonanceChambers(); + modulators(); + + + } + + + private static void gt4FarmManager() { + + + + ItemList[] aInputHatches = new ItemList[] { + ItemList.Hatch_Input_LV, ItemList.Hatch_Input_MV, ItemList.Hatch_Input_HV, + ItemList.Hatch_Input_EV, ItemList.Hatch_Input_IV, ItemList.Hatch_Input_LuV, + ItemList.Hatch_Input_ZPM, ItemList.Hatch_Input_UV + }; + GregtechItemList[] aOutputMachines = new GregtechItemList[] { + GregtechItemList.GT4_Crop_Harvester_LV, GregtechItemList.GT4_Crop_Harvester_MV, GregtechItemList.GT4_Crop_Harvester_HV, + GregtechItemList.GT4_Crop_Harvester_EV, GregtechItemList.GT4_Crop_Harvester_IV, GregtechItemList.GT4_Crop_Harvester_LuV, + GregtechItemList.GT4_Crop_Harvester_ZPM, GregtechItemList.GT4_Crop_Harvester_UV + }; + + int aTier = 1; + for (int i=0;i<8;i++) { + RecipeUtils.addShapedRecipe( + CI.getRobotArm(aTier, 1), CI.getSensor(aTier, 1), CI.getRobotArm(aTier, 1), + ItemUtils.getOrePrefixStack(OrePrefixes.toolHeadSense, CI.tieredMaterials[aTier], 1), CI.getTieredMachineHull(aTier, 1), ItemUtils.getOrePrefixStack(OrePrefixes.toolHeadSense, CI.tieredMaterials[aTier], 1), + CI.getTieredCircuitOreDictName(aTier), aInputHatches[i].get(1), CI.getTieredCircuitOreDictName(aTier), + aOutputMachines[i].get(1)); + aTier++; + } + + } + private static void gt4Redstone() { + + RecipeUtils.addShapedRecipe( + "plateIron", "plateGlass", "plateIron", + "plateGlass", ItemUtils.getSimpleStack(Blocks.redstone_lamp), "plateGlass", + "plateIron", "plateGlass", "plateIron", + GregtechItemList.GT4_Redstone_Lamp.get(2)); + RecipeUtils.addShapedRecipe( + "plateAluminium", "plateGlass", "plateAluminium", + "plateGlass", ItemUtils.getSimpleStack(Blocks.redstone_lamp), "plateGlass", + "plateAluminium", "plateGlass", "plateAluminium", + GregtechItemList.GT4_Redstone_Lamp.get(8)); + + RecipeUtils.addShapedRecipe( + "plateIron", "plateIron", "plateIron", + ItemUtils.getSimpleStack(Items.comparator), ItemList.Cover_Screen.get(1), ItemUtils.getSimpleStack(Items.comparator), + "plateIron", "plateIron", "plateIron", + GregtechItemList.GT4_Redstone_Display.get(2)); + RecipeUtils.addShapedRecipe( + "plateAluminium", "plateAluminium", "plateAluminium", + ItemUtils.getSimpleStack(Items.comparator), ItemList.Cover_Screen.get(1), ItemUtils.getSimpleStack(Items.comparator), + "plateAluminium", "plateAluminium", "plateAluminium", + GregtechItemList.GT4_Redstone_Display.get(8)); + + RecipeUtils.addShapedRecipe( + "plateIron", "plateIron", "plateIron", + ItemUtils.getSimpleStack(Items.comparator), ItemList.Cover_EnergyDetector.get(1), ItemUtils.getSimpleStack(Items.comparator), + "plateIron", "plateIron", "plateIron", + GregtechItemList.GT4_Redstone_Scale.get(2)); + RecipeUtils.addShapedRecipe( + "plateAluminium", "plateAluminium", "plateAluminium", + ItemUtils.getSimpleStack(Items.comparator), ItemList.Cover_EnergyDetector.get(1), ItemUtils.getSimpleStack(Items.comparator), + "plateAluminium", "plateAluminium", "plateAluminium", + GregtechItemList.GT4_Redstone_Scale.get(8)); + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getTieredMachineHull(1), + ItemUtils.getSimpleStack(Blocks.stone_button, 16) + }, + null, + GregtechItemList.GT4_Redstone_Button_Panel.get(1), + 800, + 4); + + } + private static void gt4Inventory() { + + ItemList[] aEnergyHatches = new ItemList[] { + ItemList.Hatch_Energy_LV, ItemList.Hatch_Energy_MV, ItemList.Hatch_Energy_HV, + ItemList.Hatch_Energy_EV, ItemList.Hatch_Energy_IV, ItemList.Hatch_Energy_LuV, + ItemList.Hatch_Energy_ZPM, ItemList.Hatch_Energy_UV + }; + + ItemList[] aRegulators = new ItemList[] { + ItemList.Automation_Regulator_LV, ItemList.Automation_Regulator_MV, ItemList.Automation_Regulator_HV, + ItemList.Automation_Regulator_EV, ItemList.Automation_Regulator_IV, ItemList.Automation_Regulator_LuV, + ItemList.Automation_Regulator_ZPM, ItemList.Automation_Regulator_UV + }; + + GregtechItemList[] aOutputInventoryManager = new GregtechItemList[] { + GregtechItemList.GT4_Electric_Inventory_Manager_LV, GregtechItemList.GT4_Electric_Inventory_Manager_MV, GregtechItemList.GT4_Electric_Inventory_Manager_HV, + GregtechItemList.GT4_Electric_Inventory_Manager_EV, GregtechItemList.GT4_Electric_Inventory_Manager_IV, GregtechItemList.GT4_Electric_Inventory_Manager_LuV, + GregtechItemList.GT4_Electric_Inventory_Manager_ZPM, GregtechItemList.GT4_Electric_Inventory_Manager_UV + }; + + int aTier = 1; + for (int i=0;i<8;i++) { + RecipeUtils.addShapedRecipe( + CI.getTieredCircuitOreDictName(aTier), aRegulators[i].get(1), CI.getTieredCircuitOreDictName(aTier), + CI.getRobotArm(aTier, 1), CI.getTieredMachineHull(aTier), CI.getRobotArm(aTier, 1), + CI.getTieredCircuitOreDictName(aTier), aEnergyHatches[i].get(1), CI.getTieredCircuitOreDictName(aTier), + aOutputInventoryManager[i].get(1)); + aTier++; + } + + GregtechItemList[] aOutputElectricCraftingTable = new GregtechItemList[] { + GregtechItemList.GT4_Electric_Auto_Workbench_LV, GregtechItemList.GT4_Electric_Auto_Workbench_MV, GregtechItemList.GT4_Electric_Auto_Workbench_HV, + GregtechItemList.GT4_Electric_Auto_Workbench_EV, GregtechItemList.GT4_Electric_Auto_Workbench_IV, GregtechItemList.GT4_Electric_Auto_Workbench_LuV, + GregtechItemList.GT4_Electric_Auto_Workbench_ZPM, GregtechItemList.GT4_Electric_Auto_Workbench_UV + }; + + aTier = 1; + for (int i=0;i<8;i++) { + RecipeUtils.addShapedRecipe( + ItemUtils.getOrePrefixStack(OrePrefixes.plate, CI.tieredMaterials[aTier], 1), ItemUtils.getSimpleStack(Blocks.crafting_table), ItemUtils.getOrePrefixStack(OrePrefixes.plate, CI.tieredMaterials[aTier], 1), + CI.getTieredCircuitOreDictName(aTier), CI.getTieredMachineHull(aTier), CI.getTieredCircuitOreDictName(aTier), + ItemUtils.getOrePrefixStack(OrePrefixes.plate, CI.tieredMaterials[aTier], 1), CI.getRobotArm(aTier, 1), ItemUtils.getOrePrefixStack(OrePrefixes.plate, CI.tieredMaterials[aTier], 1), + aOutputElectricCraftingTable[i].get(1)); + aTier++; + } + + } + + private static void multiGeneratorArray() { + + GT_ModHandler.addCraftingRecipe( + ItemList.Processing_Array.get(1L), + CI.bitsd, + new Object[]{"CTC", "FMF", "CBC", + 'M', CI.getTieredGTPPMachineCasing(4, 1), + 'B', OrePrefixes.pipeHuge.get(Materials.StainlessSteel), + 'C', OrePrefixes.circuit.get(Materials.Data), + 'F', ItemList.Electric_Pump_EV, + 'T', CI.getSensor(4, 1)}); + } + + private static void multiForgeHammer() { + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getTieredGTPPMachineCasing(4, 1), + ItemList.Machine_IV_Hammer.get(1), + CI.getPlate(4, 8), + CI.getBolt(5, 32), + ELEMENT.getInstance().ZIRCONIUM.getFineWire(32), + ItemUtils.getItemStackOfAmountFromOreDict("circuitElite", 4) + }, + CI.getTieredFluid(4, 144 * 12), + GregtechItemList.Controller_IndustrialForgeHammer.get(1), + 20 * 30, + MaterialUtils.getVoltageForTier(5)); + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getTieredGTPPMachineCasing(3, 1), + ItemList.Casing_HeatProof.get(1), + CI.getPlate(4, 2), + CI.getBolt(4, 8), + ALLOY.BABBIT_ALLOY.getFineWire(16), + ItemUtils.getItemStackOfAmountFromOreDict("circuitGood", 4) + }, + CI.getTieredFluid(4, 144 * 2), + GregtechItemList.Casing_IndustrialForgeHammer.get(1), + 20 * 30, + MaterialUtils.getVoltageForTier(4)); + + } + + private static void multiMolecularTransformer() { + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getTieredGTPPMachineCasing(6, 1), + CI.getPlate(5, 16), + CI.getBolt(5, 32), + ALLOY.HG1223.getFineWire(64), + CI.getEmitter(4, 8), + ItemUtils.getItemStackOfAmountFromOreDict("circuitMaster", 10) + }, + CI.getTieredFluid(5, 144 * 16), + ItemDummyResearch.getResearchStack(ASSEMBLY_LINE_RESEARCH.RESEARCH_11_MOLECULAR_TRANSFORMER, 1), + 20 * 60, + MaterialUtils.getVoltageForTier(5)); + + CORE.RA.addAssemblylineRecipe( + ItemDummyResearch.getResearchStack(ASSEMBLY_LINE_RESEARCH.RESEARCH_11_MOLECULAR_TRANSFORMER, 1), + 20 * 60 * 30, + new Object[] { + ALLOY.HG1223.getFineWire(64), + ALLOY.HG1223.getFineWire(64), + ItemList.Electric_Motor_IV.get(GTNH ? 32 : 16), + ItemList.Energy_LapotronicOrb.get(GTNH ? 32 : 16), + CI.getTieredComponent(OrePrefixes.cableGt12, 6, GTNH ? 32 : 16), + CI.getTieredComponent(OrePrefixes.wireGt16, 5, GTNH ? 64 : 32), + ALLOY.ZERON_100.getFrameBox(4), + ALLOY.ZIRCONIUM_CARBIDE.getPlateDouble(32), + ALLOY.BABBIT_ALLOY.getPlate(64), + ALLOY.LEAGRISIUM.getGear(GTNH ? 16 : 8), + new Object[] {CI.getTieredCircuitOreDictName(4), 64}, + new Object[] {CI.getTieredCircuitOreDictName(5), 32}, + new Object[] {CI.getTieredCircuitOreDictName(6), 16}, + GregtechItemList.Laser_Lens_WoodsGlass.get(1), + }, + new FluidStack[] { + ALLOY.NITINOL_60.getFluidStack(144 * 9 * (GTNH ? 4 : 2)), + ALLOY.INCOLOY_MA956.getFluidStack(144 * 9 * (GTNH ? 32 : 8)), + ALLOY.KANTHAL.getFluidStack(144 * 1 * (GTNH ? 16 : 4)), + }, + GregtechItemList.Controller_MolecularTransformer.get(1), + 20 * 60 * 10 * (GTNH ? 2 : 1), + (int) MaterialUtils.getVoltageForTier(6)); + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(16), + CI.getPlate(6, 4), + CI.getScrew(6, 8), + ELEMENT.getInstance().PALLADIUM.getFineWire(16), + CI.getSensor(5, 2), + ItemUtils.getItemStackOfAmountFromOreDict("circuitElite", 4) + }, + CI.getTieredFluid(5, 144 * 4), + GregtechItemList.Casing_Molecular_Transformer_1.get(1), + 20 * 20, + MaterialUtils.getVoltageForTier(5)); + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(16), + CI.getPlate(5, 4), + CI.getScrew(5, 8), + ItemList.Casing_Coil_Nichrome.get(2), + CI.getFieldGenerator(3, 2), + ItemUtils.getItemStackOfAmountFromOreDict("circuitData", 8) + }, + CI.getTieredFluid(5, 144 * 4), + GregtechItemList.Casing_Molecular_Transformer_2.get(1), + 20 * 20, + MaterialUtils.getVoltageForTier(5)); + + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(16), + ItemUtils.getSimpleStack(Blocks.glowstone, 16), + CI.getGear(5, 8), + ELEMENT.getInstance().TITANIUM.getWire04(4), + CI.getFieldGenerator(4, 2), + ItemUtils.getItemStackOfAmountFromOreDict("circuitData", 8) + }, + CI.getTieredFluid(5, 144 * 4), + GregtechItemList.Casing_Molecular_Transformer_3.get(1), + 20 * 60, + MaterialUtils.getVoltageForTier(5)); + + } + + private static void multiXlTurbines() { + + } + + private static void multiSolarTower() { + + } + + private static void multiElementalDuplicator() { + + } + + private static void resonanceChambers() { + int aFieldTier = 1; + int aCasingTier = 4; + for (int i = 0; i < 4; i++) { + RecipeUtils.addShapedRecipe( + CI.getDoublePlate(aCasingTier, 1), CI.getFieldGenerator(aFieldTier, 1), CI.getDoublePlate(aCasingTier, 1), + CI.getFieldGenerator(aFieldTier, 1), CI.getTieredMachineCasing(aCasingTier), CI.getFieldGenerator(aFieldTier, 1), + CI.getDoublePlate(aCasingTier, 1), CI.getFieldGenerator(aFieldTier, 1), CI.getDoublePlate(aCasingTier, 1), + ItemUtils.simpleMetaStack(ModBlocks.blockSpecialMultiCasings2, i, 1)); + aCasingTier++; + aFieldTier++; + } + } + + private static void modulators() { + int aCasingTier = 4; + for (int i = 4; i < 8; i++) { + RecipeUtils.addShapedRecipe( + CI.getTieredCircuitOreDictName(aCasingTier), CI.getPlate(aCasingTier, 1), CI.getTieredCircuitOreDictName(aCasingTier), + CI.getPlate(aCasingTier, 1), CI.getTieredMachineCasing(aCasingTier), CI.getPlate(aCasingTier, 1), + CI.getTieredCircuitOreDictName(aCasingTier), CI.getPlate(aCasingTier, 1), CI.getTieredCircuitOreDictName(aCasingTier), + ItemUtils.simpleMetaStack(ModBlocks.blockSpecialMultiCasings2, i, 1)); + aCasingTier++; + } + } + private static void zyngen() { CORE.RA.addSixSlotAssemblingRecipe( new ItemStack[] { diff --git a/src/main/java/gtPlusPlus/core/recipe/common/CI.java b/src/main/java/gtPlusPlus/core/recipe/common/CI.java index 0a1b762a97..7746885ba2 100644 --- a/src/main/java/gtPlusPlus/core/recipe/common/CI.java +++ b/src/main/java/gtPlusPlus/core/recipe/common/CI.java @@ -181,6 +181,13 @@ public class CI { public static ItemStack explosiveTNT; public static ItemStack explosiveITNT; + public static Materials[] tieredMaterials = new Materials[] { + Materials.Iron, Materials.Steel, Materials.Aluminium, + Materials.StainlessSteel, Materials.Titanium, Materials.TungstenSteel, + Materials.Chrome, Materials.Iridium, Materials.Osmium, + Materials.Neutronium + };; + public static void preInit(){ //Tiered Components @@ -672,6 +679,10 @@ public class CI { public static ItemStack getBolt(int aTier, int aAmount) { return getTieredComponent(OrePrefixes.bolt, aTier, aAmount); } + + public static ItemStack getScrew(int aTier, int aAmount) { + return getTieredComponent(OrePrefixes.screw, aTier, aAmount); + } public static ItemStack getTieredComponent(OrePrefixes aPrefix, int aTier, int aAmount) { aTier = Math.max(0, aTier); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java index 38d8b38f88..a9c8a1e9bc 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java @@ -113,7 +113,7 @@ public class GregtechMetaSpecialMultiCasings extends GregtechMetaCasingBlocksAbs case 12: return TexturesGtBlock.Casing_Redox_5.getIcon(); case 13: - return TexturesGtBlock.TEXTURE_MAGIC_PANEL_A.getIcon(); + return TexturesGtBlock.TEXTURE_MAGIC_PANEL_B.getIcon(); } return Textures.BlockIcons.RENDERING_ERROR.getIcon(); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java index 8f68b646f9..5642baa32d 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java @@ -563,8 +563,9 @@ public class TexturesGtBlock { public static final CustomIcon TEXTURE_METAL_PANEL_G = new CustomIcon("metro/TEXTURE_METAL_PANEL_G"); public static final CustomIcon TEXTURE_METAL_PANEL_H = new CustomIcon("metro/TEXTURE_METAL_PANEL_H"); public static final CustomIcon TEXTURE_METAL_PANEL_I = new CustomIcon("metro/TEXTURE_METAL_PANEL_I"); - + public static final CustomIcon TEXTURE_MAGIC_PANEL_A = new CustomIcon("metro/TEXTURE_MAGIC_A"); + public static final CustomIcon TEXTURE_MAGIC_PANEL_B = new CustomIcon("metro/TEXTURE_MAGIC_B"); public static final CustomIcon TEXTURE_ORGANIC_PANEL_A = new CustomIcon("metro/TEXTURE_ORGANIC_PANEL_A"); public static final CustomIcon TEXTURE_ORGANIC_PANEL_A_GLOWING = new CustomIcon("metro/TEXTURE_ORGANIC_PANEL_A_GLOWING"); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialForgeHammer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialForgeHammer.java index 89e1e303a8..b354d55a83 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialForgeHammer.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialForgeHammer.java @@ -1,9 +1,6 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; import java.util.ArrayList; @@ -18,15 +15,9 @@ 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_Energy; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus; +import gregtech.api.metatileentity.implementations.*; import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.*; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.lib.LoadedMods; @@ -37,9 +28,10 @@ import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; -public class GregtechMetaTileEntity_IndustrialForgeHammer extends GregtechMeta_MultiBlockBase { +public class GregtechMetaTileEntity_IndustrialForgeHammer extends GregtechMeta_MultiBlockBase { private int mCasing; + private int mAnvil; private IStructureDefinition STRUCTURE_DEFINITION = null; public GregtechMetaTileEntity_IndustrialForgeHammer(final int aID, final String aName, final String aNameRegional) { @@ -106,7 +98,14 @@ public class GregtechMetaTileEntity_IndustrialForgeHammer extends GregtechMeta_M ) ) ) - + .addElement('A', ofChain( + onElementPass(x -> ++x.mAnvil, ofBlock(sAnvil, 1)), + onElementPass(x -> ++x.mAnvil, ofBlock(sSteelAnvil, 1)), + onElementPass(x -> ++x.mAnvil, ofBlock(sDarkSteelAnvil, 1)), + onElementPass(x -> ++x.mAnvil, ofBlock(sThaumiumAnvil, 1)), + onElementPass(x -> ++x.mAnvil, ofBlock(sVoidAnvil, 1)) + ) + ) //.addElement('A', ofBlockAdder(GregtechMetaTileEntity_IndustrialForgeHammer::isBlockAnvil, Blocks.anvil, 1)) .build(); @@ -188,7 +187,7 @@ public class GregtechMetaTileEntity_IndustrialForgeHammer extends GregtechMeta_M tBusItems.add(tBus.getBaseMetaTileEntity().getStackInSlot(i)); } } - if (checkRecipeGeneric(tBusItems.toArray(new ItemStack[]{}), new FluidStack[]{}, getMaxParallelRecipes(), 100, 100 * aAnvilTier, 10000)) { + if (checkRecipeGeneric(tBusItems.toArray(new ItemStack[]{}), new FluidStack[]{}, getMaxParallelRecipes() * aAnvilTier, 100, 100, 10000)) { return true; } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java index c4a27079f7..75128392ea 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java @@ -74,7 +74,7 @@ public class Gregtech4Content { GregtechItemList.GT4_Electric_Auto_Workbench_LV.set(new GT_MetaTileEntity_ElectricAutoWorkbench(31091, 1, "Automatic crafting machine").getStackForm(1L)); GregtechItemList.GT4_Electric_Auto_Workbench_MV.set(new GT_MetaTileEntity_ElectricAutoWorkbench(31092, 2, "Automatic crafting machine").getStackForm(1L)); GregtechItemList.GT4_Electric_Auto_Workbench_HV.set(new GT_MetaTileEntity_ElectricAutoWorkbench(31093, 3, "Automatic crafting machine").getStackForm(1L)); - GregtechItemList.GT4_Electric_Auto_Workbench_LV.set(new GT_MetaTileEntity_ElectricAutoWorkbench(31094, 4, "Automatic crafting machine").getStackForm(1L)); + GregtechItemList.GT4_Electric_Auto_Workbench_EV.set(new GT_MetaTileEntity_ElectricAutoWorkbench(31094, 4, "Automatic crafting machine").getStackForm(1L)); GregtechItemList.GT4_Electric_Auto_Workbench_IV.set(new GT_MetaTileEntity_ElectricAutoWorkbench(31095, 5, "Automatic crafting machine").getStackForm(1L)); GregtechItemList.GT4_Electric_Auto_Workbench_LuV.set(new GT_MetaTileEntity_ElectricAutoWorkbench(31096, 6, "Automatic crafting machine").getStackForm(1L)); GregtechItemList.GT4_Electric_Auto_Workbench_ZPM.set(new GT_MetaTileEntity_ElectricAutoWorkbench(31097, 7, "Automatic crafting machine").getStackForm(1L)); diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_B.png b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_B.png new file mode 100644 index 0000000000..265d18b0f7 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_B.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_B.png.mcmeta b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_B.png.mcmeta new file mode 100644 index 0000000000..d0b9e70fe5 --- /dev/null +++ b/src/main/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_B.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation":{ + "frametime":4, + "frames": [0, 2, 3, 3, 4, 5, 6, 7, 7, 6, 5, 4, 3, 2, 1, 0] + } +} \ No newline at end of file -- cgit From e5eeec1ffc3eab063c765da7bb889017d87aabdd Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Sun, 16 Jan 2022 19:51:13 +0000 Subject: Added Recipe for Computer Cube MKII, Turbine Shaft, Rotor Assembly & Elemental Duplicator. Removed a whole heap of pointless Reactor Planner files/functions. Hide some of the modes in the Computer Cube. --- .../Ic2ExpReactorPlanner/AutomationSimulator.java | 250 +-- .../java/Ic2ExpReactorPlanner/Bundle.properties | 411 ---- .../java/Ic2ExpReactorPlanner/BundleHelper.java | 43 - .../Ic2ExpReactorPlanner/Bundle_zh_CN.properties | 373 ---- .../java/Ic2ExpReactorPlanner/MaterialsList.java | 302 --- src/main/java/Ic2ExpReactorPlanner/Reactor.java | 43 +- .../Ic2ExpReactorPlanner/ReactorPlannerFrame.form | 2260 -------------------- .../java/Ic2ExpReactorPlanner/SimulationData.java | 2 - .../components/ReactorItem.java | 4 +- .../Ic2ExpReactorPlanner/components/Reflector.java | 3 - .../gtPlusPlus/core/recipe/RECIPES_Machines.java | 117 + .../java/gtPlusPlus/core/recipe/common/CI.java | 2 +- .../xmod/gregtech/api/enums/GregtechItemList.java | 17 +- .../gui/computer/GT_Container_ComputerCube.java | 207 +- .../gui/computer/GT_GUIContainer_ComputerCube.java | 49 +- .../blocks/GregtechMetaSpecialMultiCasings2.java | 10 +- .../misc/GT_TileEntity_ComputerCube.java | 354 ++- .../assets/miscutils/textures/gui/computer/0.png | Bin 3702 -> 2335 bytes .../assets/miscutils/textures/gui/computer/2.png | Bin 3481 -> 2147 bytes 19 files changed, 676 insertions(+), 3771 deletions(-) delete mode 100644 src/main/java/Ic2ExpReactorPlanner/Bundle.properties delete mode 100644 src/main/java/Ic2ExpReactorPlanner/BundleHelper.java delete mode 100644 src/main/java/Ic2ExpReactorPlanner/Bundle_zh_CN.properties delete mode 100644 src/main/java/Ic2ExpReactorPlanner/MaterialsList.java delete mode 100644 src/main/java/Ic2ExpReactorPlanner/ReactorPlannerFrame.form (limited to 'src/main/resources/assets/miscutils/textures') diff --git a/src/main/java/Ic2ExpReactorPlanner/AutomationSimulator.java b/src/main/java/Ic2ExpReactorPlanner/AutomationSimulator.java index 488de59a8d..729642e837 100644 --- a/src/main/java/Ic2ExpReactorPlanner/AutomationSimulator.java +++ b/src/main/java/Ic2ExpReactorPlanner/AutomationSimulator.java @@ -1,8 +1,5 @@ package Ic2ExpReactorPlanner; -import static Ic2ExpReactorPlanner.BundleHelper.formatI18n; -import static Ic2ExpReactorPlanner.BundleHelper.getI18n; - import java.text.DecimalFormat; import java.util.ArrayList; import java.util.List; @@ -24,8 +21,6 @@ public class AutomationSimulator { private final GT_TileEntity_ComputerCube mReactor; - private final boolean[][] alreadyBroken = new boolean[6][9]; - private final boolean[][] needsCooldown = new boolean[6][9]; private final int initialHeat; @@ -77,13 +72,11 @@ public class AutomationSimulator { private int lapisUsed = 0; - private final MaterialsList replacedItems = new MaterialsList(); - - private static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat(getI18n("Simulation.DecimalFormat")); private boolean completed = false; private boolean mRunning = false; + private static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat("#,##0.##"); private final SimulationData data = new SimulationData(); public SimulationData getData() { @@ -116,7 +109,7 @@ public class AutomationSimulator { int totalRodCount = 0; publish(""); // NOI18N - publish(getI18n("Simulation.Started")); + publish("Simulation.Started"); reactor.setCurrentHeat(initialHeat); reactor.clearVentedHeat(); double minReactorHeat = initialHeat; @@ -241,40 +234,34 @@ public class AutomationSimulator { calculateHeatingCooling(reactorTicks); handleAutomation(reactorTicks); - handleBrokenComponents(reactorTicks, totalHeatOutput, totalRodCount, totalEUoutput, minReactorHeat, maxReactorHeat); } if (hasStopped()) { - publish(formatI18n("Simulation.CancelledAtTick", reactorTicks)); + publish("Simulation.CancelledAtTick", reactorTicks); } data.minTemp = (int) minReactorHeat; data.maxTemp = (int) maxReactorHeat; - publish(formatI18n("Simulation.ReactorMinTemp", minReactorHeat)); - publish(formatI18n("Simulation.ReactorMaxTemp", maxReactorHeat)); + publish("Simulation.ReactorMinTemp", minReactorHeat); + publish("Simulation.ReactorMaxTemp", maxReactorHeat); if (reactor.getCurrentHeat() < reactor.getMaxHeat()) { - publish(formatI18n("Simulation.TimeWithoutExploding", reactorTicks)); + publish("Simulation.TimeWithoutExploding", reactorTicks); if (reactor.isPulsed()) { String rangeString = ""; if (maxActiveTime > minActiveTime) { - rangeString = formatI18n("Simulation.ActiveTimeRange", minActiveTime, maxActiveTime); + rangeString = rangeString("Simulation.ActiveTimeRange", minActiveTime, maxActiveTime); } else if (minActiveTime < activeTime) { - rangeString = formatI18n("Simulation.ActiveTimeSingle", minActiveTime); + rangeString = "Simulation.ActiveTimeSingle "+minActiveTime; } - publish(formatI18n("Simulation.ActiveTime", activeTime, rangeString)); + publish("Simulation.ActiveTime", activeTime, rangeString); rangeString = ""; if (maxInactiveTime > minInactiveTime) { - rangeString = formatI18n("Simulation.InactiveTimeRange", minInactiveTime, maxInactiveTime); + rangeString = rangeString("Simulation.InactiveTimeRange", minInactiveTime, maxInactiveTime); } else if (minInactiveTime < inactiveTime) { - rangeString = formatI18n("Simulation.InactiveTimeSingle", minInactiveTime); + rangeString = "Simulation.InactiveTimeSingle " + minInactiveTime; } - publish(formatI18n("Simulation.InactiveTime", inactiveTime, rangeString)); - } - final String replacedItemsString = replacedItems.toString(); - if (!replacedItemsString.isEmpty()) { - data.replacedItems = new MaterialsList(replacedItems); - publish(formatI18n("Simulation.ComponentsReplaced", replacedItemsString)); + publish("Simulation.InactiveTime", inactiveTime, rangeString); } if (reactorTicks > 0) { @@ -285,10 +272,10 @@ public class AutomationSimulator { data.minHUoutput = 2 * minHeatOutput; data.maxHUoutput = (int) (2 * maxHeatOutput); if (totalHeatOutput > 0) { - publish(formatI18n("Simulation.HeatOutputs", DECIMAL_FORMAT.format(40 * totalHeatOutput), DECIMAL_FORMAT.format(2 * totalHeatOutput / reactorTicks), DECIMAL_FORMAT.format(2 - * minHeatOutput), DECIMAL_FORMAT.format(2 * maxHeatOutput))); + publish("Simulation.HeatOutputs", DECIMAL_FORMAT.format(40 * totalHeatOutput), DECIMAL_FORMAT.format(2 * totalHeatOutput / reactorTicks), DECIMAL_FORMAT.format(2 + * minHeatOutput), DECIMAL_FORMAT.format(2 * maxHeatOutput)); if (totalRodCount > 0) { - publish(formatI18n("Simulation.Efficiency", totalHeatOutput / reactorTicks / 4 / totalRodCount, minHeatOutput / 4 / totalRodCount, maxHeatOutput / 4 / totalRodCount)); + publish("Simulation.Efficiency", totalHeatOutput / reactorTicks / 4 / totalRodCount, minHeatOutput / 4 / totalRodCount, maxHeatOutput / 4 / totalRodCount); } } } @@ -298,17 +285,17 @@ public class AutomationSimulator { data.minEUoutput = minEUoutput / 20.0; data.maxEUoutput = (int) (maxEUoutput / 20.0); if (totalEUoutput > 0) { - publish(formatI18n("Simulation.EUOutputs", DECIMAL_FORMAT.format(totalEUoutput), DECIMAL_FORMAT.format(totalEUoutput / (reactorTicks * 20)), DECIMAL_FORMAT.format(minEUoutput - / 20.0), DECIMAL_FORMAT.format(maxEUoutput / 20.0))); + publish("Simulation.EUOutputs", DECIMAL_FORMAT.format(totalEUoutput), DECIMAL_FORMAT.format(totalEUoutput / (reactorTicks * 20)), DECIMAL_FORMAT.format(minEUoutput + / 20.0), DECIMAL_FORMAT.format(maxEUoutput / 20.0)); if (totalRodCount > 0) { - publish(formatI18n("Simulation.Efficiency", totalEUoutput / reactorTicks / 100 / totalRodCount, minEUoutput / 100 / totalRodCount, maxEUoutput / 100 / totalRodCount)); + publish("Simulation.Efficiency", totalEUoutput / reactorTicks / 100 / totalRodCount, minEUoutput / 100 / totalRodCount, maxEUoutput / 100 / totalRodCount); } } } } if (reactor.getCurrentHeat() > 0.0) { - publish(formatI18n("Simulation.ReactorRemainingHeat", reactor.getCurrentHeat())); + publish("Simulation.ReactorRemainingHeat", reactor.getCurrentHeat()); } double prevReactorHeat = reactor.getCurrentHeat(); double prevTotalComponentHeat = 0.0; @@ -319,13 +306,13 @@ public class AutomationSimulator { if (component.getCurrentHeat() > 0.0) { prevTotalComponentHeat += component.getCurrentHeat(); publish(String.format("R%dC%d:0xFFA500", row, col)); // NOI18N - component.info.append(formatI18n("ComponentInfo.RemainingHeat", component.getCurrentHeat())); + component.info.append("ComponentInfo.RemainingHeat " + component.getCurrentHeat()); } } } } if (prevReactorHeat == 0.0 && prevTotalComponentHeat == 0.0) { - publish(getI18n("Simulation.NoCooldown")); + publish("Simulation.NoCooldown"); } else if (reactor.getCurrentHeat() < reactor.getMaxHeat()) { double currentTotalComponentHeat = prevTotalComponentHeat; @@ -360,7 +347,7 @@ public class AutomationSimulator { if (component != null && !component.isBroken()) { currentTotalComponentHeat += component.getCurrentHeat(); if (component.getCurrentHeat() == 0.0 && needsCooldown[row][col]) { - component.info.append(formatI18n("ComponentInfo.CooldownTime", cooldownTicks)); + component.info.append("ComponentInfo.CooldownTime " + cooldownTicks); needsCooldown[row][col] = false; } } @@ -370,17 +357,17 @@ public class AutomationSimulator { while (lastHeatOutput > 0 && cooldownTicks < 50000); if (reactor.getCurrentHeat() < reactor.getMaxHeat()) { if (reactor.getCurrentHeat() == 0.0) { - publish(formatI18n("Simulation.ReactorCooldownTime", reactorCooldownTime)); + publish("Simulation.ReactorCooldownTime", reactorCooldownTime); } else if (reactorCooldownTime > 0) { - publish(formatI18n("Simulation.ReactorResidualHeat", reactor.getCurrentHeat(), reactorCooldownTime)); + publish("Simulation.ReactorResidualHeat", reactor.getCurrentHeat(), reactorCooldownTime); } - publish(formatI18n("Simulation.TotalCooldownTime", cooldownTicks)); + publish("Simulation.TotalCooldownTime", cooldownTicks); } } } else { - publish(formatI18n("Simulation.ReactorOverheatedTime", reactorTicks)); + publish("Simulation.ReactorOverheatedTime", reactorTicks); explosionPower = 10.0; double explosionPowerMult = 1.0; for (int row = 0; row < 6; row++) { @@ -393,7 +380,7 @@ public class AutomationSimulator { } } explosionPower *= explosionPowerMult; - publish(formatI18n("Simulation.ExplosionPower", explosionPower)); + publish("Simulation.ExplosionPower", explosionPower); } double totalEffectiveVentCooling = 0.0; double totalVentCoolingCapacity = 0.0; @@ -405,81 +392,82 @@ public class AutomationSimulator { ReactorItem component = reactor.getComponentAt(row, col); if (component != null) { if (component.getVentCoolingCapacity() > 0) { - component.info.append(formatI18n("ComponentInfo.UsedCooling", component.getBestVentCooling(), component.getVentCoolingCapacity())); + component.info.append("ComponentInfo.UsedCooling " + component.getBestVentCooling() + " | " + component.getVentCoolingCapacity()); totalEffectiveVentCooling += component.getBestVentCooling(); totalVentCoolingCapacity += component.getVentCoolingCapacity(); } else if (component.getBestCellCooling() > 0) { - component.info.append(formatI18n("ComponentInfo.ReceivedHeat", component.getBestCellCooling())); + component.info.append("ComponentInfo.ReceivedHeat " + component.getBestCellCooling()); totalCellCooling += component.getBestCellCooling(); } else if (component.getBestCondensatorCooling() > 0) { - component.info.append(formatI18n("ComponentInfo.ReceivedHeat", component.getBestCondensatorCooling())); + component.info.append("ComponentInfo.ReceivedHeat " + component.getBestCondensatorCooling()); totalCondensatorCooling += component.getBestCondensatorCooling(); } else if (component.getMaxHeatGenerated() > 0) { if (!reactor.isFluid() && component.getMaxEUGenerated() > 0) { - component.info.append(formatI18n("ComponentInfo.GeneratedEU", component.getMinEUGenerated(), component.getMaxEUGenerated())); + component.info.append("ComponentInfo.GeneratedEU " + component.getMinEUGenerated() + " | " + component.getMaxEUGenerated()); } - component.info.append(formatI18n("ComponentInfo.GeneratedHeat", component.getMinHeatGenerated(), component.getMaxHeatGenerated())); + component.info.append("ComponentInfo.GeneratedHeat " + component.getMinHeatGenerated() + " | " + component.getMaxHeatGenerated()); } if (component.getMaxReachedHeat() > 0) { - component.info.append(formatI18n("ComponentInfo.ReachedHeat", component.getMaxReachedHeat(), component.getMaxHeat())); + component.info.append("ComponentInfo.ReachedHeat " + component.getMaxReachedHeat() + " | " + component.getMaxHeat()); } } } } // if (totalVentCoolingCapacity > 0) { - // publish(formatI18n("Simulation.TotalVentCooling", - // totalEffectiveVentCooling, totalVentCoolingCapacity)); + // publish("Simulation.TotalVentCooling", + // totalEffectiveVentCooling, totalVentCoolingCapacity); // } showHeatingCooling(reactorTicks); // Call to show this info in case it // hasn't already been shown, such // as for an automated reactor. if (totalCellCooling > 0) { - publish(formatI18n("Simulation.TotalCellCooling", totalCellCooling)); + publish("Simulation.TotalCellCooling", totalCellCooling); } if (totalCondensatorCooling > 0) { - publish(formatI18n("Simulation.TotalCondensatorCooling", totalCondensatorCooling)); + publish("Simulation.TotalCondensatorCooling", totalCondensatorCooling); } if (maxGeneratedHeat > 0) { - publish(formatI18n("Simulation.MaxHeatGenerated", maxGeneratedHeat)); + publish("Simulation.MaxHeatGenerated", maxGeneratedHeat); } if (redstoneUsed > 0) { - publish(formatI18n("Simulation.RedstoneUsed", redstoneUsed)); + publish("Simulation.RedstoneUsed", redstoneUsed); } if (lapisUsed > 0) { - publish(formatI18n("Simulation.LapisUsed", lapisUsed)); + publish("Simulation.LapisUsed", lapisUsed); } // double totalCooling = totalEffectiveVentCooling + totalCellCooling + // totalCondensatorCooling; // if (totalCooling >= maxGeneratedHeat) { - // publish(formatI18n("Simulation.ExcessCooling", totalCooling - - // maxGeneratedHeat)); + // publish("Simulation.ExcessCooling", totalCooling - + // maxGeneratedHeat); // } else { - // publish(formatI18n("Simulation.ExcessHeating", maxGeneratedHeat - - // totalCooling)); + // publish("Simulation.ExcessHeating", maxGeneratedHeat - + // totalCooling); // } // return null; /* catch (Throwable e) { if (cooldownTicks == 0) { - publish(formatI18n("Simulation.ErrorReactor", reactorTicks)); + publish("Simulation.ErrorReactor", reactorTicks); } else { - publish(formatI18n("Simulation.ErrorCooldown", cooldownTicks)); + publish("Simulation.ErrorCooldown", cooldownTicks); } - publish(e.toString(), " ", Arrays.toString(e.getStackTrace())); // NO18N + publish(e.toString(), " ", Arrays.toString(e.getStackTrace()); // NO18N }*/ data.explosionPower = (int) explosionPower; data.totalReactorTicks = reactorTicks; long endTime = System.nanoTime(); - publish(formatI18n("Simulation.ElapsedTime", (endTime - startTime) / 1e9)); + publish("Simulation.ElapsedTime", (endTime - startTime) / 1e9); mRunning = false; completed = true; } + public boolean hasStopped() { return !mRunning; } @@ -488,88 +476,6 @@ public class AutomationSimulator { return mRunning; } - private void handleBrokenComponents(final int reactorTicks, final double totalHeatOutput, final int totalRodCount, final double totalEUoutput, final double minReactorHeat, final double maxReactorHeat) { - for (int row = 0; row < 6; row++) { - for (int col = 0; col < 9; col++) { - ReactorItem component = reactor.getComponentAt(row, col); - if (component != null && component.isBroken() && !alreadyBroken[row][col]) { - alreadyBroken[row][col] = true; - if (component.getRodCount() == 0) { - publish(String.format("R%dC%d:0xFF0000", row, col)); // NOI18N - component.info.append(formatI18n("ComponentInfo.BrokeTime", reactorTicks)); - if (componentsIntact) { - componentsIntact = false; - data.firstComponentBrokenTime = reactorTicks; - data.firstComponentBrokenRow = row; - data.firstComponentBrokenCol = col; - data.firstComponentBrokenDescription = component.toString(); - publish(formatI18n("Simulation.FirstComponentBrokenDetails", component.toString(), row, col, reactorTicks)); - if (reactor.isFluid()) { - data.prebreakTotalHUoutput = 40 * totalHeatOutput; - data.prebreakAvgHUoutput = 2 * totalHeatOutput / reactorTicks; - data.prebreakMinHUoutput = 2 * minHeatOutput; - data.prebreakMaxHUoutput = 2 * maxHeatOutput; - publish(formatI18n("Simulation.HeatOutputsBeforeBreak", DECIMAL_FORMAT.format(40 * totalHeatOutput), DECIMAL_FORMAT.format(2 * totalHeatOutput - / reactorTicks), DECIMAL_FORMAT.format(2 * minHeatOutput), DECIMAL_FORMAT.format(2 * maxHeatOutput))); - if (totalRodCount > 0) { - publish(formatI18n("Simulation.Efficiency", totalHeatOutput / reactorTicks / 4 / totalRodCount, minHeatOutput / 4 / totalRodCount, maxHeatOutput / 4 - / totalRodCount)); - } - } - else { - data.prebreakTotalEUoutput = totalEUoutput; - data.prebreakAvgEUoutput = totalEUoutput / (reactorTicks * 20); - data.prebreakMinEUoutput = minEUoutput / 20.0; - data.prebreakMaxEUoutput = maxEUoutput / 20.0; - publish(formatI18n("Simulation.EUOutputsBeforeBreak", DECIMAL_FORMAT.format(totalEUoutput), DECIMAL_FORMAT.format(totalEUoutput - / (reactorTicks * 20)), DECIMAL_FORMAT.format(minEUoutput / 20.0), DECIMAL_FORMAT.format(maxEUoutput / 20.0))); - if (totalRodCount > 0) { - publish(formatI18n("Simulation.Efficiency", totalEUoutput / reactorTicks / 100 / totalRodCount, minEUoutput / 100 / totalRodCount, maxEUoutput / 100 - / totalRodCount)); - } - } - } - } - else if (!anyRodsDepleted) { - anyRodsDepleted = true; - data.firstRodDepletedTime = reactorTicks; - data.firstRodDepletedRow = row; - data.firstRodDepletedCol = col; - data.firstRodDepletedDescription = component.toString(); - publish(formatI18n("Simulation.FirstRodDepletedDetails", component.toString(), row, col, reactorTicks)); - if (reactor.isFluid()) { - data.predepleteTotalHUoutput = 40 * totalHeatOutput; - data.predepleteAvgHUoutput = 2 * totalHeatOutput / reactorTicks; - data.predepleteMinHUoutput = 2 * minHeatOutput; - data.predepleteMaxHUoutput = 2 * maxHeatOutput; - publish(formatI18n("Simulation.HeatOutputsBeforeDepleted", DECIMAL_FORMAT.format(40 * totalHeatOutput), DECIMAL_FORMAT.format(2 * totalHeatOutput - / reactorTicks), DECIMAL_FORMAT.format(2 * minHeatOutput), DECIMAL_FORMAT.format(2 * maxHeatOutput))); - if (totalRodCount > 0) { - publish(formatI18n("Simulation.Efficiency", totalHeatOutput / reactorTicks / 4 / totalRodCount, minHeatOutput / 4 / totalRodCount, maxHeatOutput / 4 / totalRodCount)); - } - } - else { - data.predepleteTotalEUoutput = totalEUoutput; - data.predepleteAvgEUoutput = totalEUoutput / (reactorTicks * 20); - data.predepleteMinEUoutput = minEUoutput / 20.0; - data.predepleteMaxEUoutput = maxEUoutput / 20.0; - publish(formatI18n("Simulation.EUOutputsBeforeDepleted", DECIMAL_FORMAT.format(totalEUoutput), DECIMAL_FORMAT.format(totalEUoutput - / (reactorTicks * 20)), DECIMAL_FORMAT.format(minEUoutput / 20.0), DECIMAL_FORMAT.format(maxEUoutput / 20.0))); - if (totalRodCount > 0) { - publish(formatI18n("Simulation.Efficiency", totalEUoutput / reactorTicks / 100 / totalRodCount, minEUoutput / 100 / totalRodCount, maxEUoutput / 100 / totalRodCount)); - } - } - data.predepleteMinTemp = minReactorHeat; - data.predepleteMaxTemp = maxReactorHeat; - publish(formatI18n("Simulation.ReactorMinTempBeforeDepleted", minReactorHeat)); - publish(formatI18n("Simulation.ReactorMaxTempBeforeDepleted", maxReactorHeat)); - } - showHeatingCooling(reactorTicks); - } - } - } - } - private void handleAutomation(final int reactorTicks) { for (int row = 0; row < 6; row++) { for (int col = 0; col < 9; col++) { @@ -578,8 +484,7 @@ public class AutomationSimulator { if (component.getMaxHeat() > 1) { if (component.getAutomationThreshold() > component.getInitialHeat() && component.getCurrentHeat() >= component.getAutomationThreshold()) { component.clearCurrentHeat(); - replacedItems.add(component.name); - component.info.append(formatI18n("ComponentInfo.ReplacedTime", reactorTicks)); + component.info.append("ComponentInfo.ReplacedTime | " + reactorTicks); if (component.getReactorPause() > 0) { active = false; pauseTimer = Math.max(pauseTimer, component.getReactorPause()); @@ -590,8 +495,7 @@ public class AutomationSimulator { } else if (component.getAutomationThreshold() < component.getInitialHeat() && component.getCurrentHeat() <= component.getAutomationThreshold()) { component.clearCurrentHeat(); - replacedItems.add(component.name); - component.info.append(formatI18n("ComponentInfo.ReplacedTime", reactorTicks)); + component.info.append("ComponentInfo.ReplacedTime | " +reactorTicks); if (component.getReactorPause() > 0) { active = false; pauseTimer = Math.max(pauseTimer, component.getReactorPause()); @@ -603,8 +507,7 @@ public class AutomationSimulator { } else if (component.isBroken() || (component.getMaxDamage() > 1 && component.getCurrentDamage() >= component.getAutomationThreshold())) { component.clearDamage(); - replacedItems.add(component.name); - component.info.append(formatI18n("ComponentInfo.ReplacedTime", reactorTicks)); + component.info.append("ComponentInfo.ReplacedTime | " +reactorTicks); if (component.getReactorPause() > 0) { active = false; pauseTimer = Math.max(pauseTimer, component.getReactorPause()); @@ -629,32 +532,32 @@ public class AutomationSimulator { private void checkReactorTemperature(final int reactorTicks) { if (reactor.getCurrentHeat() < 0.5 * reactor.getMaxHeat() && !reachedBelow50 && reachedEvaporate) { - publish(formatI18n("Simulation.TimeToBelow50", reactorTicks)); + publish("Simulation.TimeToBelow50", reactorTicks); reachedBelow50 = true; data.timeToBelow50 = reactorTicks; } if (reactor.getCurrentHeat() >= 0.4 * reactor.getMaxHeat() && !reachedBurn) { - publish(formatI18n("Simulation.TimeToBurn", reactorTicks)); + publish("Simulation.TimeToBurn", reactorTicks); reachedBurn = true; data.timeToBurn = reactorTicks; } if (reactor.getCurrentHeat() >= 0.5 * reactor.getMaxHeat() && !reachedEvaporate) { - publish(formatI18n("Simulation.TimeToEvaporate", reactorTicks)); + publish("Simulation.TimeToEvaporate", reactorTicks); reachedEvaporate = true; data.timeToEvaporate = reactorTicks; } if (reactor.getCurrentHeat() >= 0.7 * reactor.getMaxHeat() && !reachedHurt) { - publish(formatI18n("Simulation.TimeToHurt", reactorTicks)); + publish("Simulation.TimeToHurt", reactorTicks); reachedHurt = true; data.timeToHurt = reactorTicks; } if (reactor.getCurrentHeat() >= 0.85 * reactor.getMaxHeat() && !reachedLava) { - publish(formatI18n("Simulation.TimeToLava", reactorTicks)); + publish("Simulation.TimeToLava", reactorTicks); reachedLava = true; data.timeToLava = reactorTicks; } if (reactor.getCurrentHeat() >= reactor.getMaxHeat() && !reachedExplode) { - publish(formatI18n("Simulation.TimeToXplode", reactorTicks)); + publish("Simulation.TimeToXplode", reactorTicks); reachedExplode = true; data.timeToXplode = reactorTicks; } @@ -698,25 +601,54 @@ public class AutomationSimulator { data.ventCooling = totalVentCooling / (reactorTicks - 20); data.ventCoolingCapacity = totalVentCoolingCapacity; if (totalHullHeating > 0) { - publish(formatI18n("Simulation.HullHeating", totalHullHeating / (reactorTicks - 20))); + publish("Simulation.HullHeating", totalHullHeating / (reactorTicks - 20)); } if (totalComponentHeating > 0) { - publish(formatI18n("Simulation.ComponentHeating", totalComponentHeating / (reactorTicks - 20))); + publish("Simulation.ComponentHeating", totalComponentHeating / (reactorTicks - 20)); } if (totalHullCoolingCapacity > 0) { - publish(formatI18n("Simulation.HullCooling", totalHullCooling / (reactorTicks - 20), totalHullCoolingCapacity)); + publish("Simulation.HullCooling | " +totalHullCooling / (reactorTicks - 20), totalHullCoolingCapacity); } if (totalVentCoolingCapacity > 0) { - publish(formatI18n("Simulation.VentCooling", totalVentCooling / (reactorTicks - 20), totalVentCoolingCapacity)); + publish("Simulation.VentCooling | " +totalVentCooling / (reactorTicks - 20), totalVentCoolingCapacity); } } } } + + private void publish(String string, double currentHeat, int reactorCooldownTime) { + publish(string + " | "+currentHeat+" | "+reactorCooldownTime); + } + private void publish(String string, double d, double e, double f) { + publish(string + " | "+d+" | "+e+" | "+f); + } + + private void publish(String string, String format, String format2, String format3, String format4) { + publish(string + " | "+format+" | "+format2+" | "+format3+" | "+format4); + } + + private void publish(String string, int activeTime2, String rangeString) { + publish(string + " | "+activeTime2+" | "+rangeString); + } + + private void publish(String aString, double aData) { + publish(aString+":"+aData); + } + + private void publish(String aString, long aData) { + publish(aString+":"+aData); + } + private void publish(String aString) { output.add(aString); + } + + private String rangeString(String string, int aMin, int aMax) { + return string+" ("+aMin+"-"+aMax+")"; } + protected void process(List chunks) { /* for (String chunk : chunks) { diff --git a/src/main/java/Ic2ExpReactorPlanner/Bundle.properties b/src/main/java/Ic2ExpReactorPlanner/Bundle.properties deleted file mode 100644 index b20587693f..0000000000 --- a/src/main/java/Ic2ExpReactorPlanner/Bundle.properties +++ /dev/null @@ -1,411 +0,0 @@ - -# Comparison keys are for comparing two simulated reactors. Instead of being in -# in a TextArea like the main simulation, the comparison will be in a JLabel, wrapped -# in html tags, to allow color coding of the text more easily. - -Comparison.CompareDecimalFormat=+#,##0.##;-# -Comparison.ComponentHeating=Component heating: %s (%s/%s)
-Comparison.ComponentsHeading=Components:
-Comparison.ComponentsReplacedHeading=Components replaced:
-Comparison.Default=Please run at least two simulations (preferably with different reactor designs) to get a comparison. -Comparison.EUEUoutput=total output: %s (%s/%s) EU (%s EU/t average (%s/%s), %s EU/t min (%s/%s), %s EU/t max (%s/%s))
-Comparison.EUHUoutput=total output: %s EU / %s HU (%s EU/t / %s HU/t average, %s EU/t / %s HU/t min, %s EU/t / %s HU/t max)
-Comparison.Header=Most recent simulated reactor (left, in-grid) compared to previous simulated reactor (right, in-tab): -Comparison.HUEUoutput=total output: %s HU / %s EU (%s HU/t / %s EU/t average, %s HU/t / %s EU/t min, %s HU/t / %s EU/t max)
-Comparison.HUHUoutput=total output: %s (%s/%s) HU (%s HU/t average (%s/%s), %s HU/t min (%s/%s), %s HU/t max (%s/%s))
-Comparison.HullCooling=Hull cooling: %s (%s/%s)
-Comparison.HullCoolingPossible=Possible hull cooling: %s (%s/%s)
-Comparison.HullHeating=Hull heating: %s (%s/%s)
-Comparison.MaterialsEntry=%s %s (%s/%s)
-Comparison.MaterialsHeading=Materials:
-Comparison.NoDifferences=No significant differences detected. -Comparison.PostsimMaxTemp=Reactor maximum temperature: %s (%s/%s)
-Comparison.PostsimMinTemp=Reactor minimum temperature: %s (%s/%s)
-Comparison.PredepleteMaxTemp=Reactor maximum temperature (before first fuel rod depleted): %s (%s/%s)
-Comparison.PredepleteMinTemp=Reactor minimum temperature (before first fuel rod depleted): %s (%s/%s)
-Comparison.Prefix.PostSimulation=After simulation,\u0020 -Comparison.Prefix.PostSimulationTime=Time simulated:\u0020 -Comparison.Prefix.Prebreak=Before first component broken,\u0020 -Comparison.Prefix.PrebreakTime=Time to first component break:\u0020 -Comparison.Prefix.Predeplete=Before first rod depleted,\u0020 -Comparison.Prefix.PredepleteTime=Time to first rod depletion:\u0020 -Comparison.Prefix.TimeToBelow50=Time to below 50%% heat (after being above it):\u0020 -Comparison.Prefix.TimeToBurn=Time to "Burn" temperature:\u0020 -Comparison.Prefix.TimeToEvaporate=Time to "Evaporate" temperature:\u0020 -Comparison.Prefix.TimeToHurt=Time to "Hurt" temperature:\u0020 -Comparison.Prefix.TimeToLava=Time to "Lava" temperature:\u0020 -Comparison.Prefix.TimeToXplode=Time to explode:\u0020 -Comparison.SimpleDecimalFormat=#,##0.## -Comparison.Time.Both=%+,d seconds (%d/%d)
-Comparison.Time.BothColored=%+,d seconds (%d/%d)
-Comparison.Time.LeftOnly=%d/\u221e
-Comparison.Time.RightOnly=\u221e/%d
-Comparison.VentCooling=Vent cooling: %s (%s/%s)
-Comparison.VentCoolingPossible=Possible vent cooling: %s (%s/%s)
- -# ComponentData keys are for providing extra details in the tooltips for the component palette. -# Suggested by kekzdealer in Pull Request: https://github.com/MauveCloud/Ic2ExpReactorPlanner/pull/67 -# but heavily modified since. - -ComponentData.AdvancedHeatExchanger=Heat Capacity: 10,000
Hull Exchange Rate: 8 heat/s
Component Exchange Rate: 24 heat/s -ComponentData.AdvancedHeatVent=Heat Capacity: 1,000
Self Venting Rate: 12 heat/s -ComponentData.ComponentHeatExchanger=Heat Capacity: 5,000
Component Exchange Rate: 36 heat/s -ComponentData.ComponentHeatVent=Component Venting Rate: 4 heat/s -ComponentData.ContainmentReactorPlating=Dampens explosions -ComponentData.CoolantCell10k=Heat Capacity: 10,000 -ComponentData.CoolantCell180kHelium=Heat Capacity: 180,000 -ComponentData.CoolantCell180kNak=Heat Capacity: 180,000 -ComponentData.CoolantCell30k=Heat Capacity: 30,000 -ComponentData.CoolantCell360kHelium=Heat Capacity: 360,000 -ComponentData.CoolantCell360kNak=Heat Capacity: 360,000 -ComponentData.CoolantCell60k=Heat Capacity: 60,000 -ComponentData.CoolantCell60kHelium=Heat Capacity: 60,000 -ComponentData.CoolantCell60kNak=Heat Capacity: 60,000 -ComponentData.CoolantCell180kSpace=Heat Capacity: 180,000 -ComponentData.CoolantCell360kSpace=Heat Capacity: 360,000 -ComponentData.CoolantCell540kSpace=Heat Capacity: 540,000 -ComponentData.CoolantCell1080kSpace=Heat Capacity: 1080,000 -ComponentData.DualFuelRodCesium=Generation Time: 10,861 seconds
EU Generation: 40/60/80/100/120 /t
Heat Generation: 6/12/20/30/42 /s -ComponentData.DualFuelRodCoaxium=Generation Time: 20,000 seconds
EU Generation: 20/30/40/50/60 /t
Heat Generation: 0 /s -ComponentData.DualFuelRodMox=Generation Time: 10,000 seconds
EU Generation: [20,100)/[30,150)/[40,200)/[50,250)/[60,300) /t - scales linearly with hull temperature.
Heat Generation in EU reactor or when hull temperature<=50%: 24/48/80/120/168 /s
Heat Generation in fluid reactor when hull temperature>50%: 48/96/160/240/336 /s -ComponentData.DualFuelRodNaquadah=Generation Time: 100,000 seconds
EU Generation: [40,100)/[60,150)/[80,200)/[100,250)/[120,300) /t - scales linearly with hull temperature.
Heat Generation in EU reactor or when hull temperature<=50%: 24/48/80/120/168 /s
Heat Generation in fluid reactor when hull temperature>50%: 48/96/160/240/336 /s -ComponentData.DualFuelRodNaquadahGTNH=Generation Time: 100,000 seconds
EU Generation: 20/30/40/50/60 /t
Heat Generation: 24/48/80/120/168 /s -ComponentData.DualFuelRodNaquadria=Generation Time: 100,000 seconds
EU Generation: [40,100)/[60,150)/[80,200)/[100,250)/[120,300) /t - scales linearly with hull temperature.
Heat Generation in EU reactor or when hull temperature<=50%: 24/48/80/120/168 /s
Heat Generation in fluid reactor when hull temperature>50%: 48/96/160/240/336 /s -ComponentData.DualFuelRodThorium=Generation Time: 50,000 seconds
EU Generation: 4/6/8/10/12 /t
Heat Generation: 6/12/20/30/42 /s -ComponentData.DualFuelRodTiberium=Generation Time: 50,000 seconds
EU Generation: 10/20/30/40/50 /t
Heat Generation: 12/24/40/60/84 /s -ComponentData.DualFuelRodUranium=Generation Time: 20,000 seconds
EU Generation: 20/30/40/50/60 /t
Heat Generation: 24/48/80/120/168 /s -ComponentData.FuelRodCesium=Generation Time: 10,861 seconds
EU Generation: 10/20/30/40/50 /t
Heat Generation: 1/3/8/10/15 /s -ComponentData.FuelRodCoaxium=Generation Time: 20,000 seconds
EU Generation: 5/10/15/20/25 /t
Heat Generation: 0 /s -ComponentData.FuelRodMox=Generation Time: 10,000 seconds
EU Generation: [5,25)/[10,50)/[15,75)/[20,100)/[25,125) /t - scales linearly with hull temperature.
Heat Generation in EU reactor or when hull temperature<=50%: 4/12/24/40/60 /s
Heat Generation in fluid reactor when hull temperature>50%: 8/24/48/80/120 /s -ComponentData.FuelRodNaquadah=Generation Time: 100,000 seconds
EU Generation: [10,25)/[20,50)/[30,75)/[40,100)/[50,125) /t - scales linearly with hull temperature.
Heat Generation in EU reactor or when hull temperature<=50%: 4/12/24/40/60 /s
Heat Generation in fluid reactor when hull temperature>50%: 8/24/48/80/120 /s -ComponentData.FuelRodNaquadahGTNH=Generation Time: 100,000 seconds
EU Generation: 5/10/15/20/25 /t
Heat Generation: 4/12/24/40/60 /s -ComponentData.FuelRodNaquadria=Generation Time: 100,000 seconds
EU Generation: [10,25)/[20,50)/[30,75)/[40,100)/[50,125) /t - scales linearly with hull temperature.
Heat Generation in EU reactor or when hull temperature<=50%: 4/12/24/40/60 /s
Heat Generation in fluid reactor when hull temperature>50%: 8/24/48/80/120 /s -ComponentData.FuelRodTheCore=Generation Time: 100,000 seconds
EU Generation: 10880 /t
Heat Generation: 19584 /s -ComponentData.FuelRodThorium=Generation Time: 50,000 seconds
EU Generation: 1/2/3/4/5 /t
Heat Generation: 1/3/6/10/15 /s -ComponentData.FuelRodTiberium=Generation Time: 50,000 seconds
EU Generation: 5/10/15/20/25 /t
Heat Generation: 2/6/12/20/30 /s -ComponentData.FuelRodUranium=Generation Time: 20,000 seconds
EU Generation: 5/10/15/20/25 /t
Heat Generation: 4/12/24/40/60 /s -ComponentData.HeatCapacityReactorPlating=Increases maximum heat capacity -ComponentData.HeatExchanger=Heat Capacity: 2,500
Hull Exchange Rate: 4 heat/s
Component Exchange Rate: 12 heat/s -ComponentData.HeatVent=Heat Capacity: 1,000
Self Venting Rate: 6 heat/s -ComponentData.IridiumNeutronReflector=Durability: Infinite -ComponentData.LzhCondensator=Heat Capacity: 100,000
Cannot be vented from. -ComponentData.NeutronReflector=Durability: 30,000 (10,000 in MC 1.7.10) -ComponentData.OverclockedHeatVent=Heat Capacity: 1,000
Self Venting Rate: 20 heat/s
Hull Cooling Rate: 36 heat/s -ComponentData.QuadFuelRodCesium=Generation Time: 10,861 seconds
EU Generation: 120/160/200/240/280 /t
Heat Generation: 24/40/60/84/112 /s -ComponentData.QuadFuelRodCoaxium=Generation Time: 20,000 seconds
EU Generation: 60/80/100/120/140 /t
Heat Generation: 0 /s -ComponentData.QuadFuelRodMox=Generation Time: 10,000 seconds
EU Generation: [60,300)/[80,400)/[100,500)/[120,600)/[140,700) /t - scales linearly with hull temperature.
Heat Generation in EU reactor or when hull temperature<=50%: 96/160/240/336/448 /s
Heat Generation in fluid reactor when hull temperature>50%: 192/320/480/672/896 /s -ComponentData.QuadFuelRodNaquadah=Generation Time: 100,000 seconds
EU Generation: [120,300)/[160,400)/[200,500)/[240,600)/[280,700) /t - scales linearly with hull temperature.
Heat Generation in EU reactor or when hull temperature<=50%: 96/160/240/336/448 /s
Heat Generation in fluid reactor when hull temperature>50%: 192/320/480/672/896 /s -ComponentData.QuadFuelRodNaquadahGTNH=Generation Time: 100,000 seconds
EU Generation: 60/80/100/120/140 /t
Heat Generation: 96/160/240/336/448 /s -ComponentData.QuadFuelRodNaquadria=Generation Time: 100,000 seconds
EU Generation: [120,300)/[160,400)/[200,500)/[240,600)/[280,700) /t - scales linearly with hull temperature.
Heat Generation in EU reactor or when hull temperature<=50%: 96/160/240/336/448 /s
Heat Generation in fluid reactor when hull temperature>50%: 192/320/480/672/896 /s -ComponentData.QuadFuelRodThorium=Generation Time: 50,000 seconds
EU Generation: 12/16/20/24/28 /t
Heat Generation: 24/40/60/84/112 /s -ComponentData.QuadFuelRodTiberium=Generation Time: 50,000 seconds
EU Generation: 60/80/100/120/140 /t
Heat Generation: 48/80/120/168/224 /s -ComponentData.QuadFuelRodUranium=Generation Time: 20,000 seconds
EU Generation: 60/80/100/120/140 /t
Heat Generation: 96/160/240/336/448 /s -ComponentData.ReactorHeatExchanger=Heat Capacity: 5,000
Hull Exchange Rate: 72 heat/s -ComponentData.ReactorHeatVent=Heat Capacity: 1,000
Self Venting Rate: 5 heat/s
Hull Cooling Rate: 5 heat/s -ComponentData.ReactorPlating=Crafting component for Containment and Heat-Capacity Reactor Plating -ComponentData.RshCondensator=Heat Capacity: 20,000
Cannot be vented from. -ComponentData.ThickNeutronReflector=Durability: 120,000 (40,000 in MC 1.7.10) - -# ComponentInfo keys are for updating information about a component during a simulation. - -ComponentInfo.BrokeTime=\nBroke after %,d seconds. -ComponentInfo.CooldownTime=\nTook %,d seconds to cool down. -ComponentInfo.GeneratedEU=\nGenerated %,.2f to %,.2f EU per second. -ComponentInfo.GeneratedHeat=\nGenerated %,.0f to %,.0f heat per second. -ComponentInfo.ReachedHeat=\nReached up to %,.0f of %,.0f heat. -ComponentInfo.ReceivedHeat=\nReceived at most %,.0f heat per second. -ComponentInfo.RemainingHeat=\nHad %,.0f heat left after main simulation stopped. -ComponentInfo.ReplacedTime=\nReplaced at %,d seconds. -ComponentInfo.ResidualHeat=\nHad %,.0f heat left after cooldown period. -ComponentInfo.UsedCooling=\nUsed %,.0f of %,.0f cooling. - - -# Keys for component names were originally matched to class names, to allow using reflection to look them up. -# However, refactoring eliminated the "one class for each component type" idea. -# These keys will be used both in the reactor area and the component selection area. - -ComponentName.AdvancedHeatExchanger=Advanced Heat Exchanger -ComponentName.AdvancedHeatVent=Advanced Heat Vent -ComponentName.ComponentHeatExchanger=Component Heat Exchanger -ComponentName.ComponentHeatVent=Component Heat Vent -ComponentName.ContainmentReactorPlating=Containment Reactor Plating -ComponentName.CoolantCell10k=10k Coolant Cell -ComponentName.CoolantCell1080kSpace=1080k Space Coolant Cell -ComponentName.CoolantCell180kHelium=180k He Coolant Cell -ComponentName.CoolantCell180kNak=180k NaK Coolant Cell -ComponentName.CoolantCell180kSpace=180k Space Coolant Cell -ComponentName.CoolantCell30k=30k Coolant Cell -ComponentName.CoolantCell360kHelium=360k He Coolant Cell -ComponentName.CoolantCell360kNak=360k NaK Coolant Cell -ComponentName.CoolantCell360kSpace=360k Space Coolant Cell -ComponentName.CoolantCell540kSpace=540k Space Coolant Cell -ComponentName.CoolantCell60k=60k Coolant Cell -ComponentName.CoolantCell60kHelium=60k He Coolant Cell -ComponentName.CoolantCell60kNak=60k NaK Coolant Cell -ComponentName.DualFuelRodCesium=Dual Fuel Rod (Cesium) -ComponentName.DualFuelRodCoaxium=Dual Fuel Rod (Coaxium) -ComponentName.DualFuelRodMox=Dual Fuel Rod (MOX) -ComponentName.DualFuelRodNaquadah=Dual Fuel Rod (Naquadah) -ComponentName.DualFuelRodNaquadahGTNH=Dual Fuel Rod (Naquadah) -ComponentName.DualFuelRodNaquadria=Dual Fuel Rod (Naquadria) -ComponentName.DualFuelRodThorium=Dual Fuel Rod (Thorium) -ComponentName.DualFuelRodTiberium=Dual Fuel Rod (Tiberium) -ComponentName.DualFuelRodUranium=Dual Fuel Rod (Uranium) -ComponentName.FuelRodCesium=Fuel Rod (Cesium) -ComponentName.FuelRodCoaxium=Fuel Rod (Coaxium) -ComponentName.FuelRodMox=Fuel Rod (MOX) -ComponentName.FuelRodNaquadah=Fuel Rod (Naquadah) -ComponentName.FuelRodNaquadahGTNH=Fuel Rod (Naquadah) -ComponentName.FuelRodNaquadria=Fuel Rod (Naquadria) -ComponentName.FuelRodTheCore=Fuel Rod (The Core) -ComponentName.FuelRodThorium=Fuel Rod (Thorium) -ComponentName.FuelRodTiberium=Fuel Rod (Tiberium) -ComponentName.FuelRodUranium=Fuel Rod (Uranium) -ComponentName.HeatCapacityReactorPlating=Heat-Capacity Reactor Plating -ComponentName.HeatExchanger=Heat Exchanger -ComponentName.HeatVent=Heat Vent -ComponentName.IridiumNeutronReflector=Iridium Neutron Reflector -ComponentName.LzhCondensator=LZH-Condensator -ComponentName.NeutronReflector=Neutron Reflector -ComponentName.OverclockedHeatVent=Overclocked Heat Vent -ComponentName.QuadFuelRodCesium=Quad Fuel Rod (Cesium) -ComponentName.QuadFuelRodCoaxium=Quad Fuel Rod (Coaxium) -ComponentName.QuadFuelRodMox=Quad Fuel Rod (MOX) -ComponentName.QuadFuelRodNaquadah=Quad Fuel Rod (Naquadah) -ComponentName.QuadFuelRodNaquadahGTNH=Quad Fuel Rod (Naquadah) -ComponentName.QuadFuelRodNaquadria=Quad Fuel Rod (Naquadria) -ComponentName.QuadFuelRodThorium=Quad Fuel Rod (Thorium) -ComponentName.QuadFuelRodTiberium=Quad Fuel Rod (Tiberium) -ComponentName.QuadFuelRodUranium=Quad Fuel Rod (Uranium) -ComponentName.ReactorHeatExchanger=Reactor Heat Exchanger -ComponentName.ReactorHeatVent=Reactor Heat Vent -ComponentName.ReactorPlating=Reactor Plating -ComponentName.RshCondensator=RSH-Condensator -ComponentName.ThickNeutronReflector=Thick Neutron Reflector - -ComponentTooltip.Broken=Broke during last simulation -ComponentTooltip.ResidualHeat=Had residual heat after last simulation - -Config.CSVCheckbox=Output CSV Data -Config.CSVLimit=For how many simulated seconds: -Config.EUReactor=EU Reactor -Config.FluidReactor=Fluid Reactor -Config.InitialComponentHeat=Initial Heat: -Config.NoComponentSelected=No component selected -Config.OffPulse=Off-pulse duration: -Config.OnPulse=On-pulse duration: -Config.PlacingReactorPause=Reactor Pause: -Config.PlacingReplacementThreshold=Threshold: -Config.PulseHelp=(on-pulse can be set to 5 million to mimic having no redstone timing) -Config.ReactorCoolantInjectors=Use Reactor Coolant Injectors (MC 1.8+ only) -Config.ReactorPause=Reactor Pause (seconds): -Config.ReactorPauseHelp=(This is how long the reactor will pause while replacing this component) -Config.ReplacementThreshold=Replacement Threshold: -Config.ReplacementThresholdHelp=(Set higher than component's initial heat/damage to replace the component when it gets this hot/damaged, or lower to replace a component that has cooled; broken components will be replaced during automation runs regardless of this setting) -Config.ResumeTemp=Resume when reactor temp <= -# Same language string should be usable anywhere "seconds" appears. -Config.Seconds=seconds -Config.SimulationStyle=Simulation Style: -Config.SuspendTemp=Suspend when reactor temp >= -Config.SuspendTempHelp=(both temps can be set to match explode temp to mimic having no temperature control) - -CSVData.EntryComponentValue=,"%.2f" -CSVData.EntryComponentOutput=,%.0f -CSVData.EntryCoreHeat=,%.0f -CSVData.EntryEUOutput=,"%.2f" -CSVData.EntryHUOutput=,%.0f -CSVData.EntryReactorTick=%d -CSVData.HeaderComponentName=,%s (R%dC%d) -CSVData.HeaderComponentOutput=,%s (R%dC%d) Output -CSVData.HeaderCoreHeat=,Core Heat -CSVData.HeaderEUOutput=,EU Output -CSVData.HeaderHUOutput=,HU Output -CSVData.HeaderReactorTick=Reactor Time - -MaterialName.AdvancedAlloy=Advanced Alloy -MaterialName.AdvancedCircuit=Advanced Circuit -MaterialName.Aluminium=Aluminium -MaterialName.BasicCircuit=Basic Circuit -MaterialName.Beryllium=Beryllium -MaterialName.Bronze=Bronze -MaterialName.CallistoIceDust=Callisto Ice Dust -MaterialName.CesiumFuel=Cesium-Enriched Nuclear Fuel -MaterialName.Coal=Coal -MaterialName.CoaxiumFuel=Coaxium-Enriched Nuclear Fuel -MaterialName.Copper=Copper -MaterialName.Diamond=Diamond -MaterialName.DistilledWater=Distilled Water -MaterialName.EmptyCell=Empty Cell -MaterialName.EnrichedNaquadah=Enriched Naquadah -MaterialName.FluxedElectrum=Fluxed Electrum -MaterialName.Glass=Glass -MaterialName.GlowstoneDust=Glowstone Dust -MaterialName.Gold=Gold -MaterialName.Graphite=Graphite -MaterialName.Helium==Helium -MaterialName.Iridium=Iridium -MaterialName.IridiumReinforcedPlate=Iridium Reinforced Plate -MaterialName.Iron=Iron -MaterialName.LapisLazuli=Lapis Lazuli -MaterialName.Lead=Lead -MaterialName.LedoxDust=Ledox Dust -MaterialName.MoxFuel=MOX Fuel -MaterialName.Naquadria=Naquadria -MaterialName.Platinum=Platinum -MaterialName.Potassium=Potassium -MaterialName.Redstone=Redstone -MaterialName.ReinforcedGlass=Reinforced Glass -MaterialName.Rubber=Rubber -MaterialName.Sodium=Sodium -MaterialName.Thorium=Thorium -MaterialName.Tiberium=Tiberium -MaterialName.Tungsten=Tungsten -MaterialName.Tin=Tin -MaterialName.UraniumFuel=Uranium Fuel - -# %s at the end of this string is for optionally showing the range of active time. -Simulation.ActiveTime=Reactor was active for a total of %,d seconds%s.\n -Simulation.ActiveTimeRange=\u0020(%,d to %,d seconds at a time) -Simulation.ActiveTimeSingle=\u0020(%,d seconds at a time) -Simulation.CancelledAtTick=Simulation cancelled after simulating %,d seconds.\n -Simulation.ComponentHeating=Component heating: %.2f average.\n -Simulation.ComponentsReplaced=Components replaced:\n%s -Simulation.CSVOpenFailure=Failed to open CSV file for output.\n -Simulation.CycleCompleteTime=Cycle complete after %,d seconds.\n -# This will be used to optionally show extra precision, in format strings where %s is used when %.2f might otherwise be expected. -Simulation.DecimalFormat=#,##0.## -Simulation.Efficiency=Efficiency: %.2f average, %.2f minimum, %.2f maximum\n -Simulation.ElapsedTime=Simulation took %.2f seconds.\n -Simulation.ErrorCooldown=Error %,d simulated seconds into cooldown.\n -Simulation.ErrorReactor=Error after simulating %d seconds of reactor activity\n -Simulation.EUOutputs=Total output after full simulation: %s EU (%s EU/t average, %s EU/t min, %s EU/t max)\n -Simulation.EUOutputsBeforeDepleted=Total output before first fuel rod depleted: %s EU (%s EU/t average, %s EU/t min, %s EU/t max)\n -Simulation.EUOutputsBeforeBreak=Total output before first component broken: %s EU (%s EU/t average, %s EU/t min, %s EU/t max)\n -Simulation.ExcessCooling=Excess cooling: %.2f\n -Simulation.ExcessHeating=Excess heating: %.2f\n -Simulation.ExplosionPower=Raw explosion power: %,.2f\n -Simulation.FirstComponentBrokenDetails=First Component Broken: %s at row %d column %d, at %d seconds.\n -Simulation.FirstRodDepletedDetails=First Fuel Rod Depleted: %s at row %d column %d, at %d seconds.\n -Simulation.FuelRodsTime=Fuel rods (if any) stopped after %,d seconds.\n -Simulation.HeatOutputs=Total output after full simulation: %s HU (%s HU/t average, %s HU/t minimum, %s HU/t max)\n -Simulation.HeatOutputsBeforeBreak=Total output before first component broken: %s HU (%s HU/t average, %s HU/t minimum, %s HU/t max)\n -Simulation.HeatOutputsBeforeDepleted=Total output before first fuel rod depleted: %s HU (%s HU/t average, %s HU/t minimum, %s HU/t max)\n -Simulation.HullCooling=Hull cooling: %,.2f average of %,.0f possible.\n -Simulation.HullHeating=Hull heating: %,.2f average.\n -Simulation.InactiveTime=Reactor was inactive for a total of %,d seconds%s.\n -Simulation.InactiveTimeRange=\u0020(%,d to %,d seconds at a time) -Simulation.InactiveTimeSingle=\u0020(%,d seconds at a time) -Simulation.LapisUsed=Used %d Lapis Lazuli Blocks.\n -Simulation.MaxHeatGenerated=Max heat generated (internally, by fuel rods): %,.0f\n -Simulation.NoCooldown=No cooldown needed.\n -Simulation.NoFuelRods=No fuel rods found! Simulating a pulsed cycle makes no sense! -Simulation.ReactorCooldownTime=Reactor took %,d seconds to cool down.\n -Simulation.ReactorHeatBuildup=Reactor heat buildup per second (while all components are intact):%,.0f minimum, %,.0f maximum.\n -Simulation.ReactorMaxTemp=Reactor maximum temperature: %,.0f\n -Simulation.ReactorMaxTempBeforeDepleted=Reactor maximum temperature (before first fuel rod depleted): %,.0f\n -Simulation.ReactorMinTemp=Reactor minimum temperature: %,.0f\n -Simulation.ReactorMinTempBeforeDepleted=Reactor minimum temperature (before first fuel rod depleted): %,.0f\n -Simulation.ReactorOverheatedTime=Reactor overheated at %,d seconds.\n -Simulation.ReactorRemainingHeat=Reactor remained at %,.0f heat after main simulation finished.\n -Simulation.ReactorResidualHeat=Reactor remained at %,.0f heat even after cool down period of %,d seconds.\n -Simulation.RedstoneUsed=Used %d Blocks of Redstone.\n -Simulation.Started=Simulation started.\n -Simulation.TimeToBelow50=Reactor will dip below 50%% heat for the first time (after being above it) at %d seconds.\n -Simulation.TimeToBurn=Reactor will reach "Burn" temperature at %d seconds.\n -Simulation.TimeToEvaporate=Reactor will reach "Evaporate" temperature at %d seconds.\n -Simulation.TimeToHurt=Reactor will reach "Hurt" temperature at %d seconds.\n -Simulation.TimeToLava=Reactor will reach "Lava" temperature at %d seconds.\n -# Note: The "e" is deliberately dropped from "Explode" in the key name so that it will sort after the others. -Simulation.TimeToXplode=Reactor will explode at %d seconds.\n -Simulation.TimeWithoutExploding=\nReactor ran for %,d seconds without exploding.\n -Simulation.TotalCellCooling=Total Cell Cooling (peak usages): %,.2f\n -Simulation.TotalCondensatorCooling=Total Condensator Cooling (peak usages): %,.2f\n -Simulation.TotalCooldownTime=Other components took %,d seconds to cool down (as much as they would).\n -Simulation.TotalVentCooling=Total Vent Cooling (peak usages, theoretical maximum): %,.2f of %,.2f\n -Simulation.VentCooling=Vent cooling: %,.2f average of %,.0f possible.\n - -UI.AdvancedTab=Advanced -#Needs to be heavily abbreviated to fit on the button. -UI.AutomateButton=a -UI.AutomateButtonFont=Arial 10 -UI.AutomatedReactor=Automated Reactor -UI.AutomatedReactorTooltip=Turn on to allow automating of adding/removing of components. -UI.AutomationTooltip=Click to define automation rules for this component. -UI.CancelButton=Cancel -UI.ChosenComponentRowCol=%s at row %d column %d -UI.ClearGridButton=Clear Grid -UI.CodeLabel=Code: -UI.ComparisonTab=Comparison -UI.ComponentAutomationTab=Component Automation -#Needs to be heavily abbreviated to fit on the button. -UI.ComponentInfoButton=i -UI.ComponentInfoButtonFont=Arial 10 -UI.ComponentInfoButtonTooltip=Click for information about this component -UI.ComponentInfoDefault=Please run a simulation and select a component in the reactor grid above to see its details. -UI.ComponentInfoLastSimRowCol=%s at row %d column %d\n%s -UI.ComponentListTab=Component List -UI.ComponentPlacingDefault=Placing Component: None -UI.ComponentPlacingSpecific=Placing Component: %s -UI.ComponentTab=Component -UI.CopyCodeButton=Copy Code -UI.CopyComparisonData=Copy Comparison Data -UI.CSVBrowseButton=Browse -UI.CSVFileDefault=No File Selected -UI.CSVHelp=Warnings:
  1. Simulation will likely run much slower with CSV Output enabled, especially if the chosen file is on a mechanical hard drive.
  2. User is responsible for making sure target drive has enough space for the CSV file.
  3. Additional simulations will overwrite the CSV file unless the target is manually changed.
-UI.CSVTab=CSV -UI.EnableGT508Components=Enable GT 5.08 Components -UI.EnableGT509Components=Enable GT 5.09 Components -UI.ExpandAdvancedAlloy=Expand Advanced Alloy into constituent materials (invalid when using GregTech) -UI.GregTechVersion=GregTech Version: -UI.GregTechVersionNone=None -UI.GTReactorBehavior=GT 5.09 = (2x base EU). GTNH = (10x base EU, Naq Rods->not-MOX-like). Setting always applies to -only fuel rods regardless. -UI.InitialHeatDisplay=\u0020(initial heat: %,d) -UI.InitialReactorHeat=Initial Reactor Heat: -UI.InitialReactorHeatTooltip=Use this to set a heat value for testing MOX-like reactors. -UI.LockInTabCode=Lock in-tab code -UI.MainTitle=IC2 Experimental Reactor Planner -UI.MaterialDecimalFormat=#,##0.## -UI.MaterialsTab=Materials -UI.MaxHeatDefault=/10,000 -UI.MaxHeatSpecific=/%,.0f -UI.MaxSimulationTicks=Maximum time to simulate: -UI.MaxSimulationTicksTooltip=Forces simulation to stop after simulating this much time, even if reactor hasn't exploded or ceased outputting HU or EU. -UI.MinecraftVersion=Minecraft Version: -UI.NoComponentLastSimRowCol=No component at row %d column %d during last simulation. -UI.NoComponentRowCol=No component at row %d column %d. -UI.NoSimulationRun=No simulation run yet. -UI.OnlyShowDiffData=Only show data that is significantly different -UI.PasteCodeButton=Paste Code -UI.PulseConfigurationTab=Pulse Configuration -UI.PulsedReactor=Pulsed Reactor -UI.RemoveAddonComponentsTitle=Add-on Components Found -UI.RemoveGT508ComponentsText=GT 5.08 components found in current design. Remove them? -UI.RemoveGT509ComponentsText=GT 5.09 components found in current design. Remove them? -UI.ResetPulseConfig=Reset Pulse Configuration -UI.ShowComponentDetailButtons=Show Component Detail Buttons -UI.ShowComponentPreconfigControls=Show Component Pre-configuration Controls -UI.ShowOldStyleReactorCode=Show old-style (pre-2.3.1) reactor code -UI.SimulateButton=Simulate -UI.SimulationTab=Simulation -UI.SimulationTypeAutomation=Pulsed Automation -UI.SimulationTypePulsed=Pulsed Cycle -UI.SimulationTypeSimple=Simple Cycle -UI.TemperatureEffectsDefault=Burn: 4,000 Evaporate: 5,000 Hurt: 7,000 Lava: 8,500 Explode: 10,000 -UI.TemperatureEffectsSpecific=Burn: %,d Evaporate: %,d Hurt: %,d Lava: %,d Explode: %,d -UI.TexturePackBrowseButton=Browse -UI.TexturePackClearButton=Clear -UI.TexturePackDefault=Texture Pack: no file selected -UI.TexturePackHelp=(restart planner to see new textures) -UI.TexturePackSpecific=Texture Pack: %s -UI.UseGTRecipes=Use GregTech recipes for component materials (where applicable and unambiguous) -UI.UseUfcForCoolantCells=Use Universal Fluid Cells for coolant (incompatible with GregTech recipes option) -UI.VersionNumber=Version %s - -Warning.DepletedIsotope=Obsolete component (depleted isotope cell) at row %d column %d removed.\n -Warning.DualPlutonium=Obsolete component (dual plutonium cell) at row %d column %d removed.\n -Warning.Heating=Obsolete component (heating cell) at row %d column %d removed.\n -Warning.InvalidReactorCode=Invalid Reactor Code: %s -Warning.Plutonium=Obsolete component (plutonium cell) at row %d column %d removed.\n -Warning.QuadPlutonium=Obsolete component (quad plutonium cell) at row %d column %d removed.\n -Warning.Title=Warning(s) -Warning.Unrecognized=Unrecognized component (id %d) at row %d column %d removed.\n diff --git a/src/main/java/Ic2ExpReactorPlanner/BundleHelper.java b/src/main/java/Ic2ExpReactorPlanner/BundleHelper.java deleted file mode 100644 index 8bbc9aab45..0000000000 --- a/src/main/java/Ic2ExpReactorPlanner/BundleHelper.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Ic2ExpReactorPlanner; - -import java.util.ResourceBundle; - -/** - * Utility class to handle handle access to the planner's resource bundle. - * Methods may be static-imported, and hopefully this will make the code more - * concise, but not to the point of obfuscation. - * @author Brian McCloud - */ -public class BundleHelper { - - private BundleHelper() { - // private no-op constructor to prevent instantiation. - } - - private static final ResourceBundle BUNDLE = ResourceBundle.getBundle("Ic2ExpReactorPlanner/Bundle"); - - /** - * Looks up a key in the planner's resource bundle. - * @param key the key to look up in the resource bundle. - * @return the value from the resource bundle for the default locale of the system the planner is being run on. - */ - public static String getI18n(String key) { - return BUNDLE.getString(key); - } - - /** - * Uses a resource bundle entry as a format specifier. - * @param key the key to look up in the resource bundle. - * @param args the arguments to use in String.format. - * @return the formatted string. - */ - public static String formatI18n(String key, Object... args) { - return String.format(getI18n(key), args); - } - -} diff --git a/src/main/java/Ic2ExpReactorPlanner/Bundle_zh_CN.properties b/src/main/java/Ic2ExpReactorPlanner/Bundle_zh_CN.properties deleted file mode 100644 index b3d5076fb2..0000000000 --- a/src/main/java/Ic2ExpReactorPlanner/Bundle_zh_CN.properties +++ /dev/null @@ -1,373 +0,0 @@ - -# Comparison keys are for comparing two simulated reactors. Instead of being in -# in a TextArea like the main simulation, the comparison will be in a JLabel, wrapped -# in html tags, to allow color coding of the text more easily. - -Comparison.CompareDecimalFormat=+#,##0.##;-# -Comparison.ComponentHeating=\u5143\u4ef6\u4ea7\u70ed: %s (%s/%s)
-Comparison.ComponentsHeading=\u5143\u4ef6:
-Comparison.ComponentsReplacedHeading=\u66f4\u6362\u5143\u4ef6:
-Comparison.Default=\u8bf7\u81f3\u5c11\u8fd0\u884c\u4e24\u6b21\u6a21\u62df (\u6700\u597d\u4f7f\u7528\u4e0d\u540c\u7684\u53cd\u5e94\u5806\u8bbe\u8ba1) \u4ee5\u8fdb\u884c\u6bd4\u8f83. -Comparison.EUEUoutput=\u603b\u4ea7\u80fd: %s (%s/%s) EU (\u5e73\u5747: %s EU/t (%s/%s), \u6700\u5c0f: %s EU/t (%s/%s), \u6700\u5927: %s EU/t (%s/%s))
-Comparison.EUHUoutput=\u603b\u4ea7\u80fd/\u4ea7\u70ed: %s EU / %s HU (\u5e73\u5747: %s EU/t / %s HU/t, \u6700\u5c0f: %s EU/t / %s HU/t, \u6700\u5927: %s EU/t / %s HU/t)
-Comparison.Header=\u8fd9\u4e00\u6b21\u6a21\u62df (\u5de6\u4fa7, \u4e3b\u4ee3\u7801) \u4e0e\u4e0a\u4e00\u6b21\u6a21\u62df (\u53f3\u4fa7, \u6807\u7b7e\u5185\u4ee3\u7801) \u76f8\u6bd4\u8f83: -Comparison.HUEUoutput=\u603b\u4ea7\u70ed/\u4ea7\u80fd: %s HU / %s EU (\u5e73\u5747: %s HU/t / %s EU/t, \u6700\u5c0f: %s HU/t / %s EU/t, \u6700\u5927: %s HU/t / %s EU/t)
-Comparison.HUHUoutput=\u603b\u4ea7\u70ed: %s (%s/%s) HU (\u5e73\u5747: %s HU/t (%s/%s), \u6700\u5c0f: %s HU/t (%s/%s), \u6700\u5927: %s HU/t (%s/%s))
-Comparison.HullCooling=\u5916\u58f3\u51b7\u5374: %s (%s/%s)
-Comparison.HullCoolingPossible=\u53ef\u80fd\u7684\u5916\u58f3\u51b7\u5374: %s (%s/%s)
-Comparison.HullHeating=\u5916\u58f3\u4ea7\u70ed: %s (%s/%s)
-Comparison.MaterialsEntry=%s %s (%s/%s)
-Comparison.MaterialsHeading=\u6750\u6599:
-Comparison.NoDifferences=\u672a\u68c0\u6d4b\u5230\u660e\u663e\u5dee\u5f02. -Comparison.PostsimMaxTemp=\u53cd\u5e94\u5806\u6700\u9ad8\u6e29\u5ea6: %s (%s/%s)
-Comparison.PostsimMinTemp=\u53cd\u5e94\u5806\u6700\u4f4e\u6e29\u5ea6: %s (%s/%s)
-Comparison.PredepleteMaxTemp=\u53cd\u5e94\u5806\u6700\u9ad8\u6e29\u5ea6 (\u7b2c\u4e00\u4e2a\u71c3\u6599\u68d2\u8017\u5c3d\u4e4b\u524d): %s (%s/%s)
-Comparison.PredepleteMinTemp=\u53cd\u5e94\u5806\u6700\u4f4e\u6e29\u5ea6 (\u7b2c\u4e00\u4e2a\u71c3\u6599\u68d2\u8017\u5c3d\u4e4b\u524d): %s (%s/%s)
-Comparison.Prefix.PostSimulation=\u6a21\u62df\u540e,\u0020 -Comparison.Prefix.PostSimulationTime=\u6a21\u62df\u65f6\u95f4:\u0020 -Comparison.Prefix.Prebreak=\u5728\u7b2c\u4e00\u4e2a\u5143\u4ef6\u635f\u574f\u4e4b\u524d,\u0020 -Comparison.Prefix.PrebreakTime=\u7b2c\u4e00\u6b21\u5143\u4ef6\u635f\u574f\u7684\u65f6\u95f4:\u0020 -Comparison.Prefix.Predeplete=\u5728\u7b2c\u4e00\u4e2a\u71c3\u6599\u68d2\u8017\u5c3d\u4e4b\u524d,\u0020 -Comparison.Prefix.PredepleteTime=\u7b2c\u4e00\u4e2a\u71c3\u6599\u68d2\u8017\u5c3d\u65f6\u95f4:\u0020 -Comparison.Prefix.TimeToBelow50=\u8fbe\u5230\u70ed\u91cf\u964d\u81f3 50%% \u4ee5\u4e0b\u7684\u65f6\u95f4 (\u5728\u9ad8\u4e8e 50%% \u4e4b\u540e):\u0020 -Comparison.Prefix.TimeToBurn=\u8fbe\u5230 "\u71c3\u70e7" \u6e29\u5ea6\u7684\u65f6\u95f4:\u0020 -Comparison.Prefix.TimeToEvaporate=\u8fbe\u5230 "\u84b8\u53d1" \u6e29\u5ea6\u7684\u65f6\u95f4:\u0020 -Comparison.Prefix.TimeToHurt=\u8fbe\u5230 "\u4f24\u5bb3" \u6e29\u5ea6\u7684\u65f6\u95f4:\u0020 -Comparison.Prefix.TimeToLava=\u8fbe\u5230 "\u7194\u5316" \u6e29\u5ea6\u7684\u65f6\u95f4:\u0020 -Comparison.Prefix.TimeToXplode=\u8fbe\u5230\u7206\u70b8\u7684\u65f6\u95f4:\u0020 -Comparison.SimpleDecimalFormat=#,##0.## -Comparison.Time.Both=%+,d \u79d2 (%d/%d)
-Comparison.Time.BothColored=%+,d \u79d2 (%d/%d)
-Comparison.Time.LeftOnly=%d/\u221e
-Comparison.Time.RightOnly=\u221e/%d
-Comparison.VentCooling=\u6563\u70ed\u7247\u51b7\u5374: %s (%s/%s)
-Comparison.VentCoolingPossible=\u53ef\u80fd\u7684\u6563\u70ed\u7247\u51b7\u5374: %s (%s/%s)
- -# ComponentData keys are for providing extra details in the tooltips for the component palette. -# Suggested by kekzdealer in Pull Request: https://github.com/MauveCloud/Ic2ExpReactorPlanner/pull/67 -# but heavily modified since. - -ComponentData.AdvancedHeatExchanger=\u70ed\u5bb9\u91cf: 10,000
\u53cd\u5e94\u5806\u70ed\u4ea4\u6362\u7387: 8 heat/s
\u5143\u4ef6\u70ed\u4ea4\u6362\u7387: 24 heat/s -ComponentData.AdvancedHeatVent=\u70ed\u5bb9\u91cf: 1,000
\u81ea\u6563\u70ed\u7387: 12 heat/s -ComponentData.ComponentHeatExchanger=\u70ed\u5bb9\u91cf: 5,000
\u5143\u4ef6\u70ed\u4ea4\u6362\u7387: 36 heat/s -ComponentData.ComponentHeatVent=\u5143\u4ef6\u51b7\u5374\u901f\u5ea6: 4 heat/s -ComponentData.ContainmentReactorPlating=\u964d\u4f4e\u7206\u70b8\u8303\u56f4 -ComponentData.CoolantCell10k=\u70ed\u5bb9\u91cf: 10,000 -ComponentData.CoolantCell180kHelium=\u70ed\u5bb9\u91cf: 180,000 -ComponentData.CoolantCell180kNak=\u70ed\u5bb9\u91cf: 180,000 -ComponentData.CoolantCell30k=\u70ed\u5bb9\u91cf: 30,000 -ComponentData.CoolantCell360kHelium=\u70ed\u5bb9\u91cf: 360,000 -ComponentData.CoolantCell360kNak=\u70ed\u5bb9\u91cf: 360,000 -ComponentData.CoolantCell60k=\u70ed\u5bb9\u91cf: 60,000 -ComponentData.CoolantCell60kHelium=\u70ed\u5bb9\u91cf: 60,000 -ComponentData.CoolantCell60kNak=\u70ed\u5bb9\u91cf: 60,000 -ComponentData.DualFuelRodCesium=\u6301\u7eed\u65f6\u95f4: 10,861 \u79d2
\u4ea7\u51fa EU: 40/60/80/100/120
\u4ea7\u751f\u70ed\u91cf: 6/12/20/30/42 -ComponentData.DualFuelRodCoaxium=\u6301\u7eed\u65f6\u95f4: 20,000 \u79d2
\u4ea7\u51fa EU: 20/30/40/50/60
\u4ea7\u751f\u70ed\u91cf: 0 -ComponentData.DualFuelRodMox=\u6301\u7eed\u65f6\u95f4: 10,000 \u79d2
\u4ea7\u51fa EU: [20,100)/[30,150)/[40,200)/[50,250)/[60,300) - \u4e0e\u53cd\u5e94\u5806\u6e29\u5ea6\u6210\u7ebf\u6027\u6bd4\u4f8b.
EU \u53cd\u5e94\u5806\u6a21\u5f0f\u4e0b, \u5f53\u5916\u58f3\u6e29\u5ea6<=50%\u65f6\u7684\u4ea7\u70ed\u6548\u7387: 24/48/80/120/168
\u6d41\u4f53\u53cd\u5e94\u5806\u6a21\u5f0f\u4e0b, \u5f53\u5916\u58f3\u6e29\u5ea6>50%\u65f6\u7684\u4ea7\u70ed\u6548\u7387: 48/96/160/240/336 -ComponentData.DualFuelRodNaquadah=\u6301\u7eed\u65f6\u95f4: 100,000 \u79d2
\u4ea7\u51fa EU: [40,100)/[60,150)/[80,200)/[100,250)/[120,300) - \u4e0e\u53cd\u5e94\u5806\u6e29\u5ea6\u6210\u7ebf\u6027\u6bd4\u4f8b.
EU \u53cd\u5e94\u5806\u6a21\u5f0f\u4e0b, \u5f53\u5916\u58f3\u6e29\u5ea6<=50%\u65f6\u7684\u4ea7\u70ed\u6548\u7387: 24/48/80/120/168
\u6d41\u4f53\u53cd\u5e94\u5806\u6a21\u5f0f\u4e0b, \u5f53\u5916\u58f3\u6e29\u5ea6>50%\u65f6\u7684\u4ea7\u70ed\u6548\u7387: 48/96/160/240/336 -ComponentData.DualFuelRodThorium=\u6301\u7eed\u65f6\u95f4: 50,000 \u79d2
\u4ea7\u51fa EU: 4/6/8/10/12
\u70ed\u91cf\u4ea7\u751f: 6/12/20/30/42 -ComponentData.DualFuelRodUranium=\u6301\u7eed\u65f6\u95f4: 20,000 \u79d2
\u4ea7\u51fa EU: 20/30/40/50/60
\u4ea7\u751f\u70ed\u91cf: 24/48/80/120/168 -ComponentData.FuelRodCesium=\u6301\u7eed\u65f6\u95f4: 10,861 \u79d2
\u4ea7\u51fa EU: 10/20/30/40/50
\u4ea7\u751f\u70ed\u91cf: 1/3/8/10/15 -ComponentData.FuelRodCoaxium=\u6301\u7eed\u65f6\u95f4: 20,000 \u79d2
\u4ea7\u51fa EU: 5/10/15/20/25
\u4ea7\u751f\u70ed\u91cf: 0 -ComponentData.FuelRodMox=\u6301\u7eed\u65f6\u95f4: 10,000 \u79d2
\u4ea7\u51fa EU: [5,25)/[10,50)/[15,75)/[20,100)/[25,125) - \u4e0e\u53cd\u5e94\u5806\u6e29\u5ea6\u6210\u7ebf\u6027\u6bd4\u4f8b.
EU \u53cd\u5e94\u5806\u6a21\u5f0f\u4e0b, \u5f53\u5916\u58f3\u6e29\u5ea6<=50%\u65f6\u7684\u4ea7\u70ed\u6548\u7387: 4/12/24/40/60
\u6d41\u4f53\u53cd\u5e94\u5806\u6a21\u5f0f\u4e0b, \u5f53\u5916\u58f3\u6e29\u5ea6>50%\u65f6\u7684\u4ea7\u70ed\u6548\u7387: 8/24/48/80/120 -ComponentData.FuelRodNaquadah=\u6301\u7eed\u65f6\u95f4: 100,000 \u79d2
\u4ea7\u51fa EU: [10,25)/[20,50)/[30,75)/[40,100)/[50,125) - \u4e0e\u53cd\u5e94\u5806\u6e29\u5ea6\u6210\u7ebf\u6027\u6bd4\u4f8b.
EU \u53cd\u5e94\u5806\u6a21\u5f0f\u4e0b, \u5f53\u5916\u58f3\u6e29\u5ea6<=50%\u65f6\u7684\u4ea7\u70ed\u6548\u7387: 4/12/24/40/60
\u6d41\u4f53\u53cd\u5e94\u5806\u6a21\u5f0f\u4e0b, \u5f53\u5916\u58f3\u6e29\u5ea6>50%\u65f6\u7684\u4ea7\u70ed\u6548\u7387: 8/24/48/80/120 -ComponentData.FuelRodThorium=\u6301\u7eed\u65f6\u95f4: 50,000 \u79d2
\u4ea7\u51fa EU: 1/2/3/4/5
\u4ea7\u751f\u70ed\u91cf: 1/3/8/10/15 -ComponentData.FuelRodUranium=\u6301\u7eed\u65f6\u95f4: 20,000 \u79d2
\u4ea7\u51fa EU: 5/10/15/20/25
\u4ea7\u751f\u70ed\u91cf: 4/12/24/40/60 -ComponentData.HeatCapacityReactorPlating=\u589e\u52a0\u6700\u5927\u70ed\u5bb9\u91cf -ComponentData.HeatExchanger=\u70ed\u5bb9\u91cf: 2,500
\u53cd\u5e94\u5806\u70ed\u4ea4\u6362\u7387: 4 heat/s
\u5143\u4ef6\u70ed\u4ea4\u6362\u7387: 12 heat/s -ComponentData.HeatVent=\u70ed\u5bb9\u91cf: 1,000
\u81ea\u6563\u70ed\u7387: 6 heat/s -ComponentData.IridiumNeutronReflector=\u8010\u4e45: \u65e0\u9650 -ComponentData.LzhCondensator=\u70ed\u5bb9\u91cf: 100,000
\u65e0\u6cd5\u88ab\u6563\u70ed\u7247\u51b7\u5374. -ComponentData.NeutronReflector=\u8010\u4e45: 30,000 (MC 1.7.10 \u4e2d\u4e3a 10,000) -ComponentData.OverclockedHeatVent=\u70ed\u5bb9\u91cf: 1,000
\u81ea\u6563\u70ed\u7387: 20 heat/s
\u51b7\u5374\u901f\u5ea6: 36 heat/s -ComponentData.QuadFuelRodCesium=\u6301\u7eed\u65f6\u95f4: 10,861 \u79d2
\u4ea7\u51fa EU: 120/160/200/240/280
\u4ea7\u751f\u70ed\u91cf: 24/40/60/84/112 -ComponentData.QuadFuelRodCoaxium=\u6301\u7eed\u65f6\u95f4: 20,000 \u79d2
\u4ea7\u51fa EU: 60/80/100/120/140
\u4ea7\u751f\u70ed\u91cf: 0 -ComponentData.QuadFuelRodMox=\u6301\u7eed\u65f6\u95f4: 10,000 \u79d2
\u4ea7\u51fa EU: [60,300)/[80,400)/[100,500)/[120,600)/[140,700) - \u4e0e\u53cd\u5e94\u5806\u6e29\u5ea6\u6210\u7ebf\u6027\u6bd4\u4f8b.
EU \u53cd\u5e94\u5806\u6a21\u5f0f\u4e0b, \u5f53\u5916\u58f3\u6e29\u5ea6<=50%\u65f6\u7684\u4ea7\u70ed\u6548\u7387: 96/160/240/336/448
\u6d41\u4f53\u53cd\u5e94\u5806\u6a21\u5f0f\u4e0b, \u5f53\u5916\u58f3\u6e29\u5ea6>50%\u65f6\u7684\u4ea7\u70ed\u6548\u7387: 192/320/480/672/896 -ComponentData.QuadFuelRodNaquadah=\u6301\u7eed\u65f6\u95f4: 100,000 \u79d2
\u4ea7\u51fa EU: [120,300)/[160,400)/[200,500)/[240,600)/[280,700) - \u4e0e\u53cd\u5e94\u5806\u6e29\u5ea6\u6210\u7ebf\u6027\u6bd4\u4f8b.
EU \u53cd\u5e94\u5806\u6a21\u5f0f\u4e0b, \u5f53\u5916\u58f3\u6e29\u5ea6<=50%\u65f6\u7684\u4ea7\u70ed\u6548\u7387: 96/160/240/336/448
\u6d41\u4f53\u53cd\u5e94\u5806\u6a21\u5f0f\u4e0b, \u5f53\u5916\u58f3\u6e29\u5ea6>50%\u65f6\u7684\u4ea7\u70ed\u6548\u7387: 192/320/480/672/896 -ComponentData.QuadFuelRodThorium=\u6301\u7eed\u65f6\u95f4: 50,000 \u79d2
\u4ea7\u51fa EU: 12/16/20/24/28
\u4ea7\u751f\u70ed\u91cf: 24/40/60/84/112 -ComponentData.QuadFuelRodUranium=\u6301\u7eed\u65f6\u95f4: 20,000 \u79d2
\u4ea7\u51fa EU: 60/80/100/120/140
\u4ea7\u751f\u70ed\u91cf: 96/160/240/336/448 -ComponentData.ReactorHeatExchanger=\u70ed\u5bb9\u91cf: 5,000
\u53cd\u5e94\u5806\u70ed\u4ea4\u6362\u7387: 72 heat/s -ComponentData.ReactorHeatVent=\u70ed\u5bb9\u91cf: 1,000
\u81ea\u6563\u70ed\u7387: 5 heat/s
\u51b7\u5374\u901f\u5ea6: 5 heat/s -ComponentData.ReactorPlating=\u5bc6\u5c01\u53cd\u5e94\u5806\u9694\u70ed\u677f\u4e0e\u9ad8\u70ed\u5bb9\u53cd\u5e94\u5806\u9694\u677f\u7684\u5408\u6210\u6750\u6599 -ComponentData.RshCondensator=\u70ed\u5bb9\u91cf: 20,000
\u65e0\u6cd5\u88ab\u6563\u70ed\u7247\u51b7\u5374. -ComponentData.ThickNeutronReflector=\u8010\u4e45: 120,000 (MC 1.7.10 \u4e2d\u4e3a 40,000) - -# ComponentInfo keys are for updating information about a component during a simulation. - -ComponentInfo.BrokeTime=\n %,d \u79d2\u540e\u635f\u574f. -ComponentInfo.CooldownTime=\n\u51b7\u5374\u4e86 %,d \u79d2. -ComponentInfo.GeneratedEU=\n\u4ea7\u751f %,.2f \u4e8e %,.2f EU/\u79d2. -ComponentInfo.GeneratedHeat=\n\u4ea7\u751f %,.0f \u4e8e %,.0f \u70ed\u91cf/\u79d2. -ComponentInfo.ReachedHeat=\n\u4ea7\u751f %,.0f \u4e8e %,.0f \u70ed\u91cf. -ComponentInfo.ReceivedHeat=\n\u6700\u591a\u4ea7\u751f %,.0f \u70ed\u91cf/\u79d2 -ComponentInfo.RemainingHeat=\n\u6a21\u62df\u505c\u6b62\u540e, \u8fd8\u5269\u4f59 %,.0f \u70ed\u91cf. -ComponentInfo.ReplacedTime=\n \u5728 %,d \u79d2\u540e\u88ab\u66ff\u6362. -ComponentInfo.ResidualHeat=\n\u51b7\u5374\u540e\u8fd8\u6709 %,.0f \u70ed\u91cf. -ComponentInfo.UsedCooling=\n\u4f7f\u7528 %,.0f \u4e8e %,.0f \u51b7\u5374. - - -# Keys for component names were originally matched to class names, to allow using reflection to look them up. -# However, refactoring eliminated the "one class for each component type" idea. -# These keys will be used both in the reactor area and the component selection area. - -ComponentName.AdvancedHeatExchanger=\u9ad8\u7ea7\u70ed\u4ea4\u6362\u5668 -ComponentName.AdvancedHeatVent=\u9ad8\u7ea7\u6563\u70ed\u7247 -ComponentName.ComponentHeatExchanger=\u5143\u4ef6\u70ed\u4ea4\u6362\u5668 -ComponentName.ComponentHeatVent=\u5143\u4ef6\u6563\u70ed\u7247 -ComponentName.ContainmentReactorPlating=\u5bc6\u5c01\u53cd\u5e94\u5806\u9694\u70ed\u677f -ComponentName.CoolantCell10k=10k \u51b7\u5374\u5355\u5143 -ComponentName.CoolantCell180kHelium=180k \u6c26\u51b7\u5374\u5355\u5143 -ComponentName.CoolantCell180kNak=180k \u94a0\u94be\u51b7\u5374\u5355\u5143 -ComponentName.CoolantCell30k=30k \u51b7\u5374\u5355\u5143 -ComponentName.CoolantCell360kHelium=360k \u6c26\u51b7\u5374\u5355\u5143 -ComponentName.CoolantCell360kNak=360k \u94a0\u94be\u51b7\u5374\u5355\u5143 -ComponentName.CoolantCell60k=60k \u51b7\u5374\u5355\u5143 -ComponentName.CoolantCell60kHelium=60k \u6c26\u51b7\u5374\u5355\u5143 -ComponentName.CoolantCell60kNak=60k \u94a0\u94be\u51b7\u5374\u5355\u5143 -ComponentName.DualFuelRodCesium=\u53cc\u8054\u71c3\u6599\u68d2 (\u94ef) -ComponentName.DualFuelRodCoaxium=\u53cc\u8054\u71c3\u6599\u68d2 (Coaxium) -ComponentName.DualFuelRodMox=\u53cc\u8054\u71c3\u6599\u68d2 (MOX) -ComponentName.DualFuelRodNaquadah=\u53cc\u8054\u71c3\u6599\u68d2 (\u7845\u5ca9) -ComponentName.DualFuelRodThorium=\u53cc\u8054\u71c3\u6599\u68d2 (\u948d) -ComponentName.DualFuelRodUranium=\u53cc\u8054\u71c3\u6599\u68d2 (\u94c0) -ComponentName.FuelRodCesium=\u71c3\u6599\u68d2 (\u94ef) -ComponentName.FuelRodCoaxium=\u71c3\u6599\u68d2 (Coaxium) -ComponentName.FuelRodMox=\u71c3\u6599\u68d2 (MOX) -ComponentName.FuelRodNaquadah=\u71c3\u6599\u68d2 (\u7845\u5ca9) -ComponentName.FuelRodThorium=\u71c3\u6599\u68d2 (\u948d) -ComponentName.FuelRodUranium=\u71c3\u6599\u68d2 (\u94c0) -ComponentName.HeatCapacityReactorPlating=\u9ad8\u70ed\u5bb9\u53cd\u5e94\u5806\u9694\u677f -ComponentName.HeatExchanger=\u70ed\u4ea4\u6362\u5668 -ComponentName.HeatVent=\u6563\u70ed\u7247 -ComponentName.IridiumNeutronReflector=\u94f1\u4e2d\u5b50\u53cd\u5c04\u677f -ComponentName.LzhCondensator=\u9752\u91d1\u77f3\u51b7\u51dd\u6a21\u5757 -ComponentName.NeutronReflector=\u4e2d\u5b50\u53cd\u5c04\u677f -ComponentName.OverclockedHeatVent=\u8d85\u9891\u6563\u70ed\u7247 -ComponentName.QuadFuelRodCesium=\u56db\u8054\u71c3\u6599\u68d2 (\u94ef) -ComponentName.QuadFuelRodCoaxium=\u56db\u8054\u71c3\u6599\u68d2 (Coaxium) -ComponentName.QuadFuelRodMox=\u56db\u8054\u71c3\u6599\u68d2 (MOX) -ComponentName.QuadFuelRodNaquadah=\u56db\u8054\u71c3\u6599\u68d2 (\u7845\u5ca9) -ComponentName.QuadFuelRodThorium=\u56db\u8054\u71c3\u6599\u68d2 (\u948d) -ComponentName.QuadFuelRodUranium=\u56db\u8054\u71c3\u6599\u68d2 (\u94c0) -ComponentName.ReactorHeatExchanger=\u53cd\u5e94\u5806\u70ed\u4ea4\u6362\u5668 -ComponentName.ReactorHeatVent=\u53cd\u5e94\u5806\u6563\u70ed\u7247 -ComponentName.ReactorPlating=\u53cd\u5e94\u5806\u9694\u677f -ComponentName.RshCondensator=\u7ea2\u77f3\u51b7\u51dd\u6a21\u5757 -ComponentName.ThickNeutronReflector=\u52a0\u539a\u4e2d\u5b50\u53cd\u5c04\u677f - -ComponentTooltip.Broken=\u4e0a\u6b21\u6a21\u62df\u65f6\u5df2\u635f\u574f -ComponentTooltip.ResidualHeat=\u4e0a\u6b21\u6a21\u62df\u540e\u6709\u4f59\u70ed - -Config.CSVCheckbox=\u8f93\u51fa CSV \u6570\u636e -Config.CSVLimit=\u6a21\u62df\u79d2\u6570: -Config.EUReactor=EU \u53cd\u5e94\u5806 -Config.FluidReactor=\u6d41\u4f53\u53cd\u5e94\u5806 -Config.InitialComponentHeat=\u521d\u59cb\u70ed\u91cf: -Config.NoComponentSelected=\u672a\u9009\u62e9\u5143\u4ef6 -Config.OffPulse=\u8109\u51b2\u7684\u5173\u95ed\u6301\u7eed\u65f6\u95f4: -Config.OnPulse=\u8109\u51b2\u7684\u5f00\u542f\u6301\u7eed\u65f6\u95f4: -Config.PlacingReactorPause=\u53cd\u5e94\u5806\u6682\u505c: -Config.PlacingReplacementThreshold=\u9608\u503c: -Config.PulseHelp=(\u53ef\u4ee5\u5c06\u8109\u51b2\u7684\u5f00\u542f\u6301\u7eed\u65f6\u95f4\u8bbe\u7f6e\u4e3a 5,000,000 \u4ee5\u6a21\u62df\u6ca1\u6709\u7ea2\u77f3\u8ba1\u65f6\u7684\u60c5\u51b5) -Config.ReactorCoolantInjectors=\u4f7f\u7528\u53cd\u5e94\u5806\u51b7\u5374\u6db2\u6ce8\u5165\u5668 (\u4ec5\u9650 MC 1.8 \u4ee5\u4e0a) -Config.ReactorPause=\u53cd\u5e94\u5806\u6682\u505c (\u79d2): -Config.ReactorPauseHelp=(\u8fd9\u662f\u53cd\u5e94\u5806\u5728\u66f4\u6362\u8be5\u5143\u4ef6\u65f6\u6682\u505c\u7684\u65f6\u95f4) -Config.ReplacementThreshold=\u66f4\u6362\u9608\u503c: -Config.ReplacementThresholdHelp=(\u8bbe\u7f6e\u4e3a\u9ad8\u4e8e\u5143\u4ef6\u7684\u521d\u59cb\u70ed\u91cf/\u635f\u574f\u503c, \u4ee5\u5728\u5143\u4ef6\u8fc7\u70ed/\u635f\u574f\u65f6\u66f4\u6362\u8be5\u5143\u4ef6, \u6216\u8bbe\u7f6e\u4e3a\u4f4e\u4e8e\u5143\u4ef6\u7684\u521d\u59cb\u70ed\u91cf/\u635f\u574f\u503c, \u4ee5\u66f4\u6362\u5df2\u51b7\u5374\u7684\u5143\u4ef6; \u65e0\u8bba\u6b64\u8bbe\u7f6e\u5982\u4f55, \u5728\u81ea\u52a8\u5316\u8fd0\u884c\u671f\u95f4, \u90fd\u5c06\u66f4\u6362\u635f\u574f\u7684\u5143\u4ef6) -Config.ResumeTemp=\u6062\u590d\u53cd\u5e94\u5806 \u5f53\u5806\u6e29 <= -# Same language string should be usable anywhere "seconds" appears. -Config.Seconds=\u79d2 -Config.SimulationStyle=\u6a21\u62df\u6837\u5f0f: -Config.SuspendTemp=\u6682\u505c\u53cd\u5e94\u5806 \u5f53\u5806\u6e29 >= -Config.SuspendTempHelp=(\u53ef\u4ee5\u5c06\u4e24\u4e2a\u6e29\u5ea6\u8bbe\u7f6e\u4e3a\u4e0e\u7206\u70b8\u6e29\u5ea6\u5339\u914d, \u4ee5\u6a21\u62df\u6ca1\u6709\u6e29\u5ea6\u63a7\u5236\u7684\u60c5\u51b5) - -CSVData.EntryComponentValue=,"%.2f" -CSVData.EntryComponentOutput=,%.0f -CSVData.EntryCoreHeat=,%.0f -CSVData.EntryEUOutput=,"%.2f" -CSVData.EntryHUOutput=,%.0f -CSVData.EntryReactorTick=%d -CSVData.HeaderComponentName=,%s (R%dC%d) -CSVData.HeaderComponentOutput=,%s (R%dC%d) \u8f93\u51fa -CSVData.HeaderCoreHeat=,\u5806\u82af\u70ed\u91cf -CSVData.HeaderEUOutput=,EU \u8f93\u51fa -CSVData.HeaderHUOutput=,HU \u8f93\u51fa -CSVData.HeaderReactorTick=\u53cd\u5e94\u5806\u65f6\u95f4 - -MaterialName.AdvancedAlloy=\u9ad8\u7ea7\u5408\u91d1 -MaterialName.AdvancedCircuit=\u9ad8\u7ea7\u7535\u8def\u677f -MaterialName.Aluminium=\u94dd -MaterialName.BasicCircuit=\u57fa\u7840\u7535\u8def -MaterialName.Beryllium=\u94cd -MaterialName.Bronze=\u9752\u94dc -MaterialName.CesiumFuel=\u5bcc\u96c6\u94ef\u6838\u71c3\u6599 -MaterialName.Coal=\u7164 -MaterialName.CoaxiumFuel=\u5bcc\u96c6 Coaxium \u6838\u71c3\u6599 -MaterialName.Copper=\u94dc -MaterialName.Diamond=\u94bb\u77f3 -MaterialName.DistilledWater=\u84b8\u998f\u6c34 -MaterialName.EmptyCell=\u7a7a\u5355\u5143 -MaterialName.EnrichedNaquadah=\u5bcc\u96c6\u7845\u5ca9 -MaterialName.Glass=\u73bb\u7483 -MaterialName.GlowstoneDust=\u8424\u77f3\u7c89 -MaterialName.Gold=\u91d1 -MaterialName.Graphite=\u77f3\u58a8 -MaterialName.Helium==\u6c26 -MaterialName.Iridium=\u94f1 -MaterialName.IridiumReinforcedPlate=\u5f3a\u5316\u94f1\u677f -MaterialName.Iron=\u94c1 -MaterialName.LapisLazuli=\u9752\u91d1\u77f3 -MaterialName.Lead=\u94c5 -MaterialName.MoxFuel=MOX \u71c3\u6599 -MaterialName.Potassium=\u94be -MaterialName.Redstone=\u7ea2\u77f3 -MaterialName.Rubber=\u6a61\u80f6 -MaterialName.Sodium=\u94a0 -MaterialName.Thorium=\u948d -MaterialName.Tin=\u9521 -MaterialName.UraniumFuel=\u94c0\u71c3\u6599 - -# %s at the end of this string is for optionally showing the range of active time. -Simulation.ActiveTime=\u53cd\u5e94\u5806\u5904\u4e8e\u542f\u52a8\u72b6\u6001\u7684\u65f6\u95f4\u603b\u8ba1 %,d \u79d2 %s .\n -Simulation.ActiveTimeRange=\u0020(%,d \u5230 %,d \u79d2\u4e00\u6b21) -Simulation.ActiveTimeSingle=\u0020(%,d \u79d2\u4e00\u6b21) -Simulation.CancelledAtTick=\u6a21\u62df %,d \u79d2\u540e\u53d6\u6d88\u6a21\u62df.\n -Simulation.ComponentHeating=\u5143\u4ef6\u4ea7\u70ed: \u5e73\u5747: %.2f .\n -Simulation.ComponentsReplaced=\u66f4\u6362\u7684\u5143\u4ef6:\n%s -Simulation.CSVOpenFailure=\u65e0\u6cd5\u6253\u5f00 CSV \u6587\u4ef6\u8fdb\u884c\u8f93\u51fa.\n -Simulation.CycleCompleteTime=%,d \u79d2\u540e\u5faa\u73af\u5b8c\u6210.\n -# This will be used to optionally show extra precision, in format strings where %s is used when %.2f might otherwise be expected. -Simulation.DecimalFormat=#,##0.## -Simulation.Efficiency=\u6548\u7387: \u5e73\u5747: %.2f , \u6700\u5c0f: %.2f , \u6700\u5927: %.2f \n -Simulation.ElapsedTime=\u6a21\u62df\u8017\u65f6 %.2f \u79d2.\n -Simulation.ErrorCooldown=\u9519\u8bef %,d \u6a21\u62df\u51b7\u5374\u65f6\u95f4.\n -Simulation.ErrorReactor=\u6a21\u62df\u53cd\u5e94\u5806\u542f\u52a8\u7684 %d \u79d2\u540e\u53d1\u751f\u9519\u8bef\n -Simulation.EUOutputs=\u5b8c\u6210\u6a21\u62df\u540e\u7684\u603b\u8f93\u51fa: %s EU (\u5e73\u5747: %s EU/t, \u6700\u5c0f: %s EU/t, \u6700\u5927: %s EU/t)\n -Simulation.EUOutputsBeforeDepleted=\u7b2c\u4e00\u6839\u71c3\u6599\u68d2\u8017\u5c3d\u524d\u7684\u603b\u8f93\u51fa: %s EU (\u5e73\u5747: %s EU/t, \u6700\u5c0f: %s EU/t, \u6700\u5927: %s EU/t)\n -Simulation.EUOutputsBeforeBreak=\u4e00\u4e2a\u5143\u4ef6\u635f\u574f\u524d\u7684\u603b\u8f93\u51fa: %s EU (\u5e73\u5747: %s EU/t, \u6700\u5c0f: %s EU/t, \u6700\u5927: %s EU/t)\n -Simulation.ExcessCooling=\u8fc7\u51b7: %.2f\n -Simulation.ExcessHeating=\u8fc7\u70ed: %.2f\n -Simulation.ExplosionPower=\u7206\u70b8\u5a01\u529b: %,.2f\n -Simulation.FirstComponentBrokenDetails=\u7b2c\u4e00\u4e2a\u5143\u4ef6\u635f\u574f: %s \u7b2c %d \u884c %d \u5217, \u7528\u4e86 %d \u79d2.\n -Simulation.FirstRodDepletedDetails=\u7b2c\u4e00\u6839\u71c3\u6599\u68d2\u8017\u5c3d: %s \u7b2c %d \u884c %d \u5217, \u7528\u4e86 %d \u79d2.\n -Simulation.FuelRodsTime=\u71c3\u6599\u68d2 (\u5982\u679c\u6709) \u5728 %,d \u79d2\u540e\u505c\u6b62.\n -Simulation.HeatOutputs=\u5b8c\u5168\u6a21\u62df\u540e\u7684\u603b\u8f93\u51fa: %s HU (\u5e73\u5747: %s HU/t, \u6700\u5c0f: %s HU/t, \u6700\u5927: %s HU/t)\n -Simulation.HeatOutputsBeforeBreak=\u7b2c\u4e00\u4e2a\u5143\u4ef6\u635f\u574f\u4e4b\u524d\u7684\u603b\u8f93\u51fa: %s HU (\u5e73\u5747: %s HU/t, \u6700\u5c0f: %s HU/t, \u6700\u5927: %s HU/t)\n -Simulation.HeatOutputsBeforeDepleted=\u5728\u7b2c\u4e00\u4e2a\u71c3\u6599\u68d2\u8017\u5c3d\u4e4b\u524d\u7684\u603b\u8f93\u51fa: %s HU (\u5e73\u5747: %s HU/t, \u6700\u5c0f: %s HU/t, \u6700\u5927: %s HU/t)\n -Simulation.HullCooling=\u53cd\u5e94\u5806\u51b7\u5374: %,.2f \u5e73\u5747\u4e8e %,.0f \u53ef\u80fd\u503c.\n -Simulation.HullHeating=\u53cd\u5e94\u5806\u4ea7\u70ed: \u5e73\u5747: %,.2f .\n -Simulation.InactiveTime=\u53cd\u5e94\u5806\u5904\u4e8e\u505c\u6b62\u72b6\u6001\u7684\u65f6\u95f4\u603b\u8ba1 %,d \u79d2 %s .\n -Simulation.InactiveTimeRange=\u0020(%,d \u5230 %,d \u79d2\u4e00\u6b21) -Simulation.InactiveTimeSingle=\u0020(%,d \u79d2\u4e00\u6b21) -Simulation.LapisUsed=\u7528\u4e86 %d \u5757\u9752\u91d1\u77f3.\n -Simulation.MaxHeatGenerated=\u4ea7\u751f\u7684\u6700\u5927\u70ed\u91cf (\u5185\u90e8, \u7531\u71c3\u6599\u68d2\u4ea7\u751f): %,.0f\n -Simulation.NoCooldown=\u4e0d\u9700\u8981\u51b7\u5374.\n -Simulation.NoFuelRods=\u6ca1\u6709\u627e\u5230\u71c3\u6599\u68d2! \u6a21\u62df\u8109\u51b2\u5faa\u73af\u65e0\u610f\u4e49! -Simulation.ReactorCooldownTime=\u53cd\u5e94\u5806\u51b7\u5374\u65f6\u95f4\u4e3a %,d \u79d2.\n -Simulation.ReactorHeatBuildup=\u6bcf\u79d2\u53cd\u5e94\u5806\u70ed\u91cf\u7d2f\u79ef (\u6240\u6709\u5143\u4ef6\u90fd\u5b8c\u597d\u65f6): \u6700\u5c0f: %,.0f , \u6700\u5927: %,.0f .\n -Simulation.ReactorMaxTemp=\u53cd\u5e94\u5806\u6700\u9ad8\u6e29\u5ea6: %,.0f\n -Simulation.ReactorMaxTempBeforeDepleted=\u53cd\u5e94\u5806\u6700\u9ad8\u6e29\u5ea6 (\u7b2c\u4e00\u4e2a\u71c3\u6599\u68d2\u8017\u5c3d\u4e4b\u524d): %,.0f\n -Simulation.ReactorMinTemp=\u53cd\u5e94\u5806\u6700\u4f4e\u6e29\u5ea6: %,.0f\n -Simulation.ReactorMinTempBeforeDepleted=\u53cd\u5e94\u5806\u6700\u4f4e\u6e29\u5ea6 (\u7b2c\u4e00\u4e2a\u71c3\u6599\u68d2\u8017\u5c3d\u4e4b\u524d): %,.0f\n -Simulation.ReactorOverheatedTime=\u53cd\u5e94\u5806\u5728 %,d \u79d2\u65f6\u8fc7\u70ed.\n -Simulation.ReactorRemainingHeat=\u6a21\u62df\u5b8c\u6210\u540e, \u53cd\u5e94\u5806\u7684\u70ed\u91cf\u4fdd\u6301\u5728 %,.0f .\n -Simulation.ReactorResidualHeat=\u53cd\u5e94\u5806\u5728\u51b7\u5374 %,d \u79d2\u540e\u70ed\u91cf\u4ecd\u4fdd\u6301\u5728 %,.0f .\n -Simulation.RedstoneUsed=\u4f7f\u7528\u4e86 %d \u5757\u7ea2\u77f3.\n -Simulation.Started=\u6a21\u62df\u5f00\u59cb.\n -Simulation.TimeToBelow50=\u53cd\u5e94\u5806\u70ed\u91cf\u5c06\u4f1a\u5728 %d \u79d2\u540e\u9996\u6b21\u964d\u81f3 50%% \u4ee5\u4e0b (\u5728\u9ad8\u4e8e 50%% \u4e4b\u540e).\n -Simulation.TimeToBurn=\u53cd\u5e94\u5806\u5c06\u5728 %d \u79d2\u540e\u8fbe\u5230"\u71c3\u70e7"\u6e29\u5ea6.\n -Simulation.TimeToEvaporate=\u53cd\u5e94\u5806\u5c06\u5728 %d \u79d2\u540e\u8fbe\u5230"\u84b8\u53d1"\u6e29\u5ea6.\n -Simulation.TimeToHurt=\u53cd\u5e94\u5806\u5c06\u5728 %d \u79d2\u540e\u8fbe\u5230"\u4f24\u5bb3"\u6e29\u5ea6.\n -Simulation.TimeToLava=\u53cd\u5e94\u5806\u5c06\u5728 %d \u79d2\u540e\u8fbe\u5230"\u7194\u5316"\u6e29\u5ea6.\n -# Note: The "e" is deliberately dropped from "Explode" in the key name so that it will sort after the others. -Simulation.TimeToXplode=\u53cd\u5e94\u5806\u5c06\u5728 %d \u79d2\u5185\u7206\u70b8.\n -Simulation.TimeWithoutExploding=\n\u53cd\u5e94\u5806\u8fd0\u884c %,d \u79d2\u540e\u6ca1\u6709\u7206\u70b8.\n -Simulation.TotalCellCooling=\u603b\u71c3\u6599\u68d2\u51b7\u5374 (\u5cf0\u503c\u4f7f\u7528): %,.2f\n -Simulation.TotalCondensatorCooling=\u51b7\u51dd\u5668\u603b\u51b7\u5374\u91cf (\u5cf0\u503c\u4f7f\u7528\u91cf): %,.2f\n -Simulation.TotalCooldownTime=\u5176\u4ed6\u5143\u4ef6\u9700\u8981 %,d \u79d2\u6765\u51b7\u5374 (\u5c3d\u53ef\u80fd\u591a\u7684\u65f6\u95f4).\n -Simulation.TotalVentCooling=\u603b\u7a7a\u6c14\u51b7\u5374 (\u5cf0\u503c\u7528\u6cd5, \u7406\u8bba\u6700\u5927\u503c): %,.2f \u4e8e %,.2f\n -Simulation.VentCooling=\u6563\u70ed\u7247\u51b7\u5374: %,.2f \u5e73\u5747\u4e8e %,.0f \u53ef\u80fd\u503c.\n - -UI.AdvancedTab=\u9ad8\u7ea7 -#Needs to be heavily abbreviated to fit on the button. -UI.AutomateButton=a -UI.AutomateButtonFont=Arial 10 -UI.AutomatedReactor=\u81ea\u52a8\u5316\u53cd\u5e94\u5806 -UI.AutomationTooltip=\u5355\u51fb\u6b64\u5904\u53ef\u5b9a\u4e49\u6b64\u5143\u4ef6\u7684\u81ea\u52a8\u5316\u89c4\u5219. -UI.CancelButton=\u53d6\u6d88 -UI.ChosenComponentRowCol=%s \u7b2c %d \u884c %d \u5217 -UI.ClearGridButton=\u6e05\u9664 -UI.CodeLabel=\u4ee3\u7801: -UI.ComparisonTab=\u6bd4\u8f83\u65b9\u5f0f -UI.ComponentAutomationTab=\u5143\u4ef6\u81ea\u52a8\u5316 -#Needs to be heavily abbreviated to fit on the button. -UI.ComponentInfoButton=i -UI.ComponentInfoButtonFont=Arial 10 -UI.ComponentInfoButtonTooltip=\u5355\u51fb\u4ee5\u83b7\u53d6\u6709\u5173\u6b64\u5143\u4ef6\u7684\u4fe1\u606f -UI.ComponentInfoDefault=\u8bf7\u8fd0\u884c\u6a21\u62df\u5e76\u9009\u62e9\u4e0a\u9762\u53cd\u5e94\u5806\u7f51\u683c\u4e2d\u7684\u5143\u4ef6\u4ee5\u67e5\u770b\u5176\u8be6\u7ec6\u4fe1\u606f. -UI.ComponentInfoLastSimRowCol=%s \u7b2c %d \u884c %d \u5217\n%s -UI.ComponentListTab=\u5143\u4ef6\u6e05\u5355 -UI.ComponentPlacingDefault=\u653e\u7f6e\u5143\u4ef6: \u65e0 -UI.ComponentPlacingSpecific=\u653e\u7f6e\u5143\u4ef6: %s -UI.ComponentTab=\u5143\u4ef6 -UI.CopyCodeButton=\u590d\u5236\u4ee3\u7801 -UI.CopyComparisonData=\u590d\u5236\u6bd4\u8f83\u6570\u636e -UI.CSVBrowseButton=\u6d4f\u89c8 -UI.CSVFileDefault=\u672a\u9009\u62e9\u6587\u4ef6 -UI.CSVHelp=\u8b66\u544a:
  1. \u542f\u7528 CSV \u8f93\u51fa\u540e, \u6a21\u62df\u8fd0\u884c\u53ef\u80fd\u4f1a\u6162\u5f97\u591a, \u5c24\u5176\u662f\u6240\u9009\u6587\u4ef6\u4f4d\u4e8e\u673a\u68b0\u786c\u76d8\u4e0a\u65f6.
  2. \u7528\u6237\u5e94\u786e\u4fdd\u76ee\u6807\u9a71\u52a8\u5668\u6709\u8db3\u591f\u7684\u7a7a\u95f4\u5bb9\u7eb3 CSV \u6587\u4ef6.
  3. \u9664\u975e\u624b\u52a8\u66f4\u6539\u76ee\u6807, \u5426\u5219\u5176\u4ed6\u6a21\u62df\u5c06\u8986\u76d6 CSV \u6587\u4ef6.
-UI.CSVTab=CSV -UI.EnableGT508Components=\u542f\u7528 GT 5.08 \u5143\u4ef6 -UI.EnableGT509Components=\u542f\u7528 GT 5.09 \u5143\u4ef6 -UI.ExpandAdvancedAlloy=\u5c06\u9ad8\u7ea7\u5408\u91d1\u6269\u5c55\u6210\u5143\u4ef6\u6750\u6599 (\u4f7f\u7528\u683c\u96f7\u79d1\u6280\u65f6\u65e0\u6548) -UI.GregTechVersion=\u683c\u96f7\u79d1\u6280 \u7248\u672c: -UI.GregTechVersionNone=\u65e0 -UI.GT509ReactorBehavior=\u4f7f\u7528 GT 5.09 \u53cd\u5e94\u5806\u7279\u6027 (\u71c3\u6599\u68d2\u4ea7\u751f 2 \u500d\u7684\u57fa\u672c EU \u751f\u6210\u91cf, \u65e0\u8bba\u6b64\u8bbe\u7f6e\u5982\u4f55, \u53ea\u9002\u7528\u4e8e GT 5.09 \u7684\u71c3\u6599\u68d2) -UI.InitialHeatDisplay=\u0020(\u521d\u59cb\u70ed\u91cf: %,d) -UI.InitialReactorHeat=\u53cd\u5e94\u5806\u521d\u59cb\u70ed\u91cf: -UI.LockInTabCode=\u9501\u5b9a\u9009\u9879\u5361\u4ee3\u7801 -UI.MainTitle=\u5de5\u4e1a2 \u5b9e\u9a8c\u7248 \u6838\u7535\u6a21\u62df\u5668 -UI.MaterialDecimalFormat=#,##0.## -UI.MaterialsTab=\u6750\u6599 -UI.MaxHeatDefault=/10,000 -UI.MaxHeatSpecific=/%,.0f -UI.MaxSimulationTicks=\u6700\u5927\u6a21\u62df\u65f6\u95f4: -UI.MaxSimulationTicksTooltip=\u5373\u4f7f\u53cd\u5e94\u5806\u6ca1\u6709\u7206\u70b8\u6216\u505c\u6b62\u8f93\u51fa HU \u6216 EU, \u5728\u957f\u65f6\u95f4\u6a21\u62df\u540e, \u4e5f\u4f1a\u8feb\u4f7f\u6a21\u62df\u505c\u6b62\u3002 -UI.MinecraftVersion=Minecraft \u7248\u672c: -UI.NoComponentLastSimRowCol=\u5728\u4e0a\u6b21\u6a21\u62df\u671f\u95f4\u7b2c %d \u884c %d \u5217 \u6ca1\u6709\u5143\u4ef6. -UI.NoComponentRowCol=\u7b2c %d \u884c %d \u5217 \u6ca1\u6709\u5143\u4ef6. -UI.NoSimulationRun=\u5c1a\u672a\u8fd0\u884c\u6a21\u62df. -UI.OnlyShowDiffData=\u53ea\u663e\u793a\u660e\u663e\u4e0d\u540c\u7684\u6570\u636e -UI.PasteCodeButton=\u7c98\u8d34\u4ee3\u7801 -UI.PulseConfigurationTab=\u8109\u51b2\u914d\u7f6e -UI.PulsedReactor=\u8109\u51b2\u578b\u53cd\u5e94\u5806 -UI.RemoveAddonComponentsTitle=\u627e\u5230\u9644\u52a0\u5143\u4ef6 -UI.RemoveGT508ComponentsText=\u5f53\u524d\u8bbe\u8ba1\u4e2d\u53d1\u73b0 GT 5.08 \u7684\u5143\u4ef6\u3002\u662f\u5426\u79fb\u9664\u5b83\u4eec? -UI.RemoveGT509ComponentsText=\u5f53\u524d\u8bbe\u8ba1\u4e2d\u53d1\u73b0 GT 5.09 \u7684\u5143\u4ef6\u3002\u662f\u5426\u79fb\u9664\u5b83\u4eec? -UI.ResetPulseConfig=\u91cd\u7f6e\u8109\u51b2\u914d\u7f6e -UI.ShowComponentDetailButtons=\u663e\u793a\u5143\u4ef6\u8be6\u7ec6\u4fe1\u606f\u6309\u94ae -UI.ShowComponentPreconfigControls=\u663e\u793a\u5143\u4ef6\u9884\u914d\u7f6e\u63a7\u4ef6 -UI.ShowOldStyleReactorCode=\u663e\u793a\u65e7 (2.3.1 \u4e4b\u524d\u7248\u672c) \u53cd\u5e94\u5806\u4ee3\u7801 -UI.SimulateButton=\u6a21\u62df -UI.SimulationTab=\u6a21\u62df -UI.SimulationTypeAutomation=\u8109\u51b2\u81ea\u52a8\u5316 -UI.SimulationTypePulsed=\u8109\u51b2\u578b\u5faa\u73af -UI.SimulationTypeSimple=\u7b80\u5355\u578b\u5faa\u73af -UI.TemperatureEffectsDefault=\u71c3\u70e7: 4,000 \u84b8\u53d1: 5,000 \u4f24\u5bb3: 7,000 \u7194\u5316: 8,500 \u7206\u70b8: 10,000 -UI.TemperatureEffectsSpecific=\u71c3\u70e7: %,d \u84b8\u53d1: %,d \u4f24\u5bb3: %,d \u7194\u5316: %,d \u7206\u70b8: %,d -UI.TexturePackBrowseButton=\u6d4f\u89c8 -UI.TexturePackClearButton=\u6e05\u9664 -UI.TexturePackDefault=\u6750\u8d28\u5305: \u672a\u9009\u62e9\u6587\u4ef6 -UI.TexturePackHelp=(\u91cd\u65b0\u542f\u52a8\u6a21\u62df\u5668\u4ee5\u67e5\u770b\u65b0\u6750\u8d28) -UI.TexturePackSpecific=\u6750\u8d28\u5305: %s -UI.UseGTRecipes=\u4f7f\u7528\u683c\u96f7\u79d1\u6280\u914d\u65b9\u5236\u4f5c\u5143\u4ef6\u6750\u6599 (\u5982\u9002\u7528\u4e14\u660e\u786e) -UI.UseUfcForCoolantCells=\u4f7f\u7528\u901a\u7528\u6d41\u4f53\u5355\u5143\u4f5c\u4e3a\u51b7\u5374\u5242 (\u4e0e\u683c\u96f7\u79d1\u6280\u914d\u65b9\u4e0d\u517c\u5bb9) -UI.VersionNumber=\u7248\u672c %s - -Warning.DepletedIsotope=\u5220\u9664\u4e86 (\u8fd1\u8870\u53d8\u94c0\u68d2) \u4f4d\u4e8e\u7b2c %d \u884c %d \u5217.\n -Warning.DualPlutonium=\u5220\u9664\u4e86 (\u53cc\u8054\u71c3\u6599\u68d2 (\u949a)) \u4f4d\u4e8e\u7b2c %d \u884c %d \u5217.\n -Warning.Heating=\u5220\u9664\u4e86 (\u52a0\u70ed\u5143\u4ef6) \u4f4d\u4e8e\u7b2c %d \u884c %d \u5217.\n -Warning.InvalidReactorCode=\u65e0\u6548\u7684\u53cd\u5e94\u5806\u4ee3\u7801: %s -Warning.Plutonium=\u5220\u9664\u4e86 (\u71c3\u6599\u68d2 (\u949a)) \u4f4d\u4e8e\u7b2c %d \u884c %d \u5217.\n -Warning.QuadPlutonium=\u5220\u9664\u4e86 (\u56db\u8054\u71c3\u6599\u68d2 (\u949a)) \u4f4d\u4e8e\u7b2c %d \u884c %d \u5217.\n -Warning.Title=\u8b66\u544a -Warning.Unrecognized=\u5220\u9664\u4e86\u65e0\u6cd5\u8bc6\u522b\u7684\u5143\u4ef6 (id %d) \u4f4d\u4e8e\u7b2c %d \u884c %d \u5217.\n diff --git a/src/main/java/Ic2ExpReactorPlanner/MaterialsList.java b/src/main/java/Ic2ExpReactorPlanner/MaterialsList.java deleted file mode 100644 index e798f2d44f..0000000000 --- a/src/main/java/Ic2ExpReactorPlanner/MaterialsList.java +++ /dev/null @@ -1,302 +0,0 @@ -package Ic2ExpReactorPlanner; - -import static Ic2ExpReactorPlanner.BundleHelper.getI18n; -import Ic2ExpReactorPlanner.components.ReactorItem; -import java.text.DecimalFormat; -import java.util.HashMap; -import java.util.Map; -import java.util.SortedMap; -import java.util.SortedSet; -import java.util.TreeMap; -import java.util.TreeSet; - -/** - * Represents a list of materials (such as for an IndustrialCraft2 Nuclear Reactor and components). - * @author Brian McCloud - */ -public final class MaterialsList { - - private final SortedMap materials = new TreeMap<>(); - - private static boolean useGTRecipes = false; - private static boolean useUfcForCoolantCells = false; - private static boolean expandAdvancedAlloy = false; - private static String gtVersion = "none"; - - // pre-load localized material names as constants to make code more readable. - public static final String ALUMINIUM = getI18n("MaterialName.Aluminium"); - public static final String BERYLLIUM = getI18n("MaterialName.Beryllium"); - public static final String BRONZE = getI18n("MaterialName.Bronze"); - public static final String CALLISTOICEDUST = getI18n("MaterialName.CallistoIceDust"); - public static final String CESIUM = getI18n("MaterialName.CesiumFuel"); - public static final String COAL = getI18n("MaterialName.Coal"); - public static final String COAXIUM = getI18n("MaterialName.CoaxiumFuel"); - public static final String COPPER = getI18n("MaterialName.Copper"); - public static final String DIAMOND = getI18n("MaterialName.Diamond"); - public static final String DISTILLED_WATER = getI18n("MaterialName.DistilledWater"); - // Since GT 5.09 allows different materials for making the "empty cell" (steel, tin, or PTFE), it is treated as a primitive material for GT recipes instead of a crafted item that can be further broken down. - public static final String EMPTY_CELL = getI18n("MaterialName.EmptyCell"); - public static final String ENRICHEDNAQUADAH = getI18n("MaterialName.EnrichedNaquadah"); - public static final String FLUXEDELECTRUM = getI18n("MaterialName.FluxedElectrum");//too long - public static final String GOLD = getI18n("MaterialName.Gold"); - public static final String GRAPHITE = getI18n("MaterialName.Graphite"); - public static final String GLASS = getI18n("MaterialName.Glass"); - public static final String GLOWSTONE = getI18n("MaterialName.GlowstoneDust"); - public static final String HELIUM = getI18n("MaterialName.Helium"); - public static final String IRIDIUM = getI18n("MaterialName.Iridium"); - public static final String IRON = getI18n("MaterialName.Iron"); - public static final String LAPIS = getI18n("MaterialName.LapisLazuli"); - public static final String LEAD = getI18n("MaterialName.Lead"); - public static final String LEDOXDUST = getI18n("MaterialName.LedoxDust"); - public static final String MOX = getI18n("MaterialName.MoxFuel"); - public static final String NAQUADRIA = getI18n("MaterialName.Naquadria"); - public static final String PLATINUM = getI18n("MaterialName.Platinum"); - public static final String POTASSIUM = getI18n("MaterialName.Potassium"); - public static final String REDSTONE = getI18n("MaterialName.Redstone"); - public static final String REINFORCEDGLASS = getI18n("MaterialName.ReinforcedGlass");//alt recipes - public static final String RUBBER = getI18n("MaterialName.Rubber"); - public static final String SODIUM = getI18n("MaterialName.Sodium"); - public static final String THORIUM = getI18n("MaterialName.Thorium"); - public static final String TIBERIUM = getI18n("MaterialName.Tiberium"); - public static final String TIN = getI18n("MaterialName.Tin"); - public static final String TUNGSTEN = getI18n("MaterialName.Tungsten"); - public static final String URANIUM = getI18n("MaterialName.UraniumFuel"); - - // Special materials lists for items that may expand differently. - public static MaterialsList basicCircuit = new MaterialsList(IRON, 2, REDSTONE, 2, COPPER, 6, RUBBER); - public static MaterialsList advancedCircuit = new MaterialsList(basicCircuit, 4, REDSTONE, 2, LAPIS, 2, GLOWSTONE); - public static MaterialsList alloy = new MaterialsList(getI18n("MaterialName.AdvancedAlloy")); - public static MaterialsList coolantCell = new MaterialsList(1.0 / 3, TIN, DISTILLED_WATER, LAPIS); - public static MaterialsList iridiumPlate = new MaterialsList(4, IRIDIUM, 4, alloy, DIAMOND); - - // some materials lists for crafted items that are part of reactor components without themselves being reactor components. - public static final MaterialsList TIN_ITEM_CASING = new MaterialsList(0.5, TIN); - public static final MaterialsList COIL = new MaterialsList(IRON, 8.0 / 3, COPPER); - public static final MaterialsList ELECTRIC_MOTOR = new MaterialsList(IRON, 2, COIL, 2, TIN_ITEM_CASING); - public static final MaterialsList IRON_BARS = new MaterialsList(6.0 / 16, IRON); - public static final MaterialsList GLASS_PANE = new MaterialsList(6.0 / 16, GLASS); - public static final MaterialsList TIN_ALLOY = new MaterialsList(0.5, TIN, 0.5, IRON); - - - private static Map componentMaterialsMap = buildComponentMaterialsMap(); - - /** - * Creates an empty materials list. - */ - public MaterialsList() { - // fields are initialized when declared, so no code is needed in this constructor. - } - - /** - * Creates a materials list with the specified items in it. - * @param materials the materials to add, which can be strings that each represent a single material or other MaterialsList objects, and either can be preceded by a number as a count. - * @throws IllegalArgumentException if other object types are passed as arguments. - */ - public MaterialsList(Object... materials) { - add(materials); - } - - /** - * Adds the specified items to this materials list. - * @param materials the materials to add, which can be strings that each represent a single material or other MaterialsList objects, and either can be preceded by a number as a count. - * @throws IllegalArgumentException if other object types are passed as arguments. - */ - public void add(Object... materials) { - double itemCount = 1; - for (Object material : materials) { - if (material instanceof String) { - final String materialName = (String)material; - if (this.materials.containsKey(materialName)) { - this.materials.put(materialName, this.materials.get(materialName) + itemCount); - } else { - this.materials.put(materialName, itemCount); - } - itemCount = 1; - } else if (material instanceof Number) { - itemCount = ((Number)material).doubleValue(); - } else if (material instanceof MaterialsList) { - for (Map.Entry entrySet : ((MaterialsList)material).materials.entrySet()) { - if (this.materials.containsKey(entrySet.getKey())) { - this.materials.put(entrySet.getKey(), this.materials.get(entrySet.getKey()) + itemCount * entrySet.getValue()); - } else { - this.materials.put(entrySet.getKey(), itemCount * entrySet.getValue()); - } - } - itemCount = 1; - } else { - throw new IllegalArgumentException("Invalid material type: " + material.getClass().getName()); - } - } - } - - @Override - public String toString() { - StringBuilder result = new StringBuilder(1000); - DecimalFormat materialDecimalFormat = new DecimalFormat(getI18n("UI.MaterialDecimalFormat")); - for (Map.Entry entrySet : materials.entrySet()) { - double count = entrySet.getValue(); - String formattedNumber = materialDecimalFormat.format(count); - result.append(String.format("%s %s\n", formattedNumber, entrySet.getKey())); //NOI18N - } - return result.toString(); - } - - public String buildComparisonString(MaterialsList rhs, boolean alwaysDiff) { - StringBuilder result = new StringBuilder(1000); - SortedSet keys = new TreeSet<>(materials.keySet()); - keys.addAll(rhs.materials.keySet()); - DecimalFormat comparisonDecimalFormat = new DecimalFormat(getI18n("Comparison.CompareDecimalFormat")); - DecimalFormat simpleDecimalFormat = new DecimalFormat(getI18n("Comparison.SimpleDecimalFormat")); - for (String key : keys) { - double left = 0; - if (materials.containsKey(key)) { - left = materials.get(key); - } - double right = 0; - if (rhs.materials.containsKey(key)) { - right = rhs.materials.get(key); - } - String color = "orange"; - if (left < right) { - color = "green"; - } else if (left > right) { - color = "red"; - } - if (alwaysDiff || left != right) { - result.append(String.format(getI18n("Comparison.MaterialsEntry"), color, - comparisonDecimalFormat.format(left - right), key, - simpleDecimalFormat.format(left), - simpleDecimalFormat.format(right))); - } - } - return result.toString(); - } - - public static void setUseUfcForCoolantCells(boolean value) { - useUfcForCoolantCells = value; - if (value) { - coolantCell = new MaterialsList(4, TIN_ITEM_CASING, GLASS_PANE, DISTILLED_WATER, LAPIS); - } else { - coolantCell = new MaterialsList(1.0 / 3, TIN, DISTILLED_WATER, LAPIS); - } - componentMaterialsMap = buildComponentMaterialsMap(); - } - - public static void setExpandAdvancedAlloy(boolean value) { - expandAdvancedAlloy = value; - if (value) { - alloy = new MaterialsList(3.0 / 2, IRON, 3.0 / 2, BRONZE, 3.0 / 2, TIN); - } else { - alloy = new MaterialsList(getI18n("MaterialName.AdvancedAlloy")); - } - iridiumPlate = new MaterialsList(4, IRIDIUM, 4, alloy, DIAMOND); - componentMaterialsMap = buildComponentMaterialsMap(); - } - - public static void setGTVersion(String value) { - gtVersion = value; - if ("5.08".equals(value) || "5.09".equals(value)) { - coolantCell = new MaterialsList(EMPTY_CELL, DISTILLED_WATER, LAPIS); - alloy = new MaterialsList(getI18n("MaterialName.AdvancedAlloy")); - basicCircuit = new MaterialsList(getI18n("MaterialName.BasicCircuit")); - advancedCircuit = new MaterialsList(getI18n("MaterialName.AdvancedCircuit")); - } else { - basicCircuit = new MaterialsList(IRON, 2, REDSTONE, 2, COPPER, 6, RUBBER); - advancedCircuit = new MaterialsList(basicCircuit, 4, REDSTONE, 2, LAPIS, 2, GLOWSTONE); - if (useUfcForCoolantCells) { - coolantCell = new MaterialsList(4, TIN_ITEM_CASING, GLASS_PANE, DISTILLED_WATER, LAPIS); - } else { - coolantCell = new MaterialsList(1.0 / 3, TIN, DISTILLED_WATER, LAPIS); - } - if (expandAdvancedAlloy) { - alloy = new MaterialsList(3.0 / 2, IRON, 3.0 / 2, BRONZE, 3.0 / 2, TIN); - } else { - alloy = new MaterialsList(getI18n("MaterialName.AdvancedAlloy")); - } - } - iridiumPlate = new MaterialsList(4, IRIDIUM, 4, alloy, DIAMOND); - componentMaterialsMap = buildComponentMaterialsMap(); - } - - public static MaterialsList getMaterialsForComponent(ReactorItem component) { - return componentMaterialsMap.get(component.baseName); - } - - private static Map buildComponentMaterialsMap() { - Map result = new HashMap<>(63);//result.put+2? Added 14, but I can't really tell if that's right - result.put("fuelRodUranium", new MaterialsList(IRON, URANIUM)); - result.put("dualFuelRodUranium", new MaterialsList(IRON, 2, result.get("fuelRodUranium"))); - result.put("quadFuelRodUranium", new MaterialsList(3, IRON, 2, COPPER, 4, result.get("fuelRodUranium"))); - result.put("fuelRodMox", new MaterialsList(IRON, MOX)); - result.put("dualFuelRodMox", new MaterialsList(IRON, 2, result.get("fuelRodMox"))); - result.put("quadFuelRodMox", new MaterialsList(3, IRON, 2, COPPER, 4, result.get("fuelRodMox"))); - if ("5.09".equals(gtVersion)) { - result.put("neutronReflector", new MaterialsList(6, TIN_ALLOY, 2, GRAPHITE, BERYLLIUM)); - result.put("thickNeutronReflector", new MaterialsList(4, result.get("neutronReflector"), 2, BERYLLIUM)); - } else { - result.put("neutronReflector", new MaterialsList(COPPER, 4, TIN, 4, COAL)); - result.put("thickNeutronReflector", new MaterialsList(4, result.get("neutronReflector"), 5, COPPER)); - } - if ("5.08".equals(gtVersion) || "5.09".equals(gtVersion)) { - result.put("heatVent", new MaterialsList(4, ALUMINIUM, 4, IRON_BARS)); - } else { - result.put("heatVent", new MaterialsList(ELECTRIC_MOTOR, 4, IRON, 4, IRON_BARS)); - } - result.put("advancedHeatVent", new MaterialsList(2, result.get("heatVent"), 6, IRON_BARS, DIAMOND)); - result.put("reactorHeatVent", new MaterialsList(result.get("heatVent"), 8, COPPER)); - result.put("componentHeatVent", new MaterialsList(result.get("heatVent"), 4, TIN, 4, IRON_BARS)); - result.put("overclockedHeatVent", new MaterialsList(result.get("reactorHeatVent"), 4, GOLD)); - result.put("coolantCell10k", new MaterialsList(coolantCell, 4, TIN)); - result.put("coolantCell30k", new MaterialsList(3, result.get("coolantCell10k"), 6, TIN)); - result.put("coolantCell60k", new MaterialsList(2, result.get("coolantCell30k"), 6, TIN, IRON)); - result.put("heatExchanger", new MaterialsList(basicCircuit, 3, TIN, 5, COPPER)); - result.put("advancedHeatExchanger", new MaterialsList(2, result.get("heatExchanger"), 2, basicCircuit, COPPER, 4, LAPIS)); - result.put("coreHeatExchanger", new MaterialsList(result.get("heatExchanger"), 8, COPPER)); - result.put("componentHeatExchanger", new MaterialsList(result.get("heatExchanger"), 4, GOLD)); - result.put("reactorPlating", new MaterialsList(LEAD, alloy)); - result.put("heatCapacityReactorPlating", new MaterialsList(result.get("reactorPlating"), 8, COPPER)); - if ("5.08".equals(gtVersion) || "5.09".equals(gtVersion)) { - result.put("containmentReactorPlating", new MaterialsList(result.get("reactorPlating"), LEAD)); - } else { - result.put("containmentReactorPlating", new MaterialsList(result.get("reactorPlating"), 2, alloy)); - } - result.put("rshCondensator", new MaterialsList(result.get("heatVent"), result.get("heatExchanger"), 7, REDSTONE)); - result.put("lzhCondensator", new MaterialsList(2, result.get("rshCondensator"), result.get("reactorHeatVent"), result.get("coreHeatExchanger"), 9, LAPIS, 4, REDSTONE)); - result.put("fuelRodThorium", new MaterialsList(IRON, 3, THORIUM)); - result.put("dualFuelRodThorium", new MaterialsList(IRON, 2, result.get("fuelRodThorium"))); - result.put("quadFuelRodThorium", new MaterialsList(3, IRON, 2, COPPER, 4, result.get("fuelRodThorium"))); - result.put("coolantCellHelium60k", new MaterialsList(EMPTY_CELL, HELIUM, 4, TIN)); - result.put("coolantCellHelium180k", new MaterialsList(3, result.get("coolantCellHelium60k"), 6, TIN)); - result.put("coolantCellHelium360k", new MaterialsList(2, result.get("coolantCellHelium180k"), 6, TIN, 9, COPPER)); - result.put("coolantCellNak60k", new MaterialsList(result.get("coolantCell10k"), 4, TIN, 2, POTASSIUM, 2, SODIUM)); - result.put("coolantCellNak180k", new MaterialsList(3, result.get("coolantCellNak60k"), 6, TIN)); - result.put("coolantCellNak360k", new MaterialsList(2, result.get("coolantCellNak180k"), 6, TIN, 9, COPPER)); - result.put("iridiumNeutronReflector", new MaterialsList(6, result.get("thickNeutronReflector"), 18, COPPER, iridiumPlate)); - result.put("fuelRodNaquadah", new MaterialsList(IRON, 3, ENRICHEDNAQUADAH)); - result.put("dualFuelRodNaquadah", new MaterialsList(IRON, 2, result.get("fuelRodNaquadah"))); - result.put("quadFuelRodNaquadah", new MaterialsList(3, IRON, 2, COPPER, 4, result.get("fuelRodNaquadah"))); - result.put("fuelRodCoaxium", new MaterialsList(4, IRIDIUM, 36, DIAMOND, 3, COAXIUM)); - result.put("dualFuelRodCoaxium", new MaterialsList(IRON, 2, result.get("fuelRodCoaxium"))); - result.put("quadFuelRodCoaxium", new MaterialsList(3, IRON, 2, COPPER, 4, result.get("fuelRodCoaxium"))); - result.put("fuelRodCesium", new MaterialsList(IRON, 3, CESIUM)); - result.put("dualFuelRodCesium", new MaterialsList(IRON, 2, result.get("fuelRodCesium"))); - result.put("quadFuelRodCesium", new MaterialsList(3, IRON, 2, COPPER, 4, result.get("fuelRodCesium"))); - result.put("fuelRodNaquadahGTNH", new MaterialsList(4, IRON, 4, TUNGSTEN, 1, PLATINUM, 3, ENRICHEDNAQUADAH)); - result.put("dualFuelRodNaquadahGTNH", new MaterialsList(IRON, TUNGSTEN, 2, result.get("fuelRodNaquadahGTNH"))); - result.put("quadFuelRodNaquadahGTNH", new MaterialsList(3, IRON, 3, TUNGSTEN, 4, result.get("fuelRodNaquadahGTNH"))); - result.put("fuelRodNaquadria", new MaterialsList(4, IRON, 4, TUNGSTEN, 1, PLATINUM, 3, NAQUADRIA)); - result.put("dualFuelRodNaquadria", new MaterialsList(IRON, TUNGSTEN, 2, result.get("fuelRodNaquadria"))); - result.put("quadFuelRodNaquadria", new MaterialsList(3, IRON, 3, TUNGSTEN, 4, result.get("fuelRodNaquadria"))); - result.put("fuelRodTiberium", new MaterialsList(4, IRON, 4, TUNGSTEN, 1, PLATINUM, 3, TIBERIUM)); - result.put("dualFuelRodTiberium", new MaterialsList(IRON, TUNGSTEN, 2, result.get("fuelRodTiberium"))); - result.put("quadFuelRodTiberium", new MaterialsList(3, IRON, 3, TUNGSTEN, 4, result.get("fuelRodTiberium"))); - result.put("fuelRodTheCore", new MaterialsList(96, IRON, 96, TUNGSTEN, 128, TIBERIUM, 32, result.get("fuelRodNaquadah"))); - result.put("coolantCellSpace180k", new MaterialsList(0.5, CALLISTOICEDUST, 0.5, LEDOXDUST, 1000, DISTILLED_WATER, LAPIS, REINFORCEDGLASS, 2, IRON, 2, TUNGSTEN)); - result.put("coolantCellSpace360k", new MaterialsList(1.5, IRON, 1.5, TUNGSTEN, 2, result.get("coolantCellSpace180k"))); - result.put("coolantCellSpace540k", new MaterialsList(3, IRON, 3, TUNGSTEN, 3, result.get("coolantCellSpace180k"))); - result.put("coolantCellSpace1080k", new MaterialsList(3, IRON, 3, TUNGSTEN, 9, FLUXEDELECTRUM, 3, result.get("coolantCellSpace540k"))); - - return result; - } - -} diff --git a/src/main/java/Ic2ExpReactorPlanner/Reactor.java b/src/main/java/Ic2ExpReactorPlanner/Reactor.java index 6febc91b90..83b6c511ad 100644 --- a/src/main/java/Ic2ExpReactorPlanner/Reactor.java +++ b/src/main/java/Ic2ExpReactorPlanner/Reactor.java @@ -5,11 +5,11 @@ */ package Ic2ExpReactorPlanner; -import static Ic2ExpReactorPlanner.BundleHelper.formatI18n; -import static Ic2ExpReactorPlanner.BundleHelper.getI18n; -import Ic2ExpReactorPlanner.components.ReactorItem; import java.awt.HeadlessException; -import javax.swing.JOptionPane; +import java.util.ArrayList; + +import Ic2ExpReactorPlanner.components.ReactorItem; + /** * Represents an IndustrialCraft2 Nuclear Reactor. @@ -152,24 +152,16 @@ public class Reactor { * Gets a list of the materials needed to build the components. * @return a list of the materials needed to build the components. */ - public MaterialsList getMaterials() { - MaterialsList result = new MaterialsList(); - for (int col = 0; col < grid[0].length; col++) { - for (int row = 0; row < grid.length; row++) { - if (getComponentAt(row, col) != null) { - result.add(MaterialsList.getMaterialsForComponent(getComponentAt(row, col))); - } - } - } - return result; + public ArrayList getMaterials() { + return new ArrayList(); } - public MaterialsList getComponentList() { - MaterialsList result = new MaterialsList(); + public ArrayList getComponentList() { + ArrayList result = new ArrayList(); for (int col = 0; col < grid[0].length; col++) { for (int row = 0; row < grid.length; row++) { if (getComponentAt(row, col) != null) { - result.add(getComponentAt(row, col).name); + result.add(getComponentAt(row, col)); } } } @@ -348,7 +340,7 @@ public class Reactor { // Try to handle it as a newer code with the "erp=" prefix stripped readCodeString(code); } else if (!code.isEmpty()) { - JOptionPane.showMessageDialog(null, String.format(getI18n("Warning.InvalidReactorCode"), code), getI18n("Warning.Title"), JOptionPane.WARNING_MESSAGE); + //JOptionPane.showMessageDialog(null, String.format(getI18n("Warning.InvalidReactorCode"), code), getI18n("Warning.Title"), JOptionPane.WARNING_MESSAGE); } } } @@ -381,9 +373,6 @@ public class Reactor { case 3: setComponentAt(y, x, ComponentFactory.createComponent("quadFuelRodUranium")); break; - case 4: - warnings.append(formatI18n("Warning.DepletedIsotope", y, x)); - break; case 5: setComponentAt(y, x, ComponentFactory.createComponent("neutronReflector")); break; @@ -442,7 +431,7 @@ public class Reactor { setComponentAt(y, x, ComponentFactory.createComponent("coolantCell60k")); break; case 24: - warnings.append(formatI18n("Warning.Heating", y, x)); + warnings.append("Warning.Heating", y, x); break; case 32: setComponentAt(y, x, ComponentFactory.createComponent("fuelRodThorium")); @@ -454,13 +443,13 @@ public class Reactor { setComponentAt(y, x, ComponentFactory.createComponent("quadFuelRodThorium")); break; case 35: - warnings.append(formatI18n("Warning.Plutonium", y, x)); + warnings.append("Warning.Plutonium", y, x); break; case 36: - warnings.append(formatI18n("Warning.DualPlutonium", y, x)); + warnings.append("Warning.DualPlutonium", y, x); break; case 37: - warnings.append(formatI18n("Warning.QuadPlutonium", y, x)); + warnings.append("Warning.QuadPlutonium", y, x); break; case 38: setComponentAt(y, x, ComponentFactory.createComponent("iridiumNeutronReflector")); @@ -484,14 +473,14 @@ public class Reactor { setComponentAt(y, x, ComponentFactory.createComponent("coolantCellNak360k")); break; default: - warnings.append(formatI18n("Warning.Unrecognized", nextValue, y, x)); + warnings.append("Warning.Unrecognized", y, x); break; } } } if (warnings.length() > 0) { warnings.setLength(warnings.length() - 1); // to remove last newline character - JOptionPane.showMessageDialog(null, warnings, getI18n("Warning.Title"), JOptionPane.WARNING_MESSAGE); + //JOptionPane.showMessageDialog(null, warnings, "Warning.Title", JOptionPane.WARNING_MESSAGE); } } diff --git a/src/main/java/Ic2ExpReactorPlanner/ReactorPlannerFrame.form b/src/main/java/Ic2ExpReactorPlanner/ReactorPlannerFrame.form deleted file mode 100644 index 40e56f5d3e..0000000000 --- a/src/main/java/Ic2ExpReactorPlanner/ReactorPlannerFrame.form +++ /dev/null @@ -1,2260 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/java/Ic2ExpReactorPlanner/SimulationData.java b/src/main/java/Ic2ExpReactorPlanner/SimulationData.java index d6384ef012..39ecdbc5f5 100644 --- a/src/main/java/Ic2ExpReactorPlanner/SimulationData.java +++ b/src/main/java/Ic2ExpReactorPlanner/SimulationData.java @@ -76,6 +76,4 @@ public class SimulationData { public double ventCooling = 0; public double ventCoolingCapacity = 0; - // Automation details - public MaterialsList replacedItems = new MaterialsList(); } diff --git a/src/main/java/Ic2ExpReactorPlanner/components/ReactorItem.java b/src/main/java/Ic2ExpReactorPlanner/components/ReactorItem.java index 4c4e0bb01b..9a9b1ce341 100644 --- a/src/main/java/Ic2ExpReactorPlanner/components/ReactorItem.java +++ b/src/main/java/Ic2ExpReactorPlanner/components/ReactorItem.java @@ -176,8 +176,6 @@ public class ReactorItem { protected double explosionPowerMultiplier = 1; - protected static final ResourceBundle BUNDLE = ResourceBundle.getBundle("Ic2ExpReactorPlanner/Bundle"); - protected ReactorItem(final int id, final String baseName, GT_ItemStack aItem, final double maxDamage, final double maxHeat, String sourceMod) { this.id = id; this.baseName = baseName; @@ -223,7 +221,7 @@ public class ReactorItem { public String toString() { String result = name; if (initialHeat > 0) { - result += String.format(BUNDLE.getString("UI.InitialHeatDisplay"), (int) initialHeat); + result += String.format("\u0020(initial heat: %,d)", (int) initialHeat); } return result; } diff --git a/src/main/java/Ic2ExpReactorPlanner/components/Reflector.java b/src/main/java/Ic2ExpReactorPlanner/components/Reflector.java index 465641972a..7851a62804 100644 --- a/src/main/java/Ic2ExpReactorPlanner/components/Reflector.java +++ b/src/main/java/Ic2ExpReactorPlanner/components/Reflector.java @@ -5,11 +5,8 @@ */ package Ic2ExpReactorPlanner.components; -import Ic2ExpReactorPlanner.MaterialsList; import gregtech.api.objects.GT_ItemStack; -import java.awt.Image; - /** * Represents a neutron reflector in a reactor. * @author Brian McCloud diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java index 1876001f11..cd960e5ca1 100644 --- a/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java @@ -266,11 +266,31 @@ public class RECIPES_Machines { multiSolarTower(); multiElementalDuplicator(); + computerCube(); + resonanceChambers(); modulators(); } + + private static void computerCube() { + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(20), + CI.getTieredGTPPMachineCasing(4, 1), + CI.getCircuit(4, 8), + CI.getFieldGenerator(2, 4), + CI.getDoublePlate(4, 8), + CI.getRobotArm(4, 8) + }, + Materials.Redstone.getMolten(144 * 32), + GregtechItemList.Gregtech_Computer_Cube_Machine.get(1), + 20 * 60 * 10, + MaterialUtils.getVoltageForTier(4)); + + } private static void gt4FarmManager() { @@ -532,6 +552,25 @@ public class RECIPES_Machines { private static void multiXlTurbines() { + RecipeUtils.addShapedRecipe( + CI.getDoublePlate(4, 1), CI.getElectricMotor(3, 1), CI.getDoublePlate(4, 1), + ItemUtils.getItemStackOfAmountFromOreDict("cellLubricant", 1), ItemList.Casing_Gearbox_Titanium.get(1), ItemUtils.getItemStackOfAmountFromOreDict("cellLubricant", 1), + CI.getDoublePlate(4, 1), CI.getElectricMotor(3, 1), CI.getDoublePlate(4, 1), + GregtechItemList.Casing_Turbine_Shaft.get(1)); + + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(18), + ItemList.Casing_Turbine.get(1), + CI.getPlate(4, 4), + CI.getScrew(4, 8), + CI.getCircuit(4, 4), + CI.getGear(3, 8) + }, + CI.tieredMaterials[3].getMolten(144 * 8), + GregtechItemList.Hatch_Turbine_Rotor.get(1), + 20 * 60, + MaterialUtils.getVoltageForTier(4)); // Steam CORE.RA.addSixSlotAssemblingRecipe( @@ -712,6 +751,84 @@ public class RECIPES_Machines { private static void multiElementalDuplicator() { + CORE.RA.addAssemblylineRecipe( + ItemList.Machine_IV_Replicator.get(1), + 20 * 60 * 60 * 12, + new Object[] { + CI.getTieredMachineHull(7, 4), + CI.getFieldGenerator(5, GTNH ? 32 : 16), + CI.getElectricMotor(7, GTNH ? 32 : 16), + CI.getElectricPiston(7, GTNH ? 16 : 4), + CI.getEnergyCore(6, GTNH ? 8 : 2), + CI.getPlate(7, GTNH ? 32 : 16), + CI.getScrew(7, GTNH ? 64 : 32), + CI.getBolt(6, GTNH ? 64 : 32), + CI.getTieredComponent(OrePrefixes.rod, 6, GTNH ? 20 : 10), + new Object[] {CI.getTieredCircuitOreDictName(7), 20}, + ItemList.Tool_DataOrb.get(32), + GregtechItemList.Laser_Lens_Special.get(1) + }, + new FluidStack[] { + CI.getTieredFluid(7, 144 * 32), + CI.getAlternativeTieredFluid(6, 144 * 16), + CI.getTertiaryTieredFluid(6, 144 * 16), + ALLOY.BABBIT_ALLOY.getFluidStack(128 * 144), + + }, + GregtechItemList.Controller_ElementalDuplicator.get(1), + 20 * 60 * 60 * (GTNH ? 2 : 1), + (int) MaterialUtils.getVoltageForTier(7)); + + CORE.RA.addAssemblylineRecipe( + GregtechItemList.Modulator_III.get(1), + 20 * 60 * 60 * 4, + new Object[] { + CI.getTieredGTPPMachineCasing(7, 2), + CI.getFieldGenerator(4, GTNH ? 8 : 4), + CI.getEnergyCore(4, GTNH ? 8 : 2), + CI.getPlate(7, GTNH ? 16 : 8), + CI.getScrew(6, GTNH ? 32 : 16), + CI.getBolt(6, GTNH ? 32 : 16), + CI.getTieredComponent(OrePrefixes.rod, 5, GTNH ? 32 : 16), + new Object[] {CI.getTieredCircuitOreDictName(6), 32}, + ItemList.Tool_DataOrb.get(32), + }, + new FluidStack[] { + CI.getTieredFluid(6, 144 * 16), + CI.getAlternativeTieredFluid(5, 144 * 8), + CI.getTertiaryTieredFluid(5, 144 * 8), + ALLOY.BABBIT_ALLOY.getFluidStack(64 * 144), + + }, + GregtechItemList.Hatch_Input_Elemental_Duplicator.get(1), + 20 * 60 * 60 * (GTNH ? 4 : 2), + (int) MaterialUtils.getVoltageForTier(6)); + + CORE.RA.addAssemblylineRecipe( + GregtechItemList.ResonanceChamber_III.get(1), + 20 * 60 * 60 * 2, + new Object[] { + CI.getTieredMachineHull(6, 5), + CI.getFieldGenerator(3, GTNH ? 32 : 16), + CI.getEnergyCore(2, GTNH ? 8 : 2), + CI.getPlate(7, GTNH ? 8 : 4), + CI.getScrew(7, GTNH ? 8 : 4), + CI.getBolt(6, GTNH ? 16 : 8), + CI.getTieredComponent(OrePrefixes.rod, 5, GTNH ? 8 : 4), + new Object[] {CI.getTieredCircuitOreDictName(5), 4}, + ItemList.Tool_DataStick.get(4), + }, + new FluidStack[] { + CI.getTieredFluid(5, 144 * 16), + CI.getAlternativeTieredFluid(4, 144 * 8), + CI.getTertiaryTieredFluid(4, 144 * 8), + ALLOY.BABBIT_ALLOY.getFluidStack(16 * 144), + + }, + GregtechItemList.Casing_ElementalDuplicator.get(1), + 20 * 60 * (GTNH ? 20 : 10), + (int) MaterialUtils.getVoltageForTier(6)); + } private static void resonanceChambers() { diff --git a/src/main/java/gtPlusPlus/core/recipe/common/CI.java b/src/main/java/gtPlusPlus/core/recipe/common/CI.java index 6bdf77bec5..c5a514c31a 100644 --- a/src/main/java/gtPlusPlus/core/recipe/common/CI.java +++ b/src/main/java/gtPlusPlus/core/recipe/common/CI.java @@ -541,7 +541,7 @@ public class CI { ALLOY.TUMBAGA, ALLOY.EGLIN_STEEL, ALLOY.INCONEL_792, - ALLOY.TUNGSTEN_TITANIUM_CARBIDE, + ALLOY.INCOLOY_MA956, ALLOY.NITINOL_60, ALLOY.ZERON_100, ALLOY.PIKYONIUM, diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java index c61195a9e8..4d67603db0 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java @@ -501,12 +501,25 @@ public enum GregtechItemList implements GregtechItemContainer { Hatch_SuperBus_Output_MAX, - - //---------------------------------------------------------------------------- + /** + * Blocks + */ + + + ResonanceChamber_I, + ResonanceChamber_II, + ResonanceChamber_III, + ResonanceChamber_IV, + + Modulator_I, + Modulator_II, + Modulator_III, + Modulator_IV, + //---------------------------------------------------------------------------- /** diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_Container_ComputerCube.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_Container_ComputerCube.java index 80202695e7..8abe7bff66 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_Container_ComputerCube.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_Container_ComputerCube.java @@ -4,22 +4,16 @@ import java.util.Iterator; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.gui.GT_ContainerMetaTile_Machine; -import gregtech.api.gui.GT_Slot_Holo; -import gregtech.api.gui.GT_Slot_Output; +import gregtech.api.gui.*; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.objects.GT_ItemStack; import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.slots.SlotDataStick; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.math.MathUtils; import gtPlusPlus.xmod.gregtech.common.tileentities.misc.GT_TileEntity_ComputerCube; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.ICrafting; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; +import net.minecraft.entity.player.*; +import net.minecraft.inventory.*; import net.minecraft.item.ItemStack; public class GT_Container_ComputerCube extends GT_ContainerMetaTile_Machine { @@ -39,6 +33,13 @@ public class GT_Container_ComputerCube extends GT_ContainerMetaTile_Machine { public long mEU; public int mEU1; public int mEU2; + + public long mStoredEU; + public int mStoredEU1; + public int mStoredEU2; + public long mMaxStoredEU; + public int mMaxStoredEU1; + public int mMaxStoredEU2; public int mProgress; @@ -66,90 +67,72 @@ public class GT_Container_ComputerCube extends GT_ContainerMetaTile_Machine { int y; mID = ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mMode; Logger.INFO(""+(Utils.isClient() ? "Client" : "Server")+" Mode: " + mID); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 58, 156 + ((this.mID == 5) ? 50 : 0), 4, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 156 + ((this.mID == 5) ? 50 : 0), 4, false, false, 1)); switch (this.mID) { case 1 : - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 58, 156, 86, false, false, 1)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 58, 156, 70, false, false, 1)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 58, 156, 54, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 156, 86, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 156, 70, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 156, 54, false, false, 1)); for (y = 0; y < 6; y++) { for (int x = 0; x < 9; x++) - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, x + y * 9, 5 + x * 16, 5 + y * 16, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, x + y * 9, 5 + x * 16, 5 + y * 16, false, false, 64)); } - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 113, 153, 28, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 113, 153, 28, false, false, 64)); break; case 2 : - addSlotToContainer(new Slot((IInventory) this.mTileEntity, 54, 8, 28)); - addSlotToContainer(new Slot((IInventory) this.mTileEntity, 55, 26, 28)); - addSlotToContainer(new GT_Slot_Output((IInventory) this.mTileEntity, 56, 134, 28)); - addSlotToContainer(new GT_Slot_Output((IInventory) this.mTileEntity, 57, 152, 28)); + addSlotToContainer(new SlotDataStick(this.mTileEntity, 54, 8, 28)); + addSlotToContainer(new Slot(this.mTileEntity, 55, 26, 28)); + addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 56, 134, 28)); + addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 57, 152, 28)); break; case 3 : - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 58, 88, 65, false, false, 1)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 58, 104, 65, false, false, 1)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 59, 122, 35, false, false, 64)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 60, 92, 5, false, false, 64)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 61, 122, 5, false, false, 64)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 62, 152, 35, false, false, 64)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 63, 122, 65, false, false, 64)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 64, 92, 35, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 88, 65, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 104, 65, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 59, 122, 35, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 60, 92, 5, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 61, 122, 5, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 62, 152, 35, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 63, 122, 65, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 64, 92, 35, false, false, 64)); break; case 4 : - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 58, 88, 65, false, false, 1)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 58, 104, 65, false, false, 1)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 59, 122, 5, false, false, 64)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 60, 122, 65, false, false, 64)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 61, 152, 35, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 88, 65, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 104, 65, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 59, 122, 5, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 60, 122, 65, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 61, 152, 35, false, false, 64)); break; case 5 : - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 58, 190, 146, false, false, 1)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 58, 206, 146, false, false, 1)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 59, 206, 38, false, false, 64)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 60, 206, 56, false, false, 64)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 61, 206, 74, false, false, 64)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 62, 206, 92, false, false, 64)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 63, 206, 110, false, false, 64)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 64, 153, 7, false, false, 64)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 65, 169, 7, false, false, 64)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 66, 185, 7, false, false, 64)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 67, 153, 23, false, false, 64)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 68, 169, 23, false, false, 64)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 69, 185, 23, false, false, 64)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 70, 153, 39, false, false, 64)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 71, 169, 39, false, false, 64)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 72, 185, 39, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 190, 146, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 206, 146, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 59, 206, 38, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 60, 206, 56, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 61, 206, 74, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 62, 206, 92, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 63, 206, 110, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 64, 153, 7, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 65, 169, 7, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 66, 185, 7, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 67, 153, 23, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 68, 169, 23, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 69, 185, 23, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 70, 153, 39, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 71, 169, 39, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 72, 185, 39, false, false, 64)); break; case 6 : - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 58, 88, 65, false, false, 1)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 58, 104, 65, false, false, 1)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 59, 122, 35, false, false, 64)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 60, 92, 5, false, false, 64)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 61, 122, 5, false, false, 64)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 62, 152, 35, false, false, 64)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 63, 122, 65, false, false, 64)); - addSlotToContainer(new GT_Slot_Holo((IInventory) this.mTileEntity, 64, 92, 35, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 88, 65, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 58, 104, 65, false, false, 1)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 59, 122, 35, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 60, 92, 5, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 61, 122, 5, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 62, 152, 35, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 63, 122, 65, false, false, 64)); + addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 64, 92, 35, false, false, 64)); break; } } - public int getComputerCubeGUIID() { - switch (getMode()) { - case 1 : - return 32; - case 2 : - return 34; - case 3 : - return 35; - case 4 : - return 36; - case 5 : - return 37; - case 6 : - return 38; - } - return 4; - } - public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { //Logger.INFO("Clicked slot " + aSlotIndex); if (aSlotIndex < 0) { @@ -187,51 +170,51 @@ public class GT_Container_ComputerCube extends GT_ContainerMetaTile_Machine { else if (aSlotIndex <= 2 && this.mID == 3) { if (aSlotIndex == 1) { ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchCentrifugePageBackward(); - onCraftMatrixChanged((IInventory) this.mTileEntity); + onCraftMatrixChanged(this.mTileEntity); } else if (aSlotIndex == 2) { ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchCentrifugePageForward(); - onCraftMatrixChanged((IInventory) this.mTileEntity); + onCraftMatrixChanged(this.mTileEntity); } } else if (aSlotIndex <= 2 && this.mID == 6) { if (aSlotIndex == 1) { ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchElectrolyzerPageBackward(); - onCraftMatrixChanged((IInventory) this.mTileEntity); + onCraftMatrixChanged(this.mTileEntity); } else if (aSlotIndex == 2) { ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchElectrolyzerPageForward(); - onCraftMatrixChanged((IInventory) this.mTileEntity); + onCraftMatrixChanged(this.mTileEntity); } } else if (aSlotIndex <= 2 && this.mID == 4) { if (aSlotIndex == 1) { ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchFusionPageBackward(); - onCraftMatrixChanged((IInventory) this.mTileEntity); + onCraftMatrixChanged(this.mTileEntity); } else if (aSlotIndex == 2) { ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchFusionPageForward(); - onCraftMatrixChanged((IInventory) this.mTileEntity); + onCraftMatrixChanged(this.mTileEntity); } } else if (aSlotIndex <= 2 && this.mID == 5) { if (aSlotIndex == 1) { ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchDescriptionPageBackward(); - onCraftMatrixChanged((IInventory) this.mTileEntity); + onCraftMatrixChanged(this.mTileEntity); } else if (aSlotIndex == 2) { ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchDescriptionPageForward(); - onCraftMatrixChanged((IInventory) this.mTileEntity); + onCraftMatrixChanged(this.mTileEntity); } } else if (aSlotIndex <= 58 && this.mID == 1) { if (aSlotIndex == 1) { ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).switchNuclearReactor(); - onCraftMatrixChanged((IInventory) this.mTileEntity); + onCraftMatrixChanged(this.mTileEntity); } else if (aSlotIndex == 2) { ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).loadNuclearReactor(); - onCraftMatrixChanged((IInventory) this.mTileEntity); + onCraftMatrixChanged(this.mTileEntity); } else if (aSlotIndex == 3) { ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).saveNuclearReactor(); @@ -307,6 +290,16 @@ public class GT_Container_ComputerCube extends GT_ContainerMetaTile_Machine { if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) { return; } + mStoredEU = mTileEntity.getStoredEU(); + mMaxStoredEU = mTileEntity.getEUCapacity(); + int[] aStored = MathUtils.splitLongIntoTwoIntegers(mStoredEU); + int[] aMaxStorage = MathUtils.splitLongIntoTwoIntegers(mMaxStoredEU); + mStoredEU1 = aStored[0]; + mStoredEU2 = aStored[1]; + mMaxStoredEU1 = aMaxStorage[0]; + mMaxStoredEU2 = aMaxStorage[1]; + + this.mID = ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mMode; this.mEUOut = ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mEUOut; int[] aEUSplit1 = MathUtils.splitLongIntoTwoIntegers(mEUOut); @@ -318,24 +311,30 @@ public class GT_Container_ComputerCube extends GT_ContainerMetaTile_Machine { this.mExplosionStrength = (int) (((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mExplosionStrength * 100.0F); this.mEU = ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mEU; this.mProgress = ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mProgress; + this.mMaxProgressTime = ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).mMaxProgress; + this.mProgressTime = (int) ((GT_TileEntity_ComputerCube) mTileEntity.getMetaTileEntity()).getEUVar(); int[] aEUSplit2 = MathUtils.splitLongIntoTwoIntegers(mEU); this.mEU1 = aEUSplit2[0]; this.mEU2 = aEUSplit2[1]; Iterator var2 = this.crafters.iterator(); while (var2.hasNext()) { ICrafting var1 = var2.next(); - var1.sendProgressBarUpdate((Container) this, 101, this.mID); - var1.sendProgressBarUpdate((Container) this, 102, this.mHeat & 0xFFFF); - var1.sendProgressBarUpdate((Container) this, 103, this.mMaxHeat & 0xFFFF); - var1.sendProgressBarUpdate((Container) this, 104, this.mHEM); - var1.sendProgressBarUpdate((Container) this, 105, this.mExplosionStrength); - var1.sendProgressBarUpdate((Container) this, 106, this.mHeat >>> 16); - var1.sendProgressBarUpdate((Container) this, 107, this.mMaxHeat >>> 16); - var1.sendProgressBarUpdate((Container) this, 108, this.mEU1); - var1.sendProgressBarUpdate((Container) this, 109, this.mEU2); - var1.sendProgressBarUpdate((Container) this, 110, this.mProgress); - var1.sendProgressBarUpdate((Container) this, 111, this.mEUOut1); - var1.sendProgressBarUpdate((Container) this, 112, this.mEUOut2); + var1.sendProgressBarUpdate(this, 101, this.mID); + var1.sendProgressBarUpdate(this, 102, this.mHeat & 0xFFFF); + var1.sendProgressBarUpdate(this, 103, this.mMaxHeat & 0xFFFF); + var1.sendProgressBarUpdate(this, 104, this.mHEM); + var1.sendProgressBarUpdate(this, 105, this.mExplosionStrength); + var1.sendProgressBarUpdate(this, 106, this.mHeat >>> 16); + var1.sendProgressBarUpdate(this, 107, this.mMaxHeat >>> 16); + var1.sendProgressBarUpdate(this, 108, this.mEU1); + var1.sendProgressBarUpdate(this, 109, this.mEU2); + var1.sendProgressBarUpdate(this, 110, this.mProgress); + var1.sendProgressBarUpdate(this, 111, this.mEUOut1); + var1.sendProgressBarUpdate(this, 112, this.mEUOut2); + var1.sendProgressBarUpdate(this, 113, mStoredEU1); + var1.sendProgressBarUpdate(this, 114, mStoredEU2); + var1.sendProgressBarUpdate(this, 115, mMaxStoredEU1); + var1.sendProgressBarUpdate(this, 116, mMaxStoredEU2); } } @@ -379,6 +378,20 @@ public class GT_Container_ComputerCube extends GT_ContainerMetaTile_Machine { this.mEUOut2 = par2; this.mEUOut = MathUtils.combineTwoIntegersToLong(mEUOut1, mEUOut2); break; + case 113 : + mStoredEU1 = par2; + break; + case 114 : + mStoredEU2 = par2; + mStoredEU = MathUtils.combineTwoIntegersToLong(mStoredEU1, mStoredEU2); + break; + case 115 : + mMaxStoredEU1 = par2; + break; + case 116 : + mMaxStoredEU2 = par2; + mMaxStoredEU = MathUtils.combineTwoIntegersToLong(mMaxStoredEU1, mMaxStoredEU2); + break; } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_GUIContainer_ComputerCube.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_GUIContainer_ComputerCube.java index c56e167319..71defdc72a 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_GUIContainer_ComputerCube.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_GUIContainer_ComputerCube.java @@ -2,21 +2,25 @@ package gtPlusPlus.xmod.gregtech.api.gui.computer; import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.math.MathUtils; import gtPlusPlus.xmod.gregtech.common.computer.GT_Computercube_Description; +import gtPlusPlus.xmod.gregtech.common.tileentities.misc.GT_TileEntity_ComputerCube; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; public class GT_GUIContainer_ComputerCube extends GT_GUIContainerMetaTile_Machine { + + public final GT_Container_ComputerCube mPowerContainer; + public GT_GUIContainer_ComputerCube(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aBaseMetaTileEntity, int aID) { super(new GT_Container_ComputerCube(aInventoryPlayer, aBaseMetaTileEntity, aID), CORE.RES_PATH_GUI + "computer/"+aID+".png"); - GT_Container_ComputerCube tContainer = (GT_Container_ComputerCube) this.mContainer; - Logger.INFO("1 GUI Mode: "+aID); - Logger.INFO("2 GUI Mode: "+tContainer.mID); - if (tContainer.mID == 5) { + mPowerContainer = (GT_Container_ComputerCube) mContainer; + if (mPowerContainer.mID == 5) { this.xSize += 50; } } @@ -43,8 +47,8 @@ public class GT_GUIContainer_ComputerCube extends GT_GUIContainerMetaTile_Machin if (tContainer != null) switch (tContainer.mID) { case 0 : - this.fontRendererObj.drawString("G.L.A.D.-OS", 64, 61, 16448255); - this.fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752); + this.fontRendererObj.drawString("Solaris 1.7.10", 56, 70, Utils.rgbtoHexValue(100, 190, 255)); + //this.fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752); break; case 1 : this.fontRendererObj.drawString("Reactorstats:", 7, 108, 16448255); @@ -58,11 +62,13 @@ public class GT_GUIContainer_ComputerCube extends GT_GUIContainerMetaTile_Machin this.fontRendererObj.drawString("Scanner", 51, 7, 16448255); if (tContainer.mProgress == 0) { this.fontRendererObj.drawString("Can be used to", 51, 24, 16448255); - this.fontRendererObj.drawString("scan Seedbags", 51, 32, 16448255); + this.fontRendererObj.drawString("scan things", 51, 32, 16448255); + this.fontRendererObj.drawString("Currently", 51, 48, Utils.rgbtoHexValue(200, 20, 20)); + this.fontRendererObj.drawString("Disabled", 51, 56, Utils.rgbtoHexValue(200, 20, 20)); } else { this.fontRendererObj.drawString("Progress:", 51, 24, 16448255); - this.fontRendererObj.drawString(tContainer.mProgress + "%", 51, 32, 16448255); + this.fontRendererObj.drawString(MathUtils.findPercentage(tContainer.mProgress, tContainer.mMaxProgressTime) + " %", 51, 32, 16448255); } this.fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752); break; @@ -73,15 +79,17 @@ public class GT_GUIContainer_ComputerCube extends GT_GUIContainerMetaTile_Machin break; case 4 : this.fontRendererObj.drawString("Fusionreactor", 7, 7, 16448255); - this.fontRendererObj.drawString("Recipe: " + (tContainer.mMaxHeat + 1) + "/" + GT_Recipe_Map.sFusionRecipes.mRecipeList.size(), 7, 23, 16448255); - this.fontRendererObj.drawString("Start: " + toNumber(tContainer.mEU) + "EU", 7, 31, 16448255); - this.fontRendererObj.drawString("EU/t: " + toNumber(tContainer.mEUOut), 7, 39, 16448255); - this.fontRendererObj.drawString(toNumber(tContainer.mHeat) + " Ticks", 7, 47, 16448255); + this.fontRendererObj.drawString("Recipe: " + (tContainer.mMaxHeat + 1) + "/" + GT_TileEntity_ComputerCube.sFusionReactorRecipes.size(), 7, 15, 16448255); + this.fontRendererObj.drawString("Start: " + toNumber(tContainer.mEU) + "EU", 7, 23, 16448255); + this.fontRendererObj.drawString("EU/t: " + toNumber(tContainer.mEUOut), 7, 31, 16448255); + this.fontRendererObj.drawString(toNumber(tContainer.mHeat) + " Ticks", 7, 39, 16448255); + GT_Recipe tRecipe = GT_TileEntity_ComputerCube.sFusionReactorRecipes.get(tContainer.mMaxHeat); + this.fontRendererObj.drawString(""+tRecipe.mFluidOutputs[0].getLocalizedName(), 7, 55, 16448255); if (tContainer.mEUOut < 0) { - this.fontRendererObj.drawString("IN: " + toNumber(-tContainer.mEUOut * tContainer.mHeat) + "EU", 7, 55, 16448255); + this.fontRendererObj.drawString("IN: " + toNumber(-tContainer.mEUOut * tContainer.mHeat) + "EU", 7, 47, 16448255); break; } - this.fontRendererObj.drawString("OUT: " + toNumber(tContainer.mEUOut * tContainer.mHeat) + "EU", 7, 55, 16448255); + this.fontRendererObj.drawString("OUT: " + toNumber(tContainer.mEUOut * tContainer.mHeat) + "EU", 7, 47, 16448255); break; case 5 : if (tContainer.mID == 5 && this.xSize == 176) { @@ -114,6 +122,17 @@ public class GT_GUIContainer_ComputerCube extends GT_GUIContainerMetaTile_Machin int y = (height - ySize) / 2; drawTexturedModalRect(x, y, 0, 0, xSize, ySize); switch (tContainer.mID) { + case 0 : + if (this.mPowerContainer.mStoredEU > 0 && this.mPowerContainer.mMaxStoredEU > 0) { + final double tScale = MathUtils.findPercentage(this.mPowerContainer.mStoredEU, this.mPowerContainer.mMaxStoredEU); + this.drawTexturedModalRect(x + 44, y + 8, 0, 166, Math.min(MathUtils.roundToClosestInt(tScale), 95), 5); + } + else { + // + //Logger.INFO("1 No Power? "+tContainer.mProgressTime+" | "+tContainer.mTileEntity.getEUCapacity()); + //Logger.INFO("2 No Power? "+aComp.getEUVar()+" | "+aComp.maxEUStore()); + } + break; case 5 : if (tContainer.mExplosionStrength != 0) drawTexturedModalRect(x + 152, y + 6, 0, 166, 50, 50); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java index 7ec655dca5..a80b788aa1 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java @@ -7,6 +7,7 @@ import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; import gregtech.api.util.GT_LanguageManager; import gregtech.common.blocks.GT_Material_Casings; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; @@ -59,7 +60,14 @@ public class GregtechMetaSpecialMultiCasings2 extends GregtechMetaCasingBlocksAb GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", ""); // Unused - //GregtechItemList.Casing_Turbine_Shaft.set(new ItemStack(this, 1, 0)); + GregtechItemList.ResonanceChamber_I.set(new ItemStack(this, 1, 0)); + GregtechItemList.ResonanceChamber_II.set(new ItemStack(this, 1, 1)); + GregtechItemList.ResonanceChamber_III.set(new ItemStack(this, 1, 2)); + GregtechItemList.ResonanceChamber_IV.set(new ItemStack(this, 1, 3)); + GregtechItemList.Modulator_I.set(new ItemStack(this, 1, 4)); + GregtechItemList.Modulator_II.set(new ItemStack(this, 1, 5)); + GregtechItemList.Modulator_III.set(new ItemStack(this, 1, 6)); + GregtechItemList.Modulator_IV.set(new ItemStack(this, 1, 7)); } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/GT_TileEntity_ComputerCube.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/GT_TileEntity_ComputerCube.java index 033a5f925b..67999087f3 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/GT_TileEntity_ComputerCube.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/GT_TileEntity_ComputerCube.java @@ -1,39 +1,50 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.misc; +import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes; + import java.util.ArrayList; import java.util.Collections; import Ic2ExpReactorPlanner.SimulationData; +import cpw.mods.fml.common.FMLCommonHandler; import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.ItemList; +import gregtech.api.enums.*; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; -import gregtech.api.objects.GT_ItemStack; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Recipe; +import gregtech.api.objects.*; +import gregtech.api.util.*; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gregtech.api.util.GT_Utility; +import gregtech.common.items.behaviors.Behaviour_DataOrb; import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.math.MathUtils; import gtPlusPlus.xmod.gregtech.api.gui.computer.GT_Container_ComputerCube; import gtPlusPlus.xmod.gregtech.api.gui.computer.GT_GUIContainer_ComputerCube; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import gtPlusPlus.xmod.gregtech.common.computer.GT_Computercube_Description; import gtPlusPlus.xmod.gregtech.common.computer.GT_Computercube_Simulator; -import ic2.core.Ic2Items; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank { + public static int MODE_MAIN = 0; + public static int MODE_REACTOR_PLANNER = 1; + public static int MODE_SCANNER = 2; + public static int MODE_CENTRIFUGE = 3; + public static int MODE_FUSION = 4; + public static int MODE_INFO = 5; + public static int MODE_ELECTROLYZER = 6; + public static boolean mSeedscanner = true; public static boolean mReactorplanner = true; @@ -48,11 +59,12 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank { public long mEUOut = 0; - public int mMaxHeat = 10000; + public int mMaxHeat = 1; public long mEU = 0; public int mProgress = 0; + public int mMaxProgress = 0; public int mEUTimer = 0; @@ -65,13 +77,15 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank { public int mEULast4 = 0; public float mHEM = 1.0F, mExplosionStrength = 0.0F; + + public String mFusionOutput = ""; private boolean mNeedsUpdate; private GT_Computercube_Simulator mSimulator; public GT_TileEntity_ComputerCube(final int aID, final String aDescription) { - super(aID, "computer.cube", "Computer Cube", 5, 114, aDescription); + super(aID, "computer.cube", "Computer Cube MKII", 5, 114, aDescription); } public GT_TileEntity_ComputerCube(final String aName, final String aDescription, final ITexture[][][] aTextures) { @@ -90,6 +104,17 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank { return new GT_GUIContainer_ComputerCube(aPlayerInventory, aBaseMetaTileEntity, mMode); } + @Override + public String[] getDescription() { + return new String[]{ + this.mDescription, + "Built in Reactor Planner", + "Built in Scanner", + "Built in Info-Bank", + "Displays Fusion Recipes", + CORE.GT_Tooltip}; + } + @Override public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { if (aBaseMetaTileEntity.isClientSide()) { @@ -143,7 +168,7 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank { @Override public long maxEUInput() { - return GT_Values.V[2]; + return GT_Values.V[4]; } @Override @@ -213,6 +238,8 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank { this.mHEM = 1.0F; this.mExplosionStrength = 0.0F; this.mProgress = 0; + this.mMaxProgress = 0; + this.mFusionOutput = ""; this.mInventory[113] = null; int i; for (i = 0; i < 54; i++) { @@ -229,37 +256,51 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank { } public void switchModeForward() { - this.mMode = (this.mMode + 1) % 7; + int aTempMode = mMode; + aTempMode++; + if (aTempMode == MODE_ELECTROLYZER ||aTempMode == MODE_CENTRIFUGE) { + aTempMode++; + } + if (aTempMode >= 7) { + aTempMode = 0; + } + mMode = aTempMode; switchMode(); } public void switchModeBackward() { - this.mMode--; - if (this.mMode < 0) - this.mMode = 6; + int aTempMode = mMode; + aTempMode--; + if (aTempMode == MODE_ELECTROLYZER ||aTempMode == MODE_CENTRIFUGE) { + aTempMode--; + } + if (aTempMode < 0) { + aTempMode = 6; + } + mMode = aTempMode; switchMode(); } private void switchMode() { reset(); - if (this.mMode == 1 && !mReactorplanner) { + if (this.mMode == MODE_REACTOR_PLANNER && !mReactorplanner) { switchMode(); return; } - if (this.mMode == 2 && !mSeedscanner) { + if (this.mMode == MODE_SCANNER && !mSeedscanner) { switchMode(); return; } - if (this.mMode == 3) { + if (this.mMode == MODE_CENTRIFUGE) { showCentrifugeRecipe(0); } - if (this.mMode == 4) { + if (this.mMode == MODE_FUSION) { showFusionRecipe(0); } - if (this.mMode == 5) { + if (this.mMode == MODE_INFO) { showDescription(0); } - if (this.mMode == 6) { + if (this.mMode == MODE_ELECTROLYZER) { showElectrolyzerRecipe(0); } this.getWorld().addBlockEvent(this.getXCoord(), this.getYCoord(), this.getZCoord(), GregTech_API.sBlockMachines, 10, this.mMode); @@ -540,6 +581,7 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank { this.mEUOut = tRecipe.mEUt; this.mHeat = tRecipe.mDuration; this.mMaxHeat = aIndex; + this.mFusionOutput = tRecipe.mFluidOutputs[0].getLocalizedName(); } this.getWorld().addBlockEvent(this.getXCoord(), this.getYCoord(), this.getZCoord(), GregTech_API.sBlockMachines, 11, this.mMaxHeat); } @@ -582,6 +624,7 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank { super.saveNBTData(aNBT); aNBT.setInteger("mMode", this.mMode); aNBT.setInteger("mProgress", this.mProgress); + aNBT.setInteger("mMaxProgress", this.mMaxProgress); aNBT.setBoolean("mStarted", this.mStarted); int[] aSplitLong1 = MathUtils.splitLongIntoTwoIntegers(mEU); aNBT.setInteger("mEU1", aSplitLong1[0]); @@ -593,6 +636,7 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank { aNBT.setInteger("mMaxHeat", this.mMaxHeat); aNBT.setFloat("mHEM", this.mHEM); aNBT.setFloat("mExplosionStrength", this.mExplosionStrength); + aNBT.setString("mFusionOutput", this.mFusionOutput); } @Override @@ -600,6 +644,7 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank { super.loadNBTData(aNBT); this.mMode = aNBT.getInteger("mMode"); this.mProgress = aNBT.getInteger("mProgress"); + this.mMaxProgress = aNBT.getInteger("mMaxProgress"); this.mStarted = aNBT.getBoolean("mStarted"); int partA = aNBT.getInteger("mEU1"); int partB = aNBT.getInteger("mEU2"); @@ -611,6 +656,7 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank { this.mMaxHeat = aNBT.getInteger("mMaxHeat"); this.mHEM = aNBT.getFloat("mHEM"); this.mExplosionStrength = aNBT.getFloat("mExplosionStrength"); + this.mFusionOutput = aNBT.getString("mFusionOutput"); } @Override @@ -633,17 +679,32 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank { this.mNeedsUpdate = false; } if (this.getBaseMetaTileEntity().isServerSide()) { - if (this.mMode == 2) { - if (this.mInventory[55] == null) { + if (this.mMode == MODE_SCANNER) { + /*if (this.mInventory[55] == null) { this.mInventory[55] = this.mInventory[54]; this.mInventory[54] = null; - } + }*/ if (this.mInventory[57] == null) { this.mInventory[57] = this.mInventory[56]; this.mInventory[56] = null; } - if (mSeedscanner && this.mInventory[55] != null && GT_Utility.areStacksEqual(this.mInventory[55], Ic2Items.cropSeed, true) && this.mInventory[55].getTagCompound() != null) { + // 54 - 55 || 56 - 57 + // Do scanny bits + if (mSeedscanner && this.mMode == MODE_SCANNER) { + /*if (doScan(this.mInventory[55]) == 4) { + if ((this.mInventory[57] != null) && (this.mInventory[57].getUnlocalizedName().equals("gt.metaitem.01.32707"))) { + GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "scanning"); + } + }*/ + /*if (this.mEU > 0) { + if (!this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(this.mEU, false)) { + this.mProgress = 0; + } + }*/ + } + + /*if (mSeedscanner && this.mInventory[55] != null && GT_Utility.areStacksEqual(this.mInventory[55], Ic2Items.cropSeed, true) && this.mInventory[55].getTagCompound() != null) { if (this.mInventory[55].getTagCompound().getByte("scan") < 4) { if (this.mProgress >= 100) { this.mInventory[55].getTagCompound().setByte("scan", (byte) 4); @@ -667,10 +728,10 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank { this.mInventory[56] = this.mInventory[55]; this.mInventory[55] = null; } - } + }*/ } - if (this.mMode == 1 && mReactorplanner && this.mSimulator != null && this.mSimulator.simulator != null && this.mSimulator.simulatedReactor != null) { + if (this.mMode == MODE_REACTOR_PLANNER && mReactorplanner && this.mSimulator != null && this.mSimulator.simulator != null && this.mSimulator.simulatedReactor != null) { SimulationData aData = this.mSimulator.simulator.getData(); if (aData != null && aData.totalReactorTicks > 0 && this.mProgress != aData.totalReactorTicks) { Logger.INFO("Updating Variables"); @@ -684,50 +745,6 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank { } } - /*if (this.mMode == 1 && mReactorplanner && this.mStarted && this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(32, false)) - for (int i = 0; i < 25 && this.mStarted; i++) { - this.mEUOut = 0; - this.mMaxHeat = 10000; - this.mHEM = 1.0F; - this.mExplosionStrength = 10.0F; - float tMultiplier = 1.0F; - for (int y = 0; y < 6; y++) { - for (int x = 0; x < 9; x++) { - ItemStack tStack = getStackInSlot(x + y * 9); - if (tStack != null) - if (tStack.getItem() instanceof IReactorComponent) { - IReactorComponent tComponent = (IReactorComponent) tStack.getItem(); - tComponent.processChamber(this, tStack, x, y, false); //TODO - float tInfluence = ((IReactorComponent) tStack.getItem()).influenceExplosion(this, tStack); - if (tInfluence > 0.0F && tInfluence < 1.0F) { - tMultiplier *= tInfluence; - } - else { - this.mExplosionStrength += tInfluence; - } - } - else if (tStack.isItemEqual(GT_ModHandler.getIC2Item("nearDepletedUraniumCell", 1)) || tStack.isItemEqual(GT_ModHandler.getIC2Item("reEnrichedUraniumCell", 1))) { - stopNuclearReactor(); - } - else { - setInventorySlotContents(x + y * 9, (ItemStack) null); - } - } - } - this.mEUOut *= getReactorEUOutput(); - if ((this.mEUOut == 0 && this.mEUTimer++ > 20) || this.mHeat >= this.mMaxHeat) - stopNuclearReactor(); - if (this.mEUOut != 0) - this.mEUTimer = 0; - this.mExplosionStrength *= this.mHEM * tMultiplier; - this.mEU += this.mEUOut * 20; - int tEU = this.mEULast1; - this.mEULast1 = this.mEULast2; - this.mEULast2 = this.mEULast3; - this.mEULast3 = this.mEULast4; - this.mEULast4 = this.mEUOut; - this.mEUOut = (this.mEUOut + this.mEULast1 + this.mEULast2 + this.mEULast3 + tEU) / 5; - }*/ if (aTick % 20L == 0L) { this.getWorld().addBlockEvent(this.getXCoord(), this.getYCoord(), this.getZCoord(), GregTech_API.sBlockMachines, 10, this.mMode); this.getWorld().addBlockEvent(this.getXCoord(), this.getYCoord(), this.getZCoord(), GregTech_API.sBlockMachines, 11, this.mMaxHeat); @@ -765,12 +782,12 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank { @Override public boolean canInsertItem(int i, ItemStack itemstack, int j) { - return (this.mMode == 2) ? ((i == 54 || i == 55)) : false; + return (this.mMode == MODE_SCANNER) ? ((i == 54 || i == 55)) : false; } @Override public boolean canExtractItem(int i, ItemStack itemstack, int j) { - return (this.mMode == 2) ? ((i == 56 || i == 57)) : false; + return (this.mMode == MODE_SCANNER) ? ((i == 56 || i == 57)) : false; } public World getWorld() { @@ -838,5 +855,198 @@ public class GT_TileEntity_ComputerCube extends GT_MetaTileEntity_BasicTank { public ITexture[] getSides(final byte aColor) { return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Computer_Cube)}; } + + protected static final int + DID_NOT_FIND_RECIPE = 0, + FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS = 1, + FOUND_AND_SUCCESSFULLY_USED_RECIPE = 2; + + /** + * Calcualtes overclocked ness using long integers + * @param aEUt - recipe EUt + * @param aDuration - recipe Duration + */ + protected void calculateOverclockedNess(int aEUt, int aDuration) { + if(mTier==0){ + //Long time calculation + long xMaxProgresstime = ((long)aDuration)<<1; + if(xMaxProgresstime>Integer.MAX_VALUE-1){ + //make impossible if too long + mEU=Integer.MAX_VALUE-1; + mMaxProgress=Integer.MAX_VALUE-1; + }else{ + mEU=aEUt>>2; + mMaxProgress=(int)xMaxProgresstime; + } + }else{ + //Long EUt calculation + long xEUt=aEUt; + //Isnt too low EUt check? + long tempEUt = Math.max(xEUt, V[1]); + + mMaxProgress = aDuration; + + while (tempEUt <= V[mTier -1] * (long)this.maxAmperesIn()) { + tempEUt<<=2;//this actually controls overclocking + //xEUt *= 4;//this is effect of everclocking + mMaxProgress>>=1;//this is effect of overclocking + xEUt = mMaxProgress==0 ? xEUt>>1 : xEUt<<2;//U know, if the time is less than 1 tick make the machine use 2x less power + } + if(xEUt>Integer.MAX_VALUE-1){ + mEU = Integer.MAX_VALUE-1; + mMaxProgress = Integer.MAX_VALUE-1; + }else{ + mEU = (int)xEUt; + if(mEU==0) + mEU = 1; + if(mMaxProgress==0) + mMaxProgress = 1;//set time to 1 tick + } + } + } + + public int doScan(ItemStack aInput) { + if (this.mMode != MODE_SCANNER) { + return DID_NOT_FIND_RECIPE; + } + ItemStack aStack = aInput; + if (this.mInventory[56] != null) { + return DID_NOT_FIND_RECIPE; + } else if ((GT_Utility.isStackValid(aStack)) && (aStack.stackSize > 0)) { + + + if (ItemList.IC2_Crop_Seeds.isStackEqual(aStack, true, true)) { + NBTTagCompound tNBT = aStack.getTagCompound(); + if (tNBT == null) { + tNBT = new NBTTagCompound(); + } + if (tNBT.getByte("scan") < 4) { + tNBT.setByte("scan", (byte) 4); + calculateOverclockedNess(8, 160); + //In case recipe is too OP for that machine + if (mMaxProgress == Integer.MAX_VALUE - 1 && mEU == Integer.MAX_VALUE - 1) + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + } else { + this.mMaxProgress = 1; + this.mEU = 1; + } + aStack.stackSize -= 1; + this.mInventory[57] = GT_Utility.copyAmount(1L, aStack); + this.mInventory[57].setTagCompound(tNBT); + return 2; + } + + + if (ItemList.Tool_DataOrb.isStackEqual(getSpecialSlot(), false, true)) { + if (ItemList.Tool_DataOrb.isStackEqual(aStack, false, true)) { + aStack.stackSize -= 1; + this.mInventory[57] = GT_Utility.copyAmount(1L, getSpecialSlot()); + calculateOverclockedNess(30, 512); + //In case recipe is too OP for that machine + if (mMaxProgress == Integer.MAX_VALUE - 1 && mEU == Integer.MAX_VALUE - 1) + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + return 2; + } + ItemData tData = GT_OreDictUnificator.getAssociation(aStack); + if ((tData != null) && ((tData.mPrefix == OrePrefixes.dust) || (tData.mPrefix == OrePrefixes.cell)) && (tData.mMaterial.mMaterial.mElement != null) && (!tData.mMaterial.mMaterial.mElement.mIsIsotope) && (tData.mMaterial.mMaterial != Materials.Magic) && (tData.mMaterial.mMaterial.getMass() > 0L)) { + getSpecialSlot().stackSize -= 1; + aStack.stackSize -= 1; + + this.mInventory[57] = ItemList.Tool_DataOrb.get(1L); + Behaviour_DataOrb.setDataTitle(this.mInventory[57], "Elemental-Scan"); + Behaviour_DataOrb.setDataName(this.mInventory[57], tData.mMaterial.mMaterial.mElement.name()); + calculateOverclockedNess(30, GT_Utility.safeInt(tData.mMaterial.mMaterial.getMass() * 8192L)); + //In case recipe is too OP for that machine + if (mMaxProgress == Integer.MAX_VALUE - 1 && mEU == Integer.MAX_VALUE - 1) + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + return 2; + } + } + + + if (ItemList.Tool_DataStick.isStackEqual(getSpecialSlot(), false, true)) { + if (ItemList.Tool_DataStick.isStackEqual(aStack, false, true)) { + aStack.stackSize -= 1; + this.mInventory[57] = GT_Utility.copyAmount(1L, getSpecialSlot()); + calculateOverclockedNess(30, 128); + //In case recipe is too OP for that machine + if (mMaxProgress == Integer.MAX_VALUE - 1 && mEU == Integer.MAX_VALUE - 1) + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + return 2; + } + if (aStack.getItem() == Items.written_book) { + getSpecialSlot().stackSize -= 1; + aStack.stackSize -= 1; + + this.mInventory[57] = GT_Utility.copyAmount(1L, getSpecialSlot()); + this.mInventory[57].setTagCompound(aStack.getTagCompound()); + calculateOverclockedNess(30, 128); + //In case recipe is too OP for that machine + if (mMaxProgress == Integer.MAX_VALUE - 1 && mEU == Integer.MAX_VALUE - 1) + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + return 2; + } + if (aStack.getItem() == Items.filled_map) { + getSpecialSlot().stackSize -= 1; + aStack.stackSize -= 1; + + this.mInventory[57] = GT_Utility.copyAmount(1L, getSpecialSlot()); + this.mInventory[57].setTagCompound(GT_Utility.getNBTContainingShort(new NBTTagCompound(), "map_id", (short) aStack.getItemDamage())); + calculateOverclockedNess(30, 128); + //In case recipe is too OP for that machine + if (mMaxProgress == Integer.MAX_VALUE - 1 && mEU == Integer.MAX_VALUE - 1) + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + return 2; + } + + } + + if (ItemList.Tool_DataStick.isStackEqual(getSpecialSlot(), false, true) && aStack != null) { + for (GT_Recipe.GT_Recipe_AssemblyLine tRecipe : GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes) { + if (GT_Utility.areStacksEqual(tRecipe.mResearchItem, aStack, true)) { + boolean failScanner = true; + for (GT_Recipe scannerRecipe : sScannerFakeRecipes.mRecipeList) { + if (GT_Utility.areStacksEqual(scannerRecipe.mInputs[0], aStack, true)) { + failScanner = false; + break; + } + } + if (failScanner) { + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + } + + + String s = tRecipe.mOutput.getDisplayName(); + if (FMLCommonHandler.instance().getEffectiveSide().isServer()) { + s = GT_Assemblyline_Server.lServerNames.get(tRecipe.mOutput.getDisplayName()); + if (s == null) + s = tRecipe.mOutput.getDisplayName(); + } + this.mInventory[57] = GT_Utility.copyAmount(1L, getSpecialSlot()); + + + // Use Assline Utils + if (GT_AssemblyLineUtils.setAssemblyLineRecipeOnDataStick(this.mInventory[57], tRecipe)) { + aStack.stackSize -= 1; + calculateOverclockedNess(30, tRecipe.mResearchTime); + //In case recipe is too OP for that machine + if (mMaxProgress == Integer.MAX_VALUE - 1 && mEU == Integer.MAX_VALUE - 1) + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + getSpecialSlot().stackSize -= 1; + return 2; + } + + } + } + } + + } + return 0; + } + + private ItemStack getSpecialSlot() { + return this.mInventory[54]; + } + } diff --git a/src/main/resources/assets/miscutils/textures/gui/computer/0.png b/src/main/resources/assets/miscutils/textures/gui/computer/0.png index 8f8a4a8f75..d96545981e 100644 Binary files a/src/main/resources/assets/miscutils/textures/gui/computer/0.png and b/src/main/resources/assets/miscutils/textures/gui/computer/0.png differ diff --git a/src/main/resources/assets/miscutils/textures/gui/computer/2.png b/src/main/resources/assets/miscutils/textures/gui/computer/2.png index a128743fef..90a9447503 100644 Binary files a/src/main/resources/assets/miscutils/textures/gui/computer/2.png and b/src/main/resources/assets/miscutils/textures/gui/computer/2.png differ -- cgit From aa0267acca1030b96b95569472ee8663e5cb34b3 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Wed, 19 Jan 2022 12:58:01 +0000 Subject: Added GT4 Redstone Circuit Block. --- .../xmod/gregtech/api/enums/GregtechItemList.java | 1 + .../GT_Container_RedstoneCircuitBlock.java | 176 ++++++++++ .../GT_GUIContainer_RedstoneCircuitBlock.java | 62 ++++ .../GT_MetaTileEntity_RedstoneCircuitBlock.java | 391 +++++++++++++++++++++ .../registration/gregtech/Gregtech4Content.java | 19 +- .../textures/gui/RedstoneCircuitBlock.png | Bin 0 -> 4700 bytes 6 files changed, 634 insertions(+), 15 deletions(-) create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_Container_RedstoneCircuitBlock.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_GUIContainer_RedstoneCircuitBlock.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneCircuitBlock.java create mode 100644 src/main/resources/assets/miscutils/textures/gui/RedstoneCircuitBlock.png (limited to 'src/main/resources/assets/miscutils/textures') diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java index 4d67603db0..e731cf0730 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java @@ -547,6 +547,7 @@ public enum GregtechItemList implements GregtechItemContainer { GT4_Redstone_Button_Panel, GT4_Redstone_Scale, GT4_Redstone_Display, + GT4_Redstone_Circuit, //Gt4 Workbenches GT4_Workbench_Bronze, diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_Container_RedstoneCircuitBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_Container_RedstoneCircuitBlock.java new file mode 100644 index 0000000000..acae0d39c5 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_Container_RedstoneCircuitBlock.java @@ -0,0 +1,176 @@ +package gtPlusPlus.xmod.gregtech.api.gui.computer; + +import java.util.Iterator; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.gui.GT_Slot_Holo; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.xmod.gregtech.common.tileentities.redstone.GT_MetaTileEntity_RedstoneCircuitBlock; +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; +import net.minecraftforge.oredict.OreDictionary; + +public class GT_Container_RedstoneCircuitBlock extends GT_ContainerMetaTile_Machine { + + public GT_Container_RedstoneCircuitBlock(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + public void addSlots(InventoryPlayer aInventoryPlayer) { + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 0, 8, 6, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 0, 8, 24, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 0, 8, 42, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 0, 8, 60, false, true, 1)); + + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 0, 152, 6, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 0, 152, 24, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 0, 152, 42, false, true, 1)); + + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 1, 26, 6, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 2, 26, 24, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 3, 26, 42, false, true, 1)); + addSlotToContainer(new GT_Slot_Holo(mTileEntity, 4, 26, 60, false, true, 1)); + } + + public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { + if (aSlotIndex < 0 || aSlotIndex > 6) + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + + Slot tSlot = (Slot) inventorySlots.get(aSlotIndex); + if (tSlot != null) { + if (mTileEntity.getMetaTileEntity() == null) + return null; + if (aSlotIndex < 4) { + ItemStack tStack = aPlayer.inventory.getItemStack(); + if (tStack == null) { + ((GT_MetaTileEntity_RedstoneCircuitBlock) mTileEntity.getMetaTileEntity()).changeGateData(aSlotIndex, aMouseclick == 0 ? aShifthold == 0 ? +1 : aShifthold == 1 ? +128 : +16 : aShifthold == 0 ? -1 : aShifthold == 1 ? -128 : -16); + } + else { + tStack = GT_Utility.copy(tStack); + if (aMouseclick != 0) + tStack.setItemDamage(OreDictionary.WILDCARD_VALUE); + ((GT_MetaTileEntity_RedstoneCircuitBlock) mTileEntity.getMetaTileEntity()).stackGateData(aSlotIndex, tStack); + } + return null; + } + else if (aSlotIndex == 4) { + ((GT_MetaTileEntity_RedstoneCircuitBlock) mTileEntity.getMetaTileEntity()).switchOutput(); + } + else if (aSlotIndex == 5) { + mTileEntity.setActive(!mTileEntity.isActive()); + } + else if (aSlotIndex == 6) { + if (aMouseclick == 0) + ((GT_MetaTileEntity_RedstoneCircuitBlock) mTileEntity.getMetaTileEntity()).switchGateForward(aShifthold != 0); + else + ((GT_MetaTileEntity_RedstoneCircuitBlock) mTileEntity.getMetaTileEntity()).switchGateBackward(aShifthold != 0); + } + } + return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); + } + + public int mData[] = new int[]{0, 0, 0, 0, 0, 0, 0, 0}, mGate = 0; + + @SuppressWarnings("rawtypes") + public void detectAndSendChanges() { + super.detectAndSendChanges(); + if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) + return; + mGate = ((GT_MetaTileEntity_RedstoneCircuitBlock) mTileEntity.getMetaTileEntity()).mGate; + mData = ((GT_MetaTileEntity_RedstoneCircuitBlock) mTileEntity.getMetaTileEntity()).mGateData; + + Iterator var2 = this.crafters.iterator(); + while (var2.hasNext()) { + ICrafting var1 = (ICrafting) var2.next(); + var1.sendProgressBarUpdate(this, 100, mGate & 65535); + var1.sendProgressBarUpdate(this, 101, mGate >>> 16); + var1.sendProgressBarUpdate(this, 102, mData[0] & 65535); + var1.sendProgressBarUpdate(this, 103, mData[0] >>> 16); + var1.sendProgressBarUpdate(this, 104, mData[1] & 65535); + var1.sendProgressBarUpdate(this, 105, mData[1] >>> 16); + var1.sendProgressBarUpdate(this, 106, mData[2] & 65535); + var1.sendProgressBarUpdate(this, 107, mData[2] >>> 16); + var1.sendProgressBarUpdate(this, 108, mData[3] & 65535); + var1.sendProgressBarUpdate(this, 109, mData[3] >>> 16); + var1.sendProgressBarUpdate(this, 110, mData[4] & 65535); + var1.sendProgressBarUpdate(this, 111, mData[4] >>> 16); + var1.sendProgressBarUpdate(this, 112, mData[5] & 65535); + var1.sendProgressBarUpdate(this, 113, mData[5] >>> 16); + var1.sendProgressBarUpdate(this, 114, mData[6] & 65535); + var1.sendProgressBarUpdate(this, 115, mData[6] >>> 16); + var1.sendProgressBarUpdate(this, 116, mData[7] & 65535); + var1.sendProgressBarUpdate(this, 117, mData[7] >>> 16); + } + } + + public void addCraftingToCrafters(ICrafting par1ICrafting) { + super.addCraftingToCrafters(par1ICrafting); + } + + @SideOnly(Side.CLIENT) + public void updateProgressBar(int par1, int par2) { + super.updateProgressBar(par1, par2); + switch (par1) { + case 100 : + mGate = mGate & -65536 | par2; + break; + case 101 : + mGate = mGate & 65535 | par2 << 16; + break; + case 102 : + mData[0] = mData[0] & -65536 | par2; + break; + case 103 : + mData[0] = mData[0] & 65535 | par2 << 16; + break; + case 104 : + mData[1] = mData[1] & -65536 | par2; + break; + case 105 : + mData[1] = mData[1] & 65535 | par2 << 16; + break; + case 106 : + mData[2] = mData[2] & -65536 | par2; + break; + case 107 : + mData[2] = mData[2] & 65535 | par2 << 16; + break; + case 108 : + mData[3] = mData[3] & -65536 | par2; + break; + case 109 : + mData[3] = mData[3] & 65535 | par2 << 16; + break; + case 110 : + mData[4] = mData[4] & -65536 | par2; + break; + case 111 : + mData[4] = mData[4] & 65535 | par2 << 16; + break; + case 112 : + mData[5] = mData[5] & -65536 | par2; + break; + case 113 : + mData[5] = mData[5] & 65535 | par2 << 16; + break; + case 114 : + mData[6] = mData[6] & -65536 | par2; + break; + case 115 : + mData[6] = mData[6] & 65535 | par2 << 16; + break; + case 116 : + mData[7] = mData[7] & -65536 | par2; + break; + case 117 : + mData[7] = mData[7] & 65535 | par2 << 16; + break; + } + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_GUIContainer_RedstoneCircuitBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_GUIContainer_RedstoneCircuitBlock.java new file mode 100644 index 0000000000..89636fbaf2 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_GUIContainer_RedstoneCircuitBlock.java @@ -0,0 +1,62 @@ +package gtPlusPlus.xmod.gregtech.api.gui.computer; + +import gregtech.api.GregTech_API; +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_CircuitryBehavior; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.entity.player.InventoryPlayer; + +public class GT_GUIContainer_RedstoneCircuitBlock extends GT_GUIContainerMetaTile_Machine { + + public GT_GUIContainer_RedstoneCircuitBlock(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(new GT_Container_RedstoneCircuitBlock(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + "RedstoneCircuitBlock.png"); + } + + @Override + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + GT_CircuitryBehavior tCircuit = GregTech_API.sCircuitryBehaviors.get(((GT_Container_RedstoneCircuitBlock) mContainer).mGate); + if (tCircuit != null) { + this.fontRendererObj.drawString(tCircuit.getName(), 46, 8, 16448255); + this.fontRendererObj.drawString(tCircuit.getDescription(), 46, 19, 16448255); + + this.fontRendererObj.drawString(tCircuit.getDataDescription(((GT_Container_RedstoneCircuitBlock) mContainer).mData, 0), 46, 33, 16448255); + this.fontRendererObj.drawString(tCircuit.getDataDescription(((GT_Container_RedstoneCircuitBlock) mContainer).mData, 1), 46, 44, 16448255); + this.fontRendererObj.drawString(tCircuit.getDataDescription(((GT_Container_RedstoneCircuitBlock) mContainer).mData, 2), 46, 55, 16448255); + this.fontRendererObj.drawString(tCircuit.getDataDescription(((GT_Container_RedstoneCircuitBlock) mContainer).mData, 3), 46, 66, 16448255); + + String tString; + tString = tCircuit.getDataDisplay(((GT_Container_RedstoneCircuitBlock) mContainer).mData, 0); + this.fontRendererObj.drawString(tString == null ? GT_Utility.parseNumberToString(((GT_Container_RedstoneCircuitBlock) mContainer).mData[0]) : tString, 99, 33, 16448255); + tString = tCircuit.getDataDisplay(((GT_Container_RedstoneCircuitBlock) mContainer).mData, 1); + this.fontRendererObj.drawString(tString == null ? GT_Utility.parseNumberToString(((GT_Container_RedstoneCircuitBlock) mContainer).mData[1]) : tString, 99, 44, 16448255); + tString = tCircuit.getDataDisplay(((GT_Container_RedstoneCircuitBlock) mContainer).mData, 2); + this.fontRendererObj.drawString(tString == null ? GT_Utility.parseNumberToString(((GT_Container_RedstoneCircuitBlock) mContainer).mData[2]) : tString, 99, 55, 16448255); + tString = tCircuit.getDataDisplay(((GT_Container_RedstoneCircuitBlock) mContainer).mData, 3); + this.fontRendererObj.drawString(tString == null ? GT_Utility.parseNumberToString(((GT_Container_RedstoneCircuitBlock) mContainer).mData[3]) : tString, 99, 66, 16448255); + } + } + + @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_RedstoneCircuitBlock) mContainer).mOutput > 0) + drawTexturedModalRect(x + 151, y + 5, 176, 0, 18, 18); + if ((((GT_Container_RedstoneCircuitBlock) mContainer).mActive & 1) > 0) + drawTexturedModalRect(x + 151, y + 23, 176, 18, 18, 18); + if (((GT_Container_RedstoneCircuitBlock) mContainer).mDisplayErrorCode > 0) + if ((((GT_Container_RedstoneCircuitBlock) mContainer).mTileEntity.getTimer() / 5) % 2 == 0) + drawTexturedModalRect(x + 140, y + 9, 194, 0, 7, 7); + else + ; + else + drawTexturedModalRect(x + 140, y + 9, 201, 0, 7, 7); + } + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneCircuitBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneCircuitBlock.java new file mode 100644 index 0000000000..e3779d1e9b --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/GT_MetaTileEntity_RedstoneCircuitBlock.java @@ -0,0 +1,391 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.redstone; + +import java.util.*; + +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.IRedstoneCircuitBlock; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.util.*; +import gtPlusPlus.xmod.gregtech.api.gui.computer.GT_Container_RedstoneCircuitBlock; +import gtPlusPlus.xmod.gregtech.api.gui.computer.GT_GUIContainer_RedstoneCircuitBlock; +import net.minecraft.block.Block; +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.tileentity.TileEntity; + +public class GT_MetaTileEntity_RedstoneCircuitBlock extends GT_MetaTileEntity_RedstoneBase implements IRedstoneCircuitBlock { + + public int mGate = 0, mGateData[] = new int[]{0, 0, 0, 0, 0, 0, 0, 0}; + public boolean bOutput = true; + + public GT_MetaTileEntity_RedstoneCircuitBlock(int aID) { + super(aID, "redstone.circuit", "Redstone Circuit Block", 0, 0, "Computes Redstone"); + } + + public GT_MetaTileEntity_RedstoneCircuitBlock(final String aName, String aDescription, final ITexture[][][] aTextures) { + super(aName, 0, 0, aDescription, aTextures); + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_RedstoneCircuitBlock(this.mName, mDescription, this.mTextures); + } + + @Override + public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_RedstoneCircuitBlock(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_RedstoneCircuitBlock(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public boolean hasSidedRedstoneOutputBehavior() { + return true; + } + + @Override + public boolean isEnetInput() { + return true; + } + + @Override + public boolean isEnetOutput() { + return true; + } + + @Override + public boolean isInputFacing(byte aSide) { + return !isOutputFacing(aSide); + } + + @Override + public boolean isOutputFacing(byte aSide) { + return getBaseMetaTileEntity().getBackFacing() == aSide; + } + + @Override + public long getMinimumStoredEU() { + return 500; + } + + @Override + public long maxEUInput() { + return 32; + } + + @Override + public long maxEUOutput() { + return bOutput ? 32 : 0; + } + + @Override + public int getSizeInventory() { + return 5; + } + + @Override + public long maxEUStore() { + return 1000; + } + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) { + return true; + } + aBaseMetaTileEntity.openGUI(aPlayer, 147); + return true; + } + + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setInteger("mGate", mGate); + aNBT.setIntArray("mGateData", mGateData); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + mGate = aNBT.getInteger("mGate"); + mGateData = aNBT.getIntArray("mGateData"); + if (mGateData.length != 8) + mGateData = new int[]{0, 0, 0, 0, 0, 0, 0, 0}; + } + + public void switchOutput() { + bOutput = !bOutput; + } + + public void switchGateForward(boolean aShift) { + try { + Set tKeys = GregTech_API.sCircuitryBehaviors.keySet(); + ArrayList tList = new ArrayList(); + tList.addAll(tKeys); + if (tList.size() <= 0) + return; + Collections.sort(tList); + if (!GregTech_API.sCircuitryBehaviors.containsKey(mGate)) + mGate = tList.get(0); + int tIndex = Collections.binarySearch(tList, mGate); + tIndex += aShift ? 16 : 1; + while (tIndex >= tList.size()) + tIndex -= tList.size(); + mGate = tList.get(tIndex); + switchGate(); + } + catch (Throwable e) { + GT_Log.err.print(e); + } + } + + public void switchGateBackward(boolean aShift) { + try { + Set tKeys = GregTech_API.sCircuitryBehaviors.keySet(); + ArrayList tList = new ArrayList(); + tList.addAll(tKeys); + if (tList.size() <= 0) + return; + Collections.sort(tList); + if (!GregTech_API.sCircuitryBehaviors.containsKey(mGate)) + mGate = tList.get(0); + int tIndex = Collections.binarySearch(tList, mGate); + tIndex -= aShift ? 16 : 1; + while (tIndex < 0) + tIndex += tList.size(); + mGate = tList.get(tIndex); + switchGate(); + } + catch (Throwable e) { + GT_Log.err.print(e); + } + } + + @Override + public void onFacingChange() { + resetRedstone(); + } + + private void resetRedstone() { + getBaseMetaTileEntity().setInternalOutputRedstoneSignal((byte) 0, (byte) 0); + getBaseMetaTileEntity().setInternalOutputRedstoneSignal((byte) 1, (byte) 0); + getBaseMetaTileEntity().setInternalOutputRedstoneSignal((byte) 2, (byte) 0); + getBaseMetaTileEntity().setInternalOutputRedstoneSignal((byte) 3, (byte) 0); + getBaseMetaTileEntity().setInternalOutputRedstoneSignal((byte) 4, (byte) 0); + getBaseMetaTileEntity().setInternalOutputRedstoneSignal((byte) 5, (byte) 0); + } + + public void changeGateData(int aIndex, int aValue) { + mGateData[aIndex] += aValue; + validateGateData(); + } + + public void stackGateData(int aIndex, ItemStack aStack) { + mGateData[aIndex] = GT_Utility.stackToInt(aStack); + validateGateData(); + } + + private void switchGate() { + resetRedstone(); + for (int i = 0; i < mGateData.length; i++) + mGateData[i] = 0; + GT_CircuitryBehavior tBehaviour = GregTech_API.sCircuitryBehaviors.get(mGate); + if (tBehaviour != null) + try { + tBehaviour.initParameters(mGateData, this); + } + catch (Throwable e) { + GT_Log.err.print(e); + } + validateGateData(); + } + + private void validateGateData() { + GT_CircuitryBehavior tBehaviour = GregTech_API.sCircuitryBehaviors.get(mGate); + if (tBehaviour != null) + try { + tBehaviour.validateParameters(mGateData, this); + } + catch (Throwable e) { + GT_Log.err.print(e); + } + } + + @Override + public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { + super.onFirstTick(aBaseMetaTileEntity); + getBaseMetaTileEntity().setGenericRedstoneOutput(true); + validateGateData(); + } + + @Override + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPreTick(aBaseMetaTileEntity, aTick); + getBaseMetaTileEntity().setGenericRedstoneOutput(true); + if (getBaseMetaTileEntity().isAllowedToWork() && getBaseMetaTileEntity().isServerSide()) { + mInventory[0] = mInventory[1] = mInventory[2] = mInventory[3] = mInventory[4] = null; + if (getBaseMetaTileEntity().getUniversalEnergyStored() > 400) { + if (getBaseMetaTileEntity().isActive()) { + GT_CircuitryBehavior tBehaviour = GregTech_API.sCircuitryBehaviors.get(mGate); + if (tBehaviour != null) { + try { + tBehaviour.onTick(mGateData, this); + if (tBehaviour.displayItemStack(mGateData, this, 0)) + mInventory[1] = getCoverByID(mGateData[0]); + if (tBehaviour.displayItemStack(mGateData, this, 1)) + mInventory[2] = getCoverByID(mGateData[1]); + if (tBehaviour.displayItemStack(mGateData, this, 2)) + mInventory[3] = getCoverByID(mGateData[2]); + if (tBehaviour.displayItemStack(mGateData, this, 3)) + mInventory[4] = getCoverByID(mGateData[3]); + } + catch (Throwable e) { + GT_Log.err.print(e); + } + } + } + getBaseMetaTileEntity().setErrorDisplayID(0); + } + else { + getBaseMetaTileEntity().setErrorDisplayID(1); + } + } + } + + + /** The Item List for Covers */ + public static final Map sCoversItems = new HashMap(); + + private static void initCovers() { + for (GT_ItemStack aKey : GregTech_API.sCovers.keySet()) { + ItemStack aStack = aKey.toStack().copy(); + if (aStack != null) { + sCoversItems.put(GT_Utility.stackToInt(aStack), aStack); + } + } + } + + public static ItemStack getCoverByID(int aStack) { + if (sCoversItems.isEmpty()) { + initCovers(); + } + return sCoversItems.get(Integer.valueOf(aStack)); + } + + @Override + public byte getOutputFacing() { + return getBaseMetaTileEntity().getBackFacing(); + } + + @Override + public boolean setRedstone(byte aStrength, byte aSide) { + if (getOutputRedstone(aSide) != aStrength) { + if (getBaseMetaTileEntity().decreaseStoredEnergyUnits(1, false)) { + getBaseMetaTileEntity().setInternalOutputRedstoneSignal(aSide, aStrength); + getBaseMetaTileEntity().setErrorDisplayID(0); + return true; + } + else { + getBaseMetaTileEntity().setErrorDisplayID(1); + return false; + } + } + return false; + } + + /* @Override + public int getTextureIndex(byte aSide, byte aFacing, boolean aActive, boolean aRedstone) { + if (aSide == getOutputFacing()) { + if (aSide == 0) + return aRedstone ? 56 : 54; + if (aSide == 1) + return aRedstone ? 53 : 52; + return aRedstone ? 94 : 93; + } + if (aSide == 0) + return aRedstone ? 60 : 59; + if (aSide == 1) + return aRedstone ? 58 : 57; + return aRedstone ? 62 : 61; + }*/ + + @Override + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return false; + } + + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return false; + } + + @Override + public byte getOutputRedstone(byte aSide) { + return getBaseMetaTileEntity().getOutputRedstoneSignal(aSide); + } + + @Override + public byte getInputRedstone(byte aSide) { + return getBaseMetaTileEntity().getInternalInputRedstoneSignal(aSide); + } + + @Override + public Block getBlockAtSide(byte aSide) { + return getBaseMetaTileEntity().getBlockAtSide(aSide); + } + + @Override + public byte getMetaIDAtSide(byte aSide) { + return getBaseMetaTileEntity().getMetaIDAtSide(aSide); + } + + @Override + public TileEntity getTileEntityAtSide(byte aSide) { + return getBaseMetaTileEntity().getTileEntityAtSide(aSide); + } + + @Override + public int getRandom(int aRange) { + return getBaseMetaTileEntity().getRandomNumber(aRange); + } + + @Override + public GT_CoverBehavior getCover(byte aSide) { + return getBaseMetaTileEntity().getCoverBehaviorAtSide(aSide); + } + + @Override + public int getCoverID(byte aSide) { + return getBaseMetaTileEntity().getCoverIDAtSide(aSide); + } + + @Override + public int getCoverVariable(byte aSide) { + return getBaseMetaTileEntity().getCoverDataAtSide(aSide); + } + + @Override + public ICoverable getOwnTileEntity() { + return getBaseMetaTileEntity(); + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + // TODO Auto-generated method stub + return null; + } + + @Override + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + // TODO Auto-generated method stub + return null; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java index 75128392ea..e71e71d6ed 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java @@ -5,27 +5,15 @@ import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.computer.GT_Computercube_Description; -import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_ElectricAutoWorkbench; -import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_ElectricInventoryManager; -import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_TesseractGenerator; -import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_TesseractTerminal; +import gtPlusPlus.xmod.gregtech.common.tileentities.automation.*; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_CropHarvestor; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GT4Entity_AutoCrafter; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GT4Entity_ThermalBoiler; import gtPlusPlus.xmod.gregtech.common.tileentities.misc.GT_TileEntity_ComputerCube; -import gtPlusPlus.xmod.gregtech.common.tileentities.redstone.GT_MetaTileEntity_RedstoneButtonPanel; -import gtPlusPlus.xmod.gregtech.common.tileentities.redstone.GT_MetaTileEntity_RedstoneLamp; -import gtPlusPlus.xmod.gregtech.common.tileentities.redstone.GT_MetaTileEntity_RedstoneStrengthDisplay; -import gtPlusPlus.xmod.gregtech.common.tileentities.redstone.GT_MetaTileEntity_RedstoneStrengthScale; +import gtPlusPlus.xmod.gregtech.common.tileentities.redstone.*; import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_AdvancedCraftingTable; import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_BronzeCraftingTable; -import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.GT4Entity_Shelf; -import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.GT4Entity_Shelf_Compartment; -import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.GT4Entity_Shelf_Desk; -import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.GT4Entity_Shelf_FileCabinet; -import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.GT4Entity_Shelf_Iron; -import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.GT4Entity_Shelf_Large; +import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.*; public class Gregtech4Content { @@ -66,6 +54,7 @@ public class Gregtech4Content { GregtechItemList.GT4_Redstone_Button_Panel.set(new GT_MetaTileEntity_RedstoneButtonPanel(31121).getStackForm(1L)); GregtechItemList.GT4_Redstone_Scale.set(new GT_MetaTileEntity_RedstoneStrengthScale(31122).getStackForm(1L)); GregtechItemList.GT4_Redstone_Display.set(new GT_MetaTileEntity_RedstoneStrengthDisplay(31123, "redstone.display.strength", "Redstone Display", "Displays Redstone Strength").getStackForm(1L)); + GregtechItemList.GT4_Redstone_Circuit.set(new GT_MetaTileEntity_RedstoneCircuitBlock(31124).getStackForm(1L)); } diff --git a/src/main/resources/assets/miscutils/textures/gui/RedstoneCircuitBlock.png b/src/main/resources/assets/miscutils/textures/gui/RedstoneCircuitBlock.png new file mode 100644 index 0000000000..0df259c657 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/gui/RedstoneCircuitBlock.png differ -- cgit From 8b30aa2f33741a9782cb9a1ef8628c4671723a58 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Thu, 20 Jan 2022 20:04:40 +0000 Subject: Add way to make Sunnarium without MT. Fix early init of FmlCommonHandler. --- .../block/general/BlockCompressedObsidian.java | 14 ++- src/main/java/gtPlusPlus/core/item/ModItems.java | 4 + .../core/item/general/ItemSunnariumBit.java | 16 ++++ .../gtPlusPlus/core/recipe/RECIPES_GREGTECH.java | 106 ++++++++++++--------- .../gtPlusPlus/core/recipe/RECIPES_General.java | 29 +++++- .../preloader/asm/Preloader_FMLLoadingPlugin.java | 2 +- .../resources/assets/miscutils/lang/en_US.lang | 5 + .../textures/blocks/compressed/glowstone1.png | Bin 0 -> 900 bytes .../textures/blocks/compressed/glowstone2.png | Bin 0 -> 997 bytes .../textures/blocks/compressed/glowstone3.png | Bin 0 -> 1138 bytes .../textures/blocks/compressed/glowstone4.png | Bin 0 -> 1175 bytes .../textures/blocks/compressed/glowstone5.png | Bin 0 -> 1276 bytes .../miscutils/textures/items/itemSunnariumBit.png | Bin 0 -> 276 bytes 13 files changed, 125 insertions(+), 51 deletions(-) create mode 100644 src/main/java/gtPlusPlus/core/item/general/ItemSunnariumBit.java create mode 100644 src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone1.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone2.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone3.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone4.png create mode 100644 src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone5.png create mode 100644 src/main/resources/assets/miscutils/textures/items/itemSunnariumBit.png (limited to 'src/main/resources/assets/miscutils/textures') diff --git a/src/main/java/gtPlusPlus/core/block/general/BlockCompressedObsidian.java b/src/main/java/gtPlusPlus/core/block/general/BlockCompressedObsidian.java index 03ca846b7d..2cf40160a3 100644 --- a/src/main/java/gtPlusPlus/core/block/general/BlockCompressedObsidian.java +++ b/src/main/java/gtPlusPlus/core/block/general/BlockCompressedObsidian.java @@ -23,7 +23,7 @@ import gtPlusPlus.core.lib.CORE; public class BlockCompressedObsidian extends BlockObsidian { - private final IIcon textureArray[] = new IIcon[6]; + private final IIcon textureArray[] = new IIcon[11]; public BlockCompressedObsidian() { this.setBlockName("blockCompressedObsidian"); @@ -36,9 +36,12 @@ public class BlockCompressedObsidian extends BlockObsidian { @Override public MapColor getMapColor(final int meta) { - if (meta != 5) { + if (meta < 5) { return MapColor.obsidianColor; } + if (meta > 5) { + return MapColor.goldColor; + } else { return MapColor.sandColor; } @@ -53,6 +56,11 @@ public class BlockCompressedObsidian extends BlockObsidian { this.textureArray[3] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "obsidian4"); this.textureArray[4] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "obsidian5"); this.textureArray[5] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "obsidian_invert"); + this.textureArray[6] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "glowstone1"); + this.textureArray[7] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "glowstone2"); + this.textureArray[8] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "glowstone3"); + this.textureArray[9] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "glowstone4"); + this.textureArray[10] = iicon.registerIcon(CORE.MODID + ":" + "compressed/" + "glowstone5"); } /** @@ -71,7 +79,7 @@ public class BlockCompressedObsidian extends BlockObsidian { @Override public void getSubBlocks(final Item item, final CreativeTabs tab, final List list) { - for (int i = 0; i < 6; i++) { + for (int i = 0; i < 11; i++) { list.add(new ItemStack(item, 1, i)); } } diff --git a/src/main/java/gtPlusPlus/core/item/ModItems.java b/src/main/java/gtPlusPlus/core/item/ModItems.java index 99ecd96d87..fd3d8c7a2b 100644 --- a/src/main/java/gtPlusPlus/core/item/ModItems.java +++ b/src/main/java/gtPlusPlus/core/item/ModItems.java @@ -305,6 +305,8 @@ public final class ModItems { public static ItemGenericToken itemGenericToken; public static Item itemControlCore; + + public static Item itemSunnariumBit; public static ItemStack itemHotTitaniumIngot; @@ -867,6 +869,8 @@ public final class ModItems { itemDragonJar = new ItemEntityCatcher(); itemControlCore = new ItemControlCore(); + + itemSunnariumBit = new ItemSunnariumBit(); //Chemistry new CoalTar(); diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemSunnariumBit.java b/src/main/java/gtPlusPlus/core/item/general/ItemSunnariumBit.java new file mode 100644 index 0000000000..fb713d4962 --- /dev/null +++ b/src/main/java/gtPlusPlus/core/item/general/ItemSunnariumBit.java @@ -0,0 +1,16 @@ +package gtPlusPlus.core.item.general; + +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.item.base.CoreItem; +import gtPlusPlus.core.lib.CORE; +import net.minecraft.item.EnumRarity; +import net.minecraft.util.EnumChatFormatting; + +public class ItemSunnariumBit extends CoreItem { + + public ItemSunnariumBit() { + super("item.SunnariumBit", "Sunnarium Bit", AddToCreativeTab.tabMisc, 64, 0, new String[] {}, EnumRarity.uncommon, EnumChatFormatting.GOLD, false, null); + this.setTextureName(CORE.MODID+":"+"itemSunnariumBit"); + } + +} diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java index adf93c0f69..57c44207a5 100644 --- a/src/main/java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java @@ -4,15 +4,13 @@ import static gtPlusPlus.core.lib.CORE.GTNH; import java.util.ArrayList; +import advsolar.common.AdvancedSolarPanel; import cpw.mods.fml.common.Loader; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.HotFuel; -import gregtech.api.util.ThermalFuel; +import gregtech.api.util.*; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.item.ModItems; @@ -93,6 +91,7 @@ public class RECIPES_GREGTECH { fluidheaterRecipes(); chemplantRecipes(); packagerRecipes(); + implosionRecipes(); /** @@ -112,8 +111,18 @@ public class RECIPES_GREGTECH { private static void packagerRecipes() { - - + + + } + + private static void implosionRecipes() { + + GT_Values.RA.addImplosionRecipe( + ItemUtils.getSimpleStack(ModItems.itemSunnariumBit, 9), + 16, + ItemUtils.getSimpleStack(AdvancedSolarPanel.itemSunnariumPart, 1), + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glowstone, 8)); + } private static void chemplantRecipes() { @@ -358,7 +367,7 @@ public class RECIPES_GREGTECH { CI.getTertiaryTieredFluid(aLaureniumTier-2, 6 * 144) }, new ItemStack[] { - GregtechItemList.Casing_Machine_Custom_3.get(1) + GregtechItemList.Casing_Machine_Custom_3.get(1) }, new FluidStack[] { @@ -366,7 +375,7 @@ public class RECIPES_GREGTECH { 20 * 20, MaterialUtils.getVoltageForTier(aLaureniumTier-2), 5); - + int aBotmiumTier = ALLOY.BOTMIUM.vTier; // Adding Recipes for Casings CORE.RA.addChemicalPlantRecipe( @@ -382,7 +391,7 @@ public class RECIPES_GREGTECH { CI.getTertiaryTieredFluid(aBotmiumTier-2, 6 * 144) }, new ItemStack[] { - GregtechItemList.Casing_Machine_Custom_4.get(1) + GregtechItemList.Casing_Machine_Custom_4.get(1) }, new FluidStack[] { @@ -390,7 +399,7 @@ public class RECIPES_GREGTECH { 20 * 20, MaterialUtils.getVoltageForTier(aBotmiumTier-2), 6); - + //Refine GT HF into GT++ HF if (FluidUtils.doesHydrofluoricAcidGtExist()) { @@ -873,7 +882,12 @@ public class RECIPES_GREGTECH { 20 * 60 * 5, MaterialUtils.getVoltageForTier(5)); - + GT_Values.RA.addLaserEngraverRecipe( + GregtechItemList.Laser_Lens_WoodsGlass.get(0), + ItemUtils.simpleMetaStack(ModBlocks.blockCompressedObsidian, 8, 1), + ItemUtils.getSimpleStack(ModItems.itemSunnariumBit, 3), + 20 * 60 * 5, + MaterialUtils.getVoltageForTier(3)); } @@ -1682,7 +1696,7 @@ public class RECIPES_GREGTECH { final FluidStack[] sulfurdioxideOutput = { FluidUtils.getFluidStack("oxygen", 2000) - }; + }; GT_Values.RA.addDistillationTowerRecipe( FluidUtils.getFluidStack("sulfurdioxide", 144 * 3), sulfurdioxideOutput, @@ -1718,7 +1732,7 @@ public class RECIPES_GREGTECH { ItemUtils.getItemStackOfAmountFromOreDict("dustSmallTungstate", 1), ItemUtils.getSimpleStack(Blocks.obsidian) }, new int[] { 750, 250, 250, 250, 1850 }, 0); - + HotFuel.addNewHotFuel( MISC_MATERIALS.SOLAR_SALT_HOT.getFluidStack(1000), MISC_MATERIALS.SOLAR_SALT_COLD.getFluidStack(1000), @@ -1751,15 +1765,15 @@ public class RECIPES_GREGTECH { } private static void fluidExtractorRecipes() { - + } private static void chemicalBathRecipes() { - + } private static void centrifugeRecipes() { - + GT_Values.RA.addCentrifugeRecipe( CI.getNumberedAdvancedCircuit(2), MISC_MATERIALS.SOLAR_SALT_COLD.getCell(10), @@ -1774,11 +1788,11 @@ public class RECIPES_GREGTECH { null, 20 * 30, 120); - + } private static void mixerRecipes() { - + GT_Values.RA.addMixerRecipe( ItemUtils.getItemStackOfAmountFromOreDict("dustSulfur", 1), null, @@ -1789,7 +1803,7 @@ public class RECIPES_GREGTECH { null, 600, 60); - + GT_Values.RA.addMixerRecipe( CI.getNumberedAdvancedCircuit(2), CI.emptyCells(10), @@ -1800,13 +1814,13 @@ public class RECIPES_GREGTECH { MISC_MATERIALS.SOLAR_SALT_COLD.getCell(10), 20 * 10, 120); - - - + + + } private static void chemicalReactorRecipes() { - + //Bombs GT_Values.RA.addChemicalRecipe( ItemUtils.getSimpleStack(ModItems.itemBombCasing, 4), @@ -1823,7 +1837,7 @@ public class RECIPES_GREGTECH { null, ItemUtils.getSimpleStack(ModItems.itemBomb, 4), 10 * 20); - + GT_Values.RA.addChemicalRecipe( CI.getNumberedAdvancedCircuit(21), ItemUtils.getItemStackOfAmountFromOreDict("dustApatite", 32), @@ -1832,24 +1846,24 @@ public class RECIPES_GREGTECH { ItemUtils.getItemStackOfAmountFromOreDict("dustSmallSulfur", 8), 20 * 20); - GT_Values.RA.addChemicalRecipe( - Materials.Potassium.getDust(1), - CI.getNumberedAdvancedCircuit(1), - Materials.NitricAcid.getFluid(1000), - GT_Values.NF, - MISC_MATERIALS.POTASSIUM_NITRATE.getDust(1), - 100, - 30); - - GT_Values.RA.addChemicalRecipe( - ItemUtils.getSimpleStack(AgriculturalChem.mSodiumCarbonate, 1), - CI.getNumberedAdvancedCircuit(1), - Materials.NitricAcid.getFluid(1000), - GT_Values.NF, - MISC_MATERIALS.SODIUM_NITRATE.getDust(1), - 100, - 30); - + GT_Values.RA.addChemicalRecipe( + Materials.Potassium.getDust(1), + CI.getNumberedAdvancedCircuit(1), + Materials.NitricAcid.getFluid(1000), + GT_Values.NF, + MISC_MATERIALS.POTASSIUM_NITRATE.getDust(1), + 100, + 30); + + GT_Values.RA.addChemicalRecipe( + ItemUtils.getSimpleStack(AgriculturalChem.mSodiumCarbonate, 1), + CI.getNumberedAdvancedCircuit(1), + Materials.NitricAcid.getFluid(1000), + GT_Values.NF, + MISC_MATERIALS.SODIUM_NITRATE.getDust(1), + 100, + 30); + } @@ -1903,7 +1917,7 @@ public class RECIPES_GREGTECH { } private static void autoclaveRecipes() { - + } private static void benderRecipes() { @@ -1926,7 +1940,7 @@ public class RECIPES_GREGTECH { } private static void macerationRecipes() { - + GT_ModHandler.addPulverisationRecipe(ItemUtils.getItemStackOfAmountFromOreDict("blockMeatRaw", 1), ItemUtils.getItemStackOfAmountFromOreDict("dustMeatRaw", 9)); @@ -2266,11 +2280,11 @@ public class RECIPES_GREGTECH { } private static void sifterRecipes() { - + } private static void electroMagneticSeperatorRecipes() { - + if (!GTNH) { // Trinium GT_Values.RA.addElectromagneticSeparatorRecipe( diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_General.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_General.java index 61bae54b31..218c3a1408 100644 --- a/src/main/java/gtPlusPlus/core/recipe/RECIPES_General.java +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_General.java @@ -381,11 +381,12 @@ public class RECIPES_General { private static boolean addCompressedObsidian(){ //Invert Obsidian + ItemStack aInvertedObsidian = ItemUtils.simpleMetaStack(ModBlocks.blockCompressedObsidian, 5, 1); if (RecipeUtils.addShapedRecipe( getSimpleStack(Items.redstone), getSimpleStack(Items.glowstone_dust), getSimpleStack(Items.redstone), getSimpleStack(Items.glowstone_dust), ItemUtils.simpleMetaStack(ModBlocks.blockCompressedObsidian, 1, 1), getSimpleStack(Items.glowstone_dust), getSimpleStack(Items.redstone), getSimpleStack(Items.glowstone_dust), getSimpleStack(Items.redstone), - ItemUtils.simpleMetaStack(ModBlocks.blockCompressedObsidian, 5, 1))){ + aInvertedObsidian)){ Logger.INFO("Added a recipe for Inverted Obsidian."); } @@ -394,6 +395,12 @@ public class RECIPES_General { for (int r=0;r<5;r++){ mItems[r+1] = ItemUtils.simpleMetaStack(ModBlocks.blockCompressedObsidian, r, 1); } + + final ItemStack[] mItems2 = new ItemStack[6]; + mItems2[0] = ItemUtils.getSimpleStack(Blocks.glowstone); + for (int r=0;r<5;r++){ + mItems2[r+1] = ItemUtils.simpleMetaStack(ModBlocks.blockCompressedObsidian, 6+r, 1); + } //Compressed Obsidian 1-5 for (int r=0;r<5;r++){ @@ -413,6 +420,26 @@ public class RECIPES_General { Logger.INFO("Added a shapeless recipe for Compressed Obsidian ["+r+"]"); } + } + + //Compressed Glowstone 1-5 + for (int r=0;r<5;r++){ + + final ItemStack input = mItems2[r]; + final ItemStack output = mItems2[r+1]; + + if (RecipeUtils.addShapedRecipe( + input, input, input, + input, aInvertedObsidian, input, + input, input, input, + output)){ + Logger.INFO("Added a recipe for Compressed Glowstone ["+r+"]"); + } + + if (RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{output}, ItemUtils.getSimpleStack(input, 9))){ + Logger.INFO("Added a shapeless recipe for Compressed Glowstone ["+r+"]"); + } + } return true; } diff --git a/src/main/java/gtPlusPlus/preloader/asm/Preloader_FMLLoadingPlugin.java b/src/main/java/gtPlusPlus/preloader/asm/Preloader_FMLLoadingPlugin.java index c93b37e6fb..5ff001ea2a 100644 --- a/src/main/java/gtPlusPlus/preloader/asm/Preloader_FMLLoadingPlugin.java +++ b/src/main/java/gtPlusPlus/preloader/asm/Preloader_FMLLoadingPlugin.java @@ -76,7 +76,7 @@ public class Preloader_FMLLoadingPlugin implements IFMLLoadingPlugin { CORE_Preloader.DEV_ENVIRONMENT = (Boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment"); CORE_Preloader.DEBUG_MODE = AsmConfig.debugMode; Preloader_Logger.INFO("Running on "+gtPlusPlus.preloader.CORE_Preloader.JAVA_VERSION+" | Development Environment: "+CORE_Preloader.DEV_ENVIRONMENT); - Preloader_Logger.INFO("Is Client? "+Utils.isClient()+" | Is Server? "+Utils.isServer()); + //Preloader_Logger.INFO("Is Client? "+Utils.isClient()+" | Is Server? "+Utils.isServer()); Locale aDefaultLocale = Locale.getDefault(); NumberFormat aFormat = NumberFormat.getInstance(); Locale aDisplayLocale = (Locale) ReflectionUtils.getFieldValue(ReflectionUtils.getField(Locale.class, "defaultDisplayLocale")); diff --git a/src/main/resources/assets/miscutils/lang/en_US.lang b/src/main/resources/assets/miscutils/lang/en_US.lang index 7a021cbc26..679211cbf1 100644 --- a/src/main/resources/assets/miscutils/lang/en_US.lang +++ b/src/main/resources/assets/miscutils/lang/en_US.lang @@ -107,6 +107,11 @@ tile.blockCompressedObsidian.2.name=Triple Compressed Obsidian (729) tile.blockCompressedObsidian.3.name=Quadruple Compressed Obsidian (6561) tile.blockCompressedObsidian.4.name=Quintuple Compressed Obsidian (59049) tile.blockCompressedObsidian.5.name=Inverted Obsidian +tile.blockCompressedObsidian.6.name=Compressed Glowstone (9) +tile.blockCompressedObsidian.7.name=Double Compressed Glowstone (81) +tile.blockCompressedObsidian.8.name=Triple Compressed Glowstone (729) +tile.blockCompressedObsidian.9.name=Quadruple Compressed Glowstone (6561) +tile.blockCompressedObsidian.10.name=Quintuple Compressed Glowstone (59049) tile.blockNet.name=Net diff --git a/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone1.png b/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone1.png new file mode 100644 index 0000000000..17010ff1a3 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone1.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone2.png b/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone2.png new file mode 100644 index 0000000000..72befd9bfd Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone2.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone3.png b/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone3.png new file mode 100644 index 0000000000..8af7fb854c Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone3.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone4.png b/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone4.png new file mode 100644 index 0000000000..3def965ce9 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone4.png differ diff --git a/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone5.png b/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone5.png new file mode 100644 index 0000000000..b97c9add06 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/blocks/compressed/glowstone5.png differ diff --git a/src/main/resources/assets/miscutils/textures/items/itemSunnariumBit.png b/src/main/resources/assets/miscutils/textures/items/itemSunnariumBit.png new file mode 100644 index 0000000000..acf4cbd064 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/itemSunnariumBit.png differ -- cgit