diff options
| author | NotAPenguin <michiel.vandeginste@gmail.com> | 2024-09-02 23:17:17 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-02 23:17:17 +0200 |
| commit | 1b820de08a05070909a267e17f033fcf58ac8710 (patch) | |
| tree | 02831a025986a06b20f87e5bcc69d1e0c639a342 /src/main/java/gregtech/api/recipe/maps | |
| parent | afd3fd92b6a6ab9ab0d0dc3214e6bc8ff7a86c9b (diff) | |
| download | GT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.tar.gz GT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.tar.bz2 GT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.zip | |
The Great Renaming (#3014)
* move kekztech to a single root dir
* move detrav to a single root dir
* move gtnh-lanthanides to a single root dir
* move tectech and delete some gross reflection in gt++
* remove more reflection inside gt5u
* delete more reflection in gt++
* fix imports
* move bartworks and bwcrossmod
* fix proxies
* move galactigreg and ggfab
* move gtneioreplugin
* try to fix gt++ bee loader
* apply the rename rules to BW
* apply rename rules to bwcrossmod
* apply rename rules to detrav scanner mod
* apply rename rules to galacticgreg
* apply rename rules to ggfab
* apply rename rules to goodgenerator
* apply rename rules to gtnh-lanthanides
* apply rename rules to gt++
* apply rename rules to kekztech
* apply rename rules to kubatech
* apply rename rules to tectech
* apply rename rules to gt
apply the rename rules to gt
* fix tt import
* fix mui hopefully
* fix coremod except intergalactic
* rename assline recipe class
* fix a class name i stumbled on
* rename StructureUtility to GTStructureUtility to prevent conflict with structurelib
* temporary rename of GTTooltipDataCache to old name
* fix gt client/server proxy names
Diffstat (limited to 'src/main/java/gregtech/api/recipe/maps')
23 files changed, 218 insertions, 221 deletions
diff --git a/src/main/java/gregtech/api/recipe/maps/AssemblerBackend.java b/src/main/java/gregtech/api/recipe/maps/AssemblerBackend.java index cfa25e9fe2..8273c895b2 100644 --- a/src/main/java/gregtech/api/recipe/maps/AssemblerBackend.java +++ b/src/main/java/gregtech/api/recipe/maps/AssemblerBackend.java @@ -9,7 +9,7 @@ import net.minecraftforge.fluids.FluidStack; import gregtech.api.enums.ItemList; import gregtech.api.recipe.RecipeMapBackend; import gregtech.api.recipe.RecipeMapBackendPropertiesBuilder; -import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GTRecipe; import gregtech.api.util.MethodsReturnNonnullByDefault; @ParametersAreNonnullByDefault @@ -21,7 +21,7 @@ public class AssemblerBackend extends RecipeMapBackend { } @Override - protected GT_Recipe modifyFoundRecipe(GT_Recipe recipe, ItemStack[] items, FluidStack[] fluids, + protected GTRecipe modifyFoundRecipe(GTRecipe recipe, ItemStack[] items, FluidStack[] fluids, @Nullable ItemStack specialSlot) { for (ItemStack item : items) { if (ItemList.Paper_Printed_Pages.isStackEqual(item, false, true)) { diff --git a/src/main/java/gregtech/api/recipe/maps/AssemblyLineFrontend.java b/src/main/java/gregtech/api/recipe/maps/AssemblyLineFrontend.java index 3d56c96b82..4bf3f7f56e 100644 --- a/src/main/java/gregtech/api/recipe/maps/AssemblyLineFrontend.java +++ b/src/main/java/gregtech/api/recipe/maps/AssemblyLineFrontend.java @@ -10,7 +10,7 @@ import com.gtnewhorizons.modularui.api.math.Pos2d; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.ProgressBar; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.recipe.BasicUIPropertiesBuilder; import gregtech.api.recipe.NEIRecipePropertiesBuilder; import gregtech.api.recipe.RecipeMapFrontend; @@ -52,21 +52,21 @@ public class AssemblyLineFrontend extends RecipeMapFrontend { int bar2Width = 18; List<Supplier<Float>> splitProgress = splitProgress(progressSupplier, bar1Width, bar2Width); builder.widget( - new ProgressBar().setTexture(GT_UITextures.PROGRESSBAR_ASSEMBLY_LINE_1, bar1Width) + new ProgressBar().setTexture(GTUITextures.PROGRESSBAR_ASSEMBLY_LINE_1, bar1Width) .setDirection(ProgressBar.Direction.RIGHT) .setProgress(splitProgress.get(0)) .setSynced(false, false) .setPos(new Pos2d(88, 8).add(windowOffset)) .setSize(bar1Width, 72)); builder.widget( - new ProgressBar().setTexture(GT_UITextures.PROGRESSBAR_ASSEMBLY_LINE_2, bar2Width) + new ProgressBar().setTexture(GTUITextures.PROGRESSBAR_ASSEMBLY_LINE_2, bar2Width) .setDirection(ProgressBar.Direction.RIGHT) .setProgress(splitProgress.get(1)) .setSynced(false, false) .setPos(new Pos2d(124, 8).add(windowOffset)) .setSize(bar2Width, 72)); builder.widget( - new ProgressBar().setTexture(GT_UITextures.PROGRESSBAR_ASSEMBLY_LINE_3, 18) + new ProgressBar().setTexture(GTUITextures.PROGRESSBAR_ASSEMBLY_LINE_3, 18) .setDirection(ProgressBar.Direction.UP) .setProgress(progressSupplier) .setSynced(false, false) diff --git a/src/main/java/gregtech/api/recipe/maps/FluidCannerBackend.java b/src/main/java/gregtech/api/recipe/maps/FluidCannerBackend.java index e5681f59aa..9bbe087e54 100644 --- a/src/main/java/gregtech/api/recipe/maps/FluidCannerBackend.java +++ b/src/main/java/gregtech/api/recipe/maps/FluidCannerBackend.java @@ -8,11 +8,11 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidContainerItem; -import gregtech.api.enums.GT_Values; +import gregtech.api.enums.GTValues; import gregtech.api.recipe.RecipeMapBackend; import gregtech.api.recipe.RecipeMapBackendPropertiesBuilder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTRecipe; +import gregtech.api.util.GTUtility; import gregtech.api.util.MethodsReturnNonnullByDefault; @ParametersAreNonnullByDefault @@ -24,17 +24,17 @@ public class FluidCannerBackend extends RecipeMapBackend { } @Override - protected GT_Recipe findFallback(ItemStack[] items, FluidStack[] fluids, @Nullable ItemStack specialSlot) { + protected GTRecipe findFallback(ItemStack[] items, FluidStack[] fluids, @Nullable ItemStack specialSlot) { if (items.length == 0 || items[0] == null) { return null; } if (fluids.length > 0 && fluids[0] != null) { - ItemStack filledItem = GT_Utility.fillFluidContainer(fluids[0], items[0], false, true); - FluidStack fluidToTake = GT_Utility.getFluidForFilledItem(filledItem, true); + ItemStack filledItem = GTUtility.fillFluidContainer(fluids[0], items[0], false, true); + FluidStack fluidToTake = GTUtility.getFluidForFilledItem(filledItem, true); if (fluidToTake != null) { - return GT_Values.RA.stdBuilder() - .itemInputs(GT_Utility.copyAmount(1, items[0])) + return GTValues.RA.stdBuilder() + .itemInputs(GTUtility.copyAmount(1, items[0])) .itemOutputs(filledItem) .fluidInputs(fluidToTake) .duration(Math.max(fluidToTake.amount / 64, 16)) @@ -45,11 +45,11 @@ public class FluidCannerBackend extends RecipeMapBackend { .orElse(null); } } - FluidStack drainedFluid = GT_Utility.getFluidForFilledItem(items[0], true); + FluidStack drainedFluid = GTUtility.getFluidForFilledItem(items[0], true); if (drainedFluid != null) { - return GT_Values.RA.stdBuilder() - .itemInputs(GT_Utility.copyAmount(1, items[0])) - .itemOutputs(GT_Utility.getContainerItem(items[0], true)) + return GTValues.RA.stdBuilder() + .itemInputs(GTUtility.copyAmount(1, items[0])) + .itemOutputs(GTUtility.getContainerItem(items[0], true)) .fluidOutputs(drainedFluid) .duration(Math.max(drainedFluid.amount / 64, 16)) .eut(1) diff --git a/src/main/java/gregtech/api/recipe/maps/FormingPressBackend.java b/src/main/java/gregtech/api/recipe/maps/FormingPressBackend.java index ce3ea3e89c..ccf6e63c29 100644 --- a/src/main/java/gregtech/api/recipe/maps/FormingPressBackend.java +++ b/src/main/java/gregtech/api/recipe/maps/FormingPressBackend.java @@ -7,12 +7,12 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.fluids.FluidStack; -import gregtech.api.enums.GT_Values; +import gregtech.api.enums.GTValues; import gregtech.api.enums.ItemList; import gregtech.api.recipe.RecipeMapBackend; import gregtech.api.recipe.RecipeMapBackendPropertiesBuilder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTRecipe; +import gregtech.api.util.GTUtility; import gregtech.api.util.MethodsReturnNonnullByDefault; /** @@ -27,7 +27,7 @@ public class FormingPressBackend extends RecipeMapBackend { } @Override - protected GT_Recipe modifyFoundRecipe(GT_Recipe recipe, ItemStack[] items, FluidStack[] fluids, + protected GTRecipe modifyFoundRecipe(GTRecipe recipe, ItemStack[] items, FluidStack[] fluids, @Nullable ItemStack specialSlot) { for (ItemStack mold : items) { if (ItemList.Shape_Mold_Credit.isStackEqual(mold, false, true)) { @@ -46,7 +46,7 @@ public class FormingPressBackend extends RecipeMapBackend { } @Override - protected GT_Recipe findFallback(ItemStack[] items, FluidStack[] fluids, @Nullable ItemStack specialSlot) { + protected GTRecipe findFallback(ItemStack[] items, FluidStack[] fluids, @Nullable ItemStack specialSlot) { if (items.length < 2) { return null; } @@ -54,16 +54,16 @@ public class FormingPressBackend extends RecipeMapBackend { } @Nullable - private GT_Recipe findRenamingRecipe(ItemStack[] inputs) { + private GTRecipe findRenamingRecipe(ItemStack[] inputs) { ItemStack mold = findNameMoldIndex(inputs); if (mold == null) return null; ItemStack input = findStackToRename(inputs, mold); if (input == null) return null; - ItemStack output = GT_Utility.copyAmount(1, input); + ItemStack output = GTUtility.copyAmount(1, input); if (output == null) return null; output.setStackDisplayName(mold.getDisplayName()); - return GT_Values.RA.stdBuilder() - .itemInputs(GT_Utility.copyAmount(0, mold), GT_Utility.copyAmount(1, input)) + return GTValues.RA.stdBuilder() + .itemInputs(GTUtility.copyAmount(0, mold), GTUtility.copyAmount(1, input)) .itemOutputs(output) .duration(128) .eut(8) diff --git a/src/main/java/gregtech/api/recipe/maps/FuelBackend.java b/src/main/java/gregtech/api/recipe/maps/FuelBackend.java index 49c989e174..e5f0ab40d1 100644 --- a/src/main/java/gregtech/api/recipe/maps/FuelBackend.java +++ b/src/main/java/gregtech/api/recipe/maps/FuelBackend.java @@ -12,23 +12,23 @@ import net.minecraftforge.fluids.FluidStack; import gregtech.api.recipe.RecipeMapBackend; import gregtech.api.recipe.RecipeMapBackendPropertiesBuilder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_RecipeBuilder; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTRecipe; +import gregtech.api.util.GTRecipeBuilder; +import gregtech.api.util.GTUtility; import gregtech.api.util.MethodsReturnNonnullByDefault; @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault public class FuelBackend extends RecipeMapBackend { - private final Map<String, GT_Recipe> recipesByFluidInput = new HashMap<>(); + private final Map<String, GTRecipe> recipesByFluidInput = new HashMap<>(); public FuelBackend(RecipeMapBackendPropertiesBuilder propertiesBuilder) { super(propertiesBuilder.disableOptimize()); } @Override - protected Collection<GT_Recipe> doAdd(GT_RecipeBuilder builder) { + protected Collection<GTRecipe> doAdd(GTRecipeBuilder builder) { if (builder.getDuration() == -1) { builder.duration(0); } @@ -39,11 +39,11 @@ public class FuelBackend extends RecipeMapBackend { } @Override - public GT_Recipe compileRecipe(GT_Recipe recipe) { + public GTRecipe compileRecipe(GTRecipe recipe) { super.compileRecipe(recipe); - if (recipe.mInputs != null && GT_Utility.getNonnullElementCount(recipe.mInputs) == 1 - && (recipe.mFluidInputs == null || GT_Utility.getNonnullElementCount(recipe.mFluidInputs) == 0)) { - FluidStack fluidStack = GT_Utility.getFluidForFilledItem(recipe.mInputs[0], true); + if (recipe.mInputs != null && GTUtility.getNonnullElementCount(recipe.mInputs) == 1 + && (recipe.mFluidInputs == null || GTUtility.getNonnullElementCount(recipe.mFluidInputs) == 0)) { + FluidStack fluidStack = GTUtility.getFluidForFilledItem(recipe.mInputs[0], true); if (fluidStack != null) { fluidStack.amount = 0; recipesByFluidInput.put( @@ -51,9 +51,9 @@ public class FuelBackend extends RecipeMapBackend { .getName(), recipe); } - } else if ((recipe.mInputs == null || GT_Utility.getNonnullElementCount(recipe.mInputs) == 0) + } else if ((recipe.mInputs == null || GTUtility.getNonnullElementCount(recipe.mInputs) == 0) && recipe.mFluidInputs != null - && GT_Utility.getNonnullElementCount(recipe.mFluidInputs) >= 1 + && GTUtility.getNonnullElementCount(recipe.mFluidInputs) >= 1 && recipe.mFluidInputs[0] != null) { recipesByFluidInput.put( recipe.mFluidInputs[0].getFluid() @@ -64,12 +64,12 @@ public class FuelBackend extends RecipeMapBackend { } @Nullable - public GT_Recipe findFuel(FluidStack fluidStack) { + public GTRecipe findFuel(FluidStack fluidStack) { return findFuel(fluidStack.getFluid()); } @Nullable - public GT_Recipe findFuel(Fluid fluid) { + public GTRecipe findFuel(Fluid fluid) { return recipesByFluidInput.get(fluid.getName()); } } diff --git a/src/main/java/gregtech/api/recipe/maps/FurnaceBackend.java b/src/main/java/gregtech/api/recipe/maps/FurnaceBackend.java index c4095eeb4e..e501db3c40 100644 --- a/src/main/java/gregtech/api/recipe/maps/FurnaceBackend.java +++ b/src/main/java/gregtech/api/recipe/maps/FurnaceBackend.java @@ -6,11 +6,11 @@ import javax.annotation.ParametersAreNonnullByDefault; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; -import gregtech.api.enums.GT_Values; +import gregtech.api.enums.GTValues; import gregtech.api.recipe.RecipeMapBackendPropertiesBuilder; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTModHandler; +import gregtech.api.util.GTRecipe; +import gregtech.api.util.GTUtility; import gregtech.api.util.MethodsReturnNonnullByDefault; /** @@ -25,18 +25,18 @@ public class FurnaceBackend extends NonGTBackend { } @Override - protected GT_Recipe overwriteFindRecipe(ItemStack[] items, FluidStack[] fluids, @Nullable ItemStack specialSlot, - @Nullable GT_Recipe cachedRecipe) { + protected GTRecipe overwriteFindRecipe(ItemStack[] items, FluidStack[] fluids, @Nullable ItemStack specialSlot, + @Nullable GTRecipe cachedRecipe) { if (items.length == 0 || items[0] == null) { return null; } if (cachedRecipe != null && cachedRecipe.isRecipeInputEqual(false, true, fluids, items)) { return cachedRecipe; } - ItemStack output = GT_ModHandler.getSmeltingOutput(items[0], false, null); + ItemStack output = GTModHandler.getSmeltingOutput(items[0], false, null); return output == null ? null - : GT_Values.RA.stdBuilder() - .itemInputs(GT_Utility.copyAmount(1, items[0])) + : GTValues.RA.stdBuilder() + .itemInputs(GTUtility.copyAmount(1, items[0])) .itemOutputs(output) .duration(128) .eut(4) @@ -47,6 +47,6 @@ public class FurnaceBackend extends NonGTBackend { @Override public boolean containsInput(ItemStack item) { - return GT_ModHandler.getSmeltingOutput(item, false, null) != null; + return GTModHandler.getSmeltingOutput(item, false, null) != null; } } diff --git a/src/main/java/gregtech/api/recipe/maps/LargeBoilerFuelBackend.java b/src/main/java/gregtech/api/recipe/maps/LargeBoilerFuelBackend.java index b38b66e41b..a27e425efb 100644 --- a/src/main/java/gregtech/api/recipe/maps/LargeBoilerFuelBackend.java +++ b/src/main/java/gregtech/api/recipe/maps/LargeBoilerFuelBackend.java @@ -9,11 +9,11 @@ import javax.annotation.ParametersAreNonnullByDefault; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import gregtech.api.enums.GT_Values; +import gregtech.api.enums.GTValues; import gregtech.api.recipe.RecipeMapBackend; import gregtech.api.recipe.RecipeMapBackendPropertiesBuilder; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GTModHandler; +import gregtech.api.util.GTRecipe; import gregtech.api.util.MethodsReturnNonnullByDefault; @SuppressWarnings({ "unused", "UnusedReturnValue" }) @@ -46,11 +46,11 @@ public class LargeBoilerFuelBackend extends RecipeMapBackend { return ALLOWED_SOLID_FUELS.add(itemregistryName + ":" + meta); } - public GT_Recipe addDenseLiquidRecipe(GT_Recipe recipe) { + public GTRecipe addDenseLiquidRecipe(GTRecipe recipe) { return addRecipe(recipe, ((double) recipe.mSpecialValue) / 10, false); } - public GT_Recipe addDieselRecipe(GT_Recipe recipe) { + public GTRecipe addDieselRecipe(GTRecipe recipe) { return addRecipe(recipe, ((double) recipe.mSpecialValue) / 40, false); } @@ -61,12 +61,12 @@ public class LargeBoilerFuelBackend extends RecipeMapBackend { } @Nullable - public GT_Recipe addSolidRecipe(@Nullable ItemStack fuelItemStack) { + public GTRecipe addSolidRecipe(@Nullable ItemStack fuelItemStack) { if (fuelItemStack == null) { return null; } if (!addedGeneralDesc) { - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .duration(1) .eut(1) .specialValue(1) @@ -82,17 +82,17 @@ public class LargeBoilerFuelBackend extends RecipeMapBackend { String registryName = Item.itemRegistry.getNameForObject(fuelItemStack.getItem()); boolean isHighTierAllowed = ALLOWED_SOLID_FUELS.contains(registryName + ":" + fuelItemStack.getItemDamage()); - return GT_Values.RA.stdBuilder() + return GTValues.RA.stdBuilder() .itemInputs(fuelItemStack) .duration(1) .eut(0) - .specialValue(GT_ModHandler.getFuelValue(fuelItemStack) / 1600) + .specialValue(GTModHandler.getFuelValue(fuelItemStack) / 1600) .build() - .map(r -> addRecipe(r, ((double) GT_ModHandler.getFuelValue(fuelItemStack)) / 1600, isHighTierAllowed)) + .map(r -> addRecipe(r, ((double) GTModHandler.getFuelValue(fuelItemStack)) / 1600, isHighTierAllowed)) .orElse(null); } - private GT_Recipe addRecipe(GT_Recipe recipe, double baseBurnTime, boolean isHighTierAllowed) { + private GTRecipe addRecipe(GTRecipe recipe, double baseBurnTime, boolean isHighTierAllowed) { // Some recipes will have a burn time like 15.9999999 and % always rounds down double floatErrorCorrection = 0.0001; diff --git a/src/main/java/gregtech/api/recipe/maps/MicrowaveBackend.java b/src/main/java/gregtech/api/recipe/maps/MicrowaveBackend.java index 53623cb0c7..ae4b5f5d35 100644 --- a/src/main/java/gregtech/api/recipe/maps/MicrowaveBackend.java +++ b/src/main/java/gregtech/api/recipe/maps/MicrowaveBackend.java @@ -1,8 +1,8 @@ package gregtech.api.recipe.maps; -import static gregtech.api.enums.GT_Values.W; -import static gregtech.api.util.GT_RecipeConstants.EXPLODE; -import static gregtech.api.util.GT_RecipeConstants.ON_FIRE; +import static gregtech.api.enums.GTValues.W; +import static gregtech.api.util.GTRecipeConstants.EXPLODE; +import static gregtech.api.util.GTRecipeConstants.ON_FIRE; import javax.annotation.Nullable; import javax.annotation.ParametersAreNonnullByDefault; @@ -13,18 +13,18 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntityFurnace; import net.minecraftforge.fluids.FluidStack; -import gregtech.api.enums.GT_Values; +import gregtech.api.enums.GTValues; import gregtech.api.enums.ItemList; import gregtech.api.enums.SubTag; import gregtech.api.objects.ItemData; import gregtech.api.objects.MaterialStack; import gregtech.api.recipe.RecipeMapBackendPropertiesBuilder; -import gregtech.api.util.GT_Log; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_RecipeBuilder; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTLog; +import gregtech.api.util.GTModHandler; +import gregtech.api.util.GTOreDictUnificator; +import gregtech.api.util.GTRecipe; +import gregtech.api.util.GTRecipeBuilder; +import gregtech.api.util.GTUtility; import gregtech.api.util.MethodsReturnNonnullByDefault; /** @@ -39,8 +39,8 @@ public class MicrowaveBackend extends NonGTBackend { } @Override - protected GT_Recipe overwriteFindRecipe(ItemStack[] items, FluidStack[] fluids, @Nullable ItemStack specialSlot, - @Nullable GT_Recipe cachedRecipe) { + protected GTRecipe overwriteFindRecipe(ItemStack[] items, FluidStack[] fluids, @Nullable ItemStack specialSlot, + @Nullable GTRecipe cachedRecipe) { if (items.length == 0 || items[0] == null) { return null; } @@ -48,12 +48,12 @@ public class MicrowaveBackend extends NonGTBackend { return cachedRecipe; } - ItemStack output = GT_ModHandler.getSmeltingOutput(items[0], false, null); + ItemStack output = GTModHandler.getSmeltingOutput(items[0], false, null); - if (GT_Utility.areStacksEqual(items[0], new ItemStack(Items.book, 1, W))) { - return GT_Values.RA.stdBuilder() - .itemInputs(GT_Utility.copyAmount(1, items[0])) - .itemOutputs(GT_Utility.getWrittenBook("Manual_Microwave", ItemList.Book_Written_03.get(1))) + if (GTUtility.areStacksEqual(items[0], new ItemStack(Items.book, 1, W))) { + return GTValues.RA.stdBuilder() + .itemInputs(GTUtility.copyAmount(1, items[0])) + .itemOutputs(GTUtility.getWrittenBook("Manual_Microwave", ItemList.Book_Written_03.get(1))) .duration(32) .eut(4) .noOptimize() @@ -63,37 +63,36 @@ public class MicrowaveBackend extends NonGTBackend { // Check Container Item of Input since it is around the Input, then the Input itself, then Container Item of // Output and last check the Output itself - for (ItemStack item : new ItemStack[] { GT_Utility.getContainerItem(items[0], true), items[0], - GT_Utility.getContainerItem(output, true), output }) { + for (ItemStack item : new ItemStack[] { GTUtility.getContainerItem(items[0], true), items[0], + GTUtility.getContainerItem(output, true), output }) { if (item == null) continue; - if (GT_Utility.areStacksEqual(item, new ItemStack(Blocks.netherrack, 1, W), true) - || GT_Utility.areStacksEqual(item, new ItemStack(Blocks.tnt, 1, W), true) - || GT_Utility.areStacksEqual(item, new ItemStack(Items.egg, 1, W), true) - || GT_Utility.areStacksEqual(item, new ItemStack(Items.firework_charge, 1, W), true) - || GT_Utility.areStacksEqual(item, new ItemStack(Items.fireworks, 1, W), true) - || GT_Utility.areStacksEqual(item, new ItemStack(Items.fire_charge, 1, W), true)) { - GT_Log.exp - .println("Microwave Explosion due to TNT || EGG || FIREWORKCHARGE || FIREWORK || FIRE CHARGE"); - return GT_RecipeBuilder.empty() + if (GTUtility.areStacksEqual(item, new ItemStack(Blocks.netherrack, 1, W), true) + || GTUtility.areStacksEqual(item, new ItemStack(Blocks.tnt, 1, W), true) + || GTUtility.areStacksEqual(item, new ItemStack(Items.egg, 1, W), true) + || GTUtility.areStacksEqual(item, new ItemStack(Items.firework_charge, 1, W), true) + || GTUtility.areStacksEqual(item, new ItemStack(Items.fireworks, 1, W), true) + || GTUtility.areStacksEqual(item, new ItemStack(Items.fire_charge, 1, W), true)) { + GTLog.exp.println("Microwave Explosion due to TNT || EGG || FIREWORKCHARGE || FIREWORK || FIRE CHARGE"); + return GTRecipeBuilder.empty() .metadata(EXPLODE, true) .build() .orElse(null); } - ItemData itemData = GT_OreDictUnificator.getItemData(item); + ItemData itemData = GTOreDictUnificator.getItemData(item); if (itemData != null) { if (itemData.mMaterial != null && itemData.mMaterial.mMaterial != null) { if (itemData.mMaterial.mMaterial.contains(SubTag.METAL) || itemData.mMaterial.mMaterial.contains(SubTag.EXPLOSIVE)) { - GT_Log.exp.println("Microwave Explosion due to METAL insertion"); - return GT_RecipeBuilder.empty() + GTLog.exp.println("Microwave Explosion due to METAL insertion"); + return GTRecipeBuilder.empty() .metadata(EXPLODE, true) .build() .orElse(null); } if (itemData.mMaterial.mMaterial.contains(SubTag.FLAMMABLE)) { - GT_Log.exp.println("Microwave INFLAMMATION due to FLAMMABLE insertion"); - return GT_RecipeBuilder.empty() + GTLog.exp.println("Microwave INFLAMMATION due to FLAMMABLE insertion"); + return GTRecipeBuilder.empty() .metadata(ON_FIRE, true) .build() .orElse(null); @@ -103,15 +102,15 @@ public class MicrowaveBackend extends NonGTBackend { if (materialStack == null) continue; if (materialStack.mMaterial.contains(SubTag.METAL) || materialStack.mMaterial.contains(SubTag.EXPLOSIVE)) { - GT_Log.exp.println("Microwave Explosion due to METAL insertion"); - return GT_RecipeBuilder.empty() + GTLog.exp.println("Microwave Explosion due to METAL insertion"); + return GTRecipeBuilder.empty() .metadata(EXPLODE, true) .build() .orElse(null); } if (materialStack.mMaterial.contains(SubTag.FLAMMABLE)) { - GT_Log.exp.println("Microwave INFLAMMATION due to FLAMMABLE insertion"); - return GT_RecipeBuilder.empty() + GTLog.exp.println("Microwave INFLAMMATION due to FLAMMABLE insertion"); + return GTRecipeBuilder.empty() .metadata(ON_FIRE, true) .build() .orElse(null); @@ -119,8 +118,8 @@ public class MicrowaveBackend extends NonGTBackend { } } if (TileEntityFurnace.getItemBurnTime(item) > 0) { - GT_Log.exp.println("Microwave INFLAMMATION due to BURNABLE insertion"); - return GT_RecipeBuilder.empty() + GTLog.exp.println("Microwave INFLAMMATION due to BURNABLE insertion"); + return GTRecipeBuilder.empty() .metadata(ON_FIRE, true) .build() .orElse(null); @@ -128,8 +127,8 @@ public class MicrowaveBackend extends NonGTBackend { } return output == null ? null - : GT_Values.RA.stdBuilder() - .itemInputs(GT_Utility.copyAmount(1, items[0])) + : GTValues.RA.stdBuilder() + .itemInputs(GTUtility.copyAmount(1, items[0])) .itemOutputs(output) .duration(32) .eut(4) @@ -140,6 +139,6 @@ public class MicrowaveBackend extends NonGTBackend { @Override public boolean containsInput(ItemStack item) { - return GT_ModHandler.getSmeltingOutput(item, false, null) != null; + return GTModHandler.getSmeltingOutput(item, false, null) != null; } } diff --git a/src/main/java/gregtech/api/recipe/maps/NonGTBackend.java b/src/main/java/gregtech/api/recipe/maps/NonGTBackend.java index 1e871df372..3a66a1c980 100644 --- a/src/main/java/gregtech/api/recipe/maps/NonGTBackend.java +++ b/src/main/java/gregtech/api/recipe/maps/NonGTBackend.java @@ -9,7 +9,7 @@ import net.minecraftforge.fluids.FluidStack; import gregtech.api.recipe.RecipeMapBackend; import gregtech.api.recipe.RecipeMapBackendPropertiesBuilder; -import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GTRecipe; import gregtech.api.util.MethodsReturnNonnullByDefault; /** @@ -24,8 +24,8 @@ public abstract class NonGTBackend extends RecipeMapBackend { } @Override - protected abstract GT_Recipe overwriteFindRecipe(ItemStack[] items, FluidStack[] fluids, - @Nullable ItemStack specialSlot, @Nullable GT_Recipe cachedRecipe); + protected abstract GTRecipe overwriteFindRecipe(ItemStack[] items, FluidStack[] fluids, + @Nullable ItemStack specialSlot, @Nullable GTRecipe cachedRecipe); @Override protected boolean doesOverwriteFindRecipe() { @@ -46,7 +46,7 @@ public abstract class NonGTBackend extends RecipeMapBackend { public void reInit() {} @Override - protected GT_Recipe addToItemMap(GT_Recipe recipe) { + protected GTRecipe addToItemMap(GTRecipe recipe) { return recipe; } } diff --git a/src/main/java/gregtech/api/recipe/maps/OilCrackerBackend.java b/src/main/java/gregtech/api/recipe/maps/OilCrackerBackend.java index c2c312a48a..6417334d34 100644 --- a/src/main/java/gregtech/api/recipe/maps/OilCrackerBackend.java +++ b/src/main/java/gregtech/api/recipe/maps/OilCrackerBackend.java @@ -9,7 +9,7 @@ import net.minecraftforge.fluids.FluidStack; import gregtech.api.recipe.RecipeMapBackend; import gregtech.api.recipe.RecipeMapBackendPropertiesBuilder; -import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GTRecipe; import gregtech.api.util.MethodsReturnNonnullByDefault; @ParametersAreNonnullByDefault @@ -23,7 +23,7 @@ public class OilCrackerBackend extends RecipeMapBackend { } @Override - public GT_Recipe compileRecipe(GT_Recipe recipe) { + public GTRecipe compileRecipe(GTRecipe recipe) { super.compileRecipe(recipe); if (recipe.mFluidInputs != null && recipe.mFluidInputs.length > 1 && recipe.mFluidInputs[1] != null) { validCatalystFluidNames.add( diff --git a/src/main/java/gregtech/api/recipe/maps/PrinterBackend.java b/src/main/java/gregtech/api/recipe/maps/PrinterBackend.java index a933886447..788828df52 100644 --- a/src/main/java/gregtech/api/recipe/maps/PrinterBackend.java +++ b/src/main/java/gregtech/api/recipe/maps/PrinterBackend.java @@ -1,6 +1,6 @@ package gregtech.api.recipe.maps; -import static gregtech.api.enums.GT_Values.L; +import static gregtech.api.enums.GTValues.L; import javax.annotation.Nullable; import javax.annotation.ParametersAreNonnullByDefault; @@ -12,13 +12,13 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; import gregtech.api.enums.Dyes; -import gregtech.api.enums.GT_Values; +import gregtech.api.enums.GTValues; import gregtech.api.enums.ItemList; import gregtech.api.recipe.RecipeMapBackend; import gregtech.api.recipe.RecipeMapBackendPropertiesBuilder; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTModHandler; +import gregtech.api.util.GTRecipe; +import gregtech.api.util.GTUtility; import gregtech.api.util.MethodsReturnNonnullByDefault; /** @@ -33,14 +33,14 @@ public class PrinterBackend extends RecipeMapBackend { } @Override - protected GT_Recipe modifyFoundRecipe(GT_Recipe recipe, ItemStack[] items, FluidStack[] fluids, + protected GTRecipe modifyFoundRecipe(GTRecipe recipe, ItemStack[] items, FluidStack[] fluids, @Nullable ItemStack specialSlot) { if (items[0].getItem() == Items.paper) { assert specialSlot != null; if (!ItemList.Tool_DataStick.isStackEqual(specialSlot, false, true)) return null; NBTTagCompound nbt = specialSlot.getTagCompound(); - if (nbt == null || GT_Utility.isStringInvalid(nbt.getString("title")) - || GT_Utility.isStringInvalid(nbt.getString("author"))) return null; + if (nbt == null || GTUtility.isStringInvalid(nbt.getString("title")) + || GTUtility.isStringInvalid(nbt.getString("author"))) return null; recipe = recipe.copy(); recipe.mCanBeBuffered = false; @@ -67,7 +67,7 @@ public class PrinterBackend extends RecipeMapBackend { recipe = recipe.copy(); recipe.mCanBeBuffered = false; recipe.mOutputs[0].setTagCompound( - GT_Utility.getNBTContainingString( + GTUtility.getNBTContainingString( new NBTTagCompound(), "GT.PunchCardData", nbt.getString("GT.PunchCardData"))); @@ -77,7 +77,7 @@ public class PrinterBackend extends RecipeMapBackend { } @Override - protected GT_Recipe findFallback(ItemStack[] items, FluidStack[] fluids, @Nullable ItemStack specialSlot) { + protected GTRecipe findFallback(ItemStack[] items, FluidStack[] fluids, @Nullable ItemStack specialSlot) { if (items.length == 0 || items[0] == null || fluids.length == 0 || fluids[0] == null) { return null; } @@ -88,7 +88,7 @@ public class PrinterBackend extends RecipeMapBackend { } if (dye == null) return null; - ItemStack batchRecolorOutput = GT_ModHandler.getAllRecipeOutput( + ItemStack batchRecolorOutput = GTModHandler.getAllRecipeOutput( null, items[0], items[0], @@ -100,8 +100,8 @@ public class PrinterBackend extends RecipeMapBackend { items[0], items[0]); if (batchRecolorOutput != null) { - return GT_Values.RA.stdBuilder() - .itemInputs(GT_Utility.copyAmount(8, items[0])) + return GTValues.RA.stdBuilder() + .itemInputs(GTUtility.copyAmount(8, items[0])) .itemOutputs(batchRecolorOutput) .fluidInputs(new FluidStack(fluids[0].getFluid(), (int) L)) .duration(256) @@ -112,11 +112,11 @@ public class PrinterBackend extends RecipeMapBackend { .orElse(null); } - ItemStack singleRecolorOutput = GT_ModHandler + ItemStack singleRecolorOutput = GTModHandler .getAllRecipeOutput(null, items[0], ItemList.DYE_ONLY_ITEMS[dye.mIndex].get(1)); if (singleRecolorOutput != null) { - return GT_Values.RA.stdBuilder() - .itemInputs(GT_Utility.copyAmount(1, items[0])) + return GTValues.RA.stdBuilder() + .itemInputs(GTUtility.copyAmount(1, items[0])) .itemOutputs(singleRecolorOutput) .fluidInputs(new FluidStack(fluids[0].getFluid(), (int) L)) .duration(32) diff --git a/src/main/java/gregtech/api/recipe/maps/PurificationUnitClarifierFrontend.java b/src/main/java/gregtech/api/recipe/maps/PurificationUnitClarifierFrontend.java index c7dad7ea3a..e681c95403 100644 --- a/src/main/java/gregtech/api/recipe/maps/PurificationUnitClarifierFrontend.java +++ b/src/main/java/gregtech/api/recipe/maps/PurificationUnitClarifierFrontend.java @@ -11,13 +11,13 @@ import com.gtnewhorizons.modularui.api.math.Size; import codechicken.nei.PositionedStack; import gregtech.api.enums.ItemList; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.recipe.BasicUIPropertiesBuilder; import gregtech.api.recipe.NEIRecipePropertiesBuilder; import gregtech.api.util.MethodsReturnNonnullByDefault; import gregtech.common.gui.modularui.UIHelper; -import gregtech.common.tileentities.machines.multi.purification.GT_MetaTileEntity_PurificationUnitClarifier; -import gregtech.nei.GT_NEI_DefaultHandler; +import gregtech.common.tileentities.machines.multi.purification.MTEPurificationUnitClarifier; +import gregtech.nei.GTNEIDefaultHandler; @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault @@ -28,7 +28,7 @@ public class PurificationUnitClarifierFrontend extends PurificationUnitRecipeMap super( 80, uiPropertiesBuilder.logoPos(new Pos2d(160, 100)) - .progressBarTexture(new FallbackableUITexture(GT_UITextures.PROGRESSBAR_CLARIFIER)) + .progressBarTexture(new FallbackableUITexture(GTUITextures.PROGRESSBAR_CLARIFIER)) .logoPos(new Pos2d(152, 90)), neiPropertiesBuilder.recipeBackgroundSize(new Size(170, 120))); } @@ -60,12 +60,12 @@ public class PurificationUnitClarifierFrontend extends PurificationUnitRecipeMap } @Override - public void drawNEIOverlays(GT_NEI_DefaultHandler.CachedDefaultRecipe neiCachedRecipe) { + public void drawNEIOverlays(GTNEIDefaultHandler.CachedDefaultRecipe neiCachedRecipe) { super.drawNEIOverlays(neiCachedRecipe); for (PositionedStack stack : neiCachedRecipe.mInputs) { if (stack.item.isItemEqual(ItemList.ActivatedCarbonFilterMesh.get(1))) { - drawNEIOverlayText((int) (GT_MetaTileEntity_PurificationUnitClarifier.FILTER_DAMAGE_RATE) + "%", stack); + drawNEIOverlayText((int) (MTEPurificationUnitClarifier.FILTER_DAMAGE_RATE) + "%", stack); } } } diff --git a/src/main/java/gregtech/api/recipe/maps/PurificationUnitFlocculatorFrontend.java b/src/main/java/gregtech/api/recipe/maps/PurificationUnitFlocculatorFrontend.java index 9366237b67..d0373d4310 100644 --- a/src/main/java/gregtech/api/recipe/maps/PurificationUnitFlocculatorFrontend.java +++ b/src/main/java/gregtech/api/recipe/maps/PurificationUnitFlocculatorFrontend.java @@ -15,14 +15,14 @@ import com.gtnewhorizons.modularui.api.math.Size; import codechicken.nei.PositionedStack; import gregtech.api.enums.Materials; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.recipe.BasicUIPropertiesBuilder; import gregtech.api.recipe.NEIRecipePropertiesBuilder; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTUtility; import gregtech.api.util.MethodsReturnNonnullByDefault; import gregtech.common.gui.modularui.UIHelper; -import gregtech.common.tileentities.machines.multi.purification.GT_MetaTileEntity_PurificationUnitFlocculation; -import gregtech.nei.GT_NEI_DefaultHandler; +import gregtech.common.tileentities.machines.multi.purification.MTEPurificationUnitFlocculation; +import gregtech.nei.GTNEIDefaultHandler; @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault @@ -33,7 +33,7 @@ public class PurificationUnitFlocculatorFrontend extends PurificationUnitRecipeM super( 80, uiPropertiesBuilder.logoPos(new Pos2d(160, 100)) - .progressBarTexture(new FallbackableUITexture(GT_UITextures.PROGRESSBAR_FLOCCULATION)) + .progressBarTexture(new FallbackableUITexture(GTUITextures.PROGRESSBAR_FLOCCULATION)) .logoPos(new Pos2d(152, 100)), neiPropertiesBuilder.recipeBackgroundSize(new Size(170, 120))); } @@ -60,30 +60,29 @@ public class PurificationUnitFlocculatorFrontend extends PurificationUnitRecipeM @Override @NotNull public List<String> handleNEIItemTooltip(ItemStack stack, List<String> currentTip, - GT_NEI_DefaultHandler.CachedDefaultRecipe neiCachedRecipe) { - if (stack - .isItemEqual(GT_Utility.getFluidDisplayStack(Materials.PolyAluminiumChloride.getFluid(1000L), false))) { + GTNEIDefaultHandler.CachedDefaultRecipe neiCachedRecipe) { + if (stack.isItemEqual(GTUtility.getFluidDisplayStack(Materials.PolyAluminiumChloride.getFluid(1000L), false))) { currentTip.add("Consumed during operation"); currentTip.add( - "+" + GT_MetaTileEntity_PurificationUnitFlocculation.SUCCESS_PER_LEVEL + "+" + MTEPurificationUnitFlocculation.SUCCESS_PER_LEVEL + "%/" - + GT_MetaTileEntity_PurificationUnitFlocculation.INPUT_CHEMICAL_PER_LEVEL + + MTEPurificationUnitFlocculation.INPUT_CHEMICAL_PER_LEVEL + "L"); } else if (stack - .isItemEqual(GT_Utility.getFluidDisplayStack(Materials.FlocculationWasteLiquid.getFluid(1000L), false))) { + .isItemEqual(GTUtility.getFluidDisplayStack(Materials.FlocculationWasteLiquid.getFluid(1000L), false))) { currentTip.add("Returned in amount equivalent to consumed flocculant."); } return super.handleNEIItemTooltip(stack, currentTip, neiCachedRecipe); } @Override - public void drawNEIOverlays(GT_NEI_DefaultHandler.CachedDefaultRecipe neiCachedRecipe) { + public void drawNEIOverlays(GTNEIDefaultHandler.CachedDefaultRecipe neiCachedRecipe) { super.drawNEIOverlays(neiCachedRecipe); // Display flocculation chemical neiCachedRecipe.mInputs.add( new PositionedStack( - GT_Utility.getFluidDisplayStack(Materials.PolyAluminiumChloride.getFluid(100000L), true), + GTUtility.getFluidDisplayStack(Materials.PolyAluminiumChloride.getFluid(100000L), true), 5, -1, false)); @@ -91,7 +90,7 @@ public class PurificationUnitFlocculatorFrontend extends PurificationUnitRecipeM // Display waste output neiCachedRecipe.mOutputs.add( new PositionedStack( - GT_Utility.getFluidDisplayStack(Materials.FlocculationWasteLiquid.getFluid(100000L), true), + GTUtility.getFluidDisplayStack(Materials.FlocculationWasteLiquid.getFluid(100000L), true), 147, 48, false)); diff --git a/src/main/java/gregtech/api/recipe/maps/PurificationUnitLaserFrontend.java b/src/main/java/gregtech/api/recipe/maps/PurificationUnitLaserFrontend.java index df42259864..9c90acd8ad 100644 --- a/src/main/java/gregtech/api/recipe/maps/PurificationUnitLaserFrontend.java +++ b/src/main/java/gregtech/api/recipe/maps/PurificationUnitLaserFrontend.java @@ -11,8 +11,8 @@ import gregtech.api.recipe.BasicUIPropertiesBuilder; import gregtech.api.recipe.NEIRecipePropertiesBuilder; import gregtech.api.recipe.RecipeMapFrontend; import gregtech.common.gui.modularui.UIHelper; -import gregtech.common.tileentities.machines.multi.purification.GT_MetaTileEntity_PurificationUnitUVTreatment; -import gregtech.nei.GT_NEI_DefaultHandler; +import gregtech.common.tileentities.machines.multi.purification.MTEPurificationUnitUVTreatment; +import gregtech.nei.GTNEIDefaultHandler; public class PurificationUnitLaserFrontend extends RecipeMapFrontend { @@ -22,13 +22,13 @@ public class PurificationUnitLaserFrontend extends RecipeMapFrontend { } @Override - public void drawNEIOverlays(GT_NEI_DefaultHandler.CachedDefaultRecipe neiCachedRecipe) { - final int numLenses = GT_MetaTileEntity_PurificationUnitUVTreatment.LENS_ITEMS.size(); + public void drawNEIOverlays(GTNEIDefaultHandler.CachedDefaultRecipe neiCachedRecipe) { + final int numLenses = MTEPurificationUnitUVTreatment.LENS_ITEMS.size(); List<Pos2d> positions = UIHelper.getGridPositions(numLenses, 12, -4, 3, 3); // Put in lens items for (int i = 0; i < numLenses; ++i) { Pos2d position = positions.get(i); - ItemStack lens = GT_MetaTileEntity_PurificationUnitUVTreatment.LENS_ITEMS.get(i); + ItemStack lens = MTEPurificationUnitUVTreatment.LENS_ITEMS.get(i); neiCachedRecipe.mInputs.add(new PositionedStack(lens, position.x, position.y, false)); } super.drawNEIOverlays(neiCachedRecipe); diff --git a/src/main/java/gregtech/api/recipe/maps/PurificationUnitOzonationFrontend.java b/src/main/java/gregtech/api/recipe/maps/PurificationUnitOzonationFrontend.java index cdfd41b78c..e9c1277cb3 100644 --- a/src/main/java/gregtech/api/recipe/maps/PurificationUnitOzonationFrontend.java +++ b/src/main/java/gregtech/api/recipe/maps/PurificationUnitOzonationFrontend.java @@ -9,7 +9,7 @@ import com.gtnewhorizons.modularui.api.drawable.FallbackableUITexture; import com.gtnewhorizons.modularui.api.math.Pos2d; import com.gtnewhorizons.modularui.api.math.Size; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.recipe.BasicUIPropertiesBuilder; import gregtech.api.recipe.NEIRecipePropertiesBuilder; import gregtech.api.util.MethodsReturnNonnullByDefault; @@ -24,7 +24,7 @@ public class PurificationUnitOzonationFrontend extends PurificationUnitRecipeMap super( 120, uiPropertiesBuilder.logoPos(new Pos2d(160, 100)) - .progressBarTexture(new FallbackableUITexture(GT_UITextures.PROGRESSBAR_OZONATION)) + .progressBarTexture(new FallbackableUITexture(GTUITextures.PROGRESSBAR_OZONATION)) .logoPos(new Pos2d(152, 97)), neiPropertiesBuilder.recipeBackgroundSize(new Size(170, 180))); } diff --git a/src/main/java/gregtech/api/recipe/maps/PurificationUnitParticleExtractorFrontend.java b/src/main/java/gregtech/api/recipe/maps/PurificationUnitParticleExtractorFrontend.java index bbbd88fd5f..d738ce0750 100644 --- a/src/main/java/gregtech/api/recipe/maps/PurificationUnitParticleExtractorFrontend.java +++ b/src/main/java/gregtech/api/recipe/maps/PurificationUnitParticleExtractorFrontend.java @@ -12,7 +12,7 @@ import gregtech.api.recipe.BasicUIPropertiesBuilder; import gregtech.api.recipe.NEIRecipePropertiesBuilder; import gregtech.api.recipe.RecipeMapFrontend; import gregtech.common.gui.modularui.UIHelper; -import gregtech.nei.GT_NEI_DefaultHandler; +import gregtech.nei.GTNEIDefaultHandler; public class PurificationUnitParticleExtractorFrontend extends RecipeMapFrontend { @@ -25,7 +25,7 @@ public class PurificationUnitParticleExtractorFrontend extends RecipeMapFrontend } @Override - public void drawNEIOverlays(GT_NEI_DefaultHandler.CachedDefaultRecipe neiCachedRecipe) { + public void drawNEIOverlays(GTNEIDefaultHandler.CachedDefaultRecipe neiCachedRecipe) { List<Pos2d> positions = UIHelper.getGridPositions(2, 30, 14, 2, 1); Pos2d pos1 = positions.get(0); Pos2d pos2 = positions.get(1); diff --git a/src/main/java/gregtech/api/recipe/maps/PurificationUnitPhAdjustmentFrontend.java b/src/main/java/gregtech/api/recipe/maps/PurificationUnitPhAdjustmentFrontend.java index 7e9eded675..e78d2a395a 100644 --- a/src/main/java/gregtech/api/recipe/maps/PurificationUnitPhAdjustmentFrontend.java +++ b/src/main/java/gregtech/api/recipe/maps/PurificationUnitPhAdjustmentFrontend.java @@ -15,13 +15,13 @@ import com.gtnewhorizons.modularui.api.math.Size; import codechicken.nei.PositionedStack; import gregtech.api.enums.Materials; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.recipe.BasicUIPropertiesBuilder; import gregtech.api.recipe.NEIRecipePropertiesBuilder; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTUtility; import gregtech.api.util.MethodsReturnNonnullByDefault; -import gregtech.common.tileentities.machines.multi.purification.GT_MetaTileEntity_PurificationUnitPhAdjustment; -import gregtech.nei.GT_NEI_DefaultHandler; +import gregtech.common.tileentities.machines.multi.purification.MTEPurificationUnitPhAdjustment; +import gregtech.nei.GTNEIDefaultHandler; @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault @@ -32,7 +32,7 @@ public class PurificationUnitPhAdjustmentFrontend extends PurificationUnitRecipe super( 80, uiPropertiesBuilder.logoPos(new Pos2d(160, 100)) - .progressBarTexture(new FallbackableUITexture(GT_UITextures.PROGRESSBAR_PH_NEUTRALIZATION)) + .progressBarTexture(new FallbackableUITexture(GTUITextures.PROGRESSBAR_PH_NEUTRALIZATION)) .logoPos(new Pos2d(152, 90)), neiPropertiesBuilder.recipeBackgroundSize(new Size(170, 120))); } @@ -54,24 +54,23 @@ public class PurificationUnitPhAdjustmentFrontend extends PurificationUnitRecipe @Override @NotNull public List<String> handleNEIItemTooltip(ItemStack stack, List<String> currentTip, - GT_NEI_DefaultHandler.CachedDefaultRecipe neiCachedRecipe) { + GTNEIDefaultHandler.CachedDefaultRecipe neiCachedRecipe) { // Add pH adjustment values if (stack.isItemEqual(Materials.SodiumHydroxide.getDust(1))) { - currentTip - .add("+" + GT_MetaTileEntity_PurificationUnitPhAdjustment.PH_PER_ALKALINE_DUST * 64 + " pH/stack"); + currentTip.add("+" + MTEPurificationUnitPhAdjustment.PH_PER_ALKALINE_DUST * 64 + " pH/stack"); } else - if (stack.isItemEqual(GT_Utility.getFluidDisplayStack(Materials.HydrochloricAcid.getFluid(1000L), false))) { - currentTip.add(GT_MetaTileEntity_PurificationUnitPhAdjustment.PH_PER_10_ACID_LITER * 100 + " pH/1000L"); + if (stack.isItemEqual(GTUtility.getFluidDisplayStack(Materials.HydrochloricAcid.getFluid(1000L), false))) { + currentTip.add(MTEPurificationUnitPhAdjustment.PH_PER_10_ACID_LITER * 100 + " pH/1000L"); } return super.handleNEIItemTooltip(stack, currentTip, neiCachedRecipe); } @Override - public void drawNEIOverlays(GT_NEI_DefaultHandler.CachedDefaultRecipe neiCachedRecipe) { + public void drawNEIOverlays(GTNEIDefaultHandler.CachedDefaultRecipe neiCachedRecipe) { neiCachedRecipe.mInputs.add(new PositionedStack(Materials.SodiumHydroxide.getDust(64), 3, 1, false)); neiCachedRecipe.mInputs.add( new PositionedStack( - GT_Utility.getFluidDisplayStack(Materials.HydrochloricAcid.getFluid(1000L), true), + GTUtility.getFluidDisplayStack(Materials.HydrochloricAcid.getFluid(1000L), true), 147, 1, false)); diff --git a/src/main/java/gregtech/api/recipe/maps/PurificationUnitPlasmaHeaterFrontend.java b/src/main/java/gregtech/api/recipe/maps/PurificationUnitPlasmaHeaterFrontend.java index 5c63353b98..a7f35c86a5 100644 --- a/src/main/java/gregtech/api/recipe/maps/PurificationUnitPlasmaHeaterFrontend.java +++ b/src/main/java/gregtech/api/recipe/maps/PurificationUnitPlasmaHeaterFrontend.java @@ -11,12 +11,12 @@ import com.gtnewhorizons.modularui.api.math.Size; import codechicken.nei.PositionedStack; import gregtech.api.enums.Materials; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.recipe.BasicUIPropertiesBuilder; import gregtech.api.recipe.NEIRecipePropertiesBuilder; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTUtility; import gregtech.api.util.MethodsReturnNonnullByDefault; -import gregtech.nei.GT_NEI_DefaultHandler; +import gregtech.nei.GTNEIDefaultHandler; @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault @@ -27,7 +27,7 @@ public class PurificationUnitPlasmaHeaterFrontend extends PurificationUnitRecipe super( 120, uiPropertiesBuilder.logoPos(new Pos2d(152, 90)) - .progressBarTexture(new FallbackableUITexture(GT_UITextures.PROGRESSBAR_PLASMA_HEATER)), + .progressBarTexture(new FallbackableUITexture(GTUITextures.PROGRESSBAR_PLASMA_HEATER)), neiPropertiesBuilder.recipeBackgroundSize(new Size(170, 120))); } @@ -46,12 +46,12 @@ public class PurificationUnitPlasmaHeaterFrontend extends PurificationUnitRecipe } @Override - public void drawNEIOverlays(GT_NEI_DefaultHandler.CachedDefaultRecipe neiCachedRecipe) { + public void drawNEIOverlays(GTNEIDefaultHandler.CachedDefaultRecipe neiCachedRecipe) { neiCachedRecipe.mInputs.add( - new PositionedStack(GT_Utility.getFluidDisplayStack(Materials.Helium.getPlasma(10L), true), 26, 53, false)); + new PositionedStack(GTUtility.getFluidDisplayStack(Materials.Helium.getPlasma(10L), true), 26, 53, false)); neiCachedRecipe.mInputs.add( new PositionedStack( - GT_Utility.getFluidDisplayStack(Materials.SuperCoolant.getFluid(100L), true), + GTUtility.getFluidDisplayStack(Materials.SuperCoolant.getFluid(100L), true), 107, 52, false)); diff --git a/src/main/java/gregtech/api/recipe/maps/RecyclerBackend.java b/src/main/java/gregtech/api/recipe/maps/RecyclerBackend.java index 55fb9b4cc4..c149be4219 100644 --- a/src/main/java/gregtech/api/recipe/maps/RecyclerBackend.java +++ b/src/main/java/gregtech/api/recipe/maps/RecyclerBackend.java @@ -6,12 +6,12 @@ import javax.annotation.ParametersAreNonnullByDefault; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; -import gregtech.api.enums.GT_Values; +import gregtech.api.enums.GTValues; import gregtech.api.recipe.RecipeMapBackendPropertiesBuilder; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_RecipeBuilder; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTModHandler; +import gregtech.api.util.GTRecipe; +import gregtech.api.util.GTRecipeBuilder; +import gregtech.api.util.GTUtility; import gregtech.api.util.MethodsReturnNonnullByDefault; /** @@ -26,17 +26,17 @@ public class RecyclerBackend extends NonGTBackend { } @Override - protected GT_Recipe overwriteFindRecipe(ItemStack[] items, FluidStack[] fluids, @Nullable ItemStack specialSlot, - @Nullable GT_Recipe cachedRecipe) { + protected GTRecipe overwriteFindRecipe(ItemStack[] items, FluidStack[] fluids, @Nullable ItemStack specialSlot, + @Nullable GTRecipe cachedRecipe) { if (items.length == 0 || items[0] == null) { return null; } if (cachedRecipe != null && cachedRecipe.isRecipeInputEqual(false, true, fluids, items)) { return cachedRecipe; } - GT_RecipeBuilder builder = GT_Values.RA.stdBuilder() - .itemInputs(GT_Utility.copyAmount(1, items[0])); - ItemStack output = GT_ModHandler.getRecyclerOutput(items[0], 0); + GTRecipeBuilder builder = GTValues.RA.stdBuilder() + .itemInputs(GTUtility.copyAmount(1, items[0])); + ItemStack output = GTModHandler.getRecyclerOutput(items[0], 0); if (output != null) { builder.itemOutputs(output) .outputChances(1250); @@ -50,6 +50,6 @@ public class RecyclerBackend extends NonGTBackend { @Override public boolean containsInput(ItemStack item) { - return GT_ModHandler.getRecyclerOutput(item, 0) != null; + return GTModHandler.getRecyclerOutput(item, 0) != null; } } diff --git a/src/main/java/gregtech/api/recipe/maps/ReplicatorBackend.java b/src/main/java/gregtech/api/recipe/maps/ReplicatorBackend.java index f201698457..b40b3dd082 100644 --- a/src/main/java/gregtech/api/recipe/maps/ReplicatorBackend.java +++ b/src/main/java/gregtech/api/recipe/maps/ReplicatorBackend.java @@ -12,34 +12,34 @@ import javax.annotation.ParametersAreNonnullByDefault; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; -import gregtech.GT_Mod; +import gregtech.GTMod; import gregtech.api.enums.Element; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.TierEU; import gregtech.api.recipe.RecipeMapBackend; import gregtech.api.recipe.RecipeMapBackendPropertiesBuilder; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_RecipeBuilder; -import gregtech.api.util.GT_RecipeConstants; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTRecipe; +import gregtech.api.util.GTRecipeBuilder; +import gregtech.api.util.GTRecipeConstants; +import gregtech.api.util.GTUtility; import gregtech.api.util.MethodsReturnNonnullByDefault; -import gregtech.common.items.behaviors.Behaviour_DataOrb; +import gregtech.common.items.behaviors.BehaviourDataOrb; @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault public class ReplicatorBackend extends RecipeMapBackend { - private final Map<Materials, GT_Recipe> recipesByMaterial = new HashMap<>(); + private final Map<Materials, GTRecipe> recipesByMaterial = new HashMap<>(); public ReplicatorBackend(RecipeMapBackendPropertiesBuilder propertiesBuilder) { super(propertiesBuilder.recipeEmitter(ReplicatorBackend::replicatorRecipeEmitter)); } @Override - public GT_Recipe compileRecipe(GT_Recipe recipe) { + public GTRecipe compileRecipe(GTRecipe recipe) { super.compileRecipe(recipe); - Materials material = recipe.getMetadata(GT_RecipeConstants.MATERIAL); + Materials material = recipe.getMetadata(GTRecipeConstants.MATERIAL); assert material != null; // checked by replicatorRecipeEmitter recipesByMaterial.put(material, recipe); return recipe; @@ -51,8 +51,8 @@ public class ReplicatorBackend extends RecipeMapBackend { } @Override - protected GT_Recipe overwriteFindRecipe(ItemStack[] items, FluidStack[] fluids, @Nullable ItemStack specialSlot, - @Nullable GT_Recipe cachedRecipe) { + protected GTRecipe overwriteFindRecipe(ItemStack[] items, FluidStack[] fluids, @Nullable ItemStack specialSlot, + @Nullable GTRecipe cachedRecipe) { if (specialSlot == null) { return null; } @@ -65,19 +65,19 @@ public class ReplicatorBackend extends RecipeMapBackend { @Nullable private static Materials getMaterialFromDataOrb(ItemStack stack) { - if (ItemList.Tool_DataOrb.isStackEqual(stack, false, true) && Behaviour_DataOrb.getDataTitle(stack) + if (ItemList.Tool_DataOrb.isStackEqual(stack, false, true) && BehaviourDataOrb.getDataTitle(stack) .equals("Elemental-Scan")) { - return Element.get(Behaviour_DataOrb.getDataName(stack)).mLinkedMaterials.stream() + return Element.get(BehaviourDataOrb.getDataName(stack)).mLinkedMaterials.stream() .findFirst() .orElse(null); } return null; } - private static Collection<GT_Recipe> replicatorRecipeEmitter(GT_RecipeBuilder builder) { - Materials material = builder.getMetadata(GT_RecipeConstants.MATERIAL); + private static Collection<GTRecipe> replicatorRecipeEmitter(GTRecipeBuilder builder) { + Materials material = builder.getMetadata(GTRecipeConstants.MATERIAL); if (material == null) { - throw new IllegalStateException("GT_RecipeConstants.MATERIAL must be set for replicator recipe"); + throw new IllegalStateException("GTRecipeConstants.MATERIAL must be set for replicator recipe"); } return Optional.of(material) .map(material1 -> material1.mElement) @@ -85,7 +85,7 @@ public class ReplicatorBackend extends RecipeMapBackend { .map(ReplicatorBackend::getUUMAmountFromMass) .flatMap( uum -> builder.fluidInputs(Materials.UUMatter.getFluid(uum)) - .duration(GT_Utility.safeInt(uum * 512L, 1)) + .duration(GTUtility.safeInt(uum * 512L, 1)) .eut(TierEU.RECIPE_LV) .ignoreCollision() .noOptimize() @@ -95,6 +95,6 @@ public class ReplicatorBackend extends RecipeMapBackend { } private static int getUUMAmountFromMass(long mass) { - return GT_Utility.safeInt((long) Math.pow(mass, GT_Mod.gregtechproxy.replicatorExponent), 1); + return GTUtility.safeInt((long) Math.pow(mass, GTMod.gregtechproxy.replicatorExponent), 1); } } diff --git a/src/main/java/gregtech/api/recipe/maps/SpaceProjectFrontend.java b/src/main/java/gregtech/api/recipe/maps/SpaceProjectFrontend.java index 98463dcc4d..70c9605e1b 100644 --- a/src/main/java/gregtech/api/recipe/maps/SpaceProjectFrontend.java +++ b/src/main/java/gregtech/api/recipe/maps/SpaceProjectFrontend.java @@ -1,6 +1,6 @@ package gregtech.api.recipe.maps; -import static gregtech.api.util.GT_Utility.formatNumbers; +import static gregtech.api.util.GTUtility.formatNumbers; import static net.minecraft.util.EnumChatFormatting.GRAY; import static net.minecraft.util.StatCollector.translateToLocal; @@ -22,7 +22,7 @@ import com.gtnewhorizons.modularui.common.widget.ProgressBar; import appeng.util.ReadableNumberConverter; import codechicken.lib.gui.GuiDraw; import codechicken.nei.PositionedStack; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.recipe.BasicUIPropertiesBuilder; import gregtech.api.recipe.NEIRecipePropertiesBuilder; import gregtech.api.recipe.RecipeMapFrontend; @@ -31,7 +31,7 @@ import gregtech.common.gui.modularui.UIHelper; import gregtech.common.misc.spaceprojects.SpaceProjectManager; import gregtech.common.misc.spaceprojects.SpaceProjectManager.FakeSpaceProjectRecipe; import gregtech.common.misc.spaceprojects.interfaces.ISpaceProject; -import gregtech.nei.GT_NEI_DefaultHandler; +import gregtech.nei.GTNEIDefaultHandler; @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault @@ -76,7 +76,7 @@ public class SpaceProjectFrontend extends RecipeMapFrontend { @Override protected List<String> handleNEIItemInputTooltip(List<String> currentTip, - GT_NEI_DefaultHandler.FixedPositionedStack pStack) { + GTNEIDefaultHandler.FixedPositionedStack pStack) { super.handleNEIItemOutputTooltip(currentTip, pStack); if (pStack.isFluid()) return currentTip; currentTip.add(GRAY + translateToLocal("Item Count: ") + formatNumbers(pStack.realStackSize)); @@ -84,11 +84,11 @@ public class SpaceProjectFrontend extends RecipeMapFrontend { } @Override - public void drawNEIOverlays(GT_NEI_DefaultHandler.CachedDefaultRecipe neiCachedRecipe) { + public void drawNEIOverlays(GTNEIDefaultHandler.CachedDefaultRecipe neiCachedRecipe) { for (PositionedStack stack : neiCachedRecipe.mInputs) { - if (stack instanceof GT_NEI_DefaultHandler.FixedPositionedStack pStack && stack.item != null + if (stack instanceof GTNEIDefaultHandler.FixedPositionedStack pStack && stack.item != null && !pStack.isFluid()) { - int stackSize = ((GT_NEI_DefaultHandler.FixedPositionedStack) stack).realStackSize; + int stackSize = ((GTNEIDefaultHandler.FixedPositionedStack) stack).realStackSize; String displayString; if (stack.item.stackSize > 9999) { displayString = ReadableNumberConverter.INSTANCE.toWideReadableForm(stackSize); @@ -114,14 +114,14 @@ public class SpaceProjectFrontend extends RecipeMapFrontend { int bar2Width = 18; List<Supplier<Float>> splitProgress = splitProgress(progressSupplier, bar1Width, bar2Width); builder.widget( - new ProgressBar().setTexture(GT_UITextures.PROGRESSBAR_ASSEMBLY_LINE_1, 17) + new ProgressBar().setTexture(GTUITextures.PROGRESSBAR_ASSEMBLY_LINE_1, 17) .setDirection(ProgressBar.Direction.RIGHT) .setProgress(splitProgress.get(0)) .setSynced(false, false) .setPos(new Pos2d(70, 28).add(windowOffset)) .setSize(bar1Width, 72)); builder.widget( - new ProgressBar().setTexture(GT_UITextures.PROGRESSBAR_ASSEMBLY_LINE_2, 18) + new ProgressBar().setTexture(GTUITextures.PROGRESSBAR_ASSEMBLY_LINE_2, 18) .setDirection(ProgressBar.Direction.RIGHT) .setProgress(splitProgress.get(1)) .setSynced(false, false) diff --git a/src/main/java/gregtech/api/recipe/maps/TranscendentPlasmaMixerFrontend.java b/src/main/java/gregtech/api/recipe/maps/TranscendentPlasmaMixerFrontend.java index 7a5d7ff164..7a4036e7ba 100644 --- a/src/main/java/gregtech/api/recipe/maps/TranscendentPlasmaMixerFrontend.java +++ b/src/main/java/gregtech/api/recipe/maps/TranscendentPlasmaMixerFrontend.java @@ -1,6 +1,6 @@ package gregtech.api.recipe.maps; -import static gregtech.api.util.GT_Utility.formatNumbers; +import static gregtech.api.util.GTUtility.formatNumbers; import java.util.List; @@ -11,7 +11,7 @@ import com.gtnewhorizons.modularui.api.math.Pos2d; import gregtech.api.recipe.BasicUIPropertiesBuilder; import gregtech.api.recipe.NEIRecipePropertiesBuilder; import gregtech.api.recipe.RecipeMapFrontend; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTUtility; import gregtech.api.util.MethodsReturnNonnullByDefault; import gregtech.common.gui.modularui.UIHelper; import gregtech.nei.RecipeDisplayInfo; @@ -45,12 +45,12 @@ public class TranscendentPlasmaMixerFrontend extends RecipeMapFrontend { // These look odd because recipeInfo.recipe.mEUt is actually the EU per litre of fluid processed, not // the EU/t. recipeInfo.drawText( - GT_Utility.trans("152", "Total: ") + GTUtility.trans("152", "Total: ") + formatNumbers(1000L * recipeInfo.recipe.mDuration / 100L * recipeInfo.recipe.mEUt) + " EU"); // 1000 / (20 ticks * 5 seconds) = 10L/t. 10L/t * x EU/L = 10 * x EU/t. long averageUsage = 10L * recipeInfo.recipe.mEUt; recipeInfo.drawText( - "Average: " + formatNumbers(averageUsage) + " EU/t" + GT_Utility.getTierNameWithParentheses(averageUsage)); + "Average: " + formatNumbers(averageUsage) + " EU/t" + GTUtility.getTierNameWithParentheses(averageUsage)); } } diff --git a/src/main/java/gregtech/api/recipe/maps/UnpackagerBackend.java b/src/main/java/gregtech/api/recipe/maps/UnpackagerBackend.java index e7297f0609..9ea34609f6 100644 --- a/src/main/java/gregtech/api/recipe/maps/UnpackagerBackend.java +++ b/src/main/java/gregtech/api/recipe/maps/UnpackagerBackend.java @@ -6,12 +6,12 @@ import javax.annotation.ParametersAreNonnullByDefault; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; -import gregtech.api.enums.GT_Values; +import gregtech.api.enums.GTValues; import gregtech.api.enums.ItemList; import gregtech.api.recipe.RecipeMapBackend; import gregtech.api.recipe.RecipeMapBackendPropertiesBuilder; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GTModHandler; +import gregtech.api.util.GTRecipe; import gregtech.api.util.MethodsReturnNonnullByDefault; @ParametersAreNonnullByDefault @@ -23,16 +23,16 @@ public class UnpackagerBackend extends RecipeMapBackend { } @Override - protected GT_Recipe findFallback(ItemStack[] items, FluidStack[] fluids, @Nullable ItemStack specialSlot) { + protected GTRecipe findFallback(ItemStack[] items, FluidStack[] fluids, @Nullable ItemStack specialSlot) { if (items.length == 0 || !ItemList.IC2_Scrapbox.isStackEqual(items[0], false, true)) { return null; } - ItemStack output = GT_ModHandler.getRandomScrapboxDrop(); + ItemStack output = GTModHandler.getRandomScrapboxDrop(); if (output == null) { return null; } - return GT_Values.RA.stdBuilder() + return GTValues.RA.stdBuilder() .itemInputs(ItemList.IC2_Scrapbox.get(1)) .itemOutputs(output) .duration(16) |
