aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore11
-rw-r--r--build.gradle23
-rw-r--r--dependencies.gradle12
-rw-r--r--gradle/wrapper/gradle-wrapper.jarbin62076 -> 63375 bytes
-rw-r--r--gradle/wrapper/gradle-wrapper.properties3
-rwxr-xr-xgradlew5
-rw-r--r--src/main/java/com/github/technus/tectech/TecTech.java4
-rw-r--r--src/main/java/com/github/technus/tectech/loader/MainLoader.java3
-rw-r--r--src/main/java/com/github/technus/tectech/nei/IMCForNEI.java45
-rw-r--r--src/main/java/com/github/technus/tectech/nei/NEI_TT_Config.java35
-rw-r--r--src/main/java/com/github/technus/tectech/nei/TT_NEI_EyeOfHarmonyHandler.java33
-rw-r--r--src/main/java/com/github/technus/tectech/nei/TT_NEI_ResearchHandler.java358
-rw-r--r--src/main/java/com/github/technus/tectech/nei/TT_NEI_ScannerHandler.java358
-rw-r--r--src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyFrontend.java202
-rw-r--r--src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipeStorage.java4
-rw-r--r--src/main/java/com/github/technus/tectech/recipe/ResearchStationFrontend.java94
-rw-r--r--src/main/java/com/github/technus/tectech/recipe/TT_recipe.java403
-rw-r--r--src/main/java/com/github/technus/tectech/recipe/TT_recipeAdder.java13
-rw-r--r--src/main/java/com/github/technus/tectech/recipe/TecTechRecipeMaps.java49
-rw-r--r--src/main/java/com/github/technus/tectech/thing/gui/TecTechUITextures.java8
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_EyeOfHarmony.java8
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java75
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java3
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java9
-rw-r--r--src/main/resources/assets/gregtech/textures/gui/multimachines/ResearchFake.pngbin1972 -> 0 bytes
-rw-r--r--src/main/resources/assets/tectech/lang/en_US.lang12
-rw-r--r--src/main/resources/assets/tectech/textures/gui/picture/rack_large.pngbin166 -> 332 bytes
-rw-r--r--src/main/resources/assets/tectech/textures/gui/progressbar/research_station_1.pngbin0 -> 114 bytes
-rw-r--r--src/main/resources/assets/tectech/textures/gui/progressbar/research_station_2.pngbin0 -> 172 bytes
-rw-r--r--src/main/resources/assets/tectech/textures/gui/progressbar/research_station_3.pngbin0 -> 281 bytes
30 files changed, 418 insertions, 1352 deletions
diff --git a/.gitignore b/.gitignore
index 3274a536d2..27a8ae0f17 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
.gradle
.settings
/.idea/
+/.vscode/
/run/
/build/
/eclipse/
@@ -25,7 +26,13 @@ whitelist.json
*.iml
*.ipr
*.iws
-src/main/resources/mixins.*.json
+src/main/resources/mixins.*([!.]).json
*.bat
-.vscode/settings.json
+*.DS_Store
+!gradlew.bat
.factorypath
+addon.local.gradle
+addon.local.gradle.kts
+addon.late.local.gradle
+addon.late.local.gradle.kts
+layout.json \ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 4e31dc883b..8507c7dfbd 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,4 +1,4 @@
-//version: 1700844281
+//version: 1701530445
/*
DO NOT CHANGE THIS FILE!
Also, you may replace this file at any time if there is an update available.
@@ -28,27 +28,12 @@ import java.util.concurrent.TimeUnit
buildscript {
repositories {
- mavenCentral()
-
- maven {
- name 'forge'
- url 'https://maven.minecraftforge.net'
- }
maven {
// GTNH RetroFuturaGradle and ASM Fork
name "GTNH Maven"
url "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
allowInsecureProtocol = true
}
- maven {
- name 'sonatype'
- url 'https://oss.sonatype.org/content/repositories/snapshots/'
- }
- maven {
- name 'Scala CI dependencies'
- url 'https://repo1.maven.org/maven2/'
- }
-
mavenLocal()
}
}
@@ -793,12 +778,12 @@ ext.java17PatchDependenciesCfg = configurations.create("java17PatchDependencies"
}
dependencies {
- def lwjgl3ifyVersion = '1.5.1'
+ def lwjgl3ifyVersion = '1.5.7'
if (modId != 'lwjgl3ify') {
java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}")
}
if (modId != 'hodgepodge') {
- java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.3.17')
+ java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.3.35')
}
java17PatchDependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches") {transitive = false}
@@ -1310,7 +1295,7 @@ def addCurseForgeRelation(String type, String name) {
// Updating
-def buildscriptGradleVersion = "8.2.1"
+def buildscriptGradleVersion = "8.5"
tasks.named('wrapper', Wrapper).configure {
gradleVersion = buildscriptGradleVersion
diff --git a/dependencies.gradle b/dependencies.gradle
index 82674050a5..d546b37260 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -2,14 +2,14 @@
dependencies {
shadowImplementation('com.github.GTNewHorizons:AVRcore:1.0.1')
- api('com.github.GTNewHorizons:GT5-Unofficial:5.09.44.90:dev')
+ api('com.github.GTNewHorizons:GT5-Unofficial:5.09.44.96:dev')
api('com.github.GTNewHorizons:Yamcl:0.5.86:dev')
implementation('com.github.GTNewHorizons:GTNEIOrePlugin:1.1.3:dev')
compileOnly("TGregworks:TGregworks:1.7.10-GTNH-1.0.23:deobf") {transitive=false}
- compileOnly('com.github.GTNewHorizons:TinkersConstruct:1.10.11-GTNH:dev') {transitive=false}
+ compileOnly('com.github.GTNewHorizons:TinkersConstruct:1.10.12-GTNH:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:OpenComputers:1.9.19-GTNH:dev') {transitive=false}
- compileOnly('com.github.GTNewHorizons:GTplusplus:1.10.32:dev') {transitive=false}
+ compileOnly('com.github.GTNewHorizons:GTplusplus:1.10.34:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:Avaritia:1.46:dev') {transitive=false}
compileOnly('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev') {transitive=false}
@@ -17,9 +17,9 @@ dependencies {
// for testing EOH recipes
//runtimeOnlyNonPublishable("TGregworks:TGregworks:1.7.10-GTNH-1.0.23:deobf")
- //runtimeOnlyNonPublishable('com.github.GTNewHorizons:TinkersConstruct:1.10.11-GTNH:dev')
- //runtimeOnlyNonPublishable('com.github.GTNewHorizons:NewHorizonsCoreMod:2.2.40:dev')
- //runtimeOnlyNonPublishable('com.github.GTNewHorizons:GoodGenerator:0.7.6:dev') {
+ //runtimeOnlyNonPublishable('com.github.GTNewHorizons:TinkersConstruct:1.10.12-GTNH:dev')
+ //runtimeOnlyNonPublishable('com.github.GTNewHorizons:NewHorizonsCoreMod:2.2.43:dev')
+ //runtimeOnlyNonPublishable('com.github.GTNewHorizons:GoodGenerator:0.7.9:dev') {
// exclude group: "com.github.GTNewHorizons", module: "TecTech"
//}
//runtimeOnlyNonPublishable("curse.maven:extra-utilities-225561:2264384") {transitive=false}
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index c1962a79e2..033e24c4cd 100644
--- a/gradle/wrapper/gradle-wrapper.jar
+++ b/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 17a8ddce2d..1af9e0930b 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
+validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
index aeb74cbb43..fcb6fca147 100755
--- a/gradlew
+++ b/gradlew
@@ -130,10 +130,13 @@ location of your Java installation."
fi
else
JAVACMD=java
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+ if ! command -v java >/dev/null 2>&1
+ then
+ die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
+ fi
fi
# Increase the maximum file descriptors if we can.
diff --git a/src/main/java/com/github/technus/tectech/TecTech.java b/src/main/java/com/github/technus/tectech/TecTech.java
index 292ebeb7e3..0845e02736 100644
--- a/src/main/java/com/github/technus/tectech/TecTech.java
+++ b/src/main/java/com/github/technus/tectech/TecTech.java
@@ -9,9 +9,9 @@ import com.github.technus.tectech.loader.MainLoader;
import com.github.technus.tectech.loader.TecTechConfig;
import com.github.technus.tectech.loader.gui.CreativeTabTecTech;
import com.github.technus.tectech.mechanics.enderStorage.EnderWorldSavedData;
-import com.github.technus.tectech.nei.IMCForNEI;
import com.github.technus.tectech.proxy.CommonProxy;
import com.github.technus.tectech.recipe.EyeOfHarmonyRecipeStorage;
+import com.github.technus.tectech.recipe.TecTechRecipeMaps;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Mod;
@@ -85,6 +85,7 @@ public class TecTech {
FMLCommonHandler.instance().bus().register(enderWorldSavedData);
MinecraftForge.EVENT_BUS.register(enderWorldSavedData);
+ TecTechRecipeMaps.init();
MainLoader.preLoad();
}
@@ -95,7 +96,6 @@ public class TecTech {
MainLoader.load();
MainLoader.addAfterGregTechPostLoadRunner();
- IMCForNEI.IMCSender();
}
@Mod.EventHandler
diff --git a/src/main/java/com/github/technus/tectech/loader/MainLoader.java b/src/main/java/com/github/technus/tectech/loader/MainLoader.java
index cacf236134..5681a2128e 100644
--- a/src/main/java/com/github/technus/tectech/loader/MainLoader.java
+++ b/src/main/java/com/github/technus/tectech/loader/MainLoader.java
@@ -28,6 +28,7 @@ import cpw.mods.fml.common.ProgressManager;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.GregTech_API;
import gregtech.api.enums.Materials;
+import gregtech.api.recipe.RecipeMaps;
import gregtech.api.util.GT_Recipe;
@SuppressWarnings("deprecation")
@@ -146,7 +147,7 @@ public final class MainLoader {
}
}
}
- for (GT_Recipe r : GT_Recipe.GT_Recipe_Map.sFusionRecipes.mRecipeList) {
+ for (GT_Recipe r : RecipeMaps.fusionRecipes.getAllRecipes()) {
Fluid fluid = binds.get(r.mFluidOutputs[0].getFluid());
if (fluid != null) {
if (DEBUG_MODE) {
diff --git a/src/main/java/com/github/technus/tectech/nei/IMCForNEI.java b/src/main/java/com/github/technus/tectech/nei/IMCForNEI.java
deleted file mode 100644
index 033882609b..0000000000
--- a/src/main/java/com/github/technus/tectech/nei/IMCForNEI.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package com.github.technus.tectech.nei;
-
-import static com.github.technus.tectech.Reference.MODID;
-import static gregtech.api.enums.Mods.NotEnoughItems;
-
-import net.minecraft.nbt.NBTTagCompound;
-
-import cpw.mods.fml.common.event.FMLInterModComms;
-
-public class IMCForNEI {
-
- public static void IMCSender() {
- if (!NotEnoughItems.isModLoaded()) {
- return;
- }
- sendHandler("gt.recipe.eyeofharmony", "gregtech:gt.blockmachines:15410", 1);
- sendCatalyst("gt.recipe.eyeofharmony", "gregtech:gt.blockmachines:15410");
- }
-
- private static void sendHandler(String aName, String aBlock, int aMaxRecipesPerPage) {
- NBTTagCompound aNBT = new NBTTagCompound();
- aNBT.setString("handler", aName);
- aNBT.setString("modName", MODID);
- aNBT.setString("modId", MODID);
- aNBT.setBoolean("modRequired", true);
- aNBT.setString("itemName", aBlock);
- aNBT.setInteger("handlerHeight", 135);
- aNBT.setInteger("handlerWidth", 166);
- aNBT.setInteger("maxRecipesPerPage", aMaxRecipesPerPage);
- aNBT.setInteger("yShift", 6);
- FMLInterModComms.sendMessage("NotEnoughItems", "registerHandlerInfo", aNBT);
- }
-
- private static void sendCatalyst(String aName, String aStack, int aPriority) {
- NBTTagCompound aNBT = new NBTTagCompound();
- aNBT.setString("handlerID", aName);
- aNBT.setString("itemName", aStack);
- aNBT.setInteger("priority", aPriority);
- FMLInterModComms.sendMessage("NotEnoughItems", "registerCatalystInfo", aNBT);
- }
-
- private static void sendCatalyst(String aName, String aStack) {
- sendCatalyst(aName, aStack, 0);
- }
-}
diff --git a/src/main/java/com/github/technus/tectech/nei/NEI_TT_Config.java b/src/main/java/com/github/technus/tectech/nei/NEI_TT_Config.java
deleted file mode 100644
index 1523302a24..0000000000
--- a/src/main/java/com/github/technus/tectech/nei/NEI_TT_Config.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.github.technus.tectech.nei;
-
-import com.github.technus.tectech.recipe.TT_recipe;
-
-import codechicken.nei.api.IConfigureNEI;
-import cpw.mods.fml.common.FMLCommonHandler;
-
-public class NEI_TT_Config implements IConfigureNEI { // must be NEI*Config
-
- public static boolean sIsAdded = true;
- public static TT_NEI_ResearchHandler TT_RH;
- public static TT_NEI_ScannerHandler TT_SH;
- public static TT_NEI_EyeOfHarmonyHandler TT_EOH;
-
- @Override
- public void loadConfig() {
- sIsAdded = false;
- if (FMLCommonHandler.instance().getEffectiveSide().isClient()) {
- TT_RH = new TT_NEI_ResearchHandler(TT_recipe.GT_Recipe_MapTT.sResearchableFakeRecipes);
- TT_SH = new TT_NEI_ScannerHandler(TT_recipe.GT_Recipe_MapTT.sScannableFakeRecipes);
- TT_EOH = new TT_NEI_EyeOfHarmonyHandler(TT_recipe.GT_Recipe_MapTT.sEyeofHarmonyRecipes);
- }
- sIsAdded = true;
- }
-
- @Override
- public String getName() {
- return "TecTech NEI Plugin";
- }
-
- @Override
- public String getVersion() {
- return "(1.0)";
- }
-}
diff --git a/src/main/java/com/github/technus/tectech/nei/TT_NEI_EyeOfHarmonyHandler.java b/src/main/java/com/github/technus/tectech/nei/TT_NEI_EyeOfHarmonyHandler.java
deleted file mode 100644
index 7d8e982443..0000000000
--- a/src/main/java/com/github/technus/tectech/nei/TT_NEI_EyeOfHarmonyHandler.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.github.technus.tectech.nei;
-
-import static com.github.technus.tectech.Reference.MODID;
-
-import codechicken.nei.recipe.GuiCraftingRecipe;
-import codechicken.nei.recipe.GuiUsageRecipe;
-import codechicken.nei.recipe.TemplateRecipeHandler;
-import cpw.mods.fml.common.event.FMLInterModComms;
-import gregtech.api.enums.GT_Values;
-import gregtech.api.util.GT_Recipe;
-import gregtech.nei.GT_NEI_DefaultHandler;
-
-public class TT_NEI_EyeOfHarmonyHandler extends GT_NEI_DefaultHandler {
-
- public TT_NEI_EyeOfHarmonyHandler(final GT_Recipe.GT_Recipe_Map tMap) {
- super(tMap);
- if (!NEI_TT_Config.sIsAdded) {
-
- FMLInterModComms.sendRuntimeMessage(
- GT_Values.GT,
- "NEIPlugins",
- "register-crafting-handler",
- MODID + "@" + this.getRecipeName() + "@" + this.getOverlayIdentifier());
- GuiCraftingRecipe.craftinghandlers.add(this);
- GuiUsageRecipe.usagehandlers.add(this);
- }
- }
-
- @Override
- public TemplateRecipeHandler newInstance() {
- return new TT_NEI_EyeOfHarmonyHandler(this.mRecipeMap);
- }
-}
diff --git a/src/main/java/com/github/technus/tectech/nei/TT_NEI_ResearchHandler.java b/src/main/java/com/github/technus/tectech/nei/TT_NEI_ResearchHandler.java
deleted file mode 100644
index e87350b2b9..0000000000
--- a/src/main/java/com/github/technus/tectech/nei/TT_NEI_ResearchHandler.java
+++ /dev/null
@@ -1,358 +0,0 @@
-package com.github.technus.tectech.nei;
-
-import static com.github.technus.tectech.recipe.TT_recipeAdder.nullItem;
-import static gregtech.api.enums.ItemList.Display_Fluid;
-
-import java.awt.Rectangle;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidContainerRegistry;
-import net.minecraftforge.fluids.FluidStack;
-
-import org.lwjgl.opengl.GL11;
-
-import com.github.technus.tectech.Reference;
-import com.github.technus.tectech.TecTech;
-import com.github.technus.tectech.recipe.TT_recipe;
-
-import codechicken.lib.gui.GuiDraw;
-import codechicken.nei.ItemList;
-import codechicken.nei.PositionedStack;
-import codechicken.nei.recipe.GuiCraftingRecipe;
-import codechicken.nei.recipe.GuiRecipe;
-import codechicken.nei.recipe.GuiUsageRecipe;
-import codechicken.nei.recipe.TemplateRecipeHandler;
-import cpw.mods.fml.common.event.FMLInterModComms;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.objects.ItemData;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_Utility;
-
-public class TT_NEI_ResearchHandler extends TemplateRecipeHandler {
-
- protected final TT_recipe.GT_Recipe_MapTT mRecipeMap;
-
- public TT_NEI_ResearchHandler(TT_recipe.GT_Recipe_MapTT aRecipeMap) {
- mRecipeMap = aRecipeMap;
- transferRects.add(
- new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(65, 13, 36, 18), getOverlayIdentifier()));
- if (!NEI_TT_Config.sIsAdded) {
- FMLInterModComms.sendRuntimeMessage(
- TecTech.instance,
- "NEIPlugins",
- "register-crafting-handler",
- Reference.MODID + '@' + getRecipeName() + '@' + getOverlayIdentifier());
- GuiCraftingRecipe.craftinghandlers.add(this);
- GuiUsageRecipe.usagehandlers.add(this);
- }
- }
-
- public List<GT_Recipe> getSortedRecipes() {
- List<GT_Recipe> result = new ArrayList<>(mRecipeMap.mRecipeList);
- Collections.sort(result);
- return result;
- }
-
- public static void drawText(int aX, int aY, String aString, int aColor) {
- Minecraft.getMinecraft().fontRenderer.drawString(aString, aX, aY, aColor);
- }
-
- @Override
- public TemplateRecipeHandler newInstance() {
- NEI_TT_Config.TT_RH = new TT_NEI_ResearchHandler(mRecipeMap);
- return NEI_TT_Config.TT_RH;
- }
-
- @Override
- public void loadCraftingRecipes(String outputId, Object... results) {
- if (outputId.equals(getOverlayIdentifier())) {
- for (GT_Recipe tRecipe : getSortedRecipes()) {
- if (!tRecipe.mHidden) {
- arecipes.add(new CachedDefaultRecipe(tRecipe));
- }
- }
- } else {
- super.loadCraftingRecipes(outputId, results);
- }
- }
-
- @Override
- public void loadCraftingRecipes(ItemStack aResult) {
- ItemData tPrefixMaterial = GT_OreDictUnificator.getAssociation(aResult);
-
- ArrayList<ItemStack> tResults = new ArrayList<>();
- tResults.add(aResult);
- tResults.add(GT_OreDictUnificator.get(true, aResult));
- if (tPrefixMaterial != null && !tPrefixMaterial.mBlackListed
- && !tPrefixMaterial.mPrefix.mFamiliarPrefixes.isEmpty()) {
- for (OrePrefixes tPrefix : tPrefixMaterial.mPrefix.mFamiliarPrefixes) {
- tResults.add(GT_OreDictUnificator.get(tPrefix, tPrefixMaterial.mMaterial.mMaterial, 1L));
- }
- }
- FluidStack tFluid = GT_Utility.getFluidForFilledItem(aResult, true);
- if (tFluid != null) {
- tResults.add(GT_Utility.getFluidDisplayStack(tFluid, false));
- for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry
- .getRegisteredFluidContainerData()) {
- if (tData.fluid.isFluidEqual(tFluid)) {
- tResults.add(GT_Utility.copy(tData.filledContainer));
- }
- }
- }
- for (GT_Recipe tRecipe : getSortedRecipes()) {
- if (!tRecipe.mHidden) {
- CachedDefaultRecipe tNEIRecipe = new CachedDefaultRecipe(tRecipe);
- for (ItemStack tStack : tResults) {
- if (tNEIRecipe.contains(tNEIRecipe.mOutputs, tStack)) {
- arecipes.add(tNEIRecipe);
- break;
- }
- }
- }
- }
- }
-
- @Override
- public void loadUsageRecipes(ItemStack aInput) {
- ItemData tPrefixMaterial = GT_OreDictUnificator.getAssociation(aInput);
-
- ArrayList<ItemStack> tInputs = new ArrayList<>();
- tInputs.add(aInput);
- tInputs.add(GT_OreDictUnificator.get(false, aInput));
- if (tPrefixMaterial != null && !tPrefixMaterial.mPrefix.mFamiliarPrefixes.isEmpty()) {
- for (OrePrefixes tPrefix : tPrefixMaterial.mPrefix.mFamiliarPrefixes) {
- tInputs.add(GT_OreDictUnificator.get(tPrefix, tPrefixMaterial.mMaterial.mMaterial, 1L));
- }
- }
- FluidStack tFluid = GT_Utility.getFluidForFilledItem(aInput, true);
- if (tFluid != null) {
- tInputs.add(GT_Utility.getFluidDisplayStack(tFluid, false));
- for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry
- .getRegisteredFluidContainerData()) {
- if (tData.fluid.isFluidEqual(tFluid)) {
- tInputs.add(GT_Utility.copy(tData.filledContainer));
- }
- }
- }
- for (GT_Recipe tRecipe : getSortedRecipes()) {
- if (!tRecipe.mHidden) {
- CachedDefaultRecipe tNEIRecipe = new CachedDefaultRecipe(tRecipe);
- for (ItemStack tStack : tInputs) {
- if (tNEIRecipe.contains(tNEIRecipe.mInputs, tStack)) {
- arecipes.add(tNEIRecipe);
- break;
- }
- }
- }
- }
- }
-
- @Override
- public String getOverlayIdentifier() {
- return mRecipeMap.mNEIName;
- }
-
- @Override
- public void drawBackground(int recipe) {
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- GuiDraw.changeTexture(getGuiTexture());
- GuiDraw.drawTexturedModalRect(-4, -8, 1, 3, 174, 78);
- }
-
- @Override
- public int recipiesPerPage() {
- return 1;
- }
-
- @Override
- public String getRecipeName() {
- return GT_LanguageManager.getTranslation(mRecipeMap.mUnlocalizedName);
- }
-
- @Override
- public String getGuiTexture() {
- return mRecipeMap.mNEIGUIPath;
- }
-
- @Override
- public List<String> handleItemTooltip(GuiRecipe<?> gui, ItemStack aStack, List<String> currenttip,
- int aRecipeIndex) {
- TemplateRecipeHandler.CachedRecipe tObject = arecipes.get(aRecipeIndex);
- if (tObject instanceof CachedDefaultRecipe tRecipe) {
- for (PositionedStack tStack : tRecipe.mOutputs) {
- if (aStack == tStack.item) {
- if (!(tStack instanceof FixedPositionedStack) || ((FixedPositionedStack) tStack).mChance <= 0
- || ((FixedPositionedStack) tStack).mChance == 10000) {
- break;
- }
- currenttip.add(
- trans("150", "Chance: ") + ((FixedPositionedStack) tStack).mChance / 100
- + '.'
- + (((FixedPositionedStack) tStack).mChance % 100 < 10
- ? "0" + ((FixedPositionedStack) tStack).mChance % 100
- : Integer.valueOf(((FixedPositionedStack) tStack).mChance % 100))
- + '%');
- break;
- }
- }
- for (PositionedStack tStack : tRecipe.mInputs) {
- if (aStack == tStack.item) {
- if (Display_Fluid.isStackEqual(tStack.item, true, true) || tStack.item.stackSize != 0) {
- break;
- }
- currenttip.add(trans("151", "Does not get consumed in the process"));
- break;
- }
- }
- }
- return currenttip;
- }
-
- @Override
- public void drawExtras(int aRecipeIndex) {
- int tEUt = ((CachedDefaultRecipe) arecipes.get(aRecipeIndex)).mRecipe.mEUt;
- int computation = ((CachedDefaultRecipe) arecipes.get(aRecipeIndex)).mRecipe.mDuration;
- String[] recipeDesc = ((CachedDefaultRecipe) arecipes.get(aRecipeIndex)).mRecipe.getNeiDesc();
- if (recipeDesc == null) {
- int tSpecial = ((CachedDefaultRecipe) arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue;
- short ampere = (short) (tSpecial & 0xFFFF), minComputationPerSec = (short) (tSpecial >>> 16);
- if (tEUt != 0) {
- drawText(
- 10,
- 73,
- trans("152.1", "Max EU: ") + GT_Utility.formatNumbers(
- (1 + (computation - minComputationPerSec) / minComputationPerSec) * (long) tEUt
- * ampere
- * 20)
- + " EU",
- -16777216);
- drawText(
- 10,
- 83,
- trans("153", "Usage: ") + GT_Utility.formatNumbers((long) tEUt * ampere) + " EU/t",
- -16777216);
- if (mRecipeMap.mShowVoltageAmperageInNEI) {
- drawText(10, 93, trans("154", "Voltage: ") + GT_Utility.formatNumbers(tEUt) + " EU", -16777216);
- drawText(10, 103, trans("155", "Amperage: ") + GT_Utility.formatNumbers(ampere), -16777216);
- } else {
- drawText(10, 93, trans("156", "Voltage: unspecified"), -16777216);
- drawText(10, 103, trans("157", "Amperage: unspecified"), -16777216);
- }
- }
- drawText(10, 113, "Computation: " + GT_Utility.formatNumbers(computation), -16777216);
- drawText(10, 123, "Min Computation: " + GT_Utility.formatNumbers(minComputationPerSec) + " /s", -16777216);
- } else {
- int i = 0;
- for (String descLine : recipeDesc) {
- drawText(10, 73 + 10 * i, descLine, -16777216);
- i++;
- }
- }
- }
-
- public static class FixedPositionedStack extends PositionedStack {
-
- public final int mChance;
- public boolean permutated = false;
-
- public FixedPositionedStack(Object object, int x, int y) {
- this(object, x, y, 0);
- }
-
- public FixedPositionedStack(Object object, int x, int y, int aChance) {
- super(object, x, y, true);
- mChance = aChance;
- }
-
- @Override
- public void generatePermutations() {
- if (permutated) {
- return;
- }
- ArrayList<ItemStack> tDisplayStacks = new ArrayList<>();
- for (ItemStack tStack : items) {
- if (GT_Utility.isStackValid(tStack)) {
- if (tStack.getItemDamage() == 32767) {
- List<ItemStack> permutations = ItemList.itemMap.get(tStack.getItem());
- if (!permutations.isEmpty()) {
- ItemStack stack;
- for (Iterator<ItemStack> iterator = permutations.iterator(); iterator
- .hasNext(); tDisplayStacks.add(GT_Utility.copyAmount(tStack.stackSize, stack))) {
- stack = iterator.next();
- }
- } else {
- ItemStack base = new ItemStack(tStack.getItem(), tStack.stackSize);
- base.stackTagCompound = tStack.stackTagCompound;
- tDisplayStacks.add(base);
- }
- } else {
- tDisplayStacks.add(GT_Utility.copy(tStack));
- }
- }
- }
- items = tDisplayStacks.toArray(nullItem);
- if (items.length == 0) {
- items = new ItemStack[] { new ItemStack(Blocks.fire) };
- }
- permutated = true;
- setPermutationToRender(0);
- }
- }
-
- public class CachedDefaultRecipe extends TemplateRecipeHandler.CachedRecipe {
-
- public final GT_Recipe mRecipe;
- public final List<PositionedStack> mOutputs;
- public final List<PositionedStack> mInputs;
-
- public CachedDefaultRecipe(GT_Recipe aRecipe) {
- mRecipe = aRecipe;
-
- mOutputs = new ArrayList<>();
- mInputs = new ArrayList<>();
-
- int tStartIndex = 0;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14 + 9));
- }
- if (aRecipe.mSpecialItems != null) {
- mInputs.add(new FixedPositionedStack(aRecipe.mSpecialItems, 120, 52));
- }
- if (aRecipe.getOutput(tStartIndex) != null) {
- mOutputs.add(
- new FixedPositionedStack(
- aRecipe.getOutput(tStartIndex),
- 102,
- 14 + 9,
- aRecipe.getOutputChance(tStartIndex)));
- }
- }
-
- @Override
- public List<PositionedStack> getIngredients() {
- return getCycledIngredients(cycleticks / 10, mInputs);
- }
-
- @Override
- public PositionedStack getResult() {
- return null;
- }
-
- @Override
- public List<PositionedStack> getOtherStacks() {
- return mOutputs;
- }
- }
-
- public String trans(String aKey, String aEnglish) {
- return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_" + aKey, aEnglish, false);
- }
-}
diff --git a/src/main/java/com/github/technus/tectech/nei/TT_NEI_ScannerHandler.java b/src/main/java/com/github/technus/tectech/nei/TT_NEI_ScannerHandler.java
deleted file mode 100644
index 04558efad8..0000000000
--- a/src/main/java/com/github/technus/tectech/nei/TT_NEI_ScannerHandler.java
+++ /dev/null
@@ -1,358 +0,0 @@
-package com.github.technus.tectech.nei;
-
-import static com.github.technus.tectech.recipe.TT_recipeAdder.nullItem;
-import static gregtech.api.enums.ItemList.Display_Fluid;
-
-import java.awt.Rectangle;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.ut