diff options
author | Glease <4586901+Glease@users.noreply.github.com> | 2023-04-02 00:02:47 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-01 18:02:47 +0200 |
commit | 6b77557e0e87cf5afd9ebd3985323ff1249e615c (patch) | |
tree | 36474042ef39f863aedc007eab81a9b09cc7aa78 /src/main/java/gregtech/common/tileentities/machines/basic | |
parent | 655cc902d3df19a1ac2bfaa38cc928ed629d0171 (diff) | |
download | GT5-Unofficial-6b77557e0e87cf5afd9ebd3985323ff1249e615c.tar.gz GT5-Unofficial-6b77557e0e87cf5afd9ebd3985323ff1249e615c.tar.bz2 GT5-Unofficial-6b77557e0e87cf5afd9ebd3985323ff1249e615c.zip |
Recipe Adder v2 (#1770)
* add everything
* fixes
* migrate plasma forge recipes
* syntax update
* make chances array length differ a fatal error
* time constants + long eut overload
* migrate extruder recipes
* migrate electromagnetic separator recipes
* migrate wiremill recipes
* migrate forming press recipes
* migrate bender recipes
* add doc to clarify the three itemInputs
* migrate alloy smelter recipes
* migrate arc furnace recipes
* added ModIDs enum
* sort ModIDs
* migrate autoclave recipes
* migrated some assembler recipes
* split a bit more assembler recipes
* migrate canner recipes
* migrate brewing recipes
* ic2 mod check in canner recipes
* use some loops to reduce the amount of recipes to migrate
* add requested helper methods
* migrate vacuum freezer recipes
* migrate thermal centrifuge recipes
* format smelter recipes only, doesn't go through normal GT recipe
* migrated slicer recipes
* migrated sifter recipes
* Use proper enum now
* remove more constants
* cleaning cutting recipes before migration
* remove tons of dead commented recipes
* migrate pyrolyse recipes
* use ModIDs enum more
* migrate printer recipes
* add a less confusing way to specify value of specialItem
* migrate pulverizer recipes
* less confusing special item specification
* even more ModIDs enum usage
* fix auto * import confusing Minecraft enum value with Minecraft client object
* migrated blast furnace recipes
* migrated Centrifuge recipes
* migrated assembler recipes
* migrated implosion compressor recipes
* migrated extractor recipes
* migrated mixer recipes
* remove useless code
* mgrate universal chemical recipes
* refactor chemical recipes
* migrate single block only chem reactor recipes
* migrate chem reactor recipes
* reworked circuit assembler recipes before migrating them
* migrated circuit assembler recipes
* fix merge conflict for assembler recipes
* remove leftover of the merge conflicts
* fix weird translation glitch
* example of assembly line recipe using RA2
* bugfixes for assline
* remove specialValue usage in blast furnace recipes
* fix more bugs
* add nooptimize to where it make sense
* add recipe descriptions
* Materials.Superconductor -> Materials.SuperconductorUHV
* remove useless Object creations
* remove explicit long casts
* migrate assemblyline recipes
* migrate chemical bath recipes
* migrate compressor recipes
* move smelting recipe where it belongs
* migrated cutting machine recipes
* migrated fermenter recipes (unhide alcohol)
* remove explicit long casts
* migrate fluid canner recipes
* migrate fluid heater recipes
* migrated fusion recipes
* migrated lathe recipes
* migrated laser engraver recipes
* migrated packager recipes
* migrated forge hammer recipes
* migrated TPM recipes
* exit early and reduced indents
* migrated fluid extractor recipes
* migrated fluid solidifier recipes
* migrated electrolyzer recipes
* migrated crop processing recipes
* migrated default polymerization recipes
* migrate distillery recipes
* migrate matter amplifier recipes
* add metadata identifier for fusion ignition threshold
* migrate fuel recipes
* update bs
(cherry picked from commit c2d931c9b6caa0376e9d50591894cd849021104d)
* spotless
(cherry picked from commit 1060f5357fb95e28bfae1f052025f55dabc21a0f)
* guard against null itemstacks
* wrong translation
* fix empty arrays being accessed
* add 0 duration and 0 EU/t for fuel recipes
* fix typo in matter amplifier recipes
* spotless apply
---------
Co-authored-by: boubou19 <miisterunknown@gmail.com>
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Diffstat (limited to 'src/main/java/gregtech/common/tileentities/machines/basic')
2 files changed, 22 insertions, 16 deletions
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java index bc6f50fde6..595953c06f 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java @@ -1,6 +1,6 @@ package gregtech.common.tileentities.machines.basic; -import static gregtech.api.enums.GT_Values.MOD_ID_RC; +import static gregtech.api.enums.ModIDs.Railcraft; import static gregtech.api.enums.Textures.BlockIcons.*; import java.util.*; @@ -137,9 +137,11 @@ public class GT_MetaTileEntity_Disassembler extends GT_MetaTileEntity_BasicMachi addBlacklist(Materials.Graphene.getDust(1)); addBlacklist(ItemList.Circuit_Parts_Vacuum_Tube.get(1L)); addBlacklist(ItemList.Schematic.get(1L)); - addBlacklist(GT_ModHandler.getModItem(MOD_ID_RC, "track", 1L, 0)); - addBlacklist(GT_ModHandler.getModItem(MOD_ID_RC, "track", 1L, 736)); - addBlacklist(GT_ModHandler.getModItem(MOD_ID_RC, "track", 1L, 816)); + if (Railcraft.isModLoaded()) { + addBlacklist(GT_ModHandler.getModItem(Railcraft.modID, "track", 1L, 0)); + addBlacklist(GT_ModHandler.getModItem(Railcraft.modID, "track", 1L, 736)); + addBlacklist(GT_ModHandler.getModItem(Railcraft.modID, "track", 1L, 816)); + } addBlacklist(IC2Items.getItem("mixedMetalIngot")); addBlacklist(GT_ModHandler.getModItem("Railcraft", "machine.alpha", 1L, 14)); // region transformer diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java index 20b42e7bb4..3f37effffa 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java @@ -1,6 +1,8 @@ package gregtech.common.tileentities.machines.basic; import static gregtech.api.enums.GT_Values.*; +import static gregtech.api.enums.ModIDs.GalacticraftCore; +import static gregtech.api.enums.ModIDs.GalacticraftMars; import static gregtech.api.enums.Textures.BlockIcons.*; import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes; @@ -228,36 +230,38 @@ public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine { int stackItemID = Item.getIdFromItem(aStack.getItem()); int stackItemDamage = aStack.getItemDamage(); if (stackItemID == Item.getIdFromItem( - Objects.requireNonNull(GT_ModHandler.getModItem(MOD_ID_GC_CORE, "item.schematic", 1L, 0)) + Objects.requireNonNull( + GT_ModHandler.getModItem(GalacticraftCore.modID, "item.schematic", 1L, 0)) .getItem())) { if (stackItemDamage == 0 && aStack.toString().equals( Objects.requireNonNull( - GT_ModHandler.getModItem(MOD_ID_GC_CORE, "item.schematic", 1L, 0)).copy() - .toString())) + GT_ModHandler.getModItem(GalacticraftCore.modID, "item.schematic", 1L, 0)) + .copy().toString())) sTier = "100"; else if (stackItemDamage == 1 && aStack.toString().equals( Objects.requireNonNull( - GT_ModHandler.getModItem(MOD_ID_GC_CORE, "item.schematic", 1L, 1)).copy() - .toString())) + GT_ModHandler.getModItem(GalacticraftCore.modID, "item.schematic", 1L, 1)) + .copy().toString())) sTier = "2"; } else { if (stackItemID == Item.getIdFromItem( Objects.requireNonNull( - GT_ModHandler.getModItem(MOD_ID_GC_MARS, "item.schematic", 1L, 0)).getItem())) { + GT_ModHandler.getModItem(GalacticraftMars.modID, "item.schematic", 1L, 0)) + .getItem())) { if (stackItemDamage == 0 && aStack.toString().equals( Objects.requireNonNull( - GT_ModHandler.getModItem(MOD_ID_GC_MARS, "item.schematic", 1L, 0)).copy() - .toString())) + GT_ModHandler.getModItem(GalacticraftMars.modID, "item.schematic", 1L, 0)) + .copy().toString())) sTier = "3"; else if (stackItemDamage == 1 && aStack.toString().equals( Objects.requireNonNull( - GT_ModHandler.getModItem(MOD_ID_GC_MARS, "item.schematic", 1L, 1)).copy() - .toString())) + GT_ModHandler.getModItem(GalacticraftMars.modID, "item.schematic", 1L, 1)) + .copy().toString())) sTier = "101"; else if (stackItemDamage == 2 && aStack.toString().equals( Objects.requireNonNull( - GT_ModHandler.getModItem(MOD_ID_GC_MARS, "item.schematic", 1L, 2)).copy() - .toString())) + GT_ModHandler.getModItem(GalacticraftMars.modID, "item.schematic", 1L, 2)) + .copy().toString())) sTier = "102"; } else if (aStack.getUnlocalizedName().matches(".*\\d+.*")) sTier = aStack.getUnlocalizedName().split("(?<=\\D)(?=\\d)")[1].substring(0, 1); |