diff options
Diffstat (limited to 'src/main/java/gregtech/api/recipe')
43 files changed, 610 insertions, 614 deletions
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<Pair<SteamTexture, Pair<Size, Pos2d>>> 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; * * <pre> * {@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<GT_Recipe> ALWAYS = r -> true; + private static final Predicate<GTRecipe> ALWAYS = r -> true; private final RecipeMap<?> recipeMap; @@ -43,10 +43,10 @@ public final class FindRecipeQuery { private FluidStack[] fluids; @Nullable private ItemStack specialSlot; - private Predicate<GT_Recipe> filter = ALWAYS; + private Predicate<GTRecipe> 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<GT_Recipe> findAll() { + public Stream<GTRecipe> 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<GT_Recipe> filter) { + public FindRecipeQuery filter(Predicate<GTRecipe> 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<GT_Recipe> comparator; + public final Comparator<GTRecipe> comparator; NEIRecipeProperties(boolean registerNEI, @Nullable UnaryOperator<HandlerInfo.Builder> handlerInfoCreator, Size recipeBackgroundSize, Pos2d recipeBackgroundOffset, INEISpecialInfoFormatter neiSpecialInfoFormatter, boolean unificateOutput, boolean useCustomFilter, boolean renderRealStackSizes, - Comparator<GT_Recipe> comparator) { + Comparator<GTRecipe> 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<GT_Recipe> comparator = GT_Recipe::compareTo; + private Comparator<GTRecipe> comparator = GTRecipe::compareTo; NEIRecipePropertiesBuilder() {} @@ -93,7 +93,7 @@ public final class NEIRecipePropertiesBuilder { return this; } - public NEIRecipePropertiesBuilder recipeComparator(Comparator<GT_Recipe> comparator) { + public NEIRecipePropertiesBuilder recipeComparator(Comparator<GTRecipe> 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<B extends RecipeMapBackend> implements IRecipeMap { * @return All the recipes belonging to this recipemap. */ @Unmodifiable - public Collection<GT_Recipe> getAllRecipes() { + public Collection<GTRecipe> getAllRecipes() { return backend.getAllRecipes(); } @@ -116,13 +116,13 @@ public final class RecipeMap<B extends RecipeMapBackend> 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<B extends RecipeMapBackend> 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<B extends RecipeMapBackend> 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<GT_Recipe> doAdd(GT_RecipeBuilder builder) { + public Collection<GTRecipe> 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<B extends RecipeMapBackend> 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<GT_ItemStack, GT_Recipe> itemIndex = HashMultimap.create(); + private final SetMultimap<GTItemStack, GTRecipe> itemIndex = HashMultimap.create(); /** * Recipe index based on fluids. */ - private final SetMultimap<String, GT_Recipe> fluidIndex = HashMultimap.create(); + private final SetMultimap<String, GTRecipe> fluidIndex = HashMultimap.create(); /** * All the recipes belonging to this backend, indexed by recipe category. */ - private final Map<RecipeCategory, Collection<GT_Recipe>> recipesByCategory = new HashMap<>(); + private final Map<RecipeCategory, Collection<GTRecipe>> 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<GT_Recipe> getAllRecipes() { + public Collection<GTRecipe> getAllRecipes() { return Collections.unmodifiableCollection(allRecipes()); } /** * @return Raw recipe list */ - private Collection<GT_Recipe> allRecipes() { + private Collection<GTRecipe> 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<GT_Recipe> getRecipesByCategory(RecipeCategory recipeCategory) { + public Collection<GTRecipe> getRecipesByCategory(RecipeCategory recipeCategory) { return Collections .unmodifiableCollection(recipesByCategory.getOrDefault(recipeCategory, Collections.emptyList())); } @Unmodifiable - public Map<RecipeCategory, Collection<GT_Recipe>> getRecipeCategoryMap() { + public Map<RecipeCategory, Collection<GTRecipe>> 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<GT_Recipe> doAdd(GT_RecipeBuilder builder) { - Iterable<? extends GT_Recipe> recipes = properties.recipeEmitter.apply(builder); - Collection<GT_Recipe> ret = new ArrayList<>(); - for (GT_Recipe recipe : recipes) { + protected Collection<GTRecipe> doAdd(GTRecipeBuilder builder) { + Iterable<? extends GTRecipe> recipes = properties.recipeEmitter.apply(builder); + Collection<GTRecipe> 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<? extends GT_Recipe> recipesToRemove) { - for (Collection<GT_Recipe> recipes : recipesByCategory.values()) { + public void removeRecipes(Collection<? extends GTRecipe> recipesToRemove) { + for (Collection<GTRecipe> 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<GT_Recipe> matchRecipeStream(ItemStack[] rawItems, FluidStack[] fluids, @Nullable ItemStack specialSlot, - @Nullable GT_Recipe cachedRecipe, boolean notUnificated, boolean dontCheckStackSizes, + Stream<GTRecipe> 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.<Stream<GT_Recipe>>of( + return Stream.<Stream<GTRecipe>>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 { * <p> * 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<? super GT_RecipeBuilder, ? extends Iterable<? extends GT_Recipe>> recipeEmitter; + public final Function<? super GTRecipeBuilder, ? extends Iterable<? extends GTRecipe>> recipeEmitter; /** * Runs a custom hook on all recipes added <b>via builder</b>. */ @Nullable - public final Function<? super GT_Recipe, ? extends GT_Recipe> recipeTransformer; + public final Function<? super GTRecipe, ? extends GTRecipe> recipeTransformer; RecipeMapBackendProperties(int minItemInputs, int minFluidInputs, boolean specialSlotSensitive, boolean disableOptimize, - Function<? super GT_RecipeBuilder, ? extends Iterable<? extends GT_Recipe>> recipeEmitter, - @Nullable Function<? super GT_Recipe, ? extends GT_Recipe> recipeTransformer) { + Function<? super GTRecipeBuilder, ? extends Iterable<? extends GTRecipe>> recipeEmitter, + @Nullable Function<? super GTRecipe, ? extends GTRecipe> 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<? super GT_RecipeBuilder, ? extends Iterable<? extends GT_Recipe>> recipeEmitter = this::defaultBuildRecipe; + private Function<? super GTRecipeBuilder, ? extends Iterable<? extends GTRecipe>> recipeEmitter = this::defaultBuildRecipe; @Nullable - private Function<? super GT_Recipe, ? extends GT_Recipe> recipeTransformer; + private Function<? super GTRecipe, ? extends GTRecipe> recipeTransformer; RecipeMapBackendPropertiesBuilder() {} @@ -66,40 +66,40 @@ public final class RecipeMapBackendPropertiesBuilder { } public RecipeMapBackendPropertiesBuilder recipeEmitter( - Function<? super GT_RecipeBuilder, ? extends Iterable<? extends GT_Recipe>> recipeEmitter) { + Function<? super GTRecipeBuilder, ? extends Iterable<? extends GTRecipe>> recipeEmitter) { this.recipeEmitter = recipeEmitter; return this; } public RecipeMapBackendPropertiesBuilder combineRecipeEmitter( - Function<? super GT_RecipeBuilder, ? extends Iterable<? extends GT_Recipe>> func) { + Function<? super GTRecipeBuilder, ? extends Iterable<? extends GTRecipe>> func) { // move recipeEmitter to local variable, so lambda capture the function itself instead of this - Function<? super GT_RecipeBuilder, ? extends Iterable<? extends GT_Recipe>> cur = this.recipeEmitter; + Function<? super GTRecipeBuilder, ? extends Iterable<? extends GTRecipe>> cur = this.recipeEmitter; return recipeEmitter(b -> Iterables.concat(cur.apply(b), func.apply(b))); } public RecipeMapBackendPropertiesBuilder recipeTransformer( - Function<? super GT_Recipe, ? extends GT_Recipe> recipeTransformer) { + Function<? super GTRecipe, ? extends GTRecipe> recipeTransformer) { this.recipeTransformer = recipeTransformer; return this; } public RecipeMapBackendPropertiesBuilder chainRecipeTransformer( - Function<? super GT_Recipe, ? extends GT_Recipe> func) { + Function<? super GTRecipe, ? extends GTRecipe> func) { this.recipeTransformer = this.recipeTransformer == null ? func : this.recipeTransformer.andThen(func); return this; } - private Iterable<? extends GT_Recipe> defaultBuildRecipe(GT_RecipeBuilder builder) { + private Iterable<? extends GTRecipe> 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<B extends RecipeMapBackend> { 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<B extends RecipeMapBackend> { * Changes how recipes are emitted by a particular recipe builder. Can emit multiple recipe per builder. */ public RecipeMapBuilder<B> recipeEmitter( - Function<? super GT_RecipeBuilder, ? extends Iterable<? extends GT_Recipe>> recipeEmitter) { + Function<? super GTRecipeBuilder, ? extends Iterable<? extends GTRecipe>> recipeEmitter) { backendPropertiesBuilder.recipeEmitter(recipeEmitter); return this; } @@ -130,7 +130,7 @@ public final class RecipeMapBuilder<B extends RecipeMapBackend> { * Recipes added via one of the overloads of addRecipe will NOT be affected by this function. */ public RecipeMapBuilder<B> recipeEmitterSingle( - Function<? super GT_RecipeBuilder, ? extends GT_Recipe> recipeEmitter) { + Function<? super GTRecipeBuilder, ? extends GTRecipe> recipeEmitter) { return recipeEmitter(recipeEmitter.andThen(Collections::singletonList)); } @@ -142,7 +142,7 @@ public final class RecipeMapBuilder<B extends RecipeMapBackend> { * Unlike {@link #recipeEmitter(Function)}, this one does not clear the existing recipe being emitted, if any */ public RecipeMapBuilder<B> combineRecipeEmitter( - Function<? super GT_RecipeBuilder, ? extends Iterable<? extends GT_Recipe>> recipeEmitter) { + Function<? super GTRecipeBuilder, ? extends Iterable<? extends GTRecipe>> recipeEmitter) { backendPropertiesBuilder.combineRecipeEmitter(recipeEmitter); return this; } @@ -156,7 +156,7 @@ public final class RecipeMapBuilder<B extends RecipeMapBackend> { * Unlike {@link #recipeEmitter(Function)}, this one does not clear the existing recipe being emitted, if any */ public RecipeMapBuilder<B> combineRecipeEmitterSingle( - Function<? super GT_RecipeBuilder, ? extends GT_Recipe> recipeEmitter) { + Function<? super GTRecipeBuilder, ? extends GTRecipe> recipeEmitter) { return combineRecipeEmitter(recipeEmitter.andThen(Collections::singletonList)); } @@ -166,7 +166,7 @@ public final class RecipeMapBuilder<B extends RecipeMapBackend> { * <p> * Recipes added via one of the overloads of addRecipe will NOT be affected by this function. */ - public RecipeMapBuilder<B> recipeTransformer(Function<? super GT_Recipe, ? extends GT_Recipe> recipeTransformer) { + public RecipeMapBuilder<B> recipeTransformer(Function<? super GTRecipe, ? extends GTRecipe> recipeTransformer) { backendPropertiesBuilder.recipeTransformer(recipeTransformer); return this; } @@ -177,7 +177,7 @@ public final class RecipeMapBuilder<B extends RecipeMapBackend> { * <p> * Recipes added via one of the overloads of addRecipe will NOT be affected by this function. */ - public RecipeMapBuilder<B> recipeTransformer(Consumer<GT_Recipe> recipeTransformer) { + public RecipeMapBuilder<B> recipeTransformer(Consumer<GTRecipe> recipeTransformer) { return recipeTransformer(withIdentityReturn(recipeTransformer)); } @@ -191,7 +191,7 @@ public final class RecipeMapBuilder<B extends RecipeMapBackend> { * The supplied function will be given the output of existing handler when a recipe is added. */ public RecipeMapBuilder<B> chainRecipeTransformer( - Function<? super GT_Recipe, ? extends GT_Recipe> recipeTransformer) { + Function<? super GTRecipe, ? extends GTRecipe> recipeTransformer) { backendPropertiesBuilder.chainRecipeTransformer(recipeTransformer); return this; } @@ -205,7 +205,7 @@ public final class RecipeMapBuilder<B extends RecipeMapBackend> { * 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<B> chainRecipeTransformer(Consumer<GT_Recipe> recipeTransformer) { + public RecipeMapBuilder<B> chainRecipeTransformer(Consumer<GTRecipe> recipeTransformer) { return chainRecipeTransformer(withIdentityReturn(recipeTransformer)); } @@ -250,7 +250,7 @@ public final class RecipeMapBuilder<B extends RecipeMapBackend> { * By default, it's set to {@code GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT}. */ public RecipeMapBuilder<B> 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<B extends RecipeMapBackend> { } /** - * 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<B> neiSpecialInfoFormatter(INEISpecialInfoFormatter neiSpecialInfoFormatter) { neiPropertiesBuilder.neiSpecialInfoFormatter(neiSpecialInfoFormatter); @@ -478,7 +478,7 @@ public final class RecipeMapBuilder<B extends RecipeMapBackend> { /** * Sets custom comparator for NEI recipe sort. */ - public RecipeMapBuilder<B> neiRecipeComparator(Comparator<GT_Recipe> comparator) { + public RecipeMapBuilder<B> neiRecipeComparator(Comparator<GTRecipe> 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<Float> 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<String> handleNEIItemTooltip(ItemStack stack, List<String> 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<String> handleNEIItemInputTooltip(List<String> 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<String> handleNEIItemOutputTooltip(List<String> 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<RecipeMapBackend> 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 - .<GT_Recipe, Integer>comparing(recipe -> recipe.getMetadataOrDefault(CompressionTierKey.INSTANCE, 0)) - .thenComparing(GT_Recipe::compareTo)) + .<GTRecipe, Integer>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 - .<GT_Recipe, Integer>comparing(recipe -> recipe.getMetadataOrDefault(CompressionTierKey.INSTANCE, 0)) - .thenComparing(GT_Recipe::compareTo)) + .<GTRecipe, Integer>comparing(recipe -> recipe.getMetadataOrDefault(CompressionTierKey.INSTANCE, 0)) + .thenComparing(GTRecipe::compareTo)) .build(); public static final RecipeMap<RecipeMapBackend> 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; } }) - .progressBar(GT_UITextures.PROGRESSBAR_MACERATE) + .progressBar(GTUITextures.PROGRESSBAR_MACERATE) .build(); public static final RecipeMap<ReplicatorBackend> replicatorRecipes = RecipeMapBuilder .of("gt.recipe.replicator", ReplicatorBackend::new) @@ -228,23 +228,23 @@ 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_UUM; + return GTUITextures.OVERLAY_SLOT_UUM; } return null; }) .build(); /** - * Use {@link GT_RecipeConstants#AssemblyLine} for recipe addition. + * Use {@link GTRecipeConstants#AssemblyLine} for recipe addition. */ public static final RecipeMap<RecipeMapBackend> assemblylineVisualRecipes = RecipeMapBuilder .of("gt.recipe.fakeAssemblylineProcess") .maxIO(16, 1, 4, 0) .minInputs(1, 0) .useSpecialSlot() - .slotOverlays((index, isFluid, isOutput, isSpecial) -> isSpecial ? GT_UITextures.OVERLAY_SLOT_DATA_ORB : null) + .slotOverlays((index, isFluid, isOutput, isSpecial) -> isSpecial ? GTUITextures.OVERLAY_SLOT_DATA_ORB : null) .disableOptimize() .neiTransferRect(88, 8, 18, 72) .neiTransferRect(124, 8, 18, 72) @@ -252,7 +252,7 @@ public final class RecipeMaps { .frontend(AssemblyLineFrontend::new) .build(); /** - * Usually, but not always, you should use {@link GT_RecipeConstants#UniversalArcFurnace} instead. + * Usually, but not always, you should use {@link GTRecipeConstants#UniversalArcFurnace} instead. */ public static final RecipeMap<RecipeMapBackend> plasmaArcFurnaceRecipes = RecipeMapBuilder .of("gt.recipe.plasmaarcfurnace") @@ -260,7 +260,7 @@ public final class RecipeMaps { .minInputs(1, 1) .build(); /** - * Usually, but not always, you should use {@link GT_RecipeConstants#UniversalArcFurnace} instead. + * Usually, but not always, you should use {@link GTRecipeConstants#UniversalArcFurnace} instead. */ public static final RecipeMap<RecipeMapBackend> arcFurnaceRecipes = RecipeMapBuilder.of("gt.recipe.arcfurnace") .maxIO(1, 9, 1, 0) @@ -274,20 +274,20 @@ public final class RecipeMaps { .useSpecialSlot() .slotOverlays((index, isFluid, isOutput, isSpecial) -> { if (isSpecial) { - return GT_UITextures.OVERLAY_SLOT_DATA_STICK; + return GTUITextures.OVERLAY_SLOT_DATA_STICK; } if (isFluid) { return null; } if (isOutput) { - return GT_UITextures.OVERLAY_SLOT_PAGE_PRINTED; + return GTUITextures.OVERLAY_SLOT_PAGE_PRINTED; } - return GT_UITextures.OVERLAY_SLOT_PAGE_BLANK; + return GTUITextures.OVERLAY_SLOT_PAGE_BLANK; }) .build(); public static final RecipeMap<RecipeMapBackend> sifterRecipes = RecipeMapBuilder.of("gt.recipe.sifter") .maxIO(1, 9, 1, 1) - .progressBar(GT_UITextures.PROGRESSBAR_SIFT, ProgressBar.Direction.DOWN) + .progressBar(GTUITextures.PROGRESSBAR_SIFT, ProgressBar.Direction.DOWN) .build(); public static final RecipeMap<FormingPressBackend> formingPressRecipes = RecipeMapBuilder .of("gt.recipe.press", FormingPressBackend::new) @@ -295,32 +295,32 @@ public final class RecipeMaps { .minInputs(2, 0) .slotOverlays((index, isFluid, isOutput, isSpecial) -> { if (isOutput) { - return GT_UITextures.OVERLAY_SLOT_PRESS_3; + return GTUITextures.OVERLAY_SLOT_PRESS_3; } if (index == 0) { - return GT_UITextures.OVERLAY_SLOT_PRESS_1; + return GTUITextures.OVERLAY_SLOT_PRESS_1; } - return GT_UITextures.OVERLAY_SLOT_PRESS_2; + return GTUITextures.OVERLAY_SLOT_PRESS_2; }) - .progressBar(GT_UITextures.PROGRESSBAR_COMPRESS) + .progressBar(GTUITextures.PROGRESSBAR_COMPRESS) .build(); public static final RecipeMap<RecipeMapBackend> laserEngraverRecipes = RecipeMapBuilder .of("gt.recipe.laserengraver") .maxIO(4, 4, 2, 2) .slotOverlays( (index, isFluid, isOutput, - isSpecial) -> !isFluid && !isOutput && index != 0 ? GT_UITextures.OVERLAY_SLOT_LENS : null) + isSpecial) -> !isFluid && !isOutput && index != 0 ? GTUITextures.OVERLAY_SLOT_LENS : null) // Add a simple ordering so lower tier purified water is displayed first, otherwise it gets really confusing .neiRecipeComparator( (a, b) -> Comparator.comparing(PurifiedWaterHelpers::getWaterTierFromRecipe) - .thenComparing(GT_Recipe::compareTo) + .thenComparing(GTRecipe::compareTo) .compare(a, b)) .build(); public static final RecipeMap<RecipeMapBackend> mixerRecipes = RecipeMapBuilder.of("gt.recipe.mixer") .maxIO(9, 4, 1, 1) .minInputs(1, 0) - .slotOverlays((index, isFluid, isOutput, isSpecial) -> !isFluid ? GT_UITextures.OVERLAY_SLOT_DUST : null) - .progressBar(GT_UITextures.PROGRESSBAR_MIXER, ProgressBar.Direction.CIRCULAR_CW) + .slotOverlays((index, isFluid, isOutput, isSpecial) -> !isFluid ? GTUITextures.OVERLAY_SLOT_DUST : null) + .progressBar(GTUITextures.PROGRESSBAR_MIXER, ProgressBar.Direction.CIRCULAR_CW) .build(); public static final RecipeMap<RecipeMapBackend> autoclaveRecipes = RecipeMapBuilder.of("gt.recipe.autoclave") .maxIO(2, 4, 1, 1) @@ -331,11 +331,11 @@ public final class RecipeMaps { } if (isOutput) { if (index == 0) { - return GT_UITextures.OVERLAY_SLOT_GEM; + return GTUITextures.OVERLAY_SLOT_GEM; } - return GT_UITextures.OVERLAY_SLOT_DUST; + return GTUITextures.OVERLAY_SLOT_DUST; } - return GT_UITextures.OVERLAY_SLOT_DUST; + return GTUITextures.OVERLAY_SLOT_DUST; }) .build(); public static final RecipeMap<RecipeMapBackend> electroMagneticSeparatorRecipes = RecipeMapBuilder @@ -343,47 +343,47 @@ public final class RecipeMaps { .maxIO(1, 3, 0, 0) .minInputs(1, 0) .slotOverlays( - (index, isFluid, isOutput, isSpecial) -> isOutput ? GT_UITextures.OVERLAY_SLOT_DUST - : GT_UITextures.OVERLAY_SLOT_CRUSHED_ORE) - .progressBar(GT_UITextures.PROGRESSBAR_MAGNET) + (index, isFluid, isOutput, isSpecial) -> isOutput ? GTUITextures.OVERLAY_SLOT_DUST + : GTUITextures.OVERLAY_SLOT_CRUSHED_ORE) + .progressBar(GTUITextures.PROGRESSBAR_MAGNET) .build(); public static final RecipeMap<RecipeMapBackend> polarizerRecipes = RecipeMapBuilder.of("gt.recipe.polarizer") .maxIO(1, 1, 0, 0) .minInputs(1, 0) - .progressBar(GT_UITextures.PROGRESSBAR_MAGNET) + .progressBar(GTUITextures.PROGRESSBAR_MAGNET) .build(); public static final RecipeMap<RecipeMapBackend> maceratorRecipes = RecipeMapBuilder.of("gt.recipe.macerator") .maxIO(1, 4, 0, 0) .minInputs(1, 0) .slotOverlays( - (index, isFluid, isOutput, isSpecial) -> isOutput ? GT_UITextures.OVERLAY_SLOT_DUST - : GT_UITextures.OVERLAY_SLOT_CRUSHED_ORE) + (index, isFluid, isOutput, isSpecial) -> isOutput ? GTUITextures.OVERLAY_SLOT_DUST + : GTUITextures.OVERLAY_SLOT_CRUSHED_ORE) .slotOverlaysSteam( - (index, isFluid, isOutput, isSpecial) -> isOutput ? GT_UITextures.OVERLAY_SLOT_DUST_STEAM - : GT_UITextures.OVERLAY_SLOT_CRUSHED_ORE_STEAM) - .progressBar(GT_UITextures.PROGRESSBAR_MACERATE) - .progressBarSteam(GT_UITextures.PROGRESSBAR_MACERATE_STEAM) + (index, isFluid, isOutput, isSpecial) -> isOutput ? GTUITextures.OVERLAY_SLOT_DUST_STEAM + : GTUITextures.OVERLAY_SLOT_CRUSHED_ORE_STEAM) + .progressBar(GTUITextures.PROGRESSBAR_MACERATE) + .progressBarSteam(GTUITextures.PROGRESSBAR_MACERATE_STEAM) // Avoid steam machine being used as handler icon .neiHandlerInfo(builder -> builder.setDisplayStack(ItemList.Machine_LV_Macerator.get(1))) .build(); public static final RecipeMap<RecipeMapBackend> chemicalBathRecipes = RecipeMapBuilder.of("gt.recipe.chemicalbath") .maxIO(1, 3, 1, 1) .minInputs(1, 1) - .progressBar(GT_UITextures.PROGRESSBAR_BATH, ProgressBar.Direction.CIRCULAR_CW) + .progressBar(GTUITextures.PROGRESSBAR_BATH, ProgressBar.Direction.CIRCULAR_CW) .build(); public static final RecipeMap<FluidCannerBackend> fluidCannerRecipes = RecipeMapBuilder .of("gt.recipe.fluidcanner", FluidCannerBackend::new) .maxIO(1, 1, 1, 1) .minInputs(1, 0) - .slotOverlays((index, isFluid, isOutput, isSpecial) -> !isFluid ? GT_UITextures.OVERLAY_SLOT_CANISTER : null) - .progressBar(GT_UITextures.PROGRESSBAR_CANNER) + .slotOverlays((index, isFluid, isOutput, isSpecial) -> !isFluid ? GTUITextures.OVERLAY_SLOT_CANISTER : null) + .progressBar(GTUITextures.PROGRESSBAR_CANNER) .build(); public static final RecipeMap<RecipeMapBackend> brewingRecipes = RecipeMapBuilder.of("gt.recipe.brewer") .maxIO(1, 0, 1, 1) .minInputs(1, 1) .slotOverlays( - (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GT_UITextures.OVERLAY_SLOT_CAULDRON : null) - .progressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE) + (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GTUITextures.OVERLAY_SLOT_CAULDRON : null) + .progressBar(GTUITextures.PROGRESSBAR_ARROW_MULTIPLE) .build(); public static final RecipeMap<RecipeMapBackend> fluidHeaterRecipes = RecipeMapBuilder.of("gt.recipe.fluidheater") .maxIO(1, 0, 1, 1) @@ -392,11 +392,11 @@ public final class RecipeMaps { return null; } if (isOutput) { - return GT_UITextures.OVERLAY_SLOT_HEATER_2; + return GTUITextures.OVERLAY_SLOT_HEATER_2; } - return GT_UITextures.OVERLAY_SLOT_HEATER_1; + return GTUITextures.OVERLAY_SLOT_HEATER_1; }) - .progressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE) + .progressBar(GTUITextures.PROGRESSBAR_ARROW_MULTIPLE) .build(); public static final RecipeMap<RecipeMapBackend> distilleryRecipes = RecipeMapBuilder.of("gt.recipe.distillery") .maxIO(1, 1, 1, 1) @@ -406,11 +406,11 @@ public final class RecipeMaps { return null; } if (isOutput) { - return GT_UITextures.OVERLAY_SLOT_BEAKER_2; + return GTUITextures.OVERLAY_SLOT_BEAKER_2; } - return GT_UITextures.OVERLAY_SLOT_BEAKER_1; + return GTUITextures.OVERLAY_SLOT_BEAKER_1; }) - .progressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE) + .progressBar(GTUITextures.PROGRESSBAR_ARROW_MULTIPLE) .recipeTransformer(r -> { int aInput = r.mFluidInputs[0].amount, aOutput = r.mFluidOutputs[0].amount, aDuration = r.mDuration; @@ -434,14 +434,14 @@ public final class RecipeMaps { aInput = (aInput + tScale - 1) / tScale; aOutput = aOutput / tScale; if (!isArrayEmptyOrNull(r.mOutputs)) { - ItemData tData = GT_OreDictUnificator.getItemData(r.mOutputs[0]); + ItemData tData = GTOreDictUnificator.getItemData(r.mOutputs[0]); if (tData != null && (tData.mPrefix == OrePrefixes.dust || OrePrefixes.dust.mFamiliarPrefixes.contains(tData.mPrefix))) { - r.mOutputs[0] = GT_OreDictUnificator.getDust( + r.mOutputs[0] = GTOreDictUnificator.getDust( tData.mMaterial.mMaterial, tData.mMaterial.mAmount * r.mOutputs[0].stackSize / tScale); } else { - if (r.mOutputs[0].stackSize / tScale == 0) r.mOutputs[0] = GT_Values.NI; + if (r.mOutputs[0].stackSize / tScale == 0) r.mOutputs[0] = GTValues.NI; else r.mOutputs[0] = copyAmount(r.mOutputs[0].stackSize / tScale, r.mOutputs[0]); } } @@ -455,14 +455,14 @@ public final class RecipeMaps { public static final RecipeMap<RecipeMapBackend> fermentingRecipes = RecipeMapBuilder.of("gt.recipe.fermenter") .maxIO(0, 0, 1, 1) .minInputs(0, 1) - .progressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE) + .progressBar(GTUITextures.PROGRESSBAR_ARROW_MULTIPLE) .build(); public static final RecipeMap<RecipeMapBackend> fluidSolidifierRecipes = RecipeMapBuilder .of("gt.recipe.fluidsolidifier") .maxIO(1, 1, 1, 0) .minInputs(1, 1) .slotOverlays( - (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GT_UITextures.OVERLAY_SLOT_MOLD : null) + (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GTUITextures.OVERLAY_SLOT_MOLD : null) .recipeTransformer(r -> { if (ArrayUtils.isNotEmpty(r.mFluidInputs)) { if (Materials.PhasedGold.getMolten(1) @@ -479,9 +479,9 @@ public final class RecipeMaps { .maxIO(1, 1, 0, 1) .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) .recipeTransformer(r -> { if (ArrayUtils.isNotEmpty(r.mFluidOutputs)) { if (Materials.PhasedGold.getMolten(1) @@ -498,10 +498,10 @@ public final class RecipeMaps { .minInputs(2, 0) .slotOverlays((index, isFluid, isOutput, isSpecial) -> { if (isOutput) { - return GT_UITextures.OVERLAY_SLOT_BOXED; + return GTUITextures.OVERLAY_SLOT_BOXED; } if (index != 0) { - return GT_UITextures.OVERLAY_SLOT_BOX; + return GTUITextures.OVERLAY_SLOT_BOX; } return null; }) @@ -510,7 +510,7 @@ public final class RecipeMaps { .of("gt.recipe.unpackager", UnpackagerBackend::new) .maxIO(1, 2, 0, 0) .minInputs(1, 0) - .slotOverlays((index, isFluid, isOutput, isSpecial) -> !isOutput ? GT_UITextures.OVERLAY_SLOT_BOXED : null) + .slotOverlays((index, isFluid, isOutput, isSpecial) -> !isOutput ? GTUITextures.OVERLAY_SLOT_BOXED : null) .build(); public static final RecipeMap<RecipeMapBackend> fusionRecipes = RecipeMapBuilder.of("gt.recipe.fusionreactor") .maxIO(0, 0, 2, 1) @@ -520,9 +520,9 @@ public final class RecipeMaps { .neiSpecialInfoFormatter(FusionSpecialValueFormatter.INSTANCE) .neiRecipeComparator( Comparator - .<GT_Recipe, Integer>comparing( + .<GTRecipe, Integer>comparing( recipe -> FusionSpecialValueFormatter.getFusionTier(recipe.mSpecialValue, recipe.mEUt)) - .thenComparing(GT_Recipe::compareTo)) + .thenComparing(GTRecipe::compareTo)) .frontend(FluidOnlyFrontend::new) .build(); public static final RecipeMap<RecipeMapBackend> centrifugeRecipes = RecipeMapBuilder.of("gt.recipe.centrifuge") @@ -532,15 +532,15 @@ public final class RecipeMaps { return null; } if (isFluid) { - return GT_UITextures.OVERLAY_SLOT_CENTRIFUGE_FLUID; + return GTUITextures.OVERLAY_SLOT_CENTRIFUGE_FLUID; } else { if (index == 0) { - return GT_UITextures.OVERLAY_SLOT_CENTRIFUGE; + return GTUITextures.OVERLAY_SLOT_CENTRIFUGE; } - return GT_UITextures.OVERLAY_SLOT_CANISTER; + return GTUITextures.OVERLAY_SLOT_CANISTER; } }) - .progressBar(GT_UITextures.PROGRESSBAR_EXTRACT) + .progressBar(GTUITextures.PROGRESSBAR_EXTRACT) .build(); public static final RecipeMap<RecipeMapBackend> electrolyzerRecipes = RecipeMapBuilder.of("gt.recipe.electrolyzer") .maxIO(2, 6, 1, 1) @@ -549,18 +549,18 @@ public final class RecipeMaps { return null; } if (isFluid) { - return GT_UITextures.OVERLAY_SLOT_CHARGER_FLUID; + return GTUITextures.OVERLAY_SLOT_CHARGER_FLUID; } else { if (index == 0) { - return GT_UITextures.OVERLAY_SLOT_CHARGER; + return GTUITextures.OVERLAY_SLOT_CHARGER; } - return GT_UITextures.OVERLAY_SLOT_CANISTER; + return GTUITextures.OVERLAY_SLOT_CANISTER; } }) - .progressBar(GT_UITextures.PROGRESSBAR_EXTRACT) + .progressBar(GTUITextures.PROGRESSBAR_EXTRACT) .build(); /** - * Use {@link GT_RecipeConstants#COIL_HEAT} as heat level. + * Use {@link GTRecipeConstants#COIL_HEAT} as heat level. */ public static final RecipeMap<RecipeMapBackend> blastFurnaceRecipes = RecipeMapBuilder.of("gt.recipe.blastfurnace") .maxIO(6, 6, 1, 1) @@ -568,7 +568,7 @@ public final class RecipeMaps { .neiSpecialInfoFormatter(HeatingCoilSpecialValueFormatter.INSTANCE) .build(); /** - * Use {@link GT_RecipeConstants#COIL_HEAT} as heat level. + * Use {@link GTRecipeConstants#COIL_HEAT} as heat level. */ public static final RecipeMap<RecipeMapBackend> plasmaForgeRecipes = RecipeMapBuilder.of("gt.recipe.plasmaforge") .maxIO(9, 9, 9, 9) @@ -606,14 +606,14 @@ public final class RecipeMaps { .disableOptimize() .build(); /** - * Uses {@link GT_RecipeConstants#ADDITIVE_AMOUNT} for coal/charcoal amount. + * Uses {@link GTRecipeConstants#ADDITIVE_AMOUNT} for coal/charcoal amount. */ public static final RecipeMap<RecipeMapBackend> primitiveBlastRecipes = RecipeMapBuilder .of("gt.recipe.primitiveblastfurnace") .maxIO(3, 3, 0, 0) .minInputs(1, 0) .recipeEmitter(builder -> { - Optional<GT_Recipe> rr = builder.eut(0) + Optional<GTRecipe> rr = builder.eut(0) .validateInputCount(1, 2) .validateOutputCount(1, 2) .validateNoInputFluid() @@ -629,7 +629,7 @@ public final class RecipeMaps { return Collections.emptyList(); int aCoalAmount = builder.getMetadataOrDefault(ADDITIVE_AMOUNT, 0); if (aCoalAmount <= 0) return Collections.emptyList(); - GT_RecipeTemplate coll = asTemplate(rr.get()); + GTRecipeTemplate coll = asTemplate(rr.get()); for (Materials coal : new Materials[] { Materials.Coal, Materials.Charcoal }) { coll.derive() .setInputs(aInput1, aInput2, coal.getGems(aCoalAmount)) @@ -684,7 +684,7 @@ public final class RecipeMaps { }) .build(); /** - * Uses {@link GT_RecipeConstants#ADDITIVE_AMOUNT} for TNT/ITNT/... amount. Value is truncated to [0, 64] + * Uses {@link GTRecipeConstants#ADDITIVE_AMOUNT} for TNT/ITNT/... amount. Value is truncated to [0, 64] */ public static final RecipeMap<RecipeMapBackend> implosionRecipes = RecipeMapBuilder .of("gt.recipe.implosioncompressor") @@ -693,13 +693,13 @@ public final class RecipeMaps { .slotOverlays((index, isFluid, isOutput, isSpecial) -> { if (!isFluid && !isOutput) { if (index == 0) { - return GT_UITextures.OVERLAY_SLOT_IMPLOSION; + return GTUITextures.OVERLAY_SLOT_IMPLOSION; } - return GT_UITextures.OVERLAY_SLOT_EXPLOSIVE; + return GTUITextures.OVERLAY_SLOT_EXPLOSIVE; } return null; }) - .progressBar(GT_UITextures.PROGRESSBAR_COMPRESS) + .progressBar(GTUITextures.PROGRESSBAR_COMPRESS) .disableOptimize() .recipeEmitter(b -> { switch (b.getItemInputsBasic().length) { @@ -712,7 +712,7 @@ public final class RecipeMaps { .map(Collections::singletonList) .orElse(Collections.emptyList()); } - Optional<GT_Recipe> t = b.noOptimize() + Optional<GTRecipe> t = b.noOptimize() .duration(20) .eut(30) .validateInputCount(1, 1) @@ -720,7 +720,7 @@ public final class RecipeMaps { .build(); if (!t.isPresent()) return Collections.emptyList(); ItemStack input = b.getItemInputBasic(0); - GT_RecipeTemplate coll = asTemplate(t.get()); + GTRecipeTemplate coll = asTemplate(t.get()); int tExplosives = Math.min(b.getMetadataOrDefault(ADDITIVE_AMOUNT, 0), 64); int tGunpowder = tExplosives << 1; // Worst int tDynamite = Math.max(1, tExplosives >> 1); // good @@ -730,11 +730,11 @@ public final class RecipeMaps { if (tGunpowder < 65) coll.derive() .setInputs(input, ItemList.Block_Powderbarrel.get(tGunpowder)); if (tDynamite < 17) coll.derive() - .setInputs(input, GT_ModHandler.getIC2Item("dynamite", tDynamite, null)); + .setInputs(input, GTModHandler.getIC2Item("dynamite", tDynamite, null)); coll.derive() .setInputs(input, new ItemStack(Blocks.tnt, tTNT)); coll.derive() - .setInputs(input, GT_ModHandler.getIC2Item("industrialTnt", tITNT, null)); + .setInputs(input, GTModHandler.getIC2Item("industrialTnt", tITNT, null)); return coll.getAll(); }) .build(); @@ -749,7 +749,7 @@ public final class RecipeMaps { && isArrayEmptyOrNull(b.getFluidOutputs()) && (in = getFluidForFilledItem(b.getItemInputBasic(0), true)) != null && (out = getFluidForFilledItem(b.getItemOutput(0), true)) != null) { - Collection<GT_Recipe> ret = new ArrayList<>(); + Collection<GTRecipe> ret = new ArrayList<>(); b.build() .ifPresent(ret::add); b.itemInputs() @@ -765,7 +765,7 @@ public final class RecipeMaps { .build(); /** * Using {@code .addTo(chemicalReactorRecipes)} will cause the recipe to be added to single block recipe map ONLY! - * Use {@link GT_RecipeConstants#UniversalChemical} to add to both. + * Use {@link GTRecipeConstants#UniversalChemical} to add to both. */ public static final RecipeMap<RecipeMapBackend> chemicalReactorRecipes = RecipeMapBuilder .of("gt.recipe.chemicalreactor") @@ -774,30 +774,30 @@ public final class RecipeMaps { .slotOverlays((index, isFluid, isOutput, isSpecial) -> { if (isFluid) { if (isOutput) { - return GT_UITextures.OVERLAY_SLOT_VIAL_2; + return GTUITextures.OVERLAY_SLOT_VIAL_2; } - return GT_UITextures.OVERLAY_SLOT_MOLECULAR_3; + return GTUITextures.OVERLAY_SLOT_MOLECULAR_3; } else { if (isOutput) { - return GT_UITextures.OVERLAY_SLOT_VIAL_1; + return GTUITextures.OVERLAY_SLOT_VIAL_1; } if (index == 0) { - return GT_UITextures.OVERLAY_SLOT_MOLECULAR_1; + return GTUITextures.OVERLAY_SLOT_MOLECULAR_1; } - return GT_UITextures.OVERLAY_SLOT_MOLECULAR_2; + return GTUITextures.OVERLAY_SLOT_MOLECULAR_2; } }) - .progressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE) + .progressBar(GTUITextures.PROGRESSBAR_ARROW_MULTIPLE) .disableOptimize() .build(); /** * Using {@code .addTo(multiblockChemicalReactorRecipes)} will cause the recipe to be added to - * multiblock recipe map ONLY! Use {@link GT_RecipeConstants#UniversalChemical} to add to both. + * multiblock recipe map ONLY! Use {@link GTRecipeConstants#UniversalChemical} to add to both. */ public static final RecipeMap<RecipeMapBackend> multiblockChemicalReactorRecipes = RecipeMapBuilder .of("gt.recipe.largechemicalreactor") .maxIO(6, 6, 6, 6) - .progressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE) + .progressBar(GTUITextures.PROGRESSBAR_ARROW_MULTIPLE) .disableOptimize() .frontend(LargeNEIFrontend::new) .build(); @@ -809,12 +809,12 @@ public final class RecipeMaps { return null; } if (isFluid) { - return GT_UITextures.OVERLAY_SLOTS_NUMBER[index + 1]; + return GTUITextures.OVERLAY_SLOTS_NUMBER[index + 1]; } else { - return GT_UITextures.OVERLAY_SLOTS_NUMBER[0]; + return GTUITextures.OVERLAY_SLOTS_NUMBER[0]; } }) - .progressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE) + .progressBar(GTUITextures.PROGRESSBAR_ARROW_MULTIPLE) .logoPos(80, 62) .frontend(DistillationTowerFrontend::new) .disableOptimize() @@ -823,7 +823,7 @@ public final class RecipeMaps { .of("gt.recipe.craker", OilCrackerBackend::new) .maxIO(1, 1, 2, 1) .minInputs(1, 2) - .progressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE) + .progressBar(GTUITextures.PROGRESSBAR_ARROW_MULTIPLE) .build(); public static final RecipeMap<RecipeMapBackend> pyrolyseRecipes = RecipeMapBuilder.of("gt.recipe.pyro") .maxIO(2, 1, 1, 1) @@ -834,26 +834,26 @@ public final class RecipeMaps { .maxIO(2, 1, 0, 0) .minInputs(1, 0) .slotOverlays( - (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GT_UITextures.OVERLAY_SLOT_WIREMILL : null) - .progressBar(GT_UITextures.PROGRESSBAR_WIREMILL) + (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GTUITextures.OVERLAY_SLOT_WIREMILL : null) + .progressBar(GTUITextures.PROGRESSBAR_WIREMILL) .build(); public static final RecipeMap<RecipeMapBackend> benderRecipes = RecipeMapBuilder.of("gt.recipe.metalbender") .maxIO(2, 1, 0, 0) .minInputs(2, 0) .slotOverlays( - (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GT_UITextures.OVERLAY_SLOT_BENDER : null) - .progressBar(GT_UITextures.PROGRESSBAR_BENDING) + (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GTUITextures.OVERLAY_SLOT_BENDER : null) + .progressBar(GTUITextures.PROGRESSBAR_BENDING) .build(); public static final RecipeMap<RecipeMapBackend> alloySmelterRecipes = RecipeMapBuilder.of("gt.recipe.alloysmelter") .maxIO(2, 1, 0, 0) .minInputs(2, 0) .slotOverlays( - (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GT_UITextures.OVERLAY_SLOT_FURNACE : null) - .slotOverlaysSteam((index, isFluid, isOutput, isSpecial) -> GT_UITextures.OVERLAY_SLOT_FURNACE_STEAM) - .progressBarSteam(GT_UITextures.PROGRESSBAR_ARROW_STEAM) + (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GTUITextures.OVERLAY_SLOT_FURNACE : null) + .slotOverlaysSteam((index, isFluid, isOutput, isSpecial) -> GTUITextures.OVERLAY_SLOT_FURNACE_STEAM) + .progressBarSteam(GTUITextures.PROGRESSBAR_ARROW_STEAM) .recipeEmitter(b -> { if (Materials.Graphite.contains(b.getItemInputBasic(0))) return Collections.emptyList(); - if (GT_Utility.isArrayOfLength(b.getItemInputsBasic(), 1)) { + if (GTUtility.isArrayOfLength(b.getItemInputsBasic(), 1)) { ItemStack aInput1 = b.getItemInputBasic(0); if (((OrePrefixes.ingot.contains(aInput1)) || (OrePrefixes.dust.contains(aInput1)) || (OrePrefixes.gem.contains(aInput1)))) return Collections.emptyList(); @@ -872,8 +872,8 @@ public final class RecipeMaps { .maxIO(9, 1, 1, 0) .minInputs(1, 0) .slotOverlays( - (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GT_UITextures.OVERLAY_SLOT_CIRCUIT : null) - .progressBar(GT_UITextures.PROGRESSBAR_ASSEMBLE) + (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GTUITextures.OVERLAY_SLOT_CIRCUIT : null) + .progressBar(GTUITextures.PROGRESSBAR_ASSEMBLE) .disableOptimize() .build(); public static final RecipeMap<RecipeMapBackend> circuitAssemblerRecipes = RecipeMapBuilder @@ -881,8 +881,8 @@ public final class RecipeMaps { .maxIO(6, 1, 1, 0) .minInputs(1, 0) .slotOverlays( - (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GT_UITextures.OVERLAY_SLOT_CIRCUIT : null) - .progressBar(GT_UITextures.PROGRESSBAR_CIRCUIT_ASSEMBLER) + (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GTUITextures.OVERLAY_SLOT_CIRCUIT : null) + .progressBar(GTUITextures.PROGRESSBAR_CIRCUIT_ASSEMBLER) .unificateOutputNEI(!NEICustomDiagrams.isModLoaded()) .build(); public static final RecipeMap<RecipeMapBackend> cannerRecipes = RecipeMapBuilder.of("gt.recipe.canner") @@ -893,11 +893,11 @@ public final class RecipeMaps { return null; } if (index == 0) { - return GT_UITextures.OVERLAY_SLOT_CANNER; + return GTUITextures.OVERLAY_SLOT_CANNER; } - return GT_UITextures.OVERLAY_SLOT_CANISTER; + return GTUITextures.OVERLAY_SLOT_CANISTER; }) - .progressBar(GT_UITextures.PROGRESSBAR_CANNER) + .progressBar(GTUITextures.PROGRESSBAR_CANNER) .build(); public static final RecipeMap<RecipeMapBackend> latheRecipes = RecipeMapBuilder.of("gt.recipe.lathe") .maxIO(1, 2, 0, 0) @@ -905,14 +905,14 @@ public final class RecipeMaps { .slotOverlays((index, isFluid, isOutput, isSpecial) -> { if (isOutput) { if (index == 0) { - return GT_UITextures.OVERLAY_SLOT_ROD_2; + return GTUITextures.OVERLAY_SLOT_ROD_2; } - return GT_UITextures.OVERLAY_SLOT_DUST; + return GTUITextures.OVERLAY_SLOT_DUST; } - return GT_UITextures.OVERLAY_SLOT_ROD_1; + return GTUITextures.OVERLAY_SLOT_ROD_1; }) - .progressBar(GT_UITextures.PROGRESSBAR_LATHE) - .addSpecialTexture(98, 24, 5, 18, GT_UITextures.PROGRESSBAR_LATHE_BASE) + .progressBar(GTUITextures.PROGRESSBAR_LATHE) + .addSpecialTexture(98, 24, 5, 18, GTUITextures.PROGRESSBAR_LATHE_BASE) .build(); public static final RecipeMap<RecipeMapBackend> cutterRecipes = RecipeMapBuilder.of("gt.recipe.cuttingsaw") .maxIO(2, 4, 1, 0) @@ -923,13 +923,13 @@ public final class RecipeMaps { } if (isOutput) { if (index == 0) { - return GT_UITextures.OVERLAY_SLOT_CUTTER_SLICED; + return GTUITextures.OVERLAY_SLOT_CUTTER_SLICED; } - return GT_UITextures.OVERLAY_SLOT_DUST; + return GTUITextures.OVERLAY_SLOT_DUST; } - return GT_UITextures.OVERLAY_SLOT_BOX; + return GTUITextures.OVERLAY_SLOT_BOX; }) - .progressBar(GT_UITextures.PROGRESSBAR_CUT) + .progressBar(GTUITextures.PROGRESSBAR_CUT) .recipeEmitter(b -> { b.validateInputCount(1, 2) .validateOutputCount(1, 4) @@ -937,14 +937,14 @@ public final class RecipeMaps { if ((b.getFluidInputs() != null && b.getFluidInputs().length > 0) || !b.isValid()) return buildOrEmpty(b.validateInputFluidCount(1, 1)); int aDuration = b.getDuration(), aEUt = b.getEUt(); - Collection<GT_Recipe> ret = new ArrayList<>(); + Collection<GTRecipe> ret = new ArrayList<>(); b.copy() .fluidInputs(Materials.Water.getFluid(clamp(aDuration * aEUt / 320, 4, 1000))) .duration(aDuration * 2) .build() .ifPresent(ret::add); b.copy() - .fluidInputs(GT_ModHandler.getDistilledWater(clamp(aDuration * aEUt / 426, 3, 750))) + .fluidInputs(GTModHandler.getDistilledWater(clamp(aDuration * aEUt / 426, 3, 750))) .duration(aDuration * 2) .build() .ifPresent(ret::add); @@ -960,34 +960,34 @@ public final class RecipeMaps { .minInputs(2, 0) .slotOverlays((index, isFluid, isOutput, isSpecial) -> { if (isOutput) { - return GT_UITextures.OVERLAY_SLOT_SLICER_SLICED; + return GTUITextures.OVERLAY_SLOT_SLICER_SLICED; } if (index == 0) { - return GT_UITextures.OVERLAY_SLOT_SQUARE; + return GTUITextures.OVERLAY_SLOT_SQUARE; } - return GT_UITextures.OVERLAY_SLOT_SLICE_SHAPE; + return GTUITextures.OVERLAY_SLOT_SLICE_SHAPE; }) - .progressBar(GT_UITextures.PROGRESSBAR_SLICE) + .progressBar(GTUITextures.PROGRESSBAR_SLICE) .build(); public static final RecipeMap<RecipeMapBackend> extruderRecipes = RecipeMapBuilder.of("gt.recipe.extruder") .maxIO(2, 1, 0, 0) .minInputs(2, 0) .slotOverlays( (index, isFluid, isOutput, - isSpecial) -> !isFluid && !isOutput && index != 0 ? GT_UITextures.OVERLAY_SLOT_EXTRUDER_SHAPE : null) - .progressBar(GT_UITextures.PROGRESSBAR_EXTRUDE) + isSpecial) -> !isFluid && !isOutput && index != 0 ? GTUITextures.OVERLAY_SLOT_EXTRUDER_SHAPE : null) + .progressBar(GTUITextures.PROGRESSBAR_EXTRUDE) .build(); public static final RecipeMap<RecipeMapBackend> hammerRecipes = RecipeMapBuilder.of("gt.recipe.hammer") .maxIO(2, 2, 2, 2) .minInputs(1, 0) .slotOverlays( - (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GT_UITextures.OVERLAY_SLOT_HAMMER : null) - .progressBar(GT_UITextures.PROGRESSBAR_HAMMER, ProgressBar.Direction.DOWN) - .addSpecialTexture(78, 42, 20, 6, GT_UITextures.PROGRESSBAR_HAMMER_BASE) + (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GTUITextures.OVERLAY_SLOT_HAMMER : null) + .progressBar(GTUITextures.PROGRESSBAR_HAMMER, ProgressBar.Direction.DOWN) + .addSpecialTexture(78, 42, 20, 6, GTUITextures.PROGRESSBAR_HAMMER_BASE) .slotOverlaysSteam( - (index, isFluid, isOutput, isSpecial) -> !isOutput ? GT_UITextures.OVERLAY_SLOT_HAMMER_STEAM : null) - .progressBarSteam(GT_UITextures.PROGRESSBAR_HAMMER_STEAM) - .addSpecialTextureSteam(78, 42, 20, 6, GT_UITextures.PROGRESSBAR_HAMMER_BASE_STEAM) + (index, isFluid, isOutput, isSpecial) -> !isOutput ? GTUITextures.OVERLAY_SLOT_HAMMER_STEAM : null) + .progressBarSteam(GTUITextures.PROGRESSBAR_HAMMER_STEAM) + .addSpecialTextureSteam(78, 42, 20, 6, GTUITextures.PROGRESSBAR_HAMMER_BASE_STEAM) // Avoid steam machine being used as handler icon .neiHandlerInfo(builder -> builder.setDisplayStack(ItemList.Machine_LV_Hammer.get(1))) .build(); @@ -996,14 +996,14 @@ public final class RecipeMaps { .minInputs(1, 0) .slotOverlays((index, isFluid, isOutput, isSpecial) -> { if (isFluid) { - return GT_UITextures.OVERLAY_SLOT_UUA; + return GTUITextures.OVERLAY_SLOT_UUA; } if (!isOutput) { - return GT_UITextures.OVERLAY_SLOT_CENTRIFUGE; + return GTUITextures.OVERLAY_SLOT_CENTRIFUGE; } return null; }) - .progressBar(GT_UITextures.PROGRESSBAR_EXTRACT) + .progressBar(GTUITextures.PROGRESSBAR_EXTRACT) .build(); public static final RecipeMap<RecipeMapBackend> massFabFakeRecipes = RecipeMapBuilder.of("gt.recipe.massfab") .maxIO(1, 0, 1, 1) @@ -1014,9 +1014,9 @@ public final class RecipeMaps { return null; } if (isOutput) { - return GT_UITextures.OVERLAY_SLOT_UUM; + return GTUITextures.OVERLAY_SLOT_UUM; } - return GT_UITextures.OVERLAY_SLOT_UUA; + return GTUITextures.OVERLAY_SLOT_UUA; }) .build(); public static final RecipeMap<FuelBackend> dieselFuels = RecipeMapBuilder @@ -1083,20 +1083,20 @@ public final class RecipeMaps { .of("gt.recipe.largeelectrolyzer") .maxIO(1, 6, 1, 6) .disableRegisterNEI() - .recipeEmitter(GT_RecipeMapUtil::buildRecipeForMultiblock) + .recipeEmitter(GTRecipeMapUtil::buildRecipeForMultiblock) .build(); public static final RecipeMap<RecipeMapBackend> centrifugeNonCellRecipes = RecipeMapBuilder .of("gt.recipe.largecentrifuge") .maxIO(2, 6, 1, 6) .disableOptimize() .disableRegisterNEI() - .recipeEmitter(GT_RecipeMapUtil::buildRecipeForMultiblock) + .recipeEmitter(GTRecipeMapUtil::buildRecipeForMultiblock) .build(); public static final RecipeMap<RecipeMapBackend> mixerNonCellRecipes = RecipeMapBuilder.of("gt.recipe.largemixer") .maxIO(9, 4, 6, 4) .disableOptimize() .disableRegisterNEI() - .recipeEmitter(GT_RecipeMapUtil::buildRecipeForMultiblockNoCircuit) + .recipeEmitter(GTRecipeMapUtil::buildRecipeForMultiblockNoCircuit) .build(); public static final RecipeMap<LargeBoilerFuelBackend> largeBoilerFakeFuels = RecipeMapBuilder .of("gt.recipe.largeboilerfakefuels", LargeBoilerFuelBackend::new) @@ -1110,20 +1110,20 @@ public final class RecipeMaps { .minInputs(2, 1) .slotOverlays( (index, isFluid, isOutput, - isSpecial) -> !isFluid && !isOutput && index == 0 ? GT_UITextures.OVERLAY_SLOT_LENS : null) - .progressBar(GT_UITextures.PROGRESSBAR_ASSEMBLE) + isSpecial) -> !isFluid && !isOutput && index == 0 ? GTUITextures.OVERLAY_SLOT_LENS : null) + .progressBar(GTUITextures.PROGRESSBAR_ASSEMBLE) .disableOptimize() .neiSpecialInfoFormatter(new SimpleSpecialValueFormatter("GT5U.nei.tier")) .build(); public static final RecipeMap<RecipeMapBackend> pcbFactoryRecipes = RecipeMapBuilder.of("gt.recipe.pcbfactory") .maxIO(6, 9, 3, 0) .minInputs(3, 1) - .progressBar(GT_UITextures.PROGRESSBAR_ASSEMBLE) + .progressBar(GTUITextures.PROGRESSBAR_ASSEMBLE) .disableOptimize() .neiRecipeComparator( Comparator - .<GT_Recipe, Integer>comparing(recipe -> recipe.getMetadataOrDefault(PCBFactoryTierKey.INSTANCE, 1)) - .thenComparing(GT_Recipe::compareTo)) + .<GTRecipe, Integer>comparing(recipe -> recipe.getMetadataOrDefault(PCBFactoryTierKey.INSTANCE, 1)) + .thenComparing(GTRecipe::compareTo)) .build(); public static final RecipeMap<RecipeMapBackend> purificationClarifierRecipes = RecipeMapBuilder .of("gt.recipe.purificationplantclarifier") @@ -1136,12 +1136,12 @@ public final class RecipeMaps { .of("gt.recipe.purificationplantozonation") .maxIO(0, 4, 2, 1) .minInputs(0, 2) - .progressBar(GT_UITextures.PROGRESSBAR_BATH) + .progressBar(GTUITextures.PROGRESSBAR_BATH) .neiRecipeComparator( Comparator - .<GT_Recipe, Float>comparing( + .<GTRecipe, Float>comparing( recipe -> recipe.getMetadataOrDefault(PurificationPlantBaseChanceKey.INSTANCE, 0.0f)) - .thenComparing(GT_Recipe::compareTo)) + .thenComparing(GTRecipe::compareTo)) .frontend(PurificationUnitOzonationFrontend::new) .disableOptimize() .build(); @@ -1149,12 +1149,12 @@ public final class RecipeMaps { .of("gt.recipe.purificationplantflocculation") .maxIO(0, 3, 2, 2) .minInputs(0, 1) - .progressBar(GT_UITextures.PROGRESSBAR_BATH) + .progressBar(GTUITextures.PROGRESSBAR_BATH) .neiRecipeComparator( Comparator - .<GT_Recipe, Float>comparing( + .<GTRecipe, Float>comparing( recipe -> recipe.getMetadataOrDefault(PurificationPlantBaseChanceKey.INSTANCE, 0.0f)) - .thenComparing(GT_Recipe::compareTo)) + .thenComparing(GTRecipe::compareTo)) .frontend(PurificationUnitFlocculatorFrontend::new) .disableOptimize() .build(); @@ -1163,7 +1163,7 @@ public final class RecipeMaps { .of("gt.recipe.purificationplantphadjustment") .maxIO(0, 0, 1, 1) .minInputs(0, 1) - .progressBar(GT_UITextures.PROGRESSBAR_MIXER) + .progressBar(GTUITextures.PROGRESSBAR_MIXER) .frontend(PurificationUnitPhAdjustmentFrontend::new) .disableOptimize() .build(); @@ -1172,7 +1172,7 @@ public final class RecipeMaps { .of("gt.recipe.purificationplantplasmaheating") .maxIO(0, 0, 1, 1) .minInputs(0, 1) - .progressBar(GT_UITextures.PROGRESSBAR_BOILER_HEAT) + .progressBar(GTUITextures.PROGRESSBAR_BOILER_HEAT) .frontend(PurificationUnitPlasmaHeaterFrontend::new) .disableOptimize() .build(); @@ -1180,7 +1180,7 @@ public final class RecipeMaps { .of("gt.recipe.purificationplantuvtreatment") .maxIO(9, 0, 1, 1) .minInputs(0, 1) - .progressBar(GT_UITextures.PROGRESSBAR_ARROW) + .progressBar(GTUITextures.PROGRESSBAR_ARROW) .frontend(PurificationUnitLaserFrontend::new) .disableOptimize() .build(); @@ -1188,14 +1188,14 @@ public final class RecipeMaps { .of("gt.recipe.purificationplantdegasifier") .maxIO(0, 3, 1, 2) .minInputs(0, 1) - .progressBar(GT_UITextures.PROGRESSBAR_ARROW) + .progressBar(GTUITextures.PROGRESSBAR_ARROW) .disableOptimize() .build(); public static final RecipeMap<RecipeMapBackend> purificationParticleExtractionRecipes = RecipeMapBuilder .of("gt.recipe.purificationplantquarkextractor") .maxIO(2, 2, 1, 2) .minInputs(0, 1) - .progressBar(GT_UITextures.PROGRESSBAR_ARROW) + .progressBar(GTUITextures.PROGRESSBAR_ARROW) .frontend(PurificationUnitParticleExtractorFrontend::new) .disableOptimize() .build(); @@ -1203,10 +1203,10 @@ public final class RecipeMaps { .maxIO(1, 1, 0, 0) .minInputs(1, 0) .disableOptimize() - .logo(GT_UITextures.PICTURE_RADIATION_WARNING) + .logo(GTUITextures.PICTURE_RADIATION_WARNING) .logoPos(152, 41) .neiRecipeBackgroundSize(170, 60) - .neiHandlerInfo(builder -> builder.setDisplayStack(GT_ModHandler.getIC2Item("nuclearReactor", 1, null))) + .neiHandlerInfo(builder -> builder.setDisplayStack(GTModHandler.getIC2Item("nuclearReactor", 1, null))) .build(); static { diff --git a/src/main/java/gregtech/api/recipe/check/ResultInsufficientHeat.java b/src/main/java/gregtech/api/recipe/check/ResultInsufficientHeat.java index 9383abad9d..18edab74e7 100644 --- a/src/main/java/gregtech/api/recipe/check/ResultInsufficientHeat.java +++ b/src/main/java/gregtech/api/recipe/check/ResultInsufficientHeat.java @@ -11,7 +11,7 @@ import net.minecraft.util.StatCollector; import org.jetbrains.annotations.NotNull; import gregtech.api.enums.HeatingCoilLevel; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTUtility; public class ResultInsufficientHeat implements CheckRecipeResult { @@ -38,7 +38,7 @@ public class ResultInsufficientHeat implements CheckRecipeResult { return Objects.requireNonNull( StatCollector.translateToLocalFormatted( "GT5U.gui.text.insufficient_heat", - GT_Utility.formatNumbers(required), + GTUtility.formatNumbers(required), HeatingCoilLevel.getDisplayNameFromHeat(required, true))); } diff --git a/src/main/java/gregtech/api/recipe/check/ResultInsufficientMachineTier.java b/src/main/java/gregtech/api/recipe/check/ResultInsufficientMachineTier.java index 1fb2183edb..2f144049f1 100644 --- a/src/main/java/gregtech/api/recipe/check/ResultInsufficientMachineTier.java +++ b/src/main/java/gregtech/api/recipe/check/ResultInsufficientMachineTier.java @@ -10,7 +10,7 @@ import net.minecraft.util.StatCollector; import org.jetbrains.annotations.NotNull; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTUtility; public class ResultInsufficientMachineTier implements CheckRecipeResult { @@ -37,7 +37,7 @@ public class ResultInsufficientMachineTier implements CheckRecipeResult { return Objects.requireNonNull( StatCollector.translateToLocalFormatted( "GT5U.gui.text.insufficient_machine_tier", - GT_Utility.formatNumbers(required))); + GTUtility.formatNumbers(required))); } @Override diff --git a/src/main/java/gregtech/api/recipe/check/ResultInsufficientPower.java b/src/main/java/gregtech/api/recipe/check/ResultInsufficientPower.java index 45b50aebf6..33b86ecbf8 100644 --- a/src/main/java/gregtech/api/recipe/check/ResultInsufficientPower.java +++ b/src/main/java/gregtech/api/recipe/check/ResultInsufficientPower.java @@ -10,7 +10,7 @@ import net.minecraft.util.StatCollector; import org.jetbrains.annotations.NotNull; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTUtility; public class ResultInsufficientPower implements CheckRecipeResult { @@ -37,8 +37,8 @@ public class ResultInsufficientPower implements CheckRecipeResult { return Objects.requireNonNull( StatCollector.translateToLocalFormatted( "GT5U.gui.text.insufficient_power", - GT_Utility.formatNumbers(required), - GT_Utility.getColoredTierNameFromVoltage(required))); + GTUtility.formatNumbers(required), + GTUtility.getColoredTierNameFromVoltage(required))); } @Override diff --git a/src/main/java/gregtech/api/recipe/check/ResultInsufficientStartupPower.java b/src/main/java/gregtech/api/recipe/check/ResultInsufficientStartupPower.java index c33e9bfff1..9adf82aa28 100644 --- a/src/main/java/gregtech/api/recipe/check/ResultInsufficientStartupPower.java +++ b/src/main/java/gregtech/api/recipe/check/ResultInsufficientStartupPower.java @@ -10,7 +10,7 @@ import net.minecraft.util.StatCollector; import org.jetbrains.annotations.NotNull; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTUtility; public class ResultInsufficientStartupPower implements CheckRecipeResult { @@ -37,7 +37,7 @@ public class ResultInsufficientStartupPower implements CheckRecipeResult { return Objects.requireNonNull( StatCollector.translateToLocalFormatted( "GT5U.gui.text.insufficient_startup_power", - GT_Utility.formatNumbers(required))); + GTUtility.formatNumbers(required))); } @Override diff --git a/src/main/java/gregtech/api/recipe/check/ResultInsufficientStartupPowerBigInt.java b/src/main/java/gregtech/api/recipe/check/ResultInsufficientStartupPowerBigInt.java index f4b186c9a1..32aab79465 100644 --- a/src/main/java/gregtech/api/recipe/check/ResultInsufficientStartupPowerBigInt.java +++ b/src/main/java/gregtech/api/recipe/check/ResultInsufficientStartupPowerBigInt.java @@ -1,6 +1,6 @@ package gregtech.api.recipe.check; -import static util.Util.toStandardForm; +import static kekztech.util.Util.toStandardForm; import java.math.BigInteger; import java.util.Objects; diff --git a/src/main/java/gregtech/api/recipe/check/SingleRecipeCheck.java b/src/main/java/gregtech/api/recipe/check/SingleRecipeCheck.java index 8683812d84..d339f8acfd 100644 --- a/src/main/java/gregtech/api/recipe/check/SingleRecipeCheck.java +++ b/src/main/java/gregtech/api/recipe/check/SingleRecipeCheck.java @@ -22,11 +22,11 @@ import net.minecraftforge.fluids.FluidStack; import com.google.common.collect.ImmutableMap; -import gregtech.api.enums.GT_Values; +import gregtech.api.enums.GTValues; import gregtech.api.recipe.RecipeMap; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gregtech.api.util.GT_Utility.ItemId; +import gregtech.api.util.GTRecipe; +import gregtech.api.util.GTUtility; +import gregtech.api.util.GTUtility.ItemId; /** * Used by machines that are locked to a single recipe, for faster recipe check. @@ -37,10 +37,10 @@ import gregtech.api.util.GT_Utility.ItemId; * <ul> * {@link gregtech.api.recipe.FindRecipeQuery#find Find recipe from recipemap}: O(NCR) * where N = number of machine inputs, C = average amount of recipe candidates found for specific input, - * R = computation time to {@link GT_Recipe#isRecipeInputEqual check if inputs match to recipe} + * R = computation time to {@link GTRecipe#isRecipeInputEqual check if inputs match to recipe} * </ul> * <ul> - * {@link GT_Recipe#isRecipeInputEqual Check if inputs match to recipe}: O(NM) + * {@link GTRecipe#isRecipeInputEqual Check if inputs match to recipe}: O(NM) * where N = number of machine inputs, M = number of recipe inputs * </ul> * </ul> @@ -52,7 +52,7 @@ import gregtech.api.util.GT_Utility.ItemId; public class SingleRecipeCheck { @Nonnull - private final GT_Recipe recipe; + private final GTRecipe recipe; @Nonnull private final RecipeMap<?> recipeMap; @Nonnull @@ -63,7 +63,7 @@ public class SingleRecipeCheck { private final int totalItemCost; private final int totalFluidCost; - private SingleRecipeCheck(@Nonnull GT_Recipe recipe, @Nonnull RecipeMap<?> recipeMap, + private SingleRecipeCheck(@Nonnull GTRecipe recipe, @Nonnull RecipeMap<?> recipeMap, @Nonnull ImmutableMap<ItemId, Integer> itemCost, @Nonnull ImmutableMap<Fluid, Integer> fluidCost) { this.recipe = recipe; this.recipeMap = recipeMap; @@ -81,7 +81,7 @@ public class SingleRecipeCheck { } @Nonnull - public GT_Recipe getRecipe() { + public GTRecipe getRecipe() { return recipe; } @@ -188,14 +188,14 @@ public class SingleRecipeCheck { // At load time we do a recipe check again, so in case the recipe is gone, we can stop tracking. // Of course the next step would be auto migrating to new recipe (if any), but given // we don't yet have a mean to uniquely name a recipe, this will have to make do. - // Consider move serialization code to GT_Recipe once this has been proven to work + // Consider move serialization code to GTRecipe once this has been proven to work NBTTagCompound tag = new NBTTagCompound(); tag.setString("recipemap", recipeMap.unlocalizedName); if (recipe.mInputs != null) { - tag.setTag("inputs", writeList(recipe.mInputs, GT_Utility::saveItem)); + tag.setTag("inputs", writeList(recipe.mInputs, GTUtility::saveItem)); } if (recipe.mOutputs != null) { - tag.setTag("outputs", writeList(recipe.mOutputs, GT_Utility::saveItem)); + tag.setTag("outputs", writeList(recipe.mOutputs, GTUtility::saveItem)); } if (recipe.mChances != null) { tag.setIntArray("chances", recipe.mChances); @@ -270,45 +270,44 @@ public class SingleRecipeCheck { return null; } - GT_Recipe foundRecipe = tryFindRecipe(mapToUse, tag); + GTRecipe foundRecipe = tryFindRecipe(mapToUse, tag); if (foundRecipe == null) return null; return new SingleRecipeCheck(foundRecipe, mapToUse, loadItemCost(tag), loadFluidCost(tag)); } private static ImmutableMap<Fluid, Integer> loadFluidCost(NBTTagCompound tag) { - return GT_Utility.streamCompounds(tag.getTagList("fluidCost", Constants.NBT.TAG_COMPOUND)) + return GTUtility.streamCompounds(tag.getTagList("fluidCost", Constants.NBT.TAG_COMPOUND)) .collect( - GT_Utility + GTUtility .toImmutableMapSerial(t -> FluidRegistry.getFluid(t.getString("id")), t -> t.getInteger("count"))); } private static ImmutableMap<ItemId, Integer> loadItemCost(NBTTagCompound tag) { - return GT_Utility.streamCompounds(tag.getTagList("itemCost", Constants.NBT.TAG_COMPOUND)) + return GTUtility.streamCompounds(tag.getTagList("itemCost", Constants.NBT.TAG_COMPOUND)) .collect( - GT_Utility - .toImmutableMapSerial(t -> ItemId.create(t.getCompoundTag("id")), t -> t.getInteger("count"))); + GTUtility.toImmutableMapSerial(t -> ItemId.create(t.getCompoundTag("id")), t -> t.getInteger("count"))); } - private static GT_Recipe tryFindRecipe(@Nonnull RecipeMap<?> recipeMap, NBTTagCompound tag) { - ItemStack[] inputs = GT_Utility.streamCompounds(tag.getTagList("inputs", Constants.NBT.TAG_COMPOUND)) - .map(GT_Utility::loadItem) + private static GTRecipe tryFindRecipe(@Nonnull RecipeMap<?> recipeMap, NBTTagCompound tag) { + ItemStack[] inputs = GTUtility.streamCompounds(tag.getTagList("inputs", Constants.NBT.TAG_COMPOUND)) + .map(GTUtility::loadItem) .toArray(ItemStack[]::new); - ItemStack[] outputs = GT_Utility.streamCompounds(tag.getTagList("outputs", Constants.NBT.TAG_COMPOUND)) - .map(GT_Utility::loadItem) + ItemStack[] outputs = GTUtility.streamCompounds(tag.getTagList("outputs", Constants.NBT.TAG_COMPOUND)) + .map(GTUtility::loadItem) .toArray(ItemStack[]::new); - FluidStack[] fInputs = GT_Utility.streamCompounds(tag.getTagList("fInputs", Constants.NBT.TAG_COMPOUND)) + FluidStack[] fInputs = GTUtility.streamCompounds(tag.getTagList("fInputs", Constants.NBT.TAG_COMPOUND)) .map(FluidStack::loadFluidStackFromNBT) .toArray(FluidStack[]::new); - FluidStack[] fOutputs = GT_Utility.streamCompounds(tag.getTagList("fOutputs", Constants.NBT.TAG_COMPOUND)) + FluidStack[] fOutputs = GTUtility.streamCompounds(tag.getTagList("fOutputs", Constants.NBT.TAG_COMPOUND)) .map(FluidStack::loadFluidStackFromNBT) .toArray(FluidStack[]::new); int eut = tag.getInteger("eut"); - GT_Recipe found = recipeMap.findRecipe(null, false, GT_Values.V[GT_Utility.getTier(eut)], fInputs, inputs); + GTRecipe found = recipeMap.findRecipe(null, false, GTValues.V[GTUtility.getTier(eut)], fInputs, inputs); int[] chances = tag.getIntArray("chances"); if (chances.length == 0) chances = null; - if (found == null || !GT_Utility.equals(inputs, found.mInputs) + if (found == null || !GTUtility.equals(inputs, found.mInputs) || !Arrays.equals(fInputs, found.mFluidInputs) - || !GT_Utility.equals(outputs, found.mOutputs) + || !GTUtility.equals(outputs, found.mOutputs) || !Arrays.equals(fOutputs, found.mFluidOutputs) || !Arrays.equals(chances, found.mChances) || found.mDuration != tag.getInteger("duration") @@ -350,7 +349,7 @@ public class SingleRecipeCheck { private Map<ItemId, Integer> afterItems; private Map<Fluid, Integer> afterFluids; - private GT_Recipe recipe; + private GTRecipe recipe; private Builder(@Nonnull RecipeMap<?> recipeMap) { this.recipeMap = recipeMap; @@ -368,7 +367,7 @@ public class SingleRecipeCheck { return this; } - public Builder setRecipe(@Nonnull GT_Recipe recipe) { + public Builder setRecipe(@Nonnull GTRecipe recipe) { this.recipe = recipe; return this; } 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) diff --git a/src/main/java/gregtech/api/recipe/metadata/CompressionTierKey.java b/src/main/java/gregtech/api/recipe/metadata/CompressionTierKey.java index 384b5ce2d9..88bd3d6664 100644 --- a/src/main/java/gregtech/api/recipe/metadata/CompressionTierKey.java +++ b/src/main/java/gregtech/api/recipe/metadata/CompressionTierKey.java @@ -1,6 +1,6 @@ package gregtech.api.recipe.metadata; -import static gregtech.api.util.GT_Utility.trans; +import static gregtech.api.util.GTUtility.trans; import javax.annotation.Nullable; import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/main/java/gregtech/api/recipe/metadata/PCBFactoryTierKey.java b/src/main/java/gregtech/api/recipe/metadata/PCBFactoryTierKey.java index 05db919b57..ada5574b01 100644 --- a/src/main/java/gregtech/api/recipe/metadata/PCBFactoryTierKey.java +++ b/src/main/java/gregtech/api/recipe/metadata/PCBFactoryTierKey.java @@ -1,6 +1,6 @@ package gregtech.api.recipe.metadata; -import static gregtech.api.util.GT_Utility.trans; +import static gregtech.api.util.GTUtility.trans; import javax.annotation.Nullable; import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/main/java/gregtech/api/recipe/metadata/PCBFactoryUpgradeKey.java b/src/main/java/gregtech/api/recipe/metadata/PCBFactoryUpgradeKey.java index 8257f1e6ef..4891c88848 100644 --- a/src/main/java/gregtech/api/recipe/metadata/PCBFactoryUpgradeKey.java +++ b/src/main/java/gregtech/api/recipe/metadata/PCBFactoryUpgradeKey.java @@ -1,6 +1,6 @@ package gregtech.api.recipe.metadata; -import static gregtech.api.util.GT_Utility.trans; +import static gregtech.api.util.GTUtility.trans; import javax.annotation.Nullable; import javax.annotation.ParametersAreNonnullByDefault; |