diff options
Diffstat (limited to 'src/main/java/me/shedaniel/rei/mixin/MixinBrewingRecipeRegistry.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/mixin/MixinBrewingRecipeRegistry.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/me/shedaniel/rei/mixin/MixinBrewingRecipeRegistry.java b/src/main/java/me/shedaniel/rei/mixin/MixinBrewingRecipeRegistry.java index 097ec1c98..5c3e10461 100644 --- a/src/main/java/me/shedaniel/rei/mixin/MixinBrewingRecipeRegistry.java +++ b/src/main/java/me/shedaniel/rei/mixin/MixinBrewingRecipeRegistry.java @@ -26,13 +26,13 @@ public class MixinBrewingRecipeRegistry { private static final List<Potion> REGISTERED_POTION_TYPES = Lists.newArrayList(); private static final List<Ingredient> SELF_POTION_TYPES = Lists.newArrayList(); - @Inject(method = "method_8080", at = @At("RETURN")) + @Inject(method = "registerPotionType", at = @At("RETURN")) private static void method_8080(Item item_1, CallbackInfo ci) { if (item_1 instanceof PotionItem) SELF_POTION_TYPES.add(Ingredient.ofItems(new ItemProvider[]{item_1})); } - @Inject(method = "method_8071", at = @At("RETURN")) + @Inject(method = "registerItemRecipe", at = @At("RETURN")) private static void method_8071(Item item_1, Item item_2, Item item_3, CallbackInfo ci) { if (item_1 instanceof PotionItem && item_3 instanceof PotionItem) SELF_ITEM_RECIPES.add(new BrewingRecipe(item_1, Ingredient.ofItems(new ItemProvider[]{item_2}), item_3)); @@ -41,15 +41,15 @@ public class MixinBrewingRecipeRegistry { @Inject(method = "registerPotionRecipe", at = @At("RETURN")) private static void registerPotionRecipe(Potion potion_1, Item item_1, Potion potion_2, CallbackInfo ci) { if (!REGISTERED_POTION_TYPES.contains(potion_1)) - registerPotionType(potion_1); + rei_registerPotionType(potion_1); if (!REGISTERED_POTION_TYPES.contains(potion_2)) - registerPotionType(potion_2); + rei_registerPotionType(potion_2); SELF_POTION_TYPES.stream().map(Ingredient::getStackArray).forEach(itemStacks -> Arrays.stream(itemStacks).forEach(stack -> { DefaultPlugin.registerBrewingDisplay(new DefaultBrewingDisplay(PotionUtil.setPotion(stack.copy(), potion_1), Ingredient.ofItems(new ItemProvider[]{item_1}), PotionUtil.setPotion(stack.copy(), potion_2))); })); } - private static void registerPotionType(Potion potion) { + private static void rei_registerPotionType(Potion potion) { REGISTERED_POTION_TYPES.add(potion); SELF_ITEM_RECIPES.forEach(recipe -> { DefaultPlugin.registerBrewingDisplay(new DefaultBrewingDisplay(PotionUtil.setPotion(recipe.input.getDefaultStack(), potion), recipe.ingredient, PotionUtil.setPotion(recipe.output.getDefaultStack(), potion))); |
