Topic category: Help with Minecraft modding (Java Edition)
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);