aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authormiozune <miozune@gmail.com>2022-09-03 18:18:08 +0900
committerGitHub <noreply@github.com>2022-09-03 11:18:08 +0200
commit09e190cfe796ce7471802d2e54677ee8073ce172 (patch)
treeab63661153aa3d25faa6d7266aab776e5fe1ee53 /src/main/java
parent0a079e7603823a025e7574d1cc72d62d6306151d (diff)
downloadGT5-Unofficial-09e190cfe796ce7471802d2e54677ee8073ce172.tar.gz
GT5-Unofficial-09e190cfe796ce7471802d2e54677ee8073ce172.tar.bz2
GT5-Unofficial-09e190cfe796ce7471802d2e54677ee8073ce172.zip
Fix reinforced glass (#1337)
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/gregtech/api/enums/Materials.java11
-rw-r--r--src/main/java/gregtech/api/util/GT_Recipe.java9
-rw-r--r--src/main/java/gregtech/api/util/GT_RecipeRegistrator.java2
-rw-r--r--src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java16
4 files changed, 24 insertions, 14 deletions
diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java
index 9128fd590c..387d0eaa4f 100644
--- a/src/main/java/gregtech/api/enums/Materials.java
+++ b/src/main/java/gregtech/api/enums/Materials.java
@@ -517,7 +517,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer {
public static Materials FluidNaquadahFuel = new MaterialBuilder(600, TextureSet.SET_FLUID , "Naquadah Fuel").setName("FluidNaqudahFuel").addCell().addFluid().setRGB(62, 62, 62).setColor(Dyes.dyeBlack).constructMaterial();
public static Materials EnrichedNaquadria = new MaterialBuilder(601, TextureSet.SET_FLUID , "Enriched Naquadria").setName("EnrichedNaquadria").addCell().addFluid().setRGB(52, 52, 52).setColor(Dyes.dyeBlack).constructMaterial();
- public static Materials ReinforceGlass = new MaterialBuilder(602, TextureSet.SET_FLUID , "Molten Reinforced Glass").setName("ReinforcedGlass").addCell().addFluid().setRGB(192, 245, 254).setColor(Dyes.dyeWhite).setLiquidTemperature(2000).constructMaterial();
+ public static Materials ReinforceGlass = new MaterialBuilder(602, TextureSet.SET_FLUID , "Reinforced Glass").setName("ReinforcedGlass").setRGB(192, 245, 254).setColor(Dyes.dyeWhite).setLiquidTemperature(2000).constructMaterial().disableAutoGeneratedRecycleRecipes();
public static Materials BioMediumRaw = new MaterialBuilder(603, TextureSet.SET_FLUID , "Raw Bio Catalyst Medium").setName("BioMediumRaw").addCell().addFluid().setRGB(97, 147, 46).setColor(Dyes.dyeLime).constructMaterial();
public static Materials BioMediumSterilized = new MaterialBuilder(604, TextureSet.SET_FLUID , "Sterilized Bio Catalyst Medium").setName("BiohMediumSterilized").addCell().addFluid().setRGB(162, 253, 53).setColor(Dyes.dyeLime).constructMaterial();
@@ -668,7 +668,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer {
public static Materials Amethyst = new Materials( 509, TextureSet.SET_FLINT , 7.0F, 256, 3, 1 |4|8 |64 , 210, 50, 210, 127, "Amethyst" , "Amethyst" , 0, 0, -1, 0, false, true, 3, 1, 1, Dyes.dyePink , 1, Arrays.asList(new MaterialStack(SiliconDioxide, 4), new MaterialStack(Iron, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 6), new TC_AspectStack(TC_Aspects.VITREUS, 4)));
public static Materials Redstone = new Materials( 810, TextureSet.SET_ROUGH , 1.0F, 0, 2, 1 |8 , 200, 0, 0, 0, "Redstone" , "Redstone" , 0, 0, 500, 0, false, false, 3, 1, 1, Dyes.dyeRed , 2, Arrays.asList(new MaterialStack(Silicon, 1), new MaterialStack(Pyrite, 5), new MaterialStack(Ruby, 1), new MaterialStack(Mercury, 3)), Arrays.asList(new TC_AspectStack(TC_Aspects.MACHINA, 1), new TC_AspectStack(TC_Aspects.POTENTIA, 2)));
public static Materials Lapis = new Materials( 526, TextureSet.SET_LAPIS , 1.0F, 0, 1, 1 |4|8 , 70, 70, 220, 0, "Lapis" , "Lapis" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeBlue , 2, Arrays.asList(new MaterialStack(Lazurite, 12), new MaterialStack(Sodalite, 2), new MaterialStack(Pyrite, 1), new MaterialStack(Calcite, 1)), Collections.singletonList(new TC_AspectStack(TC_Aspects.SENSUS, 1)));
- public static Materials Blaze = new Materials( 801, TextureSet.SET_POWDER , 2.0F, 16, 1, 1 |64 , 255, 200, 0, 0, "Blaze" , "Blaze" , 0, 0, 6400, 0, false, false, 2, 3, 2, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(DarkAsh, 1), new MaterialStack(Sulfur, 1), new MaterialStack(Magic, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 2), new TC_AspectStack(TC_Aspects.IGNIS, 4)));
+ public static Materials Blaze = new Materials( 801, TextureSet.SET_POWDER , 2.0F, 16, 1, 1 |64 , 255, 200, 0, 0, "Blaze" , "Blaze" , 0, 0, 6400, 0, false, false, 2, 3, 2, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(DarkAsh, 1), new MaterialStack(Sulfur, 1), new MaterialStack(Magic, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.PRAECANTATIO, 2), new TC_AspectStack(TC_Aspects.IGNIS, 4))).disableAutoGeneratedRecycleRecipes();
public static Materials EnderPearl = new Materials( 532, TextureSet.SET_SHINY , 1.0F, 16, 1, 1 |4 , 108, 220, 200, 0, "EnderPearl" , "Enderpearl" , 0, 0, -1, 0, false, false, 1, 16, 10, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(Beryllium, 1), new MaterialStack(Potassium, 4), new MaterialStack(Nitrogen, 5), new MaterialStack(Magic, 6)), Arrays.asList(new TC_AspectStack(TC_Aspects.ALIENIS, 4), new TC_AspectStack(TC_Aspects.ITER, 4), new TC_AspectStack(TC_Aspects.PRAECANTATIO, 2)));
public static Materials EnderEye = new Materials( 533, TextureSet.SET_SHINY , 1.0F, 16, 1, 1 |4 , 160, 250, 230, 0, "EnderEye" , "Endereye" , 5, 10, -1, 0, false, false, 1, 2, 1, Dyes.dyeGreen , 2, Arrays.asList(new MaterialStack(EnderPearl, 1), new MaterialStack(Blaze, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.SENSUS, 4), new TC_AspectStack(TC_Aspects.ALIENIS, 4), new TC_AspectStack(TC_Aspects.ITER, 4), new TC_AspectStack(TC_Aspects.PRAECANTATIO, 3), new TC_AspectStack(TC_Aspects.IGNIS, 2)));
public static Materials Flint = new Materials( 802, TextureSet.SET_FLINT , 2.5F, 128, 1, 1 |64 , 0, 32, 64, 0, "Flint" , "Flint" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeGray , 2, Collections.singletonList(new MaterialStack(SiliconDioxide, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.TERRA, 1), new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1)));
@@ -945,6 +945,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer {
mBlastFurnaceRequired = false,
mAutoGenerateBlastFurnaceRecipes = true,
mAutoGenerateVacuumFreezerRecipes = true,
+ mAutoGenerateRecycleRecipes = true,
mTransparent = false,
mHasParentMod = true,
mHasPlasma = false,
@@ -2289,6 +2290,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer {
Concrete.add(SubTag.STONE, SubTag.NO_SMASHING, SubTag.SMELTING_TO_FLUID);
ConstructionFoam.add(SubTag.STONE, SubTag.NO_SMASHING, SubTag.EXPLOSIVE, SubTag.NO_SMELTING);
+ ReinforceGlass.add(SubTag.CRYSTAL, SubTag.NO_SMASHING, SubTag.SMELTING_TO_FLUID);
Redstone.add(
SubTag.STONE,
SubTag.NO_SMASHING,
@@ -2834,6 +2836,11 @@ public class Materials implements IColorModulationContainer, ISubTagContainer {
return this;
}
+ public Materials disableAutoGeneratedRecycleRecipes() {
+ mAutoGenerateRecycleRecipes = false;
+ return this;
+ }
+
/**
* This is for keeping compatibility with addons mods (Such as TinkersGregworks etc.) that looped over the old materials enum
*/
diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java
index 96ff61a026..1ab29c067b 100644
--- a/src/main/java/gregtech/api/util/GT_Recipe.java
+++ b/src/main/java/gregtech/api/util/GT_Recipe.java
@@ -731,13 +731,16 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
public void reloadOwner() {
setOwner(Loader.instance().activeModContainer());
- final List<String> excludedClasses =
- Arrays.asList("java.lang.Thread", "gregtech.api.util.GT_Recipe", "gregtech.common.GT_RecipeAdder");
+ final List<String> excludedClasses = Arrays.asList(
+ "java.lang.Thread",
+ "gregtech.api.util.GT_Recipe",
+ "gregtech.api.util.GT_Recipe$GT_Recipe_Map",
+ "gregtech.common.GT_RecipeAdder");
if (GT_Mod.gregtechproxy.mNEIRecipeOwnerStackTrace) {
List<StackTraceElement> toAdd = new ArrayList<>();
for (StackTraceElement stackTrace : Thread.currentThread().getStackTrace()) {
if (excludedClasses.stream()
- .noneMatch(c -> stackTrace.getClassName().contains(c))) {
+ .noneMatch(c -> stackTrace.getClassName().equals(c))) {
toAdd.add(stackTrace);
}
}
diff --git a/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java b/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java
index a01ee332ae..847a40cef2 100644
--- a/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java
+++ b/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java
@@ -149,9 +149,9 @@ public class GT_RecipeRegistrator {
public static void registerMaterialRecycling(ItemStack aStack, ItemData aData) {
if (GT_Utility.isStackInvalid(aStack)
- || GT_Utility.areStacksEqual(new ItemStack(Items.blaze_rod), aStack)
|| aData == null
|| !aData.hasValidMaterialData()
+ || !aData.mMaterial.mMaterial.mAutoGenerateRecycleRecipes
|| aData.mMaterial.mAmount <= 0
|| GT_Utility.getFluidForFilledItem(aStack, false) != null) return;
registerReverseMacerating(GT_Utility.copyAmount(1, aStack), aData, aData.mPrefix == null);
diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java
index c46c1d4912..d5ab290aec 100644
--- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java
+++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java
@@ -2373,21 +2373,21 @@ public class GT_MachineRecipeLoader implements Runnable {
GT_Values.RA.addFluidExtractionRecipe(
GT_ModHandler.getModItem("IC2", "blockAlloyGlass", 1L, 0),
GT_Values.NI,
- Materials.ReinforceGlass.getFluid(144),
+ Materials.ReinforceGlass.getMolten(144),
10000,
100,
1920);
GT_Values.RA.addFluidExtractionRecipe(
- GT_ModHandler.getModItem(MOD_ID_DC, "item.ReinforcedGlassPLate", 2L, 0),
+ GT_ModHandler.getModItem(MOD_ID_DC, "item.ReinforcedGlassPlate", 1L, 0),
GT_Values.NI,
- Materials.ReinforceGlass.getFluid(144),
+ Materials.ReinforceGlass.getMolten(72),
10000,
- 75,
+ 50,
1920);
GT_Values.RA.addFluidExtractionRecipe(
- GT_ModHandler.getModItem(MOD_ID_DC, "item.ReinforcedGlassLense", 2L, 0),
+ GT_ModHandler.getModItem(MOD_ID_DC, "item.ReinforcedGlassLense", 1L, 0),
GT_Values.NI,
- Materials.ReinforceGlass.getFluid(144),
+ Materials.ReinforceGlass.getMolten(54),
10000,
50,
1920);
@@ -3523,7 +3523,7 @@ public class GT_MachineRecipeLoader implements Runnable {
GT_Values.RA.addFluidSolidifierRecipe(
ItemList.Shape_Mold_Plate.get(0L),
Materials.ReinforceGlass.getMolten(72),
- GT_ModHandler.getModItem(MOD_ID_DC, "item.ReinforcedGlassPLate", 1L, 0),
+ GT_ModHandler.getModItem(MOD_ID_DC, "item.ReinforcedGlassPlate", 1L, 0),
160,
1920);
GT_Values.RA.addFluidSolidifierRecipe(
@@ -4972,7 +4972,7 @@ public class GT_MachineRecipeLoader implements Runnable {
24);
GT_Values.RA.addFluidSolidifierRecipe(
ItemList.Shape_Mold_Ball.get(0L),
- Materials.ReinforceGlass.getFluid(288),
+ Materials.ReinforceGlass.getMolten(288),
ItemList.Circuit_Parts_Reinforced_Glass_Tube.get(1),
200,
240);