aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java
diff options
context:
space:
mode:
authorJakub <53441451+kuba6000@users.noreply.github.com>2022-08-29 16:04:28 +0200
committerGitHub <noreply@github.com>2022-08-29 16:04:28 +0200
commit7d1f51a8937e0a86486267437d444696e81e8aa0 (patch)
treea5b145e7271998f7b4b968a2212ed487e54a92b5 /src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java
parent5267969156d30b4bb5f4cb2279ebb49db6bd40e2 (diff)
downloadGT5-Unofficial-7d1f51a8937e0a86486267437d444696e81e8aa0.tar.gz
GT5-Unofficial-7d1f51a8937e0a86486267437d444696e81e8aa0.tar.bz2
GT5-Unofficial-7d1f51a8937e0a86486267437d444696e81e8aa0.zip
Buildscript + Spotless (#318)
* Convert AES.java to readable class * Buildscript * Spotless
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java')
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java71
1 files changed, 38 insertions, 33 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java
index 7355ac7dc0..bf9ef18720 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java
@@ -1,8 +1,5 @@
package gtPlusPlus.xmod.gregtech.loaders;
-import java.util.HashSet;
-import java.util.Set;
-
import gregtech.api.enums.GT_Values;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.api.interfaces.RunnableWithInfo;
@@ -10,38 +7,46 @@ import gtPlusPlus.core.material.Material;
import gtPlusPlus.core.material.MaterialGenerator;
import gtPlusPlus.core.recipe.common.CI;
import gtPlusPlus.core.util.minecraft.ItemUtils;
+import java.util.HashSet;
+import java.util.Set;
import net.minecraft.item.ItemStack;
public class RecipeGen_Plasma extends RecipeGen_Base {
- public final static Set<RunnableWithInfo<Material>> mRecipeGenMap = new HashSet<RunnableWithInfo<Material>>();
- static {
- MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap);
- }
-
- public RecipeGen_Plasma(final Material M){
- this.toGenerate = M;
- mRecipeGenMap.add(this);
- }
-
- @Override
- public void run() {
- generateRecipes(this.toGenerate);
- }
-
- private void generateRecipes(final Material material) {
- if (material.getPlasma() != null) {
- // Cool Plasma
- ItemStack aPlasmaCell = material.getPlasmaCell(1);
- ItemStack aCell = material.getCell(1);
- ItemStack aContainerItem = GT_Utility.getFluidForFilledItem(aPlasmaCell, true) == null ? GT_Utility.getContainerItem(aPlasmaCell, true) : CI.emptyCells(1);
- if (ItemUtils.checkForInvalidItems(new ItemStack[] {aPlasmaCell, aContainerItem})){
- GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, aPlasmaCell), aContainerItem, (int) Math.max(1024L, 1024L * material.getMass()), 4);
- }
- if (ItemUtils.checkForInvalidItems(new ItemStack[] {aCell, aPlasmaCell})){
- GT_Values.RA.addVacuumFreezerRecipe(aPlasmaCell, aCell, (int) Math.max(material.getMass() * 2L, 1L));
- }
- }
- }
-
+ public static final Set<RunnableWithInfo<Material>> mRecipeGenMap = new HashSet<RunnableWithInfo<Material>>();
+
+ static {
+ MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap);
+ }
+
+ public RecipeGen_Plasma(final Material M) {
+ this.toGenerate = M;
+ mRecipeGenMap.add(this);
+ }
+
+ @Override
+ public void run() {
+ generateRecipes(this.toGenerate);
+ }
+
+ private void generateRecipes(final Material material) {
+ if (material.getPlasma() != null) {
+ // Cool Plasma
+ ItemStack aPlasmaCell = material.getPlasmaCell(1);
+ ItemStack aCell = material.getCell(1);
+ ItemStack aContainerItem = GT_Utility.getFluidForFilledItem(aPlasmaCell, true) == null
+ ? GT_Utility.getContainerItem(aPlasmaCell, true)
+ : CI.emptyCells(1);
+ if (ItemUtils.checkForInvalidItems(new ItemStack[] {aPlasmaCell, aContainerItem})) {
+ GT_Values.RA.addFuel(
+ GT_Utility.copyAmount(1L, aPlasmaCell),
+ aContainerItem,
+ (int) Math.max(1024L, 1024L * material.getMass()),
+ 4);
+ }
+ if (ItemUtils.checkForInvalidItems(new ItemStack[] {aCell, aPlasmaCell})) {
+ GT_Values.RA.addVacuumFreezerRecipe(aPlasmaCell, aCell, (int) Math.max(material.getMass() * 2L, 1L));
+ }
+ }
+ }
}