From 1b820de08a05070909a267e17f033fcf58ac8710 Mon Sep 17 00:00:00 2001 From: NotAPenguin Date: Mon, 2 Sep 2024 23:17:17 +0200 Subject: 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 --- .../api/recipe/BasicUIPropertiesBuilder.java | 4 +- .../java/gregtech/api/recipe/FindRecipeQuery.java | 18 +- .../gregtech/api/recipe/NEIRecipeProperties.java | 10 +- .../api/recipe/NEIRecipePropertiesBuilder.java | 6 +- src/main/java/gregtech/api/recipe/RecipeMap.java | 32 +- .../java/gregtech/api/recipe/RecipeMapBackend.java | 104 +++--- .../api/recipe/RecipeMapBackendProperties.java | 12 +- .../recipe/RecipeMapBackendPropertiesBuilder.java | 26 +- .../java/gregtech/api/recipe/RecipeMapBuilder.java | 30 +- .../gregtech/api/recipe/RecipeMapFrontend.java | 52 +-- src/main/java/gregtech/api/recipe/RecipeMaps.java | 406 ++++++++++----------- .../api/recipe/check/ResultInsufficientHeat.java | 4 +- .../check/ResultInsufficientMachineTier.java | 4 +- .../api/recipe/check/ResultInsufficientPower.java | 6 +- .../check/ResultInsufficientStartupPower.java | 4 +- .../ResultInsufficientStartupPowerBigInt.java | 2 +- .../api/recipe/check/SingleRecipeCheck.java | 59 ++- .../gregtech/api/recipe/maps/AssemblerBackend.java | 4 +- .../api/recipe/maps/AssemblyLineFrontend.java | 8 +- .../api/recipe/maps/FluidCannerBackend.java | 24 +- .../api/recipe/maps/FormingPressBackend.java | 18 +- .../java/gregtech/api/recipe/maps/FuelBackend.java | 26 +- .../gregtech/api/recipe/maps/FurnaceBackend.java | 20 +- .../api/recipe/maps/LargeBoilerFuelBackend.java | 22 +- .../gregtech/api/recipe/maps/MicrowaveBackend.java | 83 +++-- .../gregtech/api/recipe/maps/NonGTBackend.java | 8 +- .../api/recipe/maps/OilCrackerBackend.java | 4 +- .../gregtech/api/recipe/maps/PrinterBackend.java | 32 +- .../maps/PurificationUnitClarifierFrontend.java | 12 +- .../maps/PurificationUnitFlocculatorFrontend.java | 27 +- .../recipe/maps/PurificationUnitLaserFrontend.java | 10 +- .../maps/PurificationUnitOzonationFrontend.java | 4 +- .../PurificationUnitParticleExtractorFrontend.java | 4 +- .../maps/PurificationUnitPhAdjustmentFrontend.java | 23 +- .../maps/PurificationUnitPlasmaHeaterFrontend.java | 14 +- .../gregtech/api/recipe/maps/RecyclerBackend.java | 22 +- .../api/recipe/maps/ReplicatorBackend.java | 36 +- .../api/recipe/maps/SpaceProjectFrontend.java | 18 +- .../maps/TranscendentPlasmaMixerFrontend.java | 8 +- .../api/recipe/maps/UnpackagerBackend.java | 12 +- .../api/recipe/metadata/CompressionTierKey.java | 2 +- .../api/recipe/metadata/PCBFactoryTierKey.java | 2 +- .../api/recipe/metadata/PCBFactoryUpgradeKey.java | 2 +- 43 files changed, 610 insertions(+), 614 deletions(-) (limited to 'src/main/java/gregtech/api/recipe') diff --git a/src/main/java/gregtech/api/recipe/BasicUIPropertiesBuilder.java b/src/main/java/gregtech/api/recipe/BasicUIPropertiesBuilder.java index 7be2c94b23..adb2ee40e8 100644 --- a/src/main/java/gregtech/api/recipe/BasicUIPropertiesBuilder.java +++ b/src/main/java/gregtech/api/recipe/BasicUIPropertiesBuilder.java @@ -20,7 +20,7 @@ import com.gtnewhorizons.modularui.api.math.Size; import com.gtnewhorizons.modularui.common.widget.ProgressBar; import gregtech.api.gui.modularui.FallbackableSteamTexture; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.gui.modularui.SteamTexture; import gregtech.api.util.MethodsReturnNonnullByDefault; import gregtech.common.gui.modularui.UIHelper; @@ -59,7 +59,7 @@ public final class BasicUIPropertiesBuilder { private final ImmutableList.Builder>> specialTexturesSteam = ImmutableList .builder(); - private IDrawable logo = GT_UITextures.PICTURE_GT_LOGO_17x17_TRANSPARENT; + private IDrawable logo = GTUITextures.PICTURE_GT_LOGO_17x17_TRANSPARENT; private Size logoSize = new Size(17, 17); private Pos2d logoPos = new Pos2d(152, 63); diff --git a/src/main/java/gregtech/api/recipe/FindRecipeQuery.java b/src/main/java/gregtech/api/recipe/FindRecipeQuery.java index 77c0648688..16702b6be6 100644 --- a/src/main/java/gregtech/api/recipe/FindRecipeQuery.java +++ b/src/main/java/gregtech/api/recipe/FindRecipeQuery.java @@ -9,7 +9,7 @@ import javax.annotation.ParametersAreNonnullByDefault; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; -import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GTRecipe; import gregtech.api.util.MethodsReturnNonnullByDefault; // spotless:off spotless likes formatting @code to @code @@ -20,7 +20,7 @@ import gregtech.api.util.MethodsReturnNonnullByDefault; * *
  * {@code
- *     GT_Recipe recipe = recipeMap.findRecipeQuery()
+ *     GTRecipe recipe = recipeMap.findRecipeQuery()
  *         .items(inputItems)
  *         .fluids(inputFluids)
  *         .find();
@@ -33,7 +33,7 @@ import gregtech.api.util.MethodsReturnNonnullByDefault;
 @MethodsReturnNonnullByDefault
 public final class FindRecipeQuery {
 
-    private static final Predicate ALWAYS = r -> true;
+    private static final Predicate ALWAYS = r -> true;
 
     private final RecipeMap recipeMap;
 
@@ -43,10 +43,10 @@ public final class FindRecipeQuery {
     private FluidStack[] fluids;
     @Nullable
     private ItemStack specialSlot;
-    private Predicate filter = ALWAYS;
+    private Predicate filter = ALWAYS;
     private long voltage = Integer.MAX_VALUE;
     @Nullable
-    private GT_Recipe cachedRecipe;
+    private GTRecipe cachedRecipe;
     private boolean notUnificated;
     private boolean dontCheckStackSizes;
     private boolean forCollisionCheck;
@@ -61,7 +61,7 @@ public final class FindRecipeQuery {
      * @return The first matched recipe, or null if not found.
      */
     @Nullable
-    public GT_Recipe find() {
+    public GTRecipe find() {
         return findAll().findFirst()
             .orElse(null);
     }
@@ -69,7 +69,7 @@ public final class FindRecipeQuery {
     /**
      * @return All the matched recipes in the form of Stream.
      */
-    public Stream findAll() {
+    public Stream findAll() {
         if (items == null) {
             items = new ItemStack[0];
         }
@@ -135,7 +135,7 @@ public final class FindRecipeQuery {
      * @param filter Matched recipe will be tested by this function. If it returns false, the query will attempt to
      *               find next recipe.
      */
-    public FindRecipeQuery filter(Predicate filter) {
+    public FindRecipeQuery filter(Predicate filter) {
         this.filter = filter;
         return this;
     }
@@ -152,7 +152,7 @@ public final class FindRecipeQuery {
     /**
      * @param cachedRecipe If this is not null, the query tests it before all other recipes.
      */
-    public FindRecipeQuery cachedRecipe(@Nullable GT_Recipe cachedRecipe) {
+    public FindRecipeQuery cachedRecipe(@Nullable GTRecipe cachedRecipe) {
         this.cachedRecipe = cachedRecipe;
         return this;
     }
diff --git a/src/main/java/gregtech/api/recipe/NEIRecipeProperties.java b/src/main/java/gregtech/api/recipe/NEIRecipeProperties.java
index 2ba49f5da1..1b62ca0390 100644
--- a/src/main/java/gregtech/api/recipe/NEIRecipeProperties.java
+++ b/src/main/java/gregtech/api/recipe/NEIRecipeProperties.java
@@ -12,7 +12,7 @@ import com.gtnewhorizons.modularui.api.math.Size;
 import codechicken.nei.recipe.HandlerInfo;
 import gregtech.api.objects.overclockdescriber.OverclockDescriber;
 import gregtech.api.util.FieldsAreNonnullByDefault;
-import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GTRecipe;
 import gregtech.api.util.MethodsReturnNonnullByDefault;
 import gregtech.nei.formatter.INEISpecialInfoFormatter;
 
@@ -49,7 +49,7 @@ public final class NEIRecipeProperties {
     public final Pos2d recipeBackgroundOffset;
 
     /**
-     * Formats special description for the recipe, mainly {@link gregtech.api.util.GT_Recipe#mSpecialValue}.
+     * Formats special description for the recipe, mainly {@link GTRecipe#mSpecialValue}.
      */
     public final INEISpecialInfoFormatter neiSpecialInfoFormatter;
 
@@ -68,14 +68,14 @@ public final class NEIRecipeProperties {
     public final boolean renderRealStackSizes;
 
     /**
-     * Comparator for NEI recipe sort. {@link GT_Recipe#compareTo(GT_Recipe)} by default.
+     * Comparator for NEI recipe sort. {@link GTRecipe#compareTo(GTRecipe)} by default.
      */
-    public final Comparator comparator;
+    public final Comparator comparator;
 
     NEIRecipeProperties(boolean registerNEI, @Nullable UnaryOperator handlerInfoCreator,
         Size recipeBackgroundSize, Pos2d recipeBackgroundOffset, INEISpecialInfoFormatter neiSpecialInfoFormatter,
         boolean unificateOutput, boolean useCustomFilter, boolean renderRealStackSizes,
-        Comparator comparator) {
+        Comparator comparator) {
         this.registerNEI = registerNEI;
         this.handlerInfoCreator = handlerInfoCreator;
         this.recipeBackgroundOffset = recipeBackgroundOffset;
diff --git a/src/main/java/gregtech/api/recipe/NEIRecipePropertiesBuilder.java b/src/main/java/gregtech/api/recipe/NEIRecipePropertiesBuilder.java
index 050a1c4920..3b47e9ce13 100644
--- a/src/main/java/gregtech/api/recipe/NEIRecipePropertiesBuilder.java
+++ b/src/main/java/gregtech/api/recipe/NEIRecipePropertiesBuilder.java
@@ -10,7 +10,7 @@ import com.gtnewhorizons.modularui.api.math.Pos2d;
 import com.gtnewhorizons.modularui.api.math.Size;
 
 import codechicken.nei.recipe.HandlerInfo;
-import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GTRecipe;
 import gregtech.api.util.MethodsReturnNonnullByDefault;
 import gregtech.nei.formatter.DefaultSpecialValueFormatter;
 import gregtech.nei.formatter.INEISpecialInfoFormatter;
@@ -36,7 +36,7 @@ public final class NEIRecipePropertiesBuilder {
     private boolean useCustomFilter;
     private boolean renderRealStackSizes = true;
 
-    private Comparator comparator = GT_Recipe::compareTo;
+    private Comparator comparator = GTRecipe::compareTo;
 
     NEIRecipePropertiesBuilder() {}
 
@@ -93,7 +93,7 @@ public final class NEIRecipePropertiesBuilder {
         return this;
     }
 
-    public NEIRecipePropertiesBuilder recipeComparator(Comparator comparator) {
+    public NEIRecipePropertiesBuilder recipeComparator(Comparator comparator) {
         this.comparator = comparator;
         return this;
     }
diff --git a/src/main/java/gregtech/api/recipe/RecipeMap.java b/src/main/java/gregtech/api/recipe/RecipeMap.java
index 46b32d18dd..669c7de2cf 100644
--- a/src/main/java/gregtech/api/recipe/RecipeMap.java
+++ b/src/main/java/gregtech/api/recipe/RecipeMap.java
@@ -1,6 +1,6 @@
 package gregtech.api.recipe;
 
-import static gregtech.api.util.GT_RecipeBuilder.ENABLE_COLLISION_CHECK;
+import static gregtech.api.util.GTRecipeBuilder.ENABLE_COLLISION_CHECK;
 
 import java.util.Collection;
 import java.util.HashMap;
@@ -23,8 +23,8 @@ import org.jetbrains.annotations.Unmodifiable;
 import gregtech.api.interfaces.IRecipeMap;
 import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords;
 import gregtech.api.util.FieldsAreNonnullByDefault;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_RecipeBuilder;
+import gregtech.api.util.GTRecipe;
+import gregtech.api.util.GTRecipeBuilder;
 import gregtech.api.util.MethodsReturnNonnullByDefault;
 
 /**
@@ -82,7 +82,7 @@ public final class RecipeMap implements IRecipeMap {
      * @return All the recipes belonging to this recipemap.
      */
     @Unmodifiable
-    public Collection getAllRecipes() {
+    public Collection getAllRecipes() {
         return backend.getAllRecipes();
     }
 
@@ -116,13 +116,13 @@ public final class RecipeMap implements IRecipeMap {
     // region add recipe
     @Deprecated
     @Nullable
-    public GT_Recipe addRecipe(GT_Recipe aRecipe) {
+    public GTRecipe addRecipe(GTRecipe aRecipe) {
         return addRecipe(aRecipe, true, false, false);
     }
 
     @Deprecated
     @Nullable
-    public GT_Recipe addRecipe(GT_Recipe aRecipe, boolean aCheckForCollisions, boolean aFakeRecipe, boolean aHidden) {
+    public GTRecipe addRecipe(GTRecipe aRecipe, boolean aCheckForCollisions, boolean aFakeRecipe, boolean aHidden) {
         aRecipe.mHidden = aHidden;
         aRecipe.mFakeRecipe = aFakeRecipe;
         if (aRecipe.mFluidInputs.length < backend.properties.minFluidInputs
@@ -137,13 +137,13 @@ public final class RecipeMap implements IRecipeMap {
      */
     @Deprecated
     @Nullable
-    public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, @Nullable ItemStack[] aInputs,
+    public GTRecipe addFakeRecipe(boolean aCheckForCollisions, @Nullable ItemStack[] aInputs,
         @Nullable ItemStack[] aOutputs, @Nullable Object aSpecial, @Nullable FluidStack[] aFluidInputs,
         @Nullable FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue, ItemStack[][] aAlt,
         boolean hidden) {
         return addFakeRecipe(
             aCheckForCollisions,
-            new GT_Recipe.GT_Recipe_WithAlt(
+            new GTRecipe.GTRecipe_WithAlt(
                 false,
                 aInputs,
                 aOutputs,
@@ -164,23 +164,23 @@ public final class RecipeMap implements IRecipeMap {
      */
     @Deprecated
     @Nullable
-    public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, GT_Recipe aRecipe) {
+    public GTRecipe addFakeRecipe(boolean aCheckForCollisions, GTRecipe aRecipe) {
         return addRecipe(aRecipe, aCheckForCollisions, true, false);
     }
 
     @Deprecated
     @Nullable
-    public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, GT_Recipe aRecipe, boolean hidden) {
+    public GTRecipe addFakeRecipe(boolean aCheckForCollisions, GTRecipe aRecipe, boolean hidden) {
         return addRecipe(aRecipe, aCheckForCollisions, true, hidden);
     }
 
     @Nonnull
     @Override
-    public Collection doAdd(GT_RecipeBuilder builder) {
+    public Collection doAdd(GTRecipeBuilder builder) {
         return backend.doAdd(builder);
     }
 
-    public GT_Recipe add(GT_Recipe aRecipe) {
+    public GTRecipe add(GTRecipe aRecipe) {
         return backend.compileRecipe(aRecipe);
     }
 
@@ -217,26 +217,26 @@ public final class RecipeMap implements IRecipeMap {
     }
 
     @Nullable
-    public GT_Recipe findRecipe(@Nullable IHasWorldObjectAndCoords aTileEntity, boolean aNotUnificated, long aVoltage,
+    public GTRecipe findRecipe(@Nullable IHasWorldObjectAndCoords aTileEntity, boolean aNotUnificated, long aVoltage,
         @Nullable FluidStack[] aFluids, @Nullable ItemStack... aInputs) {
         return findRecipe(aTileEntity, null, aNotUnificated, aVoltage, aFluids, null, aInputs);
     }
 
     @Nullable
-    public GT_Recipe findRecipe(@Nullable IHasWorldObjectAndCoords aTileEntity, boolean aNotUnificated,
+    public GTRecipe findRecipe(@Nullable IHasWorldObjectAndCoords aTileEntity, boolean aNotUnificated,
         boolean aDontCheckStackSizes, long aVoltage, @Nullable FluidStack[] aFluids, @Nullable ItemStack... aInputs) {
         return findRecipe(aTileEntity, null, aNotUnificated, aDontCheckStackSizes, aVoltage, aFluids, null, aInputs);
     }
 
     @Nullable
-    public GT_Recipe findRecipe(@Nullable IHasWorldObjectAndCoords aTileEntity, @Nullable GT_Recipe aRecipe,
+    public GTRecipe findRecipe(@Nullable IHasWorldObjectAndCoords aTileEntity, @Nullable GTRecipe aRecipe,
         boolean aNotUnificated, long aVoltage, @Nullable FluidStack[] aFluids, @Nullable ItemStack aSpecialSlot,
         @Nullable ItemStack... aInputs) {
         return findRecipe(aTileEntity, aRecipe, aNotUnificated, false, aVoltage, aFluids, aSpecialSlot, aInputs);
     }
 
     @Nullable
-    public GT_Recipe findRecipe(@Nullable IHasWorldObjectAndCoords aTileEntity, @Nullable GT_Recipe aRecipe,
+    public GTRecipe findRecipe(@Nullable IHasWorldObjectAndCoords aTileEntity, @Nullable GTRecipe aRecipe,
         boolean aNotUnificated, boolean aDontCheckStackSizes, long aVoltage, @Nullable FluidStack[] aFluids,
         @Nullable ItemStack aSpecialSlot, @Nullable ItemStack... aInputs) {
         return findRecipeQuery().items(aInputs != null ? aInputs : new ItemStack[0])
diff --git a/src/main/java/gregtech/api/recipe/RecipeMapBackend.java b/src/main/java/gregtech/api/recipe/RecipeMapBackend.java
index 8ba0895a7f..f78e367adf 100644
--- a/src/main/java/gregtech/api/recipe/RecipeMapBackend.java
+++ b/src/main/java/gregtech/api/recipe/RecipeMapBackend.java
@@ -1,9 +1,9 @@
 package gregtech.api.recipe;
 
-import static gregtech.api.util.GT_RecipeBuilder.ENABLE_COLLISION_CHECK;
-import static gregtech.api.util.GT_RecipeBuilder.handleInvalidRecipe;
-import static gregtech.api.util.GT_RecipeBuilder.handleRecipeCollision;
-import static gregtech.api.util.GT_Utility.areStacksEqualOrNull;
+import static gregtech.api.util.GTRecipeBuilder.ENABLE_COLLISION_CHECK;
+import static gregtech.api.util.GTRecipeBuilder.handleInvalidRecipe;
+import static gregtech.api.util.GTRecipeBuilder.handleRecipeCollision;
+import static gregtech.api.util.GTUtility.areStacksEqualOrNull;
 
 import java.util.ArrayList;
 import java.util.Collection;
@@ -28,13 +28,13 @@ import org.jetbrains.annotations.Unmodifiable;
 import com.google.common.collect.HashMultimap;
 import com.google.common.collect.SetMultimap;
 
-import gregtech.api.GregTech_API;
+import gregtech.api.GregTechAPI;
 import gregtech.api.interfaces.IRecipeMap;
-import gregtech.api.objects.GT_ItemStack;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_RecipeBuilder;
-import gregtech.api.util.GT_StreamUtil;
+import gregtech.api.objects.GTItemStack;
+import gregtech.api.util.GTOreDictUnificator;
+import gregtech.api.util.GTRecipe;
+import gregtech.api.util.GTRecipeBuilder;
+import gregtech.api.util.GTStreamUtil;
 import gregtech.api.util.MethodsReturnNonnullByDefault;
 
 /**
@@ -52,16 +52,16 @@ public class RecipeMapBackend {
     /**
      * Recipe index based on items.
      */
-    private final SetMultimap itemIndex = HashMultimap.create();
+    private final SetMultimap itemIndex = HashMultimap.create();
     /**
      * Recipe index based on fluids.
      */
-    private final SetMultimap fluidIndex = HashMultimap.create();
+    private final SetMultimap fluidIndex = HashMultimap.create();
 
     /**
      * All the recipes belonging to this backend, indexed by recipe category.
      */
-    private final Map> recipesByCategory = new HashMap<>();
+    private final Map> recipesByCategory = new HashMap<>();
 
     /**
      * List of recipemaps that also receive recipe addition from this backend.
@@ -75,7 +75,7 @@ public class RecipeMapBackend {
 
     public RecipeMapBackend(RecipeMapBackendPropertiesBuilder propertiesBuilder) {
         this.properties = propertiesBuilder.build();
-        GregTech_API.itemStackMultiMaps.add(itemIndex);
+        GregTechAPI.itemStackMultiMaps.add(itemIndex);
     }
 
     void setRecipeMap(RecipeMap recipeMap) {
@@ -94,14 +94,14 @@ public class RecipeMapBackend {
      *         use {@link #compileRecipe} to add / {@link #removeRecipes} to remove.
      */
     @Unmodifiable
-    public Collection getAllRecipes() {
+    public Collection getAllRecipes() {
         return Collections.unmodifiableCollection(allRecipes());
     }
 
     /**
      * @return Raw recipe list
      */
-    private Collection allRecipes() {
+    private Collection allRecipes() {
         return recipesByCategory.values()
             .stream()
             .flatMap(Collection::stream)
@@ -112,13 +112,13 @@ public class RecipeMapBackend {
      * @return All the recipes belonging to this backend, indexed by recipe category.
      */
     @Unmodifiable
-    public Collection getRecipesByCategory(RecipeCategory recipeCategory) {
+    public Collection getRecipesByCategory(RecipeCategory recipeCategory) {
         return Collections
             .unmodifiableCollection(recipesByCategory.getOrDefault(recipeCategory, Collections.emptyList()));
     }
 
     @Unmodifiable
-    public Map> getRecipeCategoryMap() {
+    public Map> getRecipeCategoryMap() {
         return Collections.unmodifiableMap(recipesByCategory);
     }
 
@@ -129,7 +129,7 @@ public class RecipeMapBackend {
      *
      * @return Supplied recipe.
      */
-    public GT_Recipe compileRecipe(GT_Recipe recipe) {
+    public GTRecipe compileRecipe(GTRecipe recipe) {
         if (recipe.getRecipeCategory() == null) {
             recipe.setRecipeCategory(recipeMap.getDefaultRecipeCategory());
         }
@@ -148,17 +148,17 @@ public class RecipeMapBackend {
     /**
      * Adds the supplied recipe to the item cache.
      */
-    protected GT_Recipe addToItemMap(GT_Recipe recipe) {
+    protected GTRecipe addToItemMap(GTRecipe recipe) {
         for (ItemStack item : recipe.mInputs) {
             if (item == null) continue;
-            itemIndex.put(new GT_ItemStack(item), recipe);
+            itemIndex.put(new GTItemStack(item), recipe);
         }
-        if (recipe instanceof GT_Recipe.GT_Recipe_WithAlt recipeWithAlt) {
+        if (recipe instanceof GTRecipe.GTRecipe_WithAlt recipeWithAlt) {
             for (ItemStack[] itemStacks : recipeWithAlt.mOreDictAlt) {
                 if (itemStacks == null) continue;
                 for (ItemStack item : itemStacks) {
                     if (item == null) continue;
-                    itemIndex.put(new GT_ItemStack(item), recipe);
+                    itemIndex.put(new GTItemStack(item), recipe);
                 }
             }
         }
@@ -168,10 +168,10 @@ public class RecipeMapBackend {
     /**
      * Builds recipe from supplied recipe builder and adds it.
      */
-    protected Collection doAdd(GT_RecipeBuilder builder) {
-        Iterable recipes = properties.recipeEmitter.apply(builder);
-        Collection ret = new ArrayList<>();
-        for (GT_Recipe recipe : recipes) {
+    protected Collection doAdd(GTRecipeBuilder builder) {
+        Iterable recipes = properties.recipeEmitter.apply(builder);
+        Collection ret = new ArrayList<>();
+        for (GTRecipe recipe : recipes) {
             if (recipe.mFluidInputs.length < properties.minFluidInputs
                 || recipe.mInputs.length < properties.minItemInputs) {
                 return Collections.emptyList();
@@ -199,7 +199,7 @@ public class RecipeMapBackend {
         return ret;
     }
 
-    private void handleCollision(GT_Recipe recipe) {
+    private void handleCollision(GTRecipe recipe) {
         StringBuilder errorInfo = new StringBuilder();
         boolean hasAnEntry = false;
         for (FluidStack fluid : recipe.mFluidInputs) {
@@ -241,11 +241,11 @@ public class RecipeMapBackend {
     /**
      * Removes supplied recipes from recipe list. Do not use unless absolute necessity!
      */
-    public void removeRecipes(Collection recipesToRemove) {
-        for (Collection recipes : recipesByCategory.values()) {
+    public void removeRecipes(Collection recipesToRemove) {
+        for (Collection recipes : recipesByCategory.values()) {
             recipes.removeAll(recipesToRemove);
         }
-        for (GT_ItemStack key : new HashMap<>(itemIndex.asMap()).keySet()) {
+        for (GTItemStack key : new HashMap<>(itemIndex.asMap()).keySet()) {
             itemIndex.get(key)
                 .removeAll(recipesToRemove);
         }
@@ -258,7 +258,7 @@ public class RecipeMapBackend {
     /**
      * Removes supplied recipe from recipe list. Do not use unless absolute necessity!
      */
-    public void removeRecipe(GT_Recipe recipe) {
+    public void removeRecipe(GTRecipe recipe) {
         removeRecipes(Collections.singleton(recipe));
     }
 
@@ -276,9 +276,9 @@ public class RecipeMapBackend {
      */
     public void reInit() {
         itemIndex.clear();
-        for (GT_Recipe recipe : allRecipes()) {
-            GT_OreDictUnificator.setStackArray(true, recipe.mInputs);
-            GT_OreDictUnificator.setStackArray(true, recipe.mOutputs);
+        for (GTRecipe recipe : allRecipes()) {
+            GTOreDictUnificator.setStackArray(true, recipe.mInputs);
+            GTOreDictUnificator.setStackArray(true, recipe.mOutputs);
             addToItemMap(recipe);
         }
     }
@@ -287,7 +287,7 @@ public class RecipeMapBackend {
      * @return If supplied item is a valid input for any of the recipes
      */
     public boolean containsInput(ItemStack item) {
-        return itemIndex.containsKey(new GT_ItemStack(item)) || itemIndex.containsKey(new GT_ItemStack(item, true));
+        return itemIndex.containsKey(new GTItemStack(item)) || itemIndex.containsKey(new GTItemStack(item, true));
     }
 
     /**
@@ -304,7 +304,7 @@ public class RecipeMapBackend {
      *
      * @return True if collision is found.
      */
-    boolean checkCollision(GT_Recipe recipe) {
+    boolean checkCollision(GTRecipe recipe) {
         return matchRecipeStream(recipe.mInputs, recipe.mFluidInputs, null, null, false, true, true).findAny()
             .isPresent();
     }
@@ -313,8 +313,8 @@ public class RecipeMapBackend {
      * Overwrites {@link #matchRecipeStream} method. Also override {@link #doesOverwriteFindRecipe} to make it work.
      */
     @Nullable
-    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) {
         return null;
     }
 
@@ -329,7 +329,7 @@ public class RecipeMapBackend {
      * Modifies successfully found recipe. Make sure not to mutate the found recipe but use copy!
      */
     @Nullable
-    protected GT_Recipe modifyFoundRecipe(GT_Recipe recipe, ItemStack[] items, FluidStack[] fluids,
+    protected GTRecipe modifyFoundRecipe(GTRecipe recipe, ItemStack[] items, FluidStack[] fluids,
         @Nullable ItemStack specialSlot) {
         return recipe;
     }
@@ -338,7 +338,7 @@ public class RecipeMapBackend {
      * Called when {@link #matchRecipeStream} cannot find recipe.
      */
     @Nullable
-    protected GT_Recipe findFallback(ItemStack[] items, FluidStack[] fluids, @Nullable ItemStack specialSlot) {
+    protected GTRecipe findFallback(ItemStack[] items, FluidStack[] fluids, @Nullable ItemStack specialSlot) {
         return null;
     }
 
@@ -357,11 +357,11 @@ public class RecipeMapBackend {
      * @param forCollisionCheck   If this method is called to check collision with already registered recipes.
      * @return Stream of matches recipes.
      */
-    Stream matchRecipeStream(ItemStack[] rawItems, FluidStack[] fluids, @Nullable ItemStack specialSlot,
-        @Nullable GT_Recipe cachedRecipe, boolean notUnificated, boolean dontCheckStackSizes,
+    Stream matchRecipeStream(ItemStack[] rawItems, FluidStack[] fluids, @Nullable ItemStack specialSlot,
+        @Nullable GTRecipe cachedRecipe, boolean notUnificated, boolean dontCheckStackSizes,
         boolean forCollisionCheck) {
         if (doesOverwriteFindRecipe()) {
-            return GT_StreamUtil.ofNullable(overwriteFindRecipe(rawItems, fluids, specialSlot, cachedRecipe));
+            return GTStreamUtil.ofNullable(overwriteFindRecipe(rawItems, fluids, specialSlot, cachedRecipe));
         }
 
         if (recipesByCategory.isEmpty()) {
@@ -393,22 +393,22 @@ public class RecipeMapBackend {
         ItemStack[] items;
         // Unification happens here in case the item input isn't already unificated.
         if (notUnificated) {
-            items = GT_OreDictUnificator.getStackArray(true, (Object[]) rawItems);
+            items = GTOreDictUnificator.getStackArray(true, (Object[]) rawItems);
         } else {
             items = rawItems;
         }
 
-        return Stream.>of(
+        return Stream.>of(
             // Check the recipe which has been used last time in order to not have to search for it again, if possible.
-            GT_StreamUtil.ofNullable(cachedRecipe)
+            GTStreamUtil.ofNullable(cachedRecipe)
                 .filter(recipe -> recipe.mCanBeBuffered)
                 .filter(recipe -> filterFindRecipe(recipe, items, fluids, specialSlot, dontCheckStackSizes))
                 .map(recipe -> modifyFoundRecipe(recipe, items, fluids, specialSlot))
                 .filter(Objects::nonNull),
             // Now look for the recipes inside the item index, but only when the recipes actually can have items inputs.
-            GT_StreamUtil.ofConditional(!itemIndex.isEmpty(), items)
+            GTStreamUtil.ofConditional(!itemIndex.isEmpty(), items)
                 .filter(Objects::nonNull)
-                .flatMap(item -> Stream.of(new GT_ItemStack(item), new GT_ItemStack(item, true)))
+                .flatMap(item -> Stream.of(new GTItemStack(item), new GTItemStack(item, true)))
                 .map(itemIndex::get)
                 .flatMap(Collection::stream)
                 .filter(recipe -> filterFindRecipe(recipe, items, fluids, specialSlot, dontCheckStackSizes))
@@ -416,7 +416,7 @@ public class RecipeMapBackend {
                 .filter(Objects::nonNull),
             // If the minimum amount of items required for the recipes is 0, then it could match to fluid-only recipes,
             // so check fluid index too.
-            GT_StreamUtil.ofConditional(properties.minItemInputs == 0, fluids)
+            GTStreamUtil.ofConditional(properties.minItemInputs == 0, fluids)
                 .filter(Objects::nonNull)
                 .map(
                     fluidStack -> fluidIndex.get(
@@ -428,7 +428,7 @@ public class RecipeMapBackend {
                 .filter(Objects::nonNull),
             // Lastly, find fallback.
             forCollisionCheck ? Stream.empty()
-                : GT_StreamUtil.ofSupplier(() -> findFallback(items, fluids, specialSlot))
+                : GTStreamUtil.ofSupplier(() -> findFallback(items, fluids, specialSlot))
                     .filter(Objects::nonNull))
             .flatMap(Function.identity());
     }
@@ -440,7 +440,7 @@ public class RecipeMapBackend {
      * 

* Note that this won't be called if {@link #doesOverwriteFindRecipe} is true. */ - protected boolean filterFindRecipe(GT_Recipe recipe, ItemStack[] items, FluidStack[] fluids, + protected boolean filterFindRecipe(GTRecipe recipe, ItemStack[] items, FluidStack[] fluids, @Nullable ItemStack specialSlot, boolean dontCheckStackSizes) { if (recipe.mEnabled && !recipe.mFakeRecipe && recipe.isRecipeInputEqual(false, dontCheckStackSizes, fluids, items)) { diff --git a/src/main/java/gregtech/api/recipe/RecipeMapBackendProperties.java b/src/main/java/gregtech/api/recipe/RecipeMapBackendProperties.java index 0cd08279a7..47c400a3dd 100644 --- a/src/main/java/gregtech/api/recipe/RecipeMapBackendProperties.java +++ b/src/main/java/gregtech/api/recipe/RecipeMapBackendProperties.java @@ -6,8 +6,8 @@ import javax.annotation.Nullable; import javax.annotation.ParametersAreNonnullByDefault; import gregtech.api.util.FieldsAreNonnullByDefault; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_RecipeBuilder; +import gregtech.api.util.GTRecipe; +import gregtech.api.util.GTRecipeBuilder; import gregtech.api.util.MethodsReturnNonnullByDefault; /** @@ -44,18 +44,18 @@ public final class RecipeMapBackendProperties { /** * Changes how recipes are emitted by a particular recipe builder. */ - public final Function> recipeEmitter; + public final Function> recipeEmitter; /** * Runs a custom hook on all recipes added via builder. */ @Nullable - public final Function recipeTransformer; + public final Function recipeTransformer; RecipeMapBackendProperties(int minItemInputs, int minFluidInputs, boolean specialSlotSensitive, boolean disableOptimize, - Function> recipeEmitter, - @Nullable Function recipeTransformer) { + Function> recipeEmitter, + @Nullable Function recipeTransformer) { if (minItemInputs < 0 || minFluidInputs < 0) { throw new IllegalArgumentException("minItemInputs and minFluidInputs cannot be negative"); } diff --git a/src/main/java/gregtech/api/recipe/RecipeMapBackendPropertiesBuilder.java b/src/main/java/gregtech/api/recipe/RecipeMapBackendPropertiesBuilder.java index 48a27fa42e..aad0748fa9 100644 --- a/src/main/java/gregtech/api/recipe/RecipeMapBackendPropertiesBuilder.java +++ b/src/main/java/gregtech/api/recipe/RecipeMapBackendPropertiesBuilder.java @@ -1,6 +1,6 @@ package gregtech.api.recipe; -import static gregtech.api.util.GT_RecipeMapUtil.buildOrEmpty; +import static gregtech.api.util.GTRecipeMapUtil.buildOrEmpty; import java.util.function.Function; @@ -9,8 +9,8 @@ import javax.annotation.ParametersAreNonnullByDefault; import com.google.common.collect.Iterables; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_RecipeBuilder; +import gregtech.api.util.GTRecipe; +import gregtech.api.util.GTRecipeBuilder; import gregtech.api.util.MethodsReturnNonnullByDefault; /** @@ -28,10 +28,10 @@ public final class RecipeMapBackendPropertiesBuilder { private boolean disableOptimize; - private Function> recipeEmitter = this::defaultBuildRecipe; + private Function> recipeEmitter = this::defaultBuildRecipe; @Nullable - private Function recipeTransformer; + private Function recipeTransformer; RecipeMapBackendPropertiesBuilder() {} @@ -66,40 +66,40 @@ public final class RecipeMapBackendPropertiesBuilder { } public RecipeMapBackendPropertiesBuilder recipeEmitter( - Function> recipeEmitter) { + Function> recipeEmitter) { this.recipeEmitter = recipeEmitter; return this; } public RecipeMapBackendPropertiesBuilder combineRecipeEmitter( - Function> func) { + Function> func) { // move recipeEmitter to local variable, so lambda capture the function itself instead of this - Function> cur = this.recipeEmitter; + Function> cur = this.recipeEmitter; return recipeEmitter(b -> Iterables.concat(cur.apply(b), func.apply(b))); } public RecipeMapBackendPropertiesBuilder recipeTransformer( - Function recipeTransformer) { + Function recipeTransformer) { this.recipeTransformer = recipeTransformer; return this; } public RecipeMapBackendPropertiesBuilder chainRecipeTransformer( - Function func) { + Function func) { this.recipeTransformer = this.recipeTransformer == null ? func : this.recipeTransformer.andThen(func); return this; } - private Iterable defaultBuildRecipe(GT_RecipeBuilder builder) { + private Iterable defaultBuildRecipe(GTRecipeBuilder builder) { // TODO sensible validation - GT_RecipeBuilder b = builder; + GTRecipeBuilder b = builder; if (disableOptimize && builder.isOptimize()) { b = copy(builder, b).noOptimize(); } return buildOrEmpty(b); } - private static GT_RecipeBuilder copy(GT_RecipeBuilder original, GT_RecipeBuilder b) { + private static GTRecipeBuilder copy(GTRecipeBuilder original, GTRecipeBuilder b) { return b == original ? b.copy() : b; } } diff --git a/src/main/java/gregtech/api/recipe/RecipeMapBuilder.java b/src/main/java/gregtech/api/recipe/RecipeMapBuilder.java index a1638a5a34..2b7bc39066 100644 --- a/src/main/java/gregtech/api/recipe/RecipeMapBuilder.java +++ b/src/main/java/gregtech/api/recipe/RecipeMapBuilder.java @@ -20,11 +20,11 @@ import com.gtnewhorizons.modularui.common.widget.ProgressBar; import codechicken.nei.recipe.HandlerInfo; import gregtech.api.gui.modularui.FallbackableSteamTexture; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.gui.modularui.SteamTexture; import gregtech.api.objects.overclockdescriber.OverclockDescriber; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_RecipeBuilder; +import gregtech.api.util.GTRecipe; +import gregtech.api.util.GTRecipeBuilder; import gregtech.api.util.MethodsReturnNonnullByDefault; import gregtech.nei.formatter.INEISpecialInfoFormatter; @@ -84,7 +84,7 @@ public final class RecipeMapBuilder { this.unlocalizedName = unlocalizedName; this.backendCreator = backendCreator; this.uiPropertiesBuilder = BasicUIProperties.builder() - .progressBarTexture(GT_UITextures.fallbackableProgressbar(unlocalizedName, GT_UITextures.PROGRESSBAR_ARROW)) + .progressBarTexture(GTUITextures.fallbackableProgressbar(unlocalizedName, GTUITextures.PROGRESSBAR_ARROW)) .neiTransferRectId(unlocalizedName); } @@ -119,7 +119,7 @@ public final class RecipeMapBuilder { * Changes how recipes are emitted by a particular recipe builder. Can emit multiple recipe per builder. */ public RecipeMapBuilder recipeEmitter( - Function> recipeEmitter) { + Function> recipeEmitter) { backendPropertiesBuilder.recipeEmitter(recipeEmitter); return this; } @@ -130,7 +130,7 @@ public final class RecipeMapBuilder { * Recipes added via one of the overloads of addRecipe will NOT be affected by this function. */ public RecipeMapBuilder recipeEmitterSingle( - Function recipeEmitter) { + Function recipeEmitter) { return recipeEmitter(recipeEmitter.andThen(Collections::singletonList)); } @@ -142,7 +142,7 @@ public final class RecipeMapBuilder { * Unlike {@link #recipeEmitter(Function)}, this one does not clear the existing recipe being emitted, if any */ public RecipeMapBuilder combineRecipeEmitter( - Function> recipeEmitter) { + Function> recipeEmitter) { backendPropertiesBuilder.combineRecipeEmitter(recipeEmitter); return this; } @@ -156,7 +156,7 @@ public final class RecipeMapBuilder { * Unlike {@link #recipeEmitter(Function)}, this one does not clear the existing recipe being emitted, if any */ public RecipeMapBuilder combineRecipeEmitterSingle( - Function recipeEmitter) { + Function recipeEmitter) { return combineRecipeEmitter(recipeEmitter.andThen(Collections::singletonList)); } @@ -166,7 +166,7 @@ public final class RecipeMapBuilder { *

* Recipes added via one of the overloads of addRecipe will NOT be affected by this function. */ - public RecipeMapBuilder recipeTransformer(Function recipeTransformer) { + public RecipeMapBuilder recipeTransformer(Function recipeTransformer) { backendPropertiesBuilder.recipeTransformer(recipeTransformer); return this; } @@ -177,7 +177,7 @@ public final class RecipeMapBuilder { *

* Recipes added via one of the overloads of addRecipe will NOT be affected by this function. */ - public RecipeMapBuilder recipeTransformer(Consumer recipeTransformer) { + public RecipeMapBuilder recipeTransformer(Consumer recipeTransformer) { return recipeTransformer(withIdentityReturn(recipeTransformer)); } @@ -191,7 +191,7 @@ public final class RecipeMapBuilder { * The supplied function will be given the output of existing handler when a recipe is added. */ public RecipeMapBuilder chainRecipeTransformer( - Function recipeTransformer) { + Function recipeTransformer) { backendPropertiesBuilder.chainRecipeTransformer(recipeTransformer); return this; } @@ -205,7 +205,7 @@ public final class RecipeMapBuilder { * Unlike {@link #recipeTransformer(Function)}, this one will not replace the existing special handler. * The supplied function will be given the output of existing handler when a recipe is added. */ - public RecipeMapBuilder chainRecipeTransformer(Consumer recipeTransformer) { + public RecipeMapBuilder chainRecipeTransformer(Consumer recipeTransformer) { return chainRecipeTransformer(withIdentityReturn(recipeTransformer)); } @@ -250,7 +250,7 @@ public final class RecipeMapBuilder { * By default, it's set to {@code GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT}. */ public RecipeMapBuilder progressBar(UITexture texture, ProgressBar.Direction direction) { - return progressBarWithFallback(GT_UITextures.fallbackableProgressbar(unlocalizedName, texture), direction); + return progressBarWithFallback(GTUITextures.fallbackableProgressbar(unlocalizedName, texture), direction); } /** @@ -438,7 +438,7 @@ public final class RecipeMapBuilder { } /** - * Sets formatter for special description for the recipe, mainly {@link gregtech.api.util.GT_Recipe#mSpecialValue}. + * Sets formatter for special description for the recipe, mainly {@link GTRecipe#mSpecialValue}. */ public RecipeMapBuilder neiSpecialInfoFormatter(INEISpecialInfoFormatter neiSpecialInfoFormatter) { neiPropertiesBuilder.neiSpecialInfoFormatter(neiSpecialInfoFormatter); @@ -478,7 +478,7 @@ public final class RecipeMapBuilder { /** * Sets custom comparator for NEI recipe sort. */ - public RecipeMapBuilder neiRecipeComparator(Comparator comparator) { + public RecipeMapBuilder neiRecipeComparator(Comparator comparator) { neiPropertiesBuilder.recipeComparator(comparator); return this; } diff --git a/src/main/java/gregtech/api/recipe/RecipeMapFrontend.java b/src/main/java/gregtech/api/recipe/RecipeMapFrontend.java index 63daa00dc7..36aee2872f 100644 --- a/src/main/java/gregtech/api/recipe/RecipeMapFrontend.java +++ b/src/main/java/gregtech/api/recipe/RecipeMapFrontend.java @@ -1,6 +1,6 @@ package gregtech.api.recipe; -import static gregtech.api.util.GT_Utility.trans; +import static gregtech.api.util.GTUtility.trans; import static net.minecraft.util.EnumChatFormatting.GRAY; import java.util.ArrayList; @@ -30,15 +30,15 @@ import com.gtnewhorizons.modularui.common.widget.ProgressBar; import com.gtnewhorizons.modularui.common.widget.SlotWidget; import codechicken.nei.PositionedStack; -import gregtech.GT_Mod; +import gregtech.GTMod; import gregtech.api.enums.SteamVariant; -import gregtech.api.gui.GT_GUIColorOverride; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.GUIColorOverride; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.recipe.metadata.IRecipeMetadataStorage; -import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GTRecipe; import gregtech.api.util.MethodsReturnNonnullByDefault; import gregtech.common.gui.modularui.UIHelper; -import gregtech.nei.GT_NEI_DefaultHandler; +import gregtech.nei.GTNEIDefaultHandler; import gregtech.nei.RecipeDisplayInfo; /** @@ -60,8 +60,8 @@ public class RecipeMapFrontend { */ protected final NEIRecipeProperties neiProperties; - protected final GT_GUIColorOverride colorOverride = GT_GUIColorOverride - .get(GT_UITextures.BACKGROUND_NEI_SINGLE_RECIPE.location); + protected final GUIColorOverride colorOverride = GUIColorOverride + .get(GTUITextures.BACKGROUND_NEI_SINGLE_RECIPE.location); public RecipeMapFrontend(BasicUIPropertiesBuilder uiPropertiesBuilder, NEIRecipePropertiesBuilder neiPropertiesBuilder) { @@ -96,7 +96,7 @@ public class RecipeMapFrontend { IItemHandlerModifiable fluidInputsInventory, IItemHandlerModifiable fluidOutputsInventory, Supplier progressSupplier, Pos2d windowOffset) { ModularWindow.Builder builder = ModularWindow.builder(neiProperties.recipeBackgroundSize) - .setBackground(GT_UITextures.BACKGROUND_NEI_SINGLE_RECIPE); + .setBackground(GTUITextures.BACKGROUND_NEI_SINGLE_RECIPE); UIHelper.forEachSlots( (i, backgrounds, pos) -> builder.widget( @@ -245,8 +245,8 @@ public class RecipeMapFrontend { } protected void drawRecipeOwnerInfo(RecipeDisplayInfo recipeInfo) { - GT_Recipe recipe = recipeInfo.recipe; - if (GT_Mod.gregtechproxy.mNEIRecipeOwner) { + GTRecipe recipe = recipeInfo.recipe; + if (GTMod.gregtechproxy.mNEIRecipeOwner) { if (recipe.owners.size() > 1) { recipeInfo.drawText( EnumChatFormatting.ITALIC + trans("273", "Original Recipe by: ") @@ -265,7 +265,7 @@ public class RecipeMapFrontend { .getName()); } } - if (GT_Mod.gregtechproxy.mNEIRecipeOwnerStackTrace && recipe.stackTraces != null + if (GTMod.gregtechproxy.mNEIRecipeOwnerStackTrace && recipe.stackTraces != null && !recipe.stackTraces.isEmpty()) { recipeInfo.drawText("stackTrace:"); // todo: good way to show all stacktraces @@ -276,23 +276,23 @@ public class RecipeMapFrontend { } public List handleNEIItemTooltip(ItemStack stack, List currentTip, - GT_NEI_DefaultHandler.CachedDefaultRecipe neiCachedRecipe) { + GTNEIDefaultHandler.CachedDefaultRecipe neiCachedRecipe) { for (PositionedStack pStack : neiCachedRecipe.mInputs) { if (stack == pStack.item) { - if (pStack instanceof GT_NEI_DefaultHandler.FixedPositionedStack) { + if (pStack instanceof GTNEIDefaultHandler.FixedPositionedStack) { currentTip = handleNEIItemInputTooltip( currentTip, - (GT_NEI_DefaultHandler.FixedPositionedStack) pStack); + (GTNEIDefaultHandler.FixedPositionedStack) pStack); } break; } } for (PositionedStack pStack : neiCachedRecipe.mOutputs) { if (stack == pStack.item) { - if (pStack instanceof GT_NEI_DefaultHandler.FixedPositionedStack) { + if (pStack instanceof GTNEIDefaultHandler.FixedPositionedStack) { currentTip = handleNEIItemOutputTooltip( currentTip, - (GT_NEI_DefaultHandler.FixedPositionedStack) pStack); + (GTNEIDefaultHandler.FixedPositionedStack) pStack); } break; } @@ -301,7 +301,7 @@ public class RecipeMapFrontend { } protected List handleNEIItemInputTooltip(List currentTip, - GT_NEI_DefaultHandler.FixedPositionedStack pStack) { + GTNEIDefaultHandler.FixedPositionedStack pStack) { if (pStack.isNotConsumed()) { currentTip.add(GRAY + trans("151", "Does not get consumed in the process")); } @@ -309,33 +309,33 @@ public class RecipeMapFrontend { } protected List handleNEIItemOutputTooltip(List currentTip, - GT_NEI_DefaultHandler.FixedPositionedStack pStack) { + GTNEIDefaultHandler.FixedPositionedStack pStack) { if (pStack.isChanceBased()) { currentTip.add(GRAY + trans("150", "Chance: ") + pStack.getChanceText()); } return currentTip; } - 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) { - drawNEIOverlayForInput((GT_NEI_DefaultHandler.FixedPositionedStack) stack); + if (stack instanceof GTNEIDefaultHandler.FixedPositionedStack) { + drawNEIOverlayForInput((GTNEIDefaultHandler.FixedPositionedStack) stack); } } for (PositionedStack stack : neiCachedRecipe.mOutputs) { - if (stack instanceof GT_NEI_DefaultHandler.FixedPositionedStack) { - drawNEIOverlayForOutput((GT_NEI_DefaultHandler.FixedPositionedStack) stack); + if (stack instanceof GTNEIDefaultHandler.FixedPositionedStack) { + drawNEIOverlayForOutput((GTNEIDefaultHandler.FixedPositionedStack) stack); } } } - protected void drawNEIOverlayForInput(GT_NEI_DefaultHandler.FixedPositionedStack stack) { + protected void drawNEIOverlayForInput(GTNEIDefaultHandler.FixedPositionedStack stack) { if (stack.isNotConsumed()) { drawNEIOverlayText("NC", stack); } } - protected void drawNEIOverlayForOutput(GT_NEI_DefaultHandler.FixedPositionedStack stack) { + protected void drawNEIOverlayForOutput(GTNEIDefaultHandler.FixedPositionedStack stack) { if (stack.isChanceBased()) { drawNEIOverlayText(stack.getChanceText(), stack); } diff --git a/src/main/java/gregtech/api/recipe/RecipeMaps.java b/src/main/java/gregtech/api/recipe/RecipeMaps.java index 293b4f36b5..b43b1144ee 100644 --- a/src/main/java/gregtech/api/recipe/RecipeMaps.java +++ b/src/main/java/gregtech/api/recipe/RecipeMaps.java @@ -4,18 +4,18 @@ import static gregtech.api.enums.Mods.Avaritia; import static gregtech.api.enums.Mods.GTNHIntergalactic; import static gregtech.api.enums.Mods.NEICustomDiagrams; import static gregtech.api.enums.Mods.Railcraft; -import static gregtech.api.util.GT_ModHandler.getModItem; -import static gregtech.api.util.GT_RecipeConstants.ADDITIVE_AMOUNT; -import static gregtech.api.util.GT_RecipeConstants.FUEL_VALUE; -import static gregtech.api.util.GT_RecipeMapUtil.GT_RecipeTemplate; -import static gregtech.api.util.GT_RecipeMapUtil.asTemplate; -import static gregtech.api.util.GT_RecipeMapUtil.buildOrEmpty; -import static gregtech.api.util.GT_Utility.clamp; -import static gregtech.api.util.GT_Utility.copyAmount; -import static gregtech.api.util.GT_Utility.getFluidForFilledItem; -import static gregtech.api.util.GT_Utility.isArrayEmptyOrNull; -import static gregtech.api.util.GT_Utility.isArrayOfLength; -import static gregtech.api.util.GT_Utility.multiplyStack; +import static gregtech.api.util.GTModHandler.getModItem; +import static gregtech.api.util.GTRecipeConstants.ADDITIVE_AMOUNT; +import static gregtech.api.util.GTRecipeConstants.FUEL_VALUE; +import static gregtech.api.util.GTRecipeMapUtil.GTRecipeTemplate; +import static gregtech.api.util.GTRecipeMapUtil.asTemplate; +import static gregtech.api.util.GTRecipeMapUtil.buildOrEmpty; +import static gregtech.api.util.GTUtility.clamp; +import static gregtech.api.util.GTUtility.copyAmount; +import static gregtech.api.util.GTUtility.getFluidForFilledItem; +import static gregtech.api.util.GTUtility.isArrayEmptyOrNull; +import static gregtech.api.util.GTUtility.isArrayOfLength; +import static gregtech.api.util.GTUtility.multiplyStack; import java.util.ArrayList; import java.util.Collection; @@ -32,11 +32,11 @@ import org.apache.commons.lang3.ArrayUtils; import com.gtnewhorizons.modularui.api.drawable.UITexture; import com.gtnewhorizons.modularui.common.widget.ProgressBar; -import gregtech.api.enums.GT_Values; +import gregtech.api.enums.GTValues; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.interfaces.IRecipeMap; import gregtech.api.objects.ItemData; import gregtech.api.recipe.maps.AssemblerBackend; @@ -68,12 +68,12 @@ import gregtech.api.recipe.maps.UnpackagerBackend; import gregtech.api.recipe.metadata.CompressionTierKey; import gregtech.api.recipe.metadata.PCBFactoryTierKey; import gregtech.api.recipe.metadata.PurificationPlantBaseChanceKey; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_RecipeConstants; -import gregtech.api.util.GT_RecipeMapUtil; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTModHandler; +import gregtech.api.util.GTOreDictUnificator; +import gregtech.api.util.GTRecipe; +import gregtech.api.util.GTRecipeConstants; +import gregtech.api.util.GTRecipeMapUtil; +import gregtech.api.util.GTUtility; import gregtech.common.tileentities.machines.multi.purification.PurifiedWaterHelpers; import gregtech.nei.formatter.FuelSpecialValueFormatter; import gregtech.nei.formatter.FusionSpecialValueFormatter; @@ -94,12 +94,12 @@ public final class RecipeMaps { return null; } if (isOutput) { - return GT_UITextures.OVERLAY_SLOT_DUST; + return GTUITextures.OVERLAY_SLOT_DUST; } else { - return GT_UITextures.OVERLAY_SLOT_CRUSHED_ORE; + return GTUITextures.OVERLAY_SLOT_CRUSHED_ORE; } }) - .progressBar(GT_UITextures.PROGRESSBAR_BATH, ProgressBar.Direction.CIRCULAR_CW) + .progressBar(GTUITextures.PROGRESSBAR_BATH, ProgressBar.Direction.CIRCULAR_CW) .build(); public static final RecipeMap thermalCentrifugeRecipes = RecipeMapBuilder .of("gt.recipe.thermalcentrifuge") @@ -111,9 +111,9 @@ public final class RecipeMaps { return null; } if (isOutput) { - return GT_UITextures.OVERLAY_SLOT_DUST; + return GTUITextures.OVERLAY_SLOT_DUST; } else { - return GT_UITextures.OVERLAY_SLOT_CRUSHED_ORE; + return GTUITextures.OVERLAY_SLOT_CRUSHED_ORE; } }) .build(); @@ -121,17 +121,17 @@ public final class RecipeMaps { .maxIO(1, 1, 0, 0) .minInputs(1, 0) .slotOverlays( - (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GT_UITextures.OVERLAY_SLOT_COMPRESSOR + (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GTUITextures.OVERLAY_SLOT_COMPRESSOR : null) - .progressBar(GT_UITextures.PROGRESSBAR_COMPRESS) + .progressBar(GTUITextures.PROGRESSBAR_COMPRESS) .slotOverlaysSteam( - (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GT_UITextures.OVERLAY_SLOT_COMPRESSOR_STEAM + (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GTUITextures.OVERLAY_SLOT_COMPRESSOR_STEAM : null) - .progressBarSteam(GT_UITextures.PROGRESSBAR_COMPRESS_STEAM) + .progressBarSteam(GTUITextures.PROGRESSBAR_COMPRESS_STEAM) .neiRecipeComparator( Comparator - .comparing(recipe -> recipe.getMetadataOrDefault(CompressionTierKey.INSTANCE, 0)) - .thenComparing(GT_Recipe::compareTo)) + .comparing(recipe -> recipe.getMetadataOrDefault(CompressionTierKey.INSTANCE, 0)) + .thenComparing(GTRecipe::compareTo)) // Avoid steam machine being used as handler icon .neiHandlerInfo(builder -> builder.setDisplayStack(ItemList.Machine_LV_Compressor.get(1))) .build(); @@ -139,27 +139,27 @@ public final class RecipeMaps { .of("gt.recipe.neutroniumcompressor") .maxIO(1, 1, 1, 0) .slotOverlays( - (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GT_UITextures.OVERLAY_SLOT_COMPRESSOR + (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GTUITextures.OVERLAY_SLOT_COMPRESSOR : null) - .progressBar(GT_UITextures.PROGRESSBAR_COMPRESS) + .progressBar(GTUITextures.PROGRESSBAR_COMPRESS) .neiHandlerInfo(builder -> builder.setDisplayStack(getModItem(Avaritia.ID, "Singularity", 1L, 0))) .disableOptimize() .neiRecipeComparator( Comparator - .comparing(recipe -> recipe.getMetadataOrDefault(CompressionTierKey.INSTANCE, 0)) - .thenComparing(GT_Recipe::compareTo)) + .comparing(recipe -> recipe.getMetadataOrDefault(CompressionTierKey.INSTANCE, 0)) + .thenComparing(GTRecipe::compareTo)) .build(); public static final RecipeMap extractorRecipes = RecipeMapBuilder.of("gt.recipe.extractor") .maxIO(1, 1, 0, 0) .minInputs(1, 0) .slotOverlays( - (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GT_UITextures.OVERLAY_SLOT_CENTRIFUGE + (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GTUITextures.OVERLAY_SLOT_CENTRIFUGE : null) - .progressBar(GT_UITextures.PROGRESSBAR_EXTRACT) + .progressBar(GTUITextures.PROGRESSBAR_EXTRACT) .slotOverlaysSteam( - (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GT_UITextures.OVERLAY_SLOT_CENTRIFUGE_STEAM + (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GTUITextures.OVERLAY_SLOT_CENTRIFUGE_STEAM : null) - .progressBarSteam(GT_UITextures.PROGRESSBAR_EXTRACT_STEAM) + .progressBarSteam(GTUITextures.PROGRESSBAR_EXTRACT_STEAM) // Avoid steam machine being used as handler icon .neiHandlerInfo(builder -> builder.setDisplayStack(ItemList.Machine_LV_Extractor.get(1))) .build(); @@ -168,8 +168,8 @@ public final class RecipeMaps { .maxIO(1, 1, 0, 0) .minInputs(1, 0) .slotOverlays( - (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GT_UITextures.OVERLAY_SLOT_RECYCLE : null) - .progressBar(GT_UITextures.PROGRESSBAR_RECYCLE, ProgressBar.Direction.CIRCULAR_CW) + (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GTUITextures.OVERLAY_SLOT_RECYCLE : null) + .progressBar(GTUITextures.PROGRESSBAR_RECYCLE, ProgressBar.Direction.CIRCULAR_CW) .neiTransferRectId("ic2.recycler") .disableRegisterNEI() .build(); @@ -178,11 +178,11 @@ public final class RecipeMaps { .maxIO(1, 1, 0, 0) .minInputs(1, 9) .slotOverlays( - (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GT_UITextures.OVERLAY_SLOT_FURNACE : null) + (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GTUITextures.OVERLAY_SLOT_FURNACE : null) .slotOverlaysSteam( - (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GT_UITextures.OVERLAY_SLOT_FURNACE_STEAM + (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GTUITextures.OVERLAY_SLOT_FURNACE_STEAM : null) - .progressBarSteam(GT_UITextures.PROGRESSBAR_ARROW_STEAM) + .progressBarSteam(GTUITextures.PROGRESSBAR_ARROW_STEAM) .neiTransferRectId("smelting") .disableRegisterNEI() .build(); @@ -191,7 +191,7 @@ public final class RecipeMaps { .maxIO(1, 1, 0, 0) .minInputs(1, 0) .slotOverlays( - (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GT_UITextures.OVERLAY_SLOT_FURNACE : null) + (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GTUITextures.OVERLAY_SLOT_FURNACE : null) .neiTransferRectId("smelting") .disableRegisterNEI() .build(); @@ -201,10 +201,10 @@ public final class RecipeMaps { .useSpecialSlot() .slotOverlays((index, isFluid, isOutput, isSpecial) -> { if (isSpecial) { - return GT_UITextures.OVERLAY_SLOT_DATA_ORB; + return GTUITextures.OVERLAY_SLOT_DATA_ORB; } if (!isFluid && !isOutput) { - return GT_UITextures.OVERLAY_SLOT_MICROSCOPE; + return GTUITextures.OVERLAY_SLOT_MICROSCOPE; } return null; }) @@ -214,12 +214,12 @@ public final class RecipeMaps { .maxIO(2, 1, 0, 0) .slotOverlays((index, isFluid, isOutput, isSpecial) -> { if (isOutput) { - return GT_UITextures.OVERLAY_SLOT_CRUSHED_ORE; + return GTUITextures.OVERLAY_SLOT_CRUSHED_ORE; } else { - return GT_UITextures.OVERLAY_SLOT_DUST; + return GTUITextures.OVERLAY_SLOT_DUST; } }) -