aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/logic
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/api/logic')
-rw-r--r--src/main/java/gregtech/api/logic/AbstractProcessingLogic.java24
-rw-r--r--src/main/java/gregtech/api/logic/ItemInventoryLogic.java8
-rw-r--r--src/main/java/gregtech/api/logic/MuTEProcessingLogic.java24
-rw-r--r--src/main/java/gregtech/api/logic/PowerLogic.java10
-rw-r--r--src/main/java/gregtech/api/logic/ProcessingLogic.java24
5 files changed, 45 insertions, 45 deletions
diff --git a/src/main/java/gregtech/api/logic/AbstractProcessingLogic.java b/src/main/java/gregtech/api/logic/AbstractProcessingLogic.java
index 3c05d8bed0..ed953d9477 100644
--- a/src/main/java/gregtech/api/logic/AbstractProcessingLogic.java
+++ b/src/main/java/gregtech/api/logic/AbstractProcessingLogic.java
@@ -11,9 +11,9 @@ import gregtech.api.interfaces.tileentity.IVoidable;
import gregtech.api.recipe.RecipeMap;
import gregtech.api.recipe.check.CheckRecipeResult;
import gregtech.api.recipe.check.CheckRecipeResultRegistry;
-import gregtech.api.util.GT_OverclockCalculator;
-import gregtech.api.util.GT_ParallelHelper;
-import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GTRecipe;
+import gregtech.api.util.OverclockCalculator;
+import gregtech.api.util.ParallelHelper;
/**
* Logic class to calculate result of recipe check from inputs.
@@ -23,7 +23,7 @@ public abstract class AbstractProcessingLogic<P extends AbstractProcessingLogic<
protected IVoidable machine;
protected Supplier<RecipeMap<?>> recipeMapSupplier;
- protected GT_Recipe lastRecipe;
+ protected GTRecipe lastRecipe;
protected RecipeMap<?> lastRecipeMap;
protected ItemStack[] outputItems;
protected FluidStack[] outputFluids;
@@ -229,8 +229,8 @@ public abstract class AbstractProcessingLogic<P extends AbstractProcessingLogic<
* At this point, inputs have been already consumed.
*/
@Nonnull
- protected CheckRecipeResult applyRecipe(@Nonnull GT_Recipe recipe, @Nonnull GT_ParallelHelper helper,
- @Nonnull GT_OverclockCalculator calculator, @Nonnull CheckRecipeResult result) {
+ protected CheckRecipeResult applyRecipe(@Nonnull GTRecipe recipe, @Nonnull ParallelHelper helper,
+ @Nonnull OverclockCalculator calculator, @Nonnull CheckRecipeResult result) {
if (recipe.mCanBeBuffered) {
lastRecipe = recipe;
} else {
@@ -267,8 +267,8 @@ public abstract class AbstractProcessingLogic<P extends AbstractProcessingLogic<
/**
* Override to tweak final duration that will be set as a result of this logic class.
*/
- protected double calculateDuration(@Nonnull GT_Recipe recipe, @Nonnull GT_ParallelHelper helper,
- @Nonnull GT_OverclockCalculator calculator) {
+ protected double calculateDuration(@Nonnull GTRecipe recipe, @Nonnull ParallelHelper helper,
+ @Nonnull OverclockCalculator calculator) {
return calculator.getDuration() * helper.getDurationMultiplierDouble();
}
@@ -276,7 +276,7 @@ public abstract class AbstractProcessingLogic<P extends AbstractProcessingLogic<
* Override to do additional check for found recipe if needed.
*/
@Nonnull
- protected CheckRecipeResult validateRecipe(@Nonnull GT_Recipe recipe) {
+ protected CheckRecipeResult validateRecipe(@Nonnull GTRecipe recipe) {
return CheckRecipeResultRegistry.SUCCESSFUL;
}
@@ -289,7 +289,7 @@ public abstract class AbstractProcessingLogic<P extends AbstractProcessingLogic<
* all inputs!
*/
@Nonnull
- protected CheckRecipeResult onRecipeStart(@Nonnull GT_Recipe recipe) {
+ protected CheckRecipeResult onRecipeStart(@Nonnull GTRecipe recipe) {
return CheckRecipeResultRegistry.SUCCESSFUL;
}
@@ -297,8 +297,8 @@ public abstract class AbstractProcessingLogic<P extends AbstractProcessingLogic<
* Override to tweak overclock logic if needed.
*/
@Nonnull
- protected GT_OverclockCalculator createOverclockCalculator(@Nonnull GT_Recipe recipe) {
- return new GT_OverclockCalculator().setRecipeEUt(recipe.mEUt)
+ protected OverclockCalculator createOverclockCalculator(@Nonnull GTRecipe recipe) {
+ return new OverclockCalculator().setRecipeEUt(recipe.mEUt)
.setAmperage(availableAmperage)
.setEUt(availableVoltage)
.setDuration(recipe.mDuration)
diff --git a/src/main/java/gregtech/api/logic/ItemInventoryLogic.java b/src/main/java/gregtech/api/logic/ItemInventoryLogic.java
index 69005216b8..22d4a9a627 100644
--- a/src/main/java/gregtech/api/logic/ItemInventoryLogic.java
+++ b/src/main/java/gregtech/api/logic/ItemInventoryLogic.java
@@ -25,12 +25,12 @@ import com.gtnewhorizons.modularui.api.widget.Widget;
import com.gtnewhorizons.modularui.common.widget.Scrollable;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
-import gregtech.api.util.GT_Utility;
+import gregtech.api.util.GTUtility;
import gregtech.api.util.item.ItemHolder;
/**
* Generic Item logic for MuTEs.
- *
+ *
* @author BlueWeabo
*/
public class ItemInventoryLogic {
@@ -101,7 +101,7 @@ public class ItemInventoryLogic {
}
/**
- *
+ *
* @return The Item Inventory Logic as an NBTTagCompound to be saved in another nbt as how one wants.
*/
@Nonnull
@@ -150,7 +150,7 @@ public class ItemInventoryLogic {
final NBTTagCompound tNBT = nbtList.getCompoundTagAt(i);
final int tSlot = tNBT.getShort("s");
if (tSlot >= 0 && tSlot < inventory.getSlots()) {
- inventory.setStackInSlot(tSlot, GT_Utility.loadItem(tNBT));
+ inventory.setStackInSlot(tSlot, GTUtility.loadItem(tNBT));
}
}
}
diff --git a/src/main/java/gregtech/api/logic/MuTEProcessingLogic.java b/src/main/java/gregtech/api/logic/MuTEProcessingLogic.java
index da53c8875d..0d6bf4cac9 100644
--- a/src/main/java/gregtech/api/logic/MuTEProcessingLogic.java
+++ b/src/main/java/gregtech/api/logic/MuTEProcessingLogic.java
@@ -24,10 +24,10 @@ import gregtech.api.logic.interfaces.ProcessingLogicHost;
import gregtech.api.recipe.RecipeMap;
import gregtech.api.recipe.check.CheckRecipeResult;
import gregtech.api.recipe.check.CheckRecipeResultRegistry;
-import gregtech.api.util.GT_OverclockCalculator;
-import gregtech.api.util.GT_ParallelHelper;
-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.OverclockCalculator;
+import gregtech.api.util.ParallelHelper;
/**
* Processing logic class, dedicated for MultiTileEntities.
@@ -81,13 +81,13 @@ public class MuTEProcessingLogic<P extends MuTEProcessingLogic<P>> extends Abstr
}
@Nonnull
- protected CheckRecipeResult processRecipe(@Nonnull List<GT_Recipe> recipes, @Nonnull ItemInventoryLogic itemInput,
+ protected CheckRecipeResult processRecipe(@Nonnull List<GTRecipe> recipes, @Nonnull ItemInventoryLogic itemInput,
@Nonnull FluidInventoryLogic fluidInput) {
CheckRecipeResult result = CheckRecipeResultRegistry.INTERNAL_ERROR;
- for (GT_Recipe recipe : recipes) {
+ for (GTRecipe recipe : recipes) {
Objects.requireNonNull(recipe);
- GT_ParallelHelper helper = createParallelHelper(recipe, itemInput, fluidInput);
- GT_OverclockCalculator calculator = createOverclockCalculator(recipe);
+ ParallelHelper helper = createParallelHelper(recipe, itemInput, fluidInput);
+ OverclockCalculator calculator = createOverclockCalculator(recipe);
helper.setCalculator(calculator);
helper.build();
result = helper.getResult();
@@ -112,9 +112,9 @@ public class MuTEProcessingLogic<P extends MuTEProcessingLogic<P>> extends Abstr
}
@Nonnull
- protected GT_ParallelHelper createParallelHelper(@Nonnull GT_Recipe recipe, @Nonnull ItemInventoryLogic itemInput,
+ protected ParallelHelper createParallelHelper(@Nonnull GTRecipe recipe, @Nonnull ItemInventoryLogic itemInput,
@Nonnull FluidInventoryLogic fluidInput) {
- return new GT_ParallelHelper().setRecipe(recipe)
+ return new ParallelHelper().setRecipe(recipe)
.setItemInputInventory(itemInput)
.setFluidInputInventory(fluidInput)
.setAvailableEUt(availableVoltage * availableAmperage)
@@ -197,7 +197,7 @@ public class MuTEProcessingLogic<P extends MuTEProcessingLogic<P>> extends Abstr
if (outputItems != null) {
NBTTagList itemOutputsNBT = new NBTTagList();
for (ItemStack item : outputItems) {
- itemOutputsNBT.appendTag(GT_Utility.saveItem(item));
+ itemOutputsNBT.appendTag(GTUtility.saveItem(item));
}
logicNBT.setTag("itemOutputs", itemOutputsNBT);
}
@@ -226,7 +226,7 @@ public class MuTEProcessingLogic<P extends MuTEProcessingLogic<P>> extends Abstr
NBTTagList itemOutputsNBT = logicNBT.getTagList("itemOutputs", TAG_COMPOUND);
outputItems = new ItemStack[itemOutputsNBT.tagCount()];
for (int i = 0; i < itemOutputsNBT.tagCount(); i++) {
- outputItems[i] = GT_Utility.loadItem(itemOutputsNBT.getCompoundTagAt(i));
+ outputItems[i] = GTUtility.loadItem(itemOutputsNBT.getCompoundTagAt(i));
}
}
if (logicNBT.hasKey("fluidOutputs")) {
diff --git a/src/main/java/gregtech/api/logic/PowerLogic.java b/src/main/java/gregtech/api/logic/PowerLogic.java
index ad19987a76..afc1877deb 100644
--- a/src/main/java/gregtech/api/logic/PowerLogic.java
+++ b/src/main/java/gregtech/api/logic/PowerLogic.java
@@ -8,12 +8,12 @@ import javax.annotation.Nonnull;
import net.minecraft.nbt.NBTTagCompound;
-import gregtech.api.enums.GT_Values.NBT;
+import gregtech.api.enums.GTValues.NBT;
/**
* Power logic for machines. This is used to store all the important variables for a machine to have energy and use it
* in any way.
- *
+ *
* @author BlueWeabo, Maxim
*/
public class PowerLogic {
@@ -122,7 +122,7 @@ public class PowerLogic {
/**
* Injecting energy in the multiblock ampere per ampere until full or until we have added the maximum possible
* amperes for this tick
- *
+ *
* @param voltage At what voltage are the amps?
* @param availableAmperage How much amperage do we have available
* @return Amount of amperes used
@@ -218,7 +218,7 @@ public class PowerLogic {
/**
* Saves the power logic to its own nbt tag before saving it to the given one.
- *
+ *
* @param nbt Tag where you want to save the power logic tag to.
*/
public void saveToNBT(NBTTagCompound nbt) {
@@ -233,7 +233,7 @@ public class PowerLogic {
/**
* Loads the power logic from its own nbt after getting it from the given one
- *
+ *
* @param nbt Tag where the power logic tag was saved to
*/
public void loadFromNBT(NBTTagCompound nbt) {
diff --git a/src/main/java/gregtech/api/logic/ProcessingLogic.java b/src/main/java/gregtech/api/logic/ProcessingLogic.java
index 4d203ed80f..63c8f6494e 100644
--- a/src/main/java/gregtech/api/logic/ProcessingLogic.java
+++ b/src/main/java/gregtech/api/logic/ProcessingLogic.java
@@ -14,9 +14,9 @@ import gregtech.api.recipe.RecipeMap;
import gregtech.api.recipe.check.CheckRecipeResult;
import gregtech.api.recipe.check.CheckRecipeResultRegistry;
import gregtech.api.recipe.check.SingleRecipeCheck;
-import gregtech.api.util.GT_OverclockCalculator;
-import gregtech.api.util.GT_ParallelHelper;
-import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GTRecipe;
+import gregtech.api.util.OverclockCalculator;
+import gregtech.api.util.ParallelHelper;
/**
* Logic class to calculate result of recipe check from inputs, based on recipemap.
@@ -119,10 +119,10 @@ public class ProcessingLogic extends AbstractProcessingLogic<ProcessingLogic> {
recipeLockableMachine.getSingleRecipeCheck()
.getRecipe()).checkRecipeResult;
}
- Stream<GT_Recipe> matchedRecipes = findRecipeMatches(recipeMap);
- Iterable<GT_Recipe> recipeIterable = matchedRecipes::iterator;
+ Stream<GTRecipe> matchedRecipes = findRecipeMatches(recipeMap);
+ Iterable<GTRecipe> recipeIterable = matchedRecipes::iterator;
CheckRecipeResult checkRecipeResult = CheckRecipeResultRegistry.NO_RECIPE;
- for (GT_Recipe matchedRecipe : recipeIterable) {
+ for (GTRecipe matchedRecipe : recipeIterable) {
CalculationResult foundResult = validateAndCalculateRecipe(matchedRecipe);
if (foundResult.successfullyConsumedInputs) {
// Successfully found and set recipe, so return it
@@ -143,14 +143,14 @@ public class ProcessingLogic extends AbstractProcessingLogic<ProcessingLogic> {
* @param recipe The recipe which will be checked and processed
*/
@Nonnull
- private CalculationResult validateAndCalculateRecipe(@Nonnull GT_Recipe recipe) {
+ private CalculationResult validateAndCalculateRecipe(@Nonnull GTRecipe recipe) {
CheckRecipeResult result = validateRecipe(recipe);
if (!result.wasSuccessful()) {
return CalculationResult.ofFailure(result);
}
- GT_ParallelHelper helper = createParallelHelper(recipe);
- GT_OverclockCalculator calculator = createOverclockCalculator(recipe);
+ ParallelHelper helper = createParallelHelper(recipe);
+ OverclockCalculator calculator = createOverclockCalculator(recipe);
helper.setCalculator(calculator);
helper.build();
@@ -170,7 +170,7 @@ public class ProcessingLogic extends AbstractProcessingLogic<ProcessingLogic> {
* Override this method if it doesn't work with normal recipemaps.
*/
@Nonnull
- protected Stream<GT_Recipe> findRecipeMatches(@Nullable RecipeMap<?> map) {
+ protected Stream<GTRecipe> findRecipeMatches(@Nullable RecipeMap<?> map) {
if (map == null) {
return Stream.empty();
}
@@ -186,8 +186,8 @@ public class ProcessingLogic extends AbstractProcessingLogic<ProcessingLogic> {
* Override to tweak parallel logic if needed.
*/
@Nonnull
- protected GT_ParallelHelper createParallelHelper(@Nonnull GT_Recipe recipe) {
- return new GT_ParallelHelper().setRecipe(recipe)
+ protected ParallelHelper createParallelHelper(@Nonnull GTRecipe recipe) {
+ return new ParallelHelper().setRecipe(recipe)
.setItemInputs(inputItems)
.setFluidInputs(inputFluids)
.setAvailableEUt(availableVoltage * availableAmperage)