Skip to content

Commit

Permalink
adapt270b2
Browse files Browse the repository at this point in the history
  • Loading branch information
Keriils committed Oct 4, 2024
1 parent 65b7af7 commit eaefda2
Show file tree
Hide file tree
Showing 11 changed files with 241 additions and 236 deletions.
28 changes: 14 additions & 14 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
dependencies {
api("com.github.GTNewHorizons:GT5-Unofficial:5.09.48.66:dev")
implementation('com.github.GTNewHorizons:NewHorizonsCoreMod:2.5.16:dev')
api('com.github.GTNewHorizons:GT5-Unofficial:5.09.50.25:dev')
implementation('com.github.GTNewHorizons:NewHorizonsCoreMod:2.6.57:dev')

implementation("com.github.GTNewHorizons:EnderIO:2.8.9:dev")
implementation("com.github.GTNewHorizons:ae2stuff:0.8.2-GTNH:dev")
implementation("com.github.GTNewHorizons:EnderIO:2.8.17:dev")
implementation("com.github.GTNewHorizons:ae2stuff:0.8.3-GTNH:dev")

// bauble things & extended things
implementation("com.github.GTNewHorizons:Baubles:1.0.4:dev")
implementation("com.github.GTNewHorizons:Draconic-Evolution:1.3.5-GTNH:dev")
implementation("com.github.GTNewHorizons:Botania:1.11.3-GTNH:dev")
implementation("com.github.GTNewHorizons:Baubles:1.0.4:dev") // late
// implementation("com.github.GTNewHorizons:Baubles-Expanded:2.0.3:dev")
implementation("com.github.GTNewHorizons:Draconic-Evolution:1.3.11.GTNH:dev")
implementation("com.github.GTNewHorizons:Botania:1.11.5-GTNH:dev")

// Avaritia things
implementation("com.github.GTNewHorizons:Avaritia:1.49:dev")
implementation("com.github.GTNewHorizons:Avaritiaddons:1.7.1-GTNH:dev")
implementation("com.github.GTNewHorizons:Avaritia:1.52:dev")
implementation("com.github.GTNewHorizons:Avaritiaddons:1.8.3-GTNH:dev")
implementation("com.github.GTNewHorizons:Eternal-Singularity:1.2.1:dev")
implementation("com.github.GTNewHorizons:Universal-Singularities:8.7.0:dev")
implementation("com.github.GTNewHorizons:Universal-Singularities:8.8.0:dev")

// worldedit modified
implementation("com.github.GTNewHorizons:worldedit-gtnh:v0.0.7:dev")
Expand All @@ -23,16 +24,15 @@ dependencies {
implementation("com.github.GTNewHorizons:SpiceOfLife:2.1.12-carrot:dev")

// jabba
implementation("com.github.GTNewHorizons:Jabba:1.3.5:dev")
implementation("com.github.GTNewHorizons:Jabba:1.4.6:dev")

// debug info & nbtEdit
runtimeOnly("com.github.GTNewHorizons:ServerUtilities:2.0.66:dev")
runtimeOnly("com.github.GTNewHorizons:ServerUtilities:2.0.79:dev")
runtimeOnly files("libs/ForgeNBTEdit.jar")
runtimeOnly files("libs/inventorytweaks-1.7.0-dev.jar")

// Thaumcraft things
implementation('com.github.GTNewHorizons:ThaumicTinkerer:2.9.4:dev')
implementation('com.github.GTNewHorizons:WitchingGadgets:1.5.0-GTNH:dev')
implementation('com.github.GTNewHorizons:ThaumicTinkerer:2.10.1:dev')
}


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.xir.NHUtilities.common.api.enums;

import static gregtech.api.enums.GT_Values.NI;
import static gregtech.api.enums.GT_Values.W;
import static gregtech.api.enums.GTValues.NI;
import static gregtech.api.enums.GTValues.W;

import java.util.Locale;

Expand All @@ -10,11 +10,11 @@
import net.minecraft.item.ItemStack;

import gregtech.api.interfaces.IItemContainer;
import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_Log;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Utility;
import gregtech.api.util.GTLanguageManager;
import gregtech.api.util.GTLog;
import gregtech.api.util.GTModHandler;
import gregtech.api.util.GTOreDictUnificator;
import gregtech.api.util.GTUtility;

@SuppressWarnings("deprecation")
public enum CustomItemList implements IItemContainer {
Expand Down Expand Up @@ -42,28 +42,28 @@ public IItemContainer set(Item aItem) {
mHasNotBeenSet = false;
if (aItem == null) return this;
ItemStack aStack = new ItemStack(aItem, 1, 0);
mStack = GT_Utility.copyAmount(1, aStack);
mStack = GTUtility.copyAmount(1, aStack);
return this;
}

@Override
public IItemContainer set(ItemStack aStack) {
mHasNotBeenSet = false;
mStack = GT_Utility.copyAmount(1, aStack);
mStack = GTUtility.copyAmount(1, aStack);
return this;
}

@Override
public Item getItem() {
sanityCheck();
if (GT_Utility.isStackInvalid(mStack)) return null;
if (GTUtility.isStackInvalid(mStack)) return null;
return mStack.getItem();
}

@Override
public Block getBlock() {
sanityCheck();
return GT_Utility.getBlockFromItem(getItem());
return GTUtility.getBlockFromItem(getItem());
}

@Override
Expand All @@ -79,50 +79,50 @@ public boolean isStackEqual(Object aStack) {
@Override
public boolean isStackEqual(Object aStack, boolean aWildcard, boolean aIgnoreNBT) {
if (mDeprecated && !mWarned) {
new Exception(this + " is now deprecated").printStackTrace(GT_Log.err);
new Exception(this + " is now deprecated").printStackTrace(GTLog.err);
// warn only once
mWarned = true;
}
if (GT_Utility.isStackInvalid(aStack)) return false;
return GT_Utility.areUnificationsEqual((ItemStack) aStack, aWildcard ? getWildcard(1) : get(1), aIgnoreNBT);
if (GTUtility.isStackInvalid(aStack)) return false;
return GTUtility.areUnificationsEqual((ItemStack) aStack, aWildcard ? getWildcard(1) : get(1), aIgnoreNBT);
}

@Override
public ItemStack get(long aAmount, Object... aReplacements) {
sanityCheck();
if (GT_Utility.isStackInvalid(mStack)) {
GT_Log.out.println("Object in the ItemList is null at:");
new NullPointerException().printStackTrace(GT_Log.out);
return GT_Utility.copyAmount(aAmount, aReplacements);
if (GTUtility.isStackInvalid(mStack)) {
GTLog.out.println("Object in the ItemList is null at:");
new NullPointerException().printStackTrace(GTLog.out);
return GTUtility.copyAmount(aAmount, aReplacements);
}
return GT_Utility.copyAmount(aAmount, GT_OreDictUnificator.get(mStack));
return GTUtility.copyAmount(aAmount, GTOreDictUnificator.get(mStack));
}

@Override
public ItemStack getWildcard(long aAmount, Object... aReplacements) {
sanityCheck();
if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements);
return GT_Utility.copyAmountAndMetaData(aAmount, W, GT_OreDictUnificator.get(mStack));
if (GTUtility.isStackInvalid(mStack)) return GTUtility.copyAmount(aAmount, aReplacements);
return GTUtility.copyAmountAndMetaData(aAmount, W, GTOreDictUnificator.get(mStack));
}

@Override
public ItemStack getUndamaged(long aAmount, Object... aReplacements) {
sanityCheck();
if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements);
return GT_Utility.copyAmountAndMetaData(aAmount, 0, GT_OreDictUnificator.get(mStack));
if (GTUtility.isStackInvalid(mStack)) return GTUtility.copyAmount(aAmount, aReplacements);
return GTUtility.copyAmountAndMetaData(aAmount, 0, GTOreDictUnificator.get(mStack));
}

@Override
public ItemStack getAlmostBroken(long aAmount, Object... aReplacements) {
sanityCheck();
if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements);
return GT_Utility.copyAmountAndMetaData(aAmount, mStack.getMaxDamage() - 1, GT_OreDictUnificator.get(mStack));
if (GTUtility.isStackInvalid(mStack)) return GTUtility.copyAmount(aAmount, aReplacements);
return GTUtility.copyAmountAndMetaData(aAmount, mStack.getMaxDamage() - 1, GTOreDictUnificator.get(mStack));
}

@Override
public ItemStack getWithName(long aAmount, String aDisplayName, Object... aReplacements) {
ItemStack rStack = get(1, aReplacements);
if (GT_Utility.isStackInvalid(rStack)) return NI;
if (GTUtility.isStackInvalid(rStack)) return NI;

// CamelCase alphanumeric words from aDisplayName
StringBuilder tCamelCasedDisplayNameBuilder = new StringBuilder();
Expand All @@ -143,36 +143,36 @@ public ItemStack getWithName(long aAmount, String aDisplayName, Object... aRepla
// Construct a translation key from UnlocalizedName and CamelCased DisplayName
final String tKey = rStack.getUnlocalizedName() + ".with." + tCamelCasedDisplayNameBuilder + ".name";

rStack.setStackDisplayName(GT_LanguageManager.addStringLocalization(tKey, aDisplayName));
return GT_Utility.copyAmount(aAmount, rStack);
rStack.setStackDisplayName(GTLanguageManager.addStringLocalization(tKey, aDisplayName));
return GTUtility.copyAmount(aAmount, rStack);
}

@Override
public ItemStack getWithCharge(long aAmount, int aEnergy, Object... aReplacements) {
ItemStack rStack = get(1, aReplacements);
if (GT_Utility.isStackInvalid(rStack)) return null;
GT_ModHandler.chargeElectricItem(rStack, aEnergy, Integer.MAX_VALUE, true, false);
return GT_Utility.copyAmount(aAmount, rStack);
if (GTUtility.isStackInvalid(rStack)) return null;
GTModHandler.chargeElectricItem(rStack, aEnergy, Integer.MAX_VALUE, true, false);
return GTUtility.copyAmount(aAmount, rStack);
}

@Override
public ItemStack getWithDamage(long aAmount, long aMetaValue, Object... aReplacements) {
sanityCheck();
if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements);
return GT_Utility.copyAmountAndMetaData(aAmount, aMetaValue, GT_OreDictUnificator.get(mStack));
if (GTUtility.isStackInvalid(mStack)) return GTUtility.copyAmount(aAmount, aReplacements);
return GTUtility.copyAmountAndMetaData(aAmount, aMetaValue, GTOreDictUnificator.get(mStack));
}

@Override
public IItemContainer registerOre(Object... aOreNames) {
sanityCheck();
for (Object tOreName : aOreNames) GT_OreDictUnificator.registerOre(tOreName, get(1));
for (Object tOreName : aOreNames) GTOreDictUnificator.registerOre(tOreName, get(1));
return this;
}

@Override
public IItemContainer registerWildcardAsOre(Object... aOreNames) {
sanityCheck();
for (Object tOreName : aOreNames) GT_OreDictUnificator.registerOre(tOreName, getWildcard(1));
for (Object tOreName : aOreNames) GTOreDictUnificator.registerOre(tOreName, getWildcard(1));
return this;
}

Expand All @@ -184,7 +184,7 @@ private void sanityCheck() {
if (mHasNotBeenSet)
throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
if (mDeprecated && !mWarned) {
new Exception(this + " is now deprecated").printStackTrace(GT_Log.err);
new Exception(this + " is now deprecated").printStackTrace(GTLog.err);
// warn only once
mWarned = true;
}
Expand Down
80 changes: 40 additions & 40 deletions src/main/java/com/xir/NHUtilities/common/items/FuelRodList.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ public class FuelRodList {
public static ItemBasic primordialPearlDust;

public static DepletedFuelRod depletedFuelRodExcitedRadianceUranium;
public static DepletedFuelRod depletedFuelRodExcitedRadianceUranium_2;
public static DepletedFuelRod depletedFuelRodExcitedRadianceUranium_4;
public static DepletedFuelRod depletedFuelRodExcitedRadianceUranium2;
public static DepletedFuelRod depletedFuelRodExcitedRadianceUranium4;

public static DepletedFuelRod depletedFuelRodSuperExcitedPrimordialPearlPlutonium;
public static DepletedFuelRod depletedFuelRodSuperExcitedPrimordialPearlPlutonium_2;
public static DepletedFuelRod depletedFuelRodSuperExcitedPrimordialPearlPlutonium_4;
public static DepletedFuelRod depletedFuelRodSuperExcitedPrimordialPearlPlutonium2;
public static DepletedFuelRod depletedFuelRodSuperExcitedPrimordialPearlPlutonium4;

public static FuelRod fuelRodExcitedRadianceUranium;
public static FuelRod fuelRodExcitedRadianceUranium_2;
public static FuelRod fuelRodExcitedRadianceUranium_4;
public static FuelRod fuelRodExcitedRadianceUranium2;
public static FuelRod fuelRodExcitedRadianceUranium4;

public static FuelRod fuelRodSuperExcitedPrimordialPearlPlutonium;
public static FuelRod fuelRodSuperExcitedPrimordialPearlPlutonium_2;
public static FuelRod fuelRodSuperExcitedPrimordialPearlPlutonium_4;
public static FuelRod fuelRodSuperExcitedPrimordialPearlPlutonium2;
public static FuelRod fuelRodSuperExcitedPrimordialPearlPlutonium4;

public static void fuelRodInit() {

Expand All @@ -40,95 +40,95 @@ public static void fuelRodInit() {
primordialPearlDust = new ItemBasic("primordialPearlDust");

depletedFuelRodExcitedRadianceUranium = new DepletedFuelRod("depletedFuelRodExcitedRadianceUranium", 100);
depletedFuelRodExcitedRadianceUranium_2 = new DepletedFuelRod("depletedFuelRodExcitedRadianceUranium_2", 200);
depletedFuelRodExcitedRadianceUranium_4 = new DepletedFuelRod("depletedFuelRodExcitedRadianceUranium_4", 400);
depletedFuelRodExcitedRadianceUranium2 = new DepletedFuelRod("depletedFuelRodExcitedRadianceUranium_2", 200);
depletedFuelRodExcitedRadianceUranium4 = new DepletedFuelRod("depletedFuelRodExcitedRadianceUranium_4", 400);

depletedFuelRodSuperExcitedPrimordialPearlPlutonium = new DepletedFuelRod(
"depletedFuelRodSuperExcitedPrimordialPearlPlutonium",
800);
depletedFuelRodSuperExcitedPrimordialPearlPlutonium_2 = new DepletedFuelRod(
depletedFuelRodSuperExcitedPrimordialPearlPlutonium2 = new DepletedFuelRod(
"depletedFuelRodSuperExcitedPrimordialPearlPlutonium_2",
1600);
depletedFuelRodSuperExcitedPrimordialPearlPlutonium_4 = new DepletedFuelRod(
depletedFuelRodSuperExcitedPrimordialPearlPlutonium4 = new DepletedFuelRod(
"depletedFuelRodSuperExcitedPrimordialPearlPlutonium_4",
3200);

fuelRodExcitedRadianceUranium = new FuelRod(
"fuelRodExcitedRadianceUranium",
1,
2000,
26,
20000,
64,
4000,
86400,
0F,
new ItemStack(depletedFuelRodExcitedRadianceUranium, 1));
fuelRodExcitedRadianceUranium_2 = new FuelRod(
fuelRodExcitedRadianceUranium2 = new FuelRod(
"fuelRodExcitedRadianceUranium_2",
2,
2000,
26,
20000,
64,
4000,
86400,
0F,
new ItemStack(depletedFuelRodExcitedRadianceUranium_2, 1));
fuelRodExcitedRadianceUranium_4 = new FuelRod(
new ItemStack(depletedFuelRodExcitedRadianceUranium2, 1));
fuelRodExcitedRadianceUranium4 = new FuelRod(
"fuelRodExcitedRadianceUranium_4",
4,
2000,
26,
20000,
64,
4000,
86400,
0F,
new ItemStack(depletedFuelRodExcitedRadianceUranium_4, 1));
new ItemStack(depletedFuelRodExcitedRadianceUranium4, 1));

fuelRodSuperExcitedPrimordialPearlPlutonium = new FuelRod(
"fuelRodSuperExcitedPrimordialPearlPlutonium",
1,
8600,
86000,
80,
12800,
15000,
3.3F,
6.3F,
new ItemStack(depletedFuelRodSuperExcitedPrimordialPearlPlutonium, 1));
fuelRodSuperExcitedPrimordialPearlPlutonium_2 = new FuelRod(
fuelRodSuperExcitedPrimordialPearlPlutonium2 = new FuelRod(
"fuelRodSuperExcitedPrimordialPearlPlutonium_2",
2,
8600,
86000,
80,
12800,
15000,
3.3F,
new ItemStack(depletedFuelRodSuperExcitedPrimordialPearlPlutonium_2, 1));
fuelRodSuperExcitedPrimordialPearlPlutonium_4 = new FuelRod(
6.3F,
new ItemStack(depletedFuelRodSuperExcitedPrimordialPearlPlutonium2, 1));
fuelRodSuperExcitedPrimordialPearlPlutonium4 = new FuelRod(
"fuelRodSuperExcitedPrimordialPearlPlutonium_4",
4,
8600,
86000,
80,
12800,
15000,
3.3F,
new ItemStack(depletedFuelRodSuperExcitedPrimordialPearlPlutonium_4, 1));
6.3F,
new ItemStack(depletedFuelRodSuperExcitedPrimordialPearlPlutonium4, 1));

RegisterUtils.registerItem(ichorFuelRod);
RegisterUtils.registerItem(shadowFuelRod);
RegisterUtils.registerItem(ichorDroplet);
RegisterUtils.registerItem(primordialPearlDust);

RegisterUtils.registerItem(depletedFuelRodExcitedRadianceUranium);
RegisterUtils.registerItem(depletedFuelRodExcitedRadianceUranium_2);
RegisterUtils.registerItem(depletedFuelRodExcitedRadianceUranium_4);
RegisterUtils.registerItem(depletedFuelRodExcitedRadianceUranium2);
RegisterUtils.registerItem(depletedFuelRodExcitedRadianceUranium4);

RegisterUtils.registerItem(fuelRodExcitedRadianceUranium);
RegisterUtils.registerItem(fuelRodExcitedRadianceUranium_2);
RegisterUtils.registerItem(fuelRodExcitedRadianceUranium_4);
RegisterUtils.registerItem(fuelRodExcitedRadianceUranium2);
RegisterUtils.registerItem(fuelRodExcitedRadianceUranium4);

RegisterUtils.registerItem(depletedFuelRodSuperExcitedPrimordialPearlPlutonium);
RegisterUtils.registerItem(depletedFuelRodSuperExcitedPrimordialPearlPlutonium_2);
RegisterUtils.registerItem(depletedFuelRodSuperExcitedPrimordialPearlPlutonium_4);
RegisterUtils.registerItem(depletedFuelRodSuperExcitedPrimordialPearlPlutonium2);
RegisterUtils.registerItem(depletedFuelRodSuperExcitedPrimordialPearlPlutonium4);

RegisterUtils.registerItem(fuelRodSuperExcitedPrimordialPearlPlutonium);
RegisterUtils.registerItem(fuelRodSuperExcitedPrimordialPearlPlutonium_2);
RegisterUtils.registerItem(fuelRodSuperExcitedPrimordialPearlPlutonium_4);
RegisterUtils.registerItem(fuelRodSuperExcitedPrimordialPearlPlutonium2);
RegisterUtils.registerItem(fuelRodSuperExcitedPrimordialPearlPlutonium4);

}
}
Loading

0 comments on commit eaefda2

Please sign in to comment.