Skip to content

Commit

Permalink
Allow overriding AluminumBrass as the metal pattern material
Browse files Browse the repository at this point in the history
  • Loading branch information
YannickMG committed Jan 20, 2025
1 parent 0f4eb09 commit 4af2904
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/main/java/tconstruct/smeltery/TinkerSmeltery.java
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ public class TinkerSmeltery {
public static Block speedBlock;
public static Fluid bloodFluid;
public static Block blood;
private static FluidType metalPatternFluidType;

@Handler
public void preInit(FMLPreInitializationEvent event) {
Expand Down Expand Up @@ -608,6 +609,7 @@ public void preInit(FMLPreInitializationEvent event) {
@Handler
public void init(FMLInitializationEvent event) {
proxy.initialize();
loadMetalPatternMaterial();
craftingTableRecipes();
addRecipesForSmeltery();
addRecipesForTableCasting();
Expand All @@ -621,6 +623,10 @@ public void postInit(FMLPostInitializationEvent evt) {
modIntegration();
}

private static void loadMetalPatternMaterial() {
metalPatternFluidType = FluidType.getFluidType(PHConstruct.metalCastFluidTypeName);
}

private void craftingTableRecipes() {

String[] patSurround = { "###", "#m#", "###" };
Expand Down Expand Up @@ -1000,7 +1006,7 @@ private void addRecipesForTableCasting() {
// Blank
tableCasting.addCastingRecipe(
new ItemStack(TinkerTools.blankPattern, 1, 1),
new FluidStack(TinkerSmeltery.moltenAlubrassFluid, TConstruct.ingotLiquidValue),
new FluidStack(metalPatternFluidType.fluid, TConstruct.ingotLiquidValue),
80);
if (!PHConstruct.removeGoldCastRecipes) {
tableCasting.addCastingRecipe(
Expand Down Expand Up @@ -1358,7 +1364,7 @@ public static void addMetalPatternCastingTableRecipe(LiquidCasting tableCasting,
int delay) {
tableCasting.addCastingRecipe(
pattern,
new FluidStack(TinkerSmeltery.moltenAlubrassFluid, TConstruct.ingotLiquidValue),
new FluidStack(metalPatternFluidType.fluid, TConstruct.ingotLiquidValue),
shape,
delay);
if (!PHConstruct.removeGoldCastRecipes) {
Expand Down Expand Up @@ -1649,7 +1655,7 @@ protected static void addRecipesForSmeltery() {

// Items
Smeltery.addMelting(
FluidType.getFluidType("AluminumBrass"),
metalPatternFluidType,
new ItemStack(TinkerTools.blankPattern, 4, 1),
-50,
TConstruct.ingotLiquidValue);
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/tconstruct/util/config/PHConstruct.java
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,9 @@ public static void initProps(File location) {
new String[] { "wanion.avaritiaddons.block.chest.infinity.TileEntityInfinityChest" })
.getStringList());

metalCastFluidTypeName = config.get("CrossmodInteractions", "Metal cast FluidType", "AluminumBrass", "For pack maintainers. Defines the LiquidType used to create metal casts.")
.getString();

/* Save the configuration file only if it has changed */
if (config.hasChanged()) config.save();

Expand Down Expand Up @@ -508,4 +511,7 @@ public static void initProps(File location) {
public static boolean extraBlockUpdates;
public static String[] heartDropBlacklist;
public static Set<String> craftingStationBlacklist;

// Crossmod interactions
public static String metalCastFluidTypeName;
}

0 comments on commit 4af2904

Please sign in to comment.