From fe7e9a044bb0050329f89ff54b08ba14c05ebd73 Mon Sep 17 00:00:00 2001 From: Pilad Date: Sun, 4 Aug 2024 23:38:05 +0500 Subject: [PATCH 1/2] Add CreativeUncertainty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Добавил с гтнх автоматический решатель задачи Шредингера для компа. --- .../spartakcore/SpartakCoreRecipeLoader.java | 9 +++ .../tectech/loader/thing/MachineLoader.java | 1 + .../technus/tectech/thing/CustomItemList.java | 2 +- ...aTileEntity_Hatch_CreativeUncertainty.java | 57 +++++++++++++++++++ .../resources/assets/tectech/lang/en_US.lang | 2 + .../resources/assets/tectech/lang/ru_RU.lang | 2 + 6 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_CreativeUncertainty.java diff --git a/src/main/java/com/github/technus/tectech/compatibility/spartakcore/SpartakCoreRecipeLoader.java b/src/main/java/com/github/technus/tectech/compatibility/spartakcore/SpartakCoreRecipeLoader.java index 221004f9b..4226e1c59 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/spartakcore/SpartakCoreRecipeLoader.java +++ b/src/main/java/com/github/technus/tectech/compatibility/spartakcore/SpartakCoreRecipeLoader.java @@ -334,6 +334,15 @@ public void run() { new ItemStack(Blocks.stone_button, 16), GT_Utility.getIntegratedCircuit(5), }, Materials.Iridium.getMolten(2592), CustomItemList.UncertaintyX_Hatch.get(1), 1400, 500000, true); + + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + CustomItemList.eM_Computer_Casing.get(1), + ItemList.Circuit_Nano.get(1), + CustomItemList.DATApipe.get(48), + ItemList.Cover_Screen.get(1), + new ItemStack(Blocks.stone_button, 16), + GT_Utility.getIntegratedCircuit(6), + }, Materials.Iridium.getMolten(2592), CustomItemList.hatch_CreativeUncertainty.get(1), 1600, 2000000, true); //Elemental Input GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ diff --git a/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java b/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java index 392024c1e..40b66ba8b 100644 --- a/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java @@ -612,6 +612,7 @@ public void run() { Machine_DebugGenny.set(new GT_MetaTileEntity_DebugPowerGenerator(15498, "debug.tt.genny", "Debug Power Generator", 15).getStackForm(1L)); Machine_DebugWriter.set(new GT_MetaTileEntity_DebugStructureWriter(15499, "debug.tt.writer", "Debug Structure Writer", 15).getStackForm(1L)); UnusedStuff.set(new ItemStack(Blocks.air)); + hatch_CreativeUncertainty.set(new GT_MetaTileEntity_Hatch_CreativeUncertainty(15500, "debug.tt.certain", "Uncertainty Resolution", 14).getStackForm(1)); // =================================================================================================== // MetaTE init diff --git a/src/main/java/com/github/technus/tectech/thing/CustomItemList.java b/src/main/java/com/github/technus/tectech/thing/CustomItemList.java index 53fff5e5a..9cabe585b 100644 --- a/src/main/java/com/github/technus/tectech/thing/CustomItemList.java +++ b/src/main/java/com/github/technus/tectech/thing/CustomItemList.java @@ -11,7 +11,7 @@ import static gregtech.api.enums.GT_Values.W; public enum CustomItemList implements IItemContainer { - hatch_CreativeMaintenance, hatch_CreativeData, + hatch_CreativeMaintenance, hatch_CreativeData, hatch_CreativeUncertainty, Machine_OwnerDetector, Machine_DataReader, Machine_BuckConverter_IV, Machine_BuckConverter_LuV, Machine_BuckConverter_ZPM, Machine_BuckConverter_UV, Machine_BuckConverter_UHV, Machine_BuckConverter_UEV, diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_CreativeUncertainty.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_CreativeUncertainty.java new file mode 100644 index 000000000..a9391fa64 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_CreativeUncertainty.java @@ -0,0 +1,57 @@ +package com.github.technus.tectech.thing.metaTileEntity.hatch; + +import static net.minecraft.util.StatCollector.translateToLocal; + +import net.minecraft.util.EnumChatFormatting; + +import com.github.technus.tectech.util.CommonValues; + +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +public class GT_MetaTileEntity_Hatch_CreativeUncertainty extends GT_MetaTileEntity_Hatch_Uncertainty { + + public GT_MetaTileEntity_Hatch_CreativeUncertainty(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier); + } + + public GT_MetaTileEntity_Hatch_CreativeUncertainty(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) { + return new GT_MetaTileEntity_Hatch_CreativeUncertainty(mName, mTier, mDescription, mTextures); + } + + @Override + public String[] getDescription() { + return new String[] { CommonValues.TEC_MARK_EM, translateToLocal("gt.blockmachines.debug.tt.certain.desc.0"), // Feeling + // certain, + // for + // sure + EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + + translateToLocal("gt.blockmachines.debug.tt.certain.desc.1") // Schrödinger's cat escaped the + // box + }; + } + + @Override + public void regenerate() { + // no-op + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if (aBaseMetaTileEntity.isServerSide() && (aTick % 100) == 0) { + if (mode == 0) { + aBaseMetaTileEntity.setActive(false); + status = -128; + } else { + aBaseMetaTileEntity.setActive(true); + compute(); + } + } + } +} diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index 78513b457..ab9a46fb5 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -791,6 +791,8 @@ gt.blockmachines.debug.tt.writer.name=Debug Structure Writer gt.blockmachines.debug.tt.writer.desc.0=Scans Blocks Around gt.blockmachines.debug.tt.writer.desc.1=Prints Multiblock NonTE structure check code gt.blockmachines.debug.tt.writer.desc.2=ABC axises aligned to machine front +gt.blockmachines.debug.tt.certain.desc.0=Feeling certain, for sure +gt.blockmachines.debug.tt.certain.desc.1=Schrödinger's cat escaped the box #Keywords and phrases #Example: ID:3 diff --git a/src/main/resources/assets/tectech/lang/ru_RU.lang b/src/main/resources/assets/tectech/lang/ru_RU.lang index 05186f11d..68dbdb3e5 100644 --- a/src/main/resources/assets/tectech/lang/ru_RU.lang +++ b/src/main/resources/assets/tectech/lang/ru_RU.lang @@ -791,6 +791,8 @@ gt.blockmachines.debug.tt.writer.name=Debug Structure Writer gt.blockmachines.debug.tt.writer.desc.0=Scans Blocks Around gt.blockmachines.debug.tt.writer.desc.1=Prints Multiblock NonTE structure check code gt.blockmachines.debug.tt.writer.desc.2=ABC axises aligned to machine front +gt.blockmachines.debug.tt.certain.desc.0=Feeling certain, for sure +gt.blockmachines.debug.tt.certain.desc.1=Schrödinger's cat escaped the box #Keywords and phrases #Example: ID:3 From 7e0d4879e7b082163719b3043df1a9c6dd000314 Mon Sep 17 00:00:00 2001 From: Pilad Date: Mon, 5 Aug 2024 00:08:39 +0500 Subject: [PATCH 2/2] RS texture fix. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Фикс текстуры обжект холдера. --- .../metaTileEntity/multi/GT_MetaTileEntity_EM_research.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java index 8a5acec35..3ac930e89 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java @@ -75,7 +75,7 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB .addElement('B', ofBlock(sBlockCasingsTT, 2)) .addElement('C', ofBlock(sBlockCasingsTT, 3)) .addElement('D', ofHatchAdderOptional(GT_MetaTileEntity_EM_research::addClassicToMachineList, textureOffset + 1, 1, sBlockCasingsTT, 1)) - .addElement('E', ofHatchAdder(GT_MetaTileEntity_EM_research::addHolderToMachineList, 3, 2)) + .addElement('E', ofHatchAdder(GT_MetaTileEntity_EM_research::addHolderToMachineList, textureOffset + 3, 2)) .build(); private static LinkedHashMap lServerNames;