aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authormiozune <miozune@gmail.com>2023-01-03 01:33:09 +0900
committerGitHub <noreply@github.com>2023-01-02 17:33:09 +0100
commit08e3d8cc083e46da43ce03541576729457726ccd (patch)
tree7652c9c8de337075734b1d3bbd65422c3cb11c64 /src/main
parentc45afc21d24c5774b9f24313562517185d792234 (diff)
downloadGT5-Unofficial-08e3d8cc083e46da43ce03541576729457726ccd.tar.gz
GT5-Unofficial-08e3d8cc083e46da43ce03541576729457726ccd.tar.bz2
GT5-Unofficial-08e3d8cc083e46da43ce03541576729457726ccd.zip
Move NEI handlers to new recipemap methods (#470)
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/gregtech/api/util/GTPP_Recipe.java202
-rw-r--r--src/main/java/gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java64
-rw-r--r--src/main/java/gtPlusPlus/nei/GT_NEI_FluidReactor.java41
-rw-r--r--src/main/java/gtPlusPlus/nei/GT_NEI_LFTR.java43
-rw-r--r--src/main/java/gtPlusPlus/nei/GT_NEI_MultiSolarTower.java36
-rw-r--r--src/main/java/gtPlusPlus/nei/GT_NEI_MultiTreeGrowthSimulator.java57
-rw-r--r--src/main/java/gtPlusPlus/nei/NEI_GT_Config.java15
-rw-r--r--src/main/java/gtPlusPlus/nei/NEI_IMC_Sender.java3
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java4
9 files changed, 149 insertions, 316 deletions
diff --git a/src/main/java/gregtech/api/util/GTPP_Recipe.java b/src/main/java/gregtech/api/util/GTPP_Recipe.java
index 7bca0da4df..da642e378e 100644
--- a/src/main/java/gregtech/api/util/GTPP_Recipe.java
+++ b/src/main/java/gregtech/api/util/GTPP_Recipe.java
@@ -1,14 +1,21 @@
package gregtech.api.util;
import static gregtech.api.enums.GT_Values.*;
+import static net.minecraft.util.EnumChatFormatting.GRAY;
import com.gtnewhorizons.modularui.api.math.Pos2d;
import com.gtnewhorizons.modularui.common.widget.ProgressBar;
import com.gtnewhorizons.modularui.common.widget.ProgressBar.Direction;
import gregtech.api.gui.modularui.GT_UITextures;
+import gregtech.common.gui.modularui.UIHelper;
+import gregtech.nei.GT_NEI_DefaultHandler.FixedPositionedStack;
+import gregtech.nei.NEIRecipeInfo;
import gtPlusPlus.api.interfaces.IComparableRecipe;
import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.util.math.MathUtils;
+import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.xmod.gregtech.api.gui.GTPP_UITextures;
import java.util.*;
import net.minecraft.item.ItemStack;
@@ -328,28 +335,54 @@ public class GTPP_Recipe extends GT_Recipe implements IComparableRecipe {
1,
" EU/t per Dynamo",
true,
- false)
+ true)
.setUsualFluidInputCount(6)
- .setUsualFluidOutputCount(6);
+ .setUsualFluidOutputCount(6)
+ .setNEISpecialInfoFormatter((recipeInfo, applyPrefixAndSuffix) -> {
+ final long tEUt = recipeInfo.recipe.mSpecialValue;
+ final int tDuration = recipeInfo.recipe.mDuration;
+ return Arrays.asList(
+ applyPrefixAndSuffix.apply(recipeInfo.recipe.mSpecialValue),
+ "Dynamo: " + MathUtils.formatNumbers(tDuration * tEUt) + " EU",
+ "Total: " + MathUtils.formatNumbers(tDuration * tEUt * 4) + " EU");
+ });
// Ore Milling Map
public static final GT_Recipe_Map sOreMillRecipes = new GT_Recipe_Map(
- new HashSet<>(10000),
- "gtpp.recipe.oremill",
- "Milling",
- null,
- RES_PATH_GUI + "basicmachines/LFTR",
- 3,
- 3,
- 1,
- 0,
- 1,
- E,
- 1,
- E,
- true,
- false)
- .useModularUI(true);
+ new HashSet<>(10000),
+ "gtpp.recipe.oremill",
+ "Milling",
+ null,
+ RES_PATH_GUI + "basicmachines/LFTR",
+ 3,
+ 3,
+ 1,
+ 0,
+ 1,
+ E,
+ 1,
+ E,
+ true,
+ true) {
+ @Override
+ protected List<String> handleNEIItemInputTooltip(List<String> currentTip, FixedPositionedStack pStack) {
+ if (ItemUtils.isMillingBall(pStack.item)) {
+ currentTip.add(GRAY + "Does not always get consumed in the process");
+ } else {
+ super.handleNEIItemInputTooltip(currentTip, pStack);
+ }
+ return currentTip;
+ }
+
+ @Override
+ protected void drawNEIOverlayForInput(FixedPositionedStack stack) {
+ if (ItemUtils.isMillingBall(stack.item)) {
+ drawNEIOverlayText("NC*", stack);
+ } else {
+ super.drawNEIOverlayForInput(stack);
+ }
+ }
+ }.useModularUI(true);
// Fission Fuel Plant Recipes
public static final GT_Recipe_Map sFissionFuelProcessing = new GT_Recipe_Map_FluidOnly(
@@ -482,7 +515,7 @@ public class GTPP_Recipe extends GT_Recipe implements IComparableRecipe {
1,
E,
true,
- false);
+ true);
// RTG Fuel Map
public static final GT_Recipe.GT_Recipe_Map_Fuel sRTGFuels = (GT_Recipe_Map_Fuel) new GT_Recipe_Map_Fuel(
@@ -524,7 +557,7 @@ public class GTPP_Recipe extends GT_Recipe implements IComparableRecipe {
.setUsualFluidOutputCount(3);
// Solar Tower map
- public static final GT_Recipe_Map sSolarTowerRecipes = new GT_Recipe_Map(
+ public static final GT_Recipe_Map sSolarTowerRecipes = new GT_Recipe_Map_FluidOnly(
new HashSet<>(10),
"gtpp.recipe.solartower",
"Solar Tower",
@@ -539,8 +572,12 @@ public class GTPP_Recipe extends GT_Recipe implements IComparableRecipe {
1000,
null,
true,
- false)
- .useModularUI(true);
+ true)
+ .useModularUI(true)
+ .setNEISpecialInfoFormatter((recipeInfo, applyPrefixAndSuffix) -> Arrays.asList(
+ "Solar Heater rings boost tier",
+ "R1:T1, R2:T2, R3:T4, R4:T8, R5:T16",
+ "Input Amount = 1000 x T"));
// Cyclotron recipe map
public static final GT_Recipe_Map sCyclotronRecipes = new GT_Recipe_Map(
@@ -806,26 +843,63 @@ public class GTPP_Recipe extends GT_Recipe implements IComparableRecipe {
// Tree Growth Simulator
public static final GT_Recipe_Map sTreeSimFakeRecipes = new GT_Recipe_Map(
- new HashSet<>(100),
- "gtpp.recipe.treefarm",
- "Tree Growth Simulator",
- null,
- RES_PATH_GUI + "basicmachines/FissionFuel",
- 1,
- 2,
- 1,
- 0,
- 1,
- "",
- 1,
- "",
- false,
- false)
- .useModularUI(true);
+ new HashSet<>(100),
+ "gtpp.recipe.treefarm",
+ "Tree Growth Simulator",
+ null,
+ RES_PATH_GUI + "basicmachines/FissionFuel",
+ 1,
+ 2,
+ 1,
+ 0,
+ 1,
+ "",
+ 1,
+ "",
+ false,
+ true) {
+ @Override
+ protected void drawNEIEnergyInfo(NEIRecipeInfo recipeInfo) {}
+
+ @Override
+ protected void drawNEIDurationInfo(NEIRecipeInfo recipeInfo) {}
+
+ @Override
+ protected List<String> handleNEIItemOutputTooltip(List<String> currentTip, FixedPositionedStack pStack) {
+ if (ModItems.fluidFertBasic != null && pStack.isChanceBased()) {
+ currentTip.add(
+ GRAY + "Outputted if " + ModItems.fluidFertBasic.getLocalizedName() + " is provided");
+ } else {
+ super.handleNEIItemOutputTooltip(currentTip, pStack);
+ }
+ return currentTip;
+ }
+
+ @Override
+ protected void drawNEIOverlayForOutput(FixedPositionedStack stack) {}
+ }.useModularUI(true).setNEISpecialInfoFormatter((recipeInfo, applyPrefixAndSuffix) -> {
+ List<String> result = new ArrayList<>();
+ if (ModItems.fluidFertBasic != null) {
+ result.add("Sapling is outputted if");
+ result.add("" + ModItems.fluidFertBasic.getLocalizedName() + " is provided.");
+ result.add("This is optional.");
+ }
+ return result;
+ });
}
public static class GTPP_Recipe_Map_ChemicalPlant extends GT_Recipe_Map {
+ private static final List<String> tierMaterialNames = Arrays.asList(
+ "Bronze",
+ "Steel",
+ "Aluminium",
+ "Stainless Steel",
+ "Titanium",
+ "Tungsten Steel",
+ "Laurenium",
+ "Botmium");
+
public GTPP_Recipe_Map_ChemicalPlant(
Collection<GT_Recipe> aRecipeList,
String aUnlocalizedName,
@@ -866,42 +940,56 @@ public class GTPP_Recipe extends GT_Recipe implements IComparableRecipe {
setProgressBarPos(82, 24);
setUsualFluidInputCount(4);
setUsualFluidOutputCount(2);
+ setNEISpecialInfoFormatter((recipeInfo, applyPrefixAndSuffix) -> {
+ int specialValue = recipeInfo.recipe.mSpecialValue;
+ String tierMaterial = "";
+ for (int i = 0; i < tierMaterialNames.size(); i++) {
+ if (i == specialValue) {
+ tierMaterial = tierMaterialNames.get(i);
+ }
+ }
+ return Collections.singletonList(applyPrefixAndSuffix.apply(specialValue) + " - " + tierMaterial);
+ });
}
@Override
public List<Pos2d> getItemInputPositions(int itemInputCount) {
- List<Pos2d> results = new ArrayList<>();
- for (int i = 0; i < itemInputCount; i++) {
- results.add(new Pos2d(7 + i * 18, 6));
- }
- return results;
+ return UIHelper.getGridPositions(itemInputCount, 7, 6, itemInputCount, 1);
}
@Override
public List<Pos2d> getItemOutputPositions(int itemOutputCount) {
- List<Pos2d> results = new ArrayList<>();
- for (int i = 0; i < itemOutputCount; i++) {
- results.add(new Pos2d(106 + (i % 2) * 18, 15 + (i / 2) * 18));
- }
- return results;
+ return UIHelper.getGridPositions(itemOutputCount, 106, 15, 2);
}
@Override
public List<Pos2d> getFluidInputPositions(int fluidInputCount) {
- List<Pos2d> results = new ArrayList<>();
- for (int i = 0; i < fluidInputCount; i++) {
- results.add(new Pos2d(7 + i * 18, 41));
- }
- return results;
+ return UIHelper.getGridPositions(fluidInputCount, 7, 41, fluidInputCount, 1);
}
@Override
public List<Pos2d> getFluidOutputPositions(int fluidOutputCount) {
- List<Pos2d> results = new ArrayList<>();
- for (int i = 0; i < fluidOutputCount; i++) {
- results.add(new Pos2d(142, 15 + i * 18));
+ return UIHelper.getGridPositions(fluidOutputCount, 142, 15, 1, fluidOutputCount);
+ }
+
+ @Override
+ protected List<String> handleNEIItemInputTooltip(List<String> currentTip, FixedPositionedStack pStack) {
+ if (ItemUtils.isCatalyst(pStack.item)) {
+ currentTip.add(GRAY + "Does not always get consumed in the process");
+ currentTip.add(GRAY + "Higher tier pipe casings allow this item to last longer");
+ } else {
+ super.handleNEIItemInputTooltip(currentTip, pStack);
+ }
+ return currentTip;
+ }
+
+ @Override
+ protected void drawNEIOverlayForInput(FixedPositionedStack stack) {
+ if (ItemUtils.isCatalyst(stack.item)) {
+ drawNEIOverlayText("NC*", stack);
+ } else {
+ super.drawNEIOverlayForInput(stack);
}
- return results;
}
}
}
diff --git a/src/main/java/gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java b/src/main/java/gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java
deleted file mode 100644
index 65af02dfe1..0000000000
--- a/src/main/java/gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package gtPlusPlus.nei;
-
-import codechicken.nei.PositionedStack;
-import codechicken.nei.recipe.*;
-import cpw.mods.fml.common.event.FMLInterModComms;
-import gregtech.api.enums.GT_Values;
-import gregtech.api.util.*;
-import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
-import gregtech.nei.GT_NEI_DefaultHandler;
-import gtPlusPlus.core.util.minecraft.ItemUtils;
-import java.util.*;
-import net.minecraft.item.ItemStack;
-
-/**
- * Handles milling/catalyst tooltip
- */
-public class GTPP_NEI_DefaultHandler extends GT_NEI_DefaultHandler {
-
- public GTPP_NEI_DefaultHandler(final GT_Recipe_Map tMap) {
- super(tMap);
- if (!NEI_GT_Config.sIsAdded) {
- FMLInterModComms.sendRuntimeMessage(
- GT_Values.GT,
- "NEIPlugins",
- "register-crafting-handler",
- "gregtechplusplus@" + this.getRecipeName() + "@" + this.getOverlayIdentifier());
- GuiCraftingRecipe.craftinghandlers.add(this);
- GuiUsageRecipe.usagehandlers.add(this);
- }
- }
-
- @Override
- public TemplateRecipeHandler newInstance() {
- return new GTPP_NEI_DefaultHandler(this.mRecipeMap);
- }
-
- @Override
- public List<String> handleItemTooltip(
- GuiRecipe<?> gui, ItemStack aStack, List<String> currenttip, int aRecipeIndex) {
- super.handleItemTooltip(gui, aStack, currenttip, aRecipeIndex);
- CachedRecipe tObject = this.arecipes.get(aRecipeIndex);
- if (tObject instanceof CachedDefaultRecipe) {
- CachedDefaultRecipe tRecipe = (CachedDefaultRecipe) tObject;
- for (PositionedStack tStack : tRecipe.mOutputs) {
- // no-op
- }
- for (PositionedStack tStack : tRecipe.mInputs) {
- if (aStack == tStack.item) {
- if (ItemUtils.isMillingBall(aStack)) {
- currenttip.remove(GT_Utility.trans("151", "Does not get consumed in the process"));
- currenttip.add("Does not always get consumed in the process");
- }
- if (ItemUtils.isCatalyst(aStack)) {
- currenttip.remove(GT_Utility.trans("151", "Does not get consumed in the process"));
- currenttip.add("Does not always get consumed in the process");
- currenttip.add("Higher tier pipe casings allow this item to last longer");
- }
- }
- }
- }
-
- return currenttip;
- }
-}
diff --git a/src/main/java/gtPlusPlus/nei/GT_NEI_FluidReactor.java b/src/main/java/gtPlusPlus/nei/GT_NEI_FluidReactor.java
deleted file mode 100644
index 0a04e0abf7..0000000000
--- a/src/main/java/gtPlusPlus/nei/GT_NEI_FluidReactor.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package gtPlusPlus.nei;
-
-import codechicken.nei.recipe.TemplateRecipeHandler;
-import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map;
-
-public class GT_NEI_FluidReactor extends GTPP_NEI_DefaultHandler {
-
- public GT_NEI_FluidReactor() {
- super(GTPP_Recipe_Map.sChemicalPlantRecipes);
- }
-
- @Override
- public TemplateRecipeHandler newInstance() {
- return new GT_NEI_FluidReactor();
- }
-
- @Override
- protected String getSpecialInfo(int specialValue) {
- String aTierMaterial = " - ";
- if (specialValue <= 0) {
- aTierMaterial += "Bronze";
- } else if (specialValue == 1) {
- aTierMaterial += "Steel";
- } else if (specialValue == 2) {
- aTierMaterial += "Aluminium";
- } else if (specialValue == 3) {
- aTierMaterial += "Stainless Steel";
- } else if (specialValue == 4) {
- aTierMaterial += "Titanium";
- } else if (specialValue == 5) {
- aTierMaterial += "Tungsten Steel";
- } else if (specialValue == 6) {
- aTierMaterial += "Laurenium";
- } else if (specialValue == 7) {
- aTierMaterial += "Botmium";
- }
- return this.mRecipeMap.mNEISpecialValuePre
- + (specialValue * this.mRecipeMap.mNEISpecialValueMultiplier)
- + aTierMaterial;
- }
-}
diff --git a/src/main/java/gtPlusPlus/nei/GT_NEI_LFTR.java b/src/main/java/gtPlusPlus/nei/GT_NEI_LFTR.java
deleted file mode 100644
index 0d1ef2bcf7..0000000000
--- a/src/main/java/gtPlusPlus/nei/GT_NEI_LFTR.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package gtPlusPlus.nei;
-
-import codechicken.nei.recipe.TemplateRecipeHandler;
-import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map;
-import gtPlusPlus.core.util.math.MathUtils;
-
-public class GT_NEI_LFTR extends GTPP_NEI_DefaultHandler {
-
- public GT_NEI_LFTR() {
- super(GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes);
- }
-
- @Override
- public TemplateRecipeHandler newInstance() {
- return new GT_NEI_LFTR();
- }
-
- @Override
- public void drawExtras(final int aRecipeIndex) {
- final long tEUt = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue;
- final int tDuration = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mDuration;
- int y = getDescriptionYOffset();
- drawText(
- 10,
- y,
- "Time: " + (tDuration < 20 ? "< 1" : MathUtils.formatNumbers(0.05d * tDuration)) + " secs",
- -16777216);
- y += 10;
- drawText(
- 10,
- y,
- this.mRecipeMap.mNEISpecialValuePre
- + MathUtils.formatNumbers(
- (((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue
- * this.mRecipeMap.mNEISpecialValueMultiplier))
- + this.mRecipeMap.mNEISpecialValuePost,
- -16777216);
- y += 10;
- drawText(10, y, "Dynamo: " + MathUtils.formatNumbers((long) (tDuration * tEUt)) + " EU", -16777216);
- y += 10;
- drawText(10, y, "Total: " + MathUtils.formatNumbers((long) (tDuration * tEUt * 4)) + " EU", -16777216);
- }
-}
diff --git a/src/main/java/gtPlusPlus/nei/GT_NEI_MultiSolarTower.java b/src/main/java/gtPlusPlus/nei/GT_NEI_MultiSolarTower.java
deleted file mode 100644
index 375c47ef5d..0000000000
--- a/src/main/java/gtPlusPlus/nei/GT_NEI_MultiSolarTower.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package gtPlusPlus.nei;
-
-import codechicken.nei.recipe.TemplateRecipeHandler;
-import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
-import gtPlusPlus.core.util.math.MathUtils;
-
-public class GT_NEI_MultiSolarTower extends GTPP_NEI_DefaultHandler {
-
- public GT_NEI_MultiSolarTower(GT_Recipe_Map aMap) {
- super(aMap);
- }
-
- @Override
- public TemplateRecipeHandler newInstance() {
- return new GT_NEI_MultiSolarTower(mRecipeMap);
- }
-
- @Override
- public void drawExtras(final int aRecipeIndex) {
- final int tDuration = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mDuration;
- int y = getDescriptionYOffset();
- if (tDuration > 0) {
- drawText(
- 10,
- y,
- "Time: " + (tDuration < 20 ? "< 1" : MathUtils.formatNumbers(0.05d * tDuration)) + " secs",
- -16777216);
- y += 10;
- }
- drawText(5, y, "Solar Heater rings boost tier", -16777216);
- y += 10;
- drawText(5, y, "R1:T1, R2:T2, R3:T4, R4:T8, R5:T16", -16777216);
- y += 10;
- drawText(5, y, "Input Amount = 1000 x T", -16777216);
- }
-}
diff --git a/src/main/java/gtPlusPlus/nei/GT_NEI_MultiTreeGrowthSimulator.java b/src/main/java/gtPlusPlus/nei/GT_NEI_MultiTreeGrowthSimulator.java
deleted file mode 100644
index a98b791e34..0000000000
--- a/src/main/java/gtPlusPlus/nei/GT_NEI_MultiTreeGrowthSimulator.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package gtPlusPlus.nei;
-
-import codechicken.nei.PositionedStack;
-import codechicken.nei.recipe.GuiRecipe;
-import codechicken.nei.recipe.TemplateRecipeHandler;
-import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map;
-import gtPlusPlus.core.item.ModItems;
-import java.util.List;
-import net.minecraft.item.ItemStack;
-
-public class GT_NEI_MultiTreeGrowthSimulator extends GTPP_NEI_DefaultHandler {
-
- public GT_NEI_MultiTreeGrowthSimulator() {
- super(GTPP_Recipe_Map.sTreeSimFakeRecipes);
- }
-
- @Override
- public TemplateRecipeHandler newInstance() {
- return new GT_NEI_MultiTreeGrowthSimulator();
- }
-
- @Override
- public void drawExtras(final int aRecipeIndex) {
- if (ModItems.fluidFertBasic != null) {
- int y = getDescriptionYOffset();
- drawText(5, y, "Chance of Sapling output if", -16777216);
- y += 10;
- drawText(5, y, "" + ModItems.fluidFertBasic.getLocalizedName() + " is provided.", -16777216);
- y += 10;
- drawText(5, y, "This is optional.", -16777216);
- }
- }
-
- @Override
- public List<String> handleItemTooltip(
- final GuiRecipe<?> gui, final ItemStack aStack, final List<String> currenttip, final int aRecipeIndex) {
- final TemplateRecipeHandler.CachedRecipe tObject = this.arecipes.get(aRecipeIndex);
- if (tObject instanceof CachedDefaultRecipe) {
- final CachedDefaultRecipe tRecipe = (CachedDefaultRecipe) tObject;
- for (final PositionedStack tStack : tRecipe.mOutputs) {
- if (aStack == tStack.item) {
- if ((!(tStack instanceof FixedPositionedStack))
- || (((FixedPositionedStack) tStack).mChance <= 0)
- || (((FixedPositionedStack) tStack).mChance == 10000)) {
- break;
- }
- if (ModItems.fluidFertBasic != null) {
- currenttip.add(
- "Chance output if " + ModItems.fluidFertBasic.getLocalizedName() + " is provided.");
- }
- break;
- }
- }
- }
- return currenttip;
- }
-}
diff --git a/src/main/java/gtPlusPlus/nei/NEI_GT_Config.java b/src/main/java/gtPlusPlus/nei/NEI_GT_Config.java
index 0a38a9b276..92d19b3630 100644
--- a/src/main/java/gtPlusPlus/nei/NEI_GT_Config.java
+++ b/src/main/java/gtPlusPlus/nei/NEI_GT_Config.java
@@ -2,7 +2,6 @@ package gtPlusPlus.nei;
import codechicken.nei.api.API;
import codechicken.nei.api.IConfigureNEI;
-import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
@@ -15,20 +14,6 @@ public class NEI_GT_Config implements IConfigureNEI {
public synchronized void loadConfig() {
sIsAdded = false;
- Logger.INFO("NEI Registration: Registering NEI handler for " + GTPP_Recipe_Map.sChemicalPlantRecipes.mNEIName);
- new GT_NEI_FluidReactor();
- Logger.INFO("NEI Registration: Registering NEI handler for "
- + GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.mNEIName);
- new GT_NEI_LFTR();
- Logger.INFO("NEI Registration: Registering NEI handler for " + GTPP_Recipe_Map.sTreeSimFakeRecipes.mNEIName);
- new GT_NEI_MultiTreeGrowthSimulator();
- Logger.INFO("NEI Registration: Registering NEI handler for " + GTPP_Recipe_Map.sAdvFreezerRecipes_GT.mNEIName);
- Logger.INFO("NEI Registration: Registering NEI handler for " + GTPP_Recipe_Map.sOreMillRecipes.mNEIName);
- new GTPP_NEI_DefaultHandler(GTPP_Recipe_Map.sOreMillRecipes);
- Logger.INFO("NEI Registration: Registering NEI handler for " + GTPP_Recipe_Map.sOreMillRecipes.mNEIName);
- new GTPP_NEI_DefaultHandler(GTPP_Recipe_Map.sOreMillRecipes);
- Logger.INFO("NEI Registration: Registering NEI handler for " + GTPP_Recipe_Map.sSolarTowerRecipes.mNEIName);
- new GT_NEI_MultiSolarTower(GTPP_Recipe_Map.sSolarTowerRecipes);
Logger.INFO("NEI Registration: Registering NEI handler for " + DecayableRecipeHandler.mNEIName);
API.registerRecipeHandler(new DecayableRecipeHandler());
API.registerUsageHandler(new DecayableRecipeHandler());
diff --git a/src/main/java/gtPlusPlus/nei/NEI_IMC_Sender.java b/src/main/java/gtPlusPlus/nei/NEI_IMC_Sender.java
index 51bf7cd187..63b39cb0ee 100644
--- a/src/main/java/gtPlusPlus/nei/NEI_IMC_Sender.java
+++ b/src/main/java/gtPlusPlus/nei/NEI_IMC_Sender.java
@@ -30,6 +30,7 @@ public class NEI_IMC_Sender {
sendHandler("gtpp.recipe.lftr.sparging", "gregtech:gt.blockmachines:31035", 1);
sendHandler("gtpp.recipe.oremill", "gregtech:gt.blockmachines:31027", 1);
sendHandler("gtpp.recipe.flotationcell", "gregtech:gt.blockmachines:31028", 1);
+ sendHandler("gtpp.recipe.fluidchemicaleactor", "gregtech:gt.blockmachines:998");
sendCatalyst("GTPP_Decayables", "miscutils:blockDecayablesChest");
@@ -86,8 +87,6 @@ public class NEI_IMC_Sender {
sendCatalyst("gt.recipe.complexfusionreactor", "gregtech:gt.blockmachines:965", -1);
- // overwrite yShift
- sendHandler("gtPlusPlus.nei.GT_NEI_FluidReactor", "gregtech:gt.blockmachines:998");
sendHandler("gtpp.recipe.multidehydrator", "gregtech:gt.blockmachines:995");
sendCatalyst("gtpp.recipe.multidehydrator", "gregtech:gt.blockmachines:995");
sendRemoveCatalyst("gtpp.recipe.chemicaldehydrator", "gregtech:gt.blockmachines:995");
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java
index f5e45fa710..340139c51c 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java
@@ -571,9 +571,11 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase<
ItemStack[] aOutput = new ItemStack[] {aLog, aSapling};
String aOutputs = ItemUtils.getArrayStackNames(aOutput);
Logger.INFO("" + aOutputs);
+ ItemStack inputStack = aSapling.copy();
+ inputStack.stackSize = 0;
GTPP_Recipe_Map.sTreeSimFakeRecipes.addFakeRecipe(
false,
- new ItemStack[] {aSapling.copy()},
+ new ItemStack[] {inputStack},
aOutput,
null,
new int[] {10000, 1000},