[1.15] cannot the potion brewing

Started by Auriny on

Topic category: Help with modding (Java Edition)

Last seen on 04:13, 17. May 2021
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[1.15] cannot the potion brewing

here is errors
\MCreatorWorkspaces\aurarpg1152\src\main\java\net\mcreator\aurarpg\Potthornsbrewrecipe.java:46: error: ')' expected mth.invoke(null, Potions.POISON, Item.getItemFromBlock(BaldCactusBlock.block), ThornsPotion:potionType);
^
\MCreatorWorkspaces\aurarpg1152\src\main\java\net\mcreator\aurarpg\Potthornsbrewrecipe.java:46: error: not a statement mth.invoke(null, Potions.POISON, Item.getItemFromBlock(BaldCactusBlock.block), ThornsPotion:potionType);
^
\MCreatorWorkspaces\aurarpg1152\src\main\java\net\mcreator\aurarpg\Potthornsbrewrecipe.java:46: error: ';' expected mth.invoke(null, Potions.POISON, Item.getItemFromBlock(BaldCactusBlock.block), ThornsPotion:potionType);
here is my code
 

/**
 * This mod element is always locked. Enter your code in the methods below.
 * If you don't need some of these methods, you can remove them as they
 * are overrides of the base class Aurarpg1152ModElements.ModElement.
 *
 * You can register new events in this class too.
 *
 * As this class is loaded into mod element list, it NEEDS to extend
 * ModElement class. If you remove this extend statement or remove the
 * constructor, the compilation will fail.
 *
 * If you want to make a plain independent class, create it using
 * Project Browser - New... and make sure to make the class
 * outside net.mcreator.aurarpg as this package is managed by MCreator.
 *
 * If you change workspace package, modid or prefix, you will need
 * to manually adapt this file to these changes or remake it.
*/
package net.mcreator.aurarpg;

import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;

import net.minecraft.potion.Potions;
import net.minecraft.potion.Potion;
import net.minecraft.item.Item;

import net.mcreator.aurarpg.block.BaldCactusBlock;

import java.lang.reflect.Method;

@Aurarpg1152ModElements.ModElement.Tag
public class Potthornsbrewrecipe extends Aurarpg1152ModElements.ModElement {
    /**
     * Do not remove this constructor
     */
    public Potthornsbrewrecipe(Aurarpg1152ModElements instance) {
        super(instance, 34);
    }

    @Override
    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.POISON, Item.getItemFromBlock(BaldCactusBlock.block), ThornsPotion:potionType);
            // To add more recipes, you can copy the line above, for ex.
            // mth.invoke(null, potion2, item2, potion3);
        } catch (Throwable e) {
            System.err.println("ERROR: " + e); // You can change this part
        }
    }
}

help me please i cannot do this 4 hours

Last seen on 04:13, 17. May 2021
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
cannot make the potion…
Sat, 05/01/2021 - 04:36

cannot make the potion brewing*

Last seen on 01:27, 24. Jan 2023
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
its not in 2020.5 they added…
Sun, 05/09/2021 - 20:11

its not in 2020.5 they added brewing in 2021.1

Last seen on 01:50, 27. May 2021
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
cannot make the potion play…
Mon, 05/24/2021 - 08:20

cannot make the potion

play world of solitaire online