diff options
| author | Raven Szewczyk <git@eigenraven.me> | 2024-05-24 19:04:17 +0100 |
|---|---|---|
| committer | Raven Szewczyk <git@eigenraven.me> | 2024-05-24 19:04:17 +0100 |
| commit | 69ce418e29e22391f60cdd55815727762a78c33a (patch) | |
| tree | 97be683e94b8a541d7578760a154f16d4dea38e2 /src/main/java/gtPlusPlus/xmod/gregtech/api | |
| parent | 38f38a991e433f6eff30476b87a71eeadee228ce (diff) | |
| download | GT5-Unofficial-69ce418e29e22391f60cdd55815727762a78c33a.tar.gz GT5-Unofficial-69ce418e29e22391f60cdd55815727762a78c33a.tar.bz2 GT5-Unofficial-69ce418e29e22391f60cdd55815727762a78c33a.zip | |
Apply updated GT5u spotless configs
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/api')
47 files changed, 2263 insertions, 2066 deletions
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 a9df5bf301..6367d22f77 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java @@ -872,7 +872,7 @@ public enum GregtechItemList implements GregtechItemContainer { return false; } return GT_Utility - .areUnificationsEqual((ItemStack) aStack, aWildcard ? this.getWildcard(1) : this.get(1), aIgnoreNBT); + .areUnificationsEqual((ItemStack) aStack, aWildcard ? this.getWildcard(1) : this.get(1), aIgnoreNBT); } public static Block getBlockFromStack(Object aStack) { @@ -922,7 +922,7 @@ public enum GregtechItemList implements GregtechItemContainer { return GT_Utility.copyAmount(aAmount, aReplacements); } return GT_Utility - .copyAmountAndMetaData(aAmount, this.mStack.getMaxDamage() - 1, GT_OreDictUnificator.get(this.mStack)); + .copyAmountAndMetaData(aAmount, this.mStack.getMaxDamage() - 1, GT_OreDictUnificator.get(this.mStack)); } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java index 03ec5f3fc5..3185810495 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java @@ -46,28 +46,28 @@ public enum GregtechOrePrefixes { * and Lapotronic Energy Orb Infinite (Cheaty) */ ingotHot("Hot Ingots", "Hot ", " Ingot", true, true, false, false, false, false, false, true, false, false, B[1], - M * 1, 16, 12), // A hot Ingot, which has to be cooled down by a Vacuum Freezer. + M * 1, 16, 12), // A hot Ingot, which has to be cooled down by a Vacuum Freezer. ingot("Ingots", "", " Ingot", true, true, false, false, false, false, false, true, false, false, B[1], M * 1, 64, - 11), // A regular Ingot. Introduced by Eloraam + 11), // A regular Ingot. Introduced by Eloraam dustTiny("Tiny Dusts", "Tiny Pile of ", " Dust", true, true, false, false, false, false, false, true, false, false, - B[0] | B[1] | B[2] | B[3], M / 9, 64, 0), // 1/9th of a Dust. + B[0] | B[1] | B[2] | B[3], M / 9, 64, 0), // 1/9th of a Dust. dustSmall("Small Dusts", "Small Pile of ", " Dust", true, true, false, false, false, false, false, true, false, - false, B[0] | B[1] | B[2] | B[3], M / 4, 64, 1), // 1/4th of a Dust. + false, B[0] | B[1] | B[2] | B[3], M / 4, 64, 1), // 1/4th of a Dust. dustImpure("Impure Dusts", "Impure Pile of ", " Dust", true, true, false, false, false, false, false, true, false, - true, B[3], M * 1, 64, 3), // Dust with impurities. 1 Unit of Main Material and 1/9 - 1/4 Unit of secondary - // Material + true, B[3], M * 1, 64, 3), // Dust with impurities. 1 Unit of Main Material and 1/9 - 1/4 Unit of secondary + // Material dustRefined("Refined Dusts", "Refined Pile of ", " Dust", true, true, false, false, false, false, false, true, - false, true, B[3], M * 1, 64, 2), + false, true, B[3], M * 1, 64, 2), dustPure("Purified Dusts", "Purified Pile of ", " Dust", true, true, false, false, false, false, false, true, false, - true, B[3], M * 1, 64, 4), + true, B[3], M * 1, 64, 4), dust("Dusts", "", " Dust", true, true, false, false, false, false, false, true, false, false, - B[0] | B[1] | B[2] | B[3], M * 1, 64, 2), // Pure Dust worth of one Ingot or Gem. Introduced by Alblaka. + B[0] | B[1] | B[2] | B[3], M * 1, 64, 2), // Pure Dust worth of one Ingot or Gem. Introduced by Alblaka. nugget("Nuggets", "", " Nugget", true, true, false, false, false, false, false, true, false, false, B[1], M / 9, 64, - 9), // A Nugget. Introduced by Eloraam + 9), // A Nugget. Introduced by Eloraam plate("Plates", "", " Plate", true, true, false, false, false, false, true, true, false, false, B[1] | B[2], M * 1, - 64, 17), // Regular Plate made of one Ingot/Dust. Introduced by Calclavia + 64, 17), // Regular Plate made of one Ingot/Dust. Introduced by Calclavia block("Storage Blocks", "Block of ", "", true, true, false, false, false, true, true, false, false, false, 0, M * 9, - 64, 71), // Storage Block consisting out of 9 Ingots/Gems/Dusts. Introduced by CovertJaguar + 64, 71), // Storage Block consisting out of 9 Ingots/Gems/Dusts. Introduced by CovertJaguar gem("Gemstones", "", "", true, true, true, false, false, false, true, true, false, false, B[2], M * 1, 64, 8), // A // regular // Gem @@ -78,31 +78,31 @@ public enum GregtechOrePrefixes { // by // Eloraam gemChipped("Chipped Gemstones", "Chipped ", "", true, true, true, false, false, false, true, true, false, false, - B[2], M / 4, 64, 59), // A regular Gem worth one small Dust. Introduced by TerraFirmaCraft + B[2], M / 4, 64, 59), // A regular Gem worth one small Dust. Introduced by TerraFirmaCraft gemFlawed("Flawed Gemstones", "Flawed ", "", true, true, true, false, false, false, true, true, false, false, B[2], - M / 2, 64, 60), // A regular Gem worth two small Dusts. Introduced by TerraFirmaCraft + M / 2, 64, 60), // A regular Gem worth two small Dusts. Introduced by TerraFirmaCraft gemFlawless("Flawless Gemstones", "Flawless ", "", true, true, true, false, false, false, true, true, false, false, - B[2], M * 2, 32, 61), // A regular Gem worth two Dusts. Introduced by TerraFirmaCraft + B[2], M * 2, 32, 61), // A regular Gem worth two Dusts. Introduced by TerraFirmaCraft gemExquisite("Exquisite Gemstones", "Exquisite ", "", true, true, true, false, false, false, true, true, false, - false, B[2], M * 4, 16, 62), // A regular Gem worth four Dusts. Introduced by TerraFirmaCraft + false, B[2], M * 4, 16, 62), // A regular Gem worth four Dusts. Introduced by TerraFirmaCraft stick("Sticks/Rods", "", " Rod", true, true, false, false, false, false, true, true, false, false, B[1] | B[2], - M / 2, 64, 23), // Stick made of half an Ingot. Introduced by Eloraam + M / 2, 64, 23), // Stick made of half an Ingot. Introduced by Eloraam type2("16x Wires", "16x ", " Wire", true, true, false, false, false, false, true, false, false, false, 0, M * 8, 64, - -1), + -1), toolAngleGrinder("Angle Grinder", "", "Angle Grinder", true, true, false, false, false, false, true, true, false, - false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots. + false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots. toolElectricSnips("Electric Snips", "", "Electric Snips", true, true, false, false, false, false, true, true, false, - false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots. + false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots. toolElectricLighter("Electric Lighter", "", "Electric Lighter", true, true, false, false, false, false, true, true, - false, false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots. + false, false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots. toolElectricButcherKnife("Electric Butcher Knife", "", "Electric Butcher Knife", true, true, false, false, false, - false, true, true, false, false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots. + false, true, true, false, false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots. batterySingleuse("Single Use Batteries", "", "", false, true, false, false, false, false, false, false, false, - false, 0, -1, 64, -1), + false, 0, -1, 64, -1), battery("Reusable Batteries", "", "", false, true, false, false, false, false, false, false, false, false, 0, -1, - 64, -1), // Introduced by Calclavia + 64, -1), // Introduced by Calclavia circuit("Circuits", "", "", true, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Introduced // by // Calclavia @@ -119,7 +119,7 @@ public enum GregtechOrePrefixes { public final short mTextureIndex; public final String mRegularLocalName, mLocalizedMaterialPre, mLocalizedMaterialPost; public final boolean mIsUsedForOreProcessing, mIsEnchantable, mIsUnificatable, mIsMaterialBased, mIsSelfReferencing, - mIsContainer, mDontUnificateActively, mIsUsedForBlocks, mAllowNormalRecycling, mGenerateDefaultItem; + mIsContainer, mDontUnificateActively, mIsUsedForBlocks, mAllowNormalRecycling, mGenerateDefaultItem; public final List<TC_AspectStack> mAspects = new ArrayList<>(); public final Collection<GregtechOrePrefixes> mFamiliarPrefixes = new HashSet<>(); /** @@ -129,7 +129,7 @@ public enum GregtechOrePrefixes { public final long mMaterialAmount; private final Collection<Materials> mNotGeneratedItems = new HashSet<>(), mIgnoredMaterials = new HashSet<>(), - mGeneratedItems = new HashSet<>(); + mGeneratedItems = new HashSet<>(); private final ArrayList<Interface_OreRecipeRegistrator> mOreProcessing = new ArrayList<>(); private final ArrayList<Interface_OreRecipeRegistrator> mOreProcessingFake = new ArrayList<>(); public final ItemStack mContainerItem = null; @@ -144,11 +144,11 @@ public enum GregtechOrePrefixes { public int mMaterialGenerationBits = 0; private GregtechOrePrefixes(final String aRegularLocalName, final String aLocalizedMaterialPre, - final String aLocalizedMaterialPost, final boolean aIsUnificatable, final boolean aIsMaterialBased, - final boolean aIsSelfReferencing, final boolean aIsContainer, final boolean aDontUnificateActively, - final boolean aIsUsedForBlocks, final boolean aAllowNormalRecycling, final boolean aGenerateDefaultItem, - final boolean aIsEnchantable, final boolean aIsUsedForOreProcessing, final int aMaterialGenerationBits, - final long aMaterialAmount, final int aDefaultStackSize, final int aTextureindex) { + final String aLocalizedMaterialPost, final boolean aIsUnificatable, final boolean aIsMaterialBased, + final boolean aIsSelfReferencing, final boolean aIsContainer, final boolean aDontUnificateActively, + final boolean aIsUsedForBlocks, final boolean aAllowNormalRecycling, final boolean aGenerateDefaultItem, + final boolean aIsEnchantable, final boolean aIsUsedForOreProcessing, final int aMaterialGenerationBits, + final long aMaterialAmount, final int aDefaultStackSize, final int aTextureindex) { this.mIsUnificatable = aIsUnificatable; this.mIsMaterialBased = aIsMaterialBased; this.mIsSelfReferencing = aIsSelfReferencing; @@ -168,39 +168,73 @@ public enum GregtechOrePrefixes { this.mTextureIndex = (short) aTextureindex; // TODO - Utilise some form of way to check if it's gt 5.9 if so, use string switch. - if (this.name().startsWith("ore")) { + if (this.name() + .startsWith("ore")) { getTcAspectStack(TC_Aspects.TERRA.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("wire") || this.name().startsWith("cable")) { - getTcAspectStack(TC_Aspects.ELECTRUM.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("dust")) { - getTcAspectStack(TC_Aspects.PERDITIO.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("crushed")) { - getTcAspectStack(TC_Aspects.PERFODIO.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("ingot") || this.name().startsWith("nugget")) { - getTcAspectStack(TC_Aspects.METALLUM.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("armor")) { - getTcAspectStack(TC_Aspects.TUTAMEN.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("stone")) { - getTcAspectStack(TC_Aspects.TERRA.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("pipe")) { - getTcAspectStack(TC_Aspects.ITER.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("gear")) { - getTcAspectStack(TC_Aspects.MOTUS.name(), 1).addToAspectList(this.mAspects); - getTcAspectStack(TC_Aspects.MACHINA.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("frame") || this.name().startsWith("plate")) { - getTcAspectStack(TC_Aspects.FABRICO.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("tool")) { - getTcAspectStack(TC_Aspects.INSTRUMENTUM.name(), 2).addToAspectList(this.mAspects); - } else - if (this.name().startsWith("gem") || this.name().startsWith("crystal") || this.name().startsWith("lens")) { - getTcAspectStack(TC_Aspects.VITREUS.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("crate")) { - getTcAspectStack(TC_Aspects.ITER.name(), 2).addToAspectList(this.mAspects); - } else if (this.name().startsWith("circuit")) { - getTcAspectStack("COGNITIO", 1); - } else if (this.name().startsWith("battery")) { - getTcAspectStack(TC_Aspects.ELECTRUM.name(), 1).addToAspectList(this.mAspects); - } + } else if (this.name() + .startsWith("wire") + || this.name() + .startsWith("cable")) { + getTcAspectStack(TC_Aspects.ELECTRUM.name(), 1).addToAspectList(this.mAspects); + } else + if (this.name() + .startsWith("dust")) { + getTcAspectStack(TC_Aspects.PERDITIO.name(), 1).addToAspectList(this.mAspects); + } else if (this.name() + .startsWith("crushed")) { + getTcAspectStack(TC_Aspects.PERFODIO.name(), 1).addToAspectList(this.mAspects); + } else if (this.name() + .startsWith("ingot") + || this.name() + .startsWith("nugget")) { + getTcAspectStack(TC_Aspects.METALLUM.name(), 1).addToAspectList(this.mAspects); + } else + if (this.name() + .startsWith("armor")) { + getTcAspectStack(TC_Aspects.TUTAMEN.name(), 1).addToAspectList(this.mAspects); + } else if (this.name() + .startsWith("stone")) { + getTcAspectStack(TC_Aspects.TERRA.name(), 1).addToAspectList(this.mAspects); + } else if (this.name() + .startsWith("pipe")) { + getTcAspectStack(TC_Aspects.ITER.name(), 1).addToAspectList(this.mAspects); + } else if (this.name() + .startsWith("gear")) { + getTcAspectStack(TC_Aspects.MOTUS.name(), 1).addToAspectList(this.mAspects); + getTcAspectStack(TC_Aspects.MACHINA.name(), 1) + .addToAspectList(this.mAspects); + } else if (this.name() + .startsWith("frame") + || this.name() + .startsWith("plate")) { + getTcAspectStack(TC_Aspects.FABRICO.name(), 1) + .addToAspectList(this.mAspects); + } else + if (this.name() + .startsWith("tool")) { + getTcAspectStack(TC_Aspects.INSTRUMENTUM.name(), 2) + .addToAspectList(this.mAspects); + } else if (this.name() + .startsWith("gem") + || this.name() + .startsWith("crystal") + || this.name() + .startsWith("lens")) { + getTcAspectStack(TC_Aspects.VITREUS.name(), 1) + .addToAspectList(this.mAspects); + } else + if (this.name() + .startsWith("crate")) { + getTcAspectStack(TC_Aspects.ITER.name(), 2) + .addToAspectList(this.mAspects); + } else if (this.name() + .startsWith("circuit")) { + getTcAspectStack("COGNITIO", 1); + } else if (this.name() + .startsWith("battery")) { + getTcAspectStack(TC_Aspects.ELECTRUM.name(), 1) + .addToAspectList(this.mAspects); + } } public static GregtechOrePrefixes getOrePrefix(final String aOre) { @@ -285,10 +319,9 @@ public enum GregtechOrePrefixes { public boolean doGenerateItem(final Materials aMaterial) { return (aMaterial != null) && (aMaterial != Materials._NULL) - && (((aMaterial.mTypes & this.mMaterialGenerationBits) != 0) - || this.mGeneratedItems.contains(aMaterial)) - && !this.mNotGeneratedItems.contains(aMaterial) - && ((this.mCondition == null) || this.mCondition.isTrue(aMaterial)); + && (((aMaterial.mTypes & this.mMaterialGenerationBits) != 0) || this.mGeneratedItems.contains(aMaterial)) + && !this.mNotGeneratedItems.contains(aMaterial) + && ((this.mCondition == null) || this.mCondition.isTrue(aMaterial)); } public boolean ignoreMaterials(final Materials... aMaterials) { @@ -315,20 +348,20 @@ public enum GregtechOrePrefixes { } public void processOre(final GT_Materials aMaterial, final String aOreDictName, final String aModName, - final ItemStack aStack) { + final ItemStack aStack) { if ((aMaterial != null) - && ((aMaterial != GT_Materials._NULL) || this.mIsSelfReferencing || !this.mIsMaterialBased) - && GT_Utility.isStackValid(aStack)) { + && ((aMaterial != GT_Materials._NULL) || this.mIsSelfReferencing || !this.mIsMaterialBased) + && GT_Utility.isStackValid(aStack)) { for (final Interface_OreRecipeRegistrator tRegistrator : this.mOreProcessing) { if (D2) { GT_Log.ore.println( - "Processing '" + aOreDictName - + "' with the Prefix '" - + this.name() - + "' and the Material '" - + aMaterial.name() - + "' at " - + GT_Utility.getClassName(tRegistrator)); + "Processing '" + aOreDictName + + "' with the Prefix '" + + this.name() + + "' and the Material '" + + aMaterial.name() + + "' at " + + GT_Utility.getClassName(tRegistrator)); } tRegistrator.registerOre(this, aMaterial, aOreDictName, aModName, GT_Utility.copyAmount(1, aStack)); } @@ -337,19 +370,19 @@ public enum GregtechOrePrefixes { // TODO public void processOre(final Materials aMaterial, final String aOreDictName, final String aModName, - final ItemStack aStack) { + final ItemStack aStack) { if ((aMaterial != null) && ((aMaterial != Materials._NULL) || this.mIsSelfReferencing || !this.mIsMaterialBased) - && GT_Utility.isStackValid(aStack)) { + && GT_Utility.isStackValid(aStack)) { for (final Interface_OreRecipeRegistrator tRegistrator : this.mOreProcessingFake) { if (D2) { GT_Log.ore.println( - "Processing '" + aOreDictName - + "' with the Prefix '" - + this.name() - + "' and the Material '" - + aMaterial.mName - |
