Custom BrewingStand recipe

Started by TheKiwisEdge on Wed, 04/14/2021 - 00:05

Topic category: Help with modding (Java Edition)

Last seen on 23:06, 21. Apr 2021
Joined Feb 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Custom BrewingStand recipe
Wed, 04/14/2021 - 00:05

I am making a mod in which you need a bunch of chemicals to make stuff, i need a way to be able to craft two potion types together and get an item as a result. The part where it combines a potion and item to get a potion works just fine. The part where it adds two potions and gives an item does not. Is there something i can do with the second try statement, would i need to make a secondary procedure, or am i out of luck.

public void init(FMLCommonSetupEvent event) {
        try {
            Class clazz = net.minecraft.potion.PotionBrewing.class;
            Method mth = ObfuscationReflectionHelper.findMethod(clazz, "func_193357_a", Potion.class, Item.class, Potion.class);
            mth.invoke(null, Potions.WATER, RockSaltItem.block, SaltWaterPotion.potionType);
            mth.invoke(null, SaltWaterPotion.potionType, ElectrolyzerCompundItem.block, ChlorinePotion.potionType);
            mth.invoke(null, Potions.WATER, SulfurDustItem.block, SulfuricAcidPotion.potionType);
            mth.invoke(null, SulfuricAcidPotion.potionType, RockSaltItem.block, SodiumBisulfitePotion.potionType);
            mth.invoke(null, SodiumBisulfitePotion.potionType, RockSaltItem.block, HydrochloricAcidPotion.potionType);
        } 
        try {
            Class clazz = net.minecraft.potion.PotionBrewing.class;
            Method mth = ObfuscationReflectionHelper.findMethod(clazz, "func_193357_a", Potion.class, Potion.class, Item.class);
            mth.invoke(null, ChlorinePotion.potionType, HydrochloricAcidPotion.potionType, ChlorineGasBottleItem.block);