This PR changes certain methods and fields within MalumVanillaRecipeReplacements to be static. It also adds a nested mixin, to handle the changes in vanilla recipe generation.
The mixin uses a static field injected into VanillaRecipeProvider to store the class of the most recently used instance. A check is injected into RecipeBuilder.save to pass the RecipeBuilder through MalumVanillaRecipeReplacements.enhance if the field matches said class. This will always work, since VanillaRecipeProvider.buildRecipes calls RecipeBuilder.save , which, according to the mixin, happens after storing the class.
This PR changes certain methods and fields within MalumVanillaRecipeReplacements to be static. It also adds a nested mixin, to handle the changes in vanilla recipe generation.
The mixin uses a static field injected into VanillaRecipeProvider to store the class of the most recently used instance. A check is injected into
RecipeBuilder.save
to pass the RecipeBuilder throughMalumVanillaRecipeReplacements.enhance
if the field matches said class. This will always work, sinceVanillaRecipeProvider.buildRecipes
callsRecipeBuilder.save
, which, according to the mixin, happens after storing the class.TLDR; It's hacky, so please review carefully