Tech Reborn

Tech Reborn

30M Downloads

Fuels accepted in various fluid fuel powered generators are hardcoded

KonSola5 opened this issue ยท 1 comments

commented

Describe the bug
Fuels accepted in various fluid fuel powered generators are hardcoded.

That means that a pack would have to either make a custom mod with an @Inject (for adding) or @Overwrite (for removing recipes) mixin into the class registering the fluid generator recipes, or the pack would have to perform weird fluid conversion recipes.

public class FluidGeneratorRecipes {
public static void init() {
register(EFluidGenerator.DIESEL, ModFluids.NITROFUEL.getFluid(), 24);
register(EFluidGenerator.DIESEL, ModFluids.NITROCOAL_FUEL.getFluid(), 48);
register(EFluidGenerator.DIESEL, ModFluids.DIESEL.getFluid(), 128);
register(EFluidGenerator.DIESEL, ModFluids.NITRO_DIESEL.getFluid(), 400);
register(EFluidGenerator.SEMIFLUID, ModFluids.SODIUM.getFluid(), 30);
register(EFluidGenerator.SEMIFLUID, ModFluids.LITHIUM.getFluid(), 60);
register(EFluidGenerator.SEMIFLUID, ModFluids.OIL.getFluid(), 16);
register(EFluidGenerator.SEMIFLUID, ModFluids.BIOFUEL.getFluid(), 6);
register(EFluidGenerator.THERMAL, Fluids.LAVA, 60);
register(EFluidGenerator.GAS, ModFluids.HYDROGEN.getFluid(), 15);
register(EFluidGenerator.GAS, ModFluids.METHANE.getFluid(), 45);
register(EFluidGenerator.PLASMA, ModFluids.HELIUMPLASMA.getFluid(), 8192);
}
static void register(EFluidGenerator generator, Fluid fluid, int euPerMB) {
GeneratorRecipeHelper.registerFluidRecipe(generator, fluid, euPerMB);
}
}

Steps to Reproduce
Steps to reproduce the behavior:
Coding issue.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information with the version):

  • Minecraft: Any (present on 1.20.4)
  • Mod Loader: Fabric

Logs
None, since it's a coding issue.

Additional context
Fusion Reactor recipes are already compatible with datapacks, and that's the only generator in the whole mod which inputs can be configured with a datapack.

commented

Done, fluids are now data driven recipes, with the following format:

{
  "type": "techreborn:diesel_generator",
  "fluid": "techreborn:nitrofuel",
  "power": 24
}

type can be one of:

  • techreborn:thermal_generator
  • techreborn:gas_generator
  • techreborn:diesel_generator
  • techreborn:semi_fluid_generator
  • techreborn:plasma_generator