Potion item in procedure (latest version, 1.16)

Started by scorpion981 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Potion item in procedure (latest version, 1.16)

Hello, im trying to make a local itemstack value be a fire resistance potion but in mcreator you can only select one potion item (water bottle/any potions). I want to make this through code snippets so it is simpler to organize my procedure. I tried to set my local variable to this:

new ItemStack(Items.POTIONITEM), PotionTypes.STRONG_HEALING

but everytime (gradle):

Executing Gradle task: build
Build info: MCreator 2021.2.36710, forge-1.16.5, 64-bit, 3725 MB, Windows 10, JVM 11.0.11, JAVA_HOME: C:\Program Files\Pylo\MCreator\jdk
> Task :compileJava
C:\Users\enlai\MCreatorWorkspaces\minecraft_second_era\src\main\java\net\mcreator\minecraftsecondera\procedures\DrinkFireRestistancePotionProcedure.java:65: error: cannot find symbol  new Potion.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionTypes.STRONG_HEALING);
   ^
 symbol: class addPotionToItemStack
 location: class net.minecraft.potion.Potion
C:\Users\enlai\MCreatorWorkspaces\minecraft_second_era\src\main\java\net\mcreator\minecraftsecondera\procedures\DrinkFireRestistancePotionProcedure.java:65: error: cannot find symbol  new Potion.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionTypes.STRONG_HEALING);
        ^
 symbol: variable POTIONITEM
 location: class net.minecraft.item.Items
C:\Users\enlai\MCreatorWorkspaces\minecraft_second_era\src\main\java\net\mcreator\minecraftsecondera\procedures\DrinkFireRestistancePotionProcedure.java:65: error: cannot find symbol  new Potion.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionTypes.STRONG_HEALING);
          ^
 symbol: variable PotionTypes
 location: class net.mcreator.minecraftsecondera.procedures.DrinkFireRestistancePotionProcedure
3 errors
...

 

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
commands
Tue, 09/14/2021 - 03:01

commands

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
potions are water bottles…
Tue, 09/14/2021 - 03:05

potions are water bottles with NBTs

Joined Jul 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I know that but can I really…
Tue, 09/14/2021 - 11:40

I know that but can I really use a command in a procedure to make a itemstack variable