Topic category: Help with Minecraft modding (Java Edition)
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
cannot make the potion brewing*
its not in 2020.5 they added brewing in 2021.1
cannot make the potion
play world of solitaire online