mirror of
https://github.com/turbodiesel4598/NuclearCraft
synced 2026-04-26 16:24:50 +02:00
Compare commits
3 Commits
b03ac28246
...
e747545f0e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e747545f0e | ||
|
|
713e9ee1db | ||
|
|
c6e8954367 |
@ -1,3 +1,7 @@
|
|||||||
|
v2.18zzz
|
||||||
|
|
||||||
|
* Fixed crash when GTCEu is installed [thanks to DStrand1!]
|
||||||
|
|
||||||
v2.18zz
|
v2.18zz
|
||||||
|
|
||||||
* Fixed ore processing config not correctly disabling ore melting recipes and unnecessarily disabling ingot crushing and melting recipes
|
* Fixed ore processing config not correctly disabling ore melting recipes and unnecessarily disabling ingot crushing and melting recipes
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
mc_version=1.12.2
|
mc_version=1.12.2
|
||||||
forge_version=14.23.5.2847
|
forge_version=14.23.5.2847
|
||||||
mapping_version=stable_39
|
mapping_version=stable_39
|
||||||
mod_version=2.18zz
|
mod_version=2.18zzz
|
||||||
|
|
||||||
ic2_version=2.8.221-ex112
|
ic2_version=2.8.221-ex112
|
||||||
jei_version=4.16.1.301
|
jei_version=4.16.1.301
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import java.util.Collection;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import net.minecraftforge.fml.common.Loader;
|
||||||
import org.apache.commons.lang3.tuple.Pair;
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
|
|
||||||
import gregtech.api.items.metaitem.MetaItem.MetaValueItem;
|
import gregtech.api.items.metaitem.MetaItem.MetaValueItem;
|
||||||
@ -32,6 +33,14 @@ import net.minecraftforge.fluids.FluidStack;
|
|||||||
import net.minecraftforge.fml.common.Optional;
|
import net.minecraftforge.fml.common.Optional;
|
||||||
|
|
||||||
public class GTCERecipeHelper {
|
public class GTCERecipeHelper {
|
||||||
|
|
||||||
|
private static RecipeMap<?> EXTRACTOR_MAP;
|
||||||
|
|
||||||
|
@Optional.Method(modid = "gregtech")
|
||||||
|
public static void checkGtVersion() {
|
||||||
|
String version = Loader.instance().getIndexedModList().get("gregtech").getVersion();
|
||||||
|
EXTRACTOR_MAP = getExtractorMap(Integer.parseInt(version.split("\\.")[0]));
|
||||||
|
}
|
||||||
|
|
||||||
// Thanks so much to Firew0lf for the original method!
|
// Thanks so much to Firew0lf for the original method!
|
||||||
@Optional.Method(modid = "gregtech")
|
@Optional.Method(modid = "gregtech")
|
||||||
@ -63,8 +72,9 @@ public class GTCERecipeHelper {
|
|||||||
builder = addStats(recipeMap.recipeBuilder(), recipe, 16, 12);
|
builder = addStats(recipeMap.recipeBuilder(), recipe, 16, 12);
|
||||||
break;
|
break;
|
||||||
case "melter":
|
case "melter":
|
||||||
recipeMap = RecipeMaps.FLUID_EXTRACTION_RECIPES;
|
recipeMap = EXTRACTOR_MAP;
|
||||||
builder = addStats(recipeMap.recipeBuilder(), recipe, 32, 16);
|
if (recipeMap != null)
|
||||||
|
builder = addStats(recipeMap.recipeBuilder(), recipe, 32, 16);
|
||||||
break;
|
break;
|
||||||
case "supercooler":
|
case "supercooler":
|
||||||
recipeMap = RecipeMaps.VACUUM_RECIPES;
|
recipeMap = RecipeMaps.VACUUM_RECIPES;
|
||||||
@ -107,8 +117,9 @@ public class GTCERecipeHelper {
|
|||||||
builder = addStats(recipeMap.recipeBuilder(), recipe, 20, 20).notConsumable(new IntCircuitIngredient(1));
|
builder = addStats(recipeMap.recipeBuilder(), recipe, 20, 20).notConsumable(new IntCircuitIngredient(1));
|
||||||
break;
|
break;
|
||||||
case "extractor":
|
case "extractor":
|
||||||
recipeMap = RecipeMaps.FLUID_EXTRACTION_RECIPES;
|
recipeMap = EXTRACTOR_MAP;
|
||||||
builder = addStats(recipeMap.recipeBuilder(), recipe, 16, 12);
|
if (recipeMap != null)
|
||||||
|
builder = addStats(recipeMap.recipeBuilder(), recipe, 16, 12);
|
||||||
break;
|
break;
|
||||||
case "centrifuge":
|
case "centrifuge":
|
||||||
recipeMap = RecipeMaps.CENTRIFUGE_RECIPES;
|
recipeMap = RecipeMaps.CENTRIFUGE_RECIPES;
|
||||||
@ -324,4 +335,16 @@ public class GTCERecipeHelper {
|
|||||||
}
|
}
|
||||||
return MetaItems.SHAPE_MOLD_BALL;
|
return MetaItems.SHAPE_MOLD_BALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Optional.Method(modid = "gregtech")
|
||||||
|
private static RecipeMap<?> getExtractorMap(int gtVersion) {
|
||||||
|
if (gtVersion == 2) {
|
||||||
|
return RecipeMaps.EXTRACTOR_RECIPES;
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
return (RecipeMap<?>) RecipeMaps.class.getField("FLUID_EXTRACTION_RECIPES").get(null);
|
||||||
|
} catch (NoSuchFieldException | IllegalAccessException ignored) {}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -59,6 +59,7 @@ public abstract class ProcessorRecipeHandler extends AbstractRecipeHandler<Proce
|
|||||||
|
|
||||||
public void addGTCERecipes() {
|
public void addGTCERecipes() {
|
||||||
if (ModCheck.gregtechLoaded() && GTCE_INTEGRATION.getBoolean(recipeName)) {
|
if (ModCheck.gregtechLoaded() && GTCE_INTEGRATION.getBoolean(recipeName)) {
|
||||||
|
GTCERecipeHelper.checkGtVersion();
|
||||||
for (ProcessorRecipe recipe : recipeList) {
|
for (ProcessorRecipe recipe : recipeList) {
|
||||||
GTCERecipeHelper.addGTCERecipe(recipeName, recipe);
|
GTCERecipeHelper.addGTCERecipe(recipeName, recipe);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user