CraftTweaker

CraftTweaker

151M Downloads

Create custom potion error

0karin opened this issue ยท 2 comments

commented

Issue Description:

I trying to create simple custom potion, using wiki sample for this.

What happens:

[CLIENT][ERROR] potions.zs:5 > 2 methods available but none matches the parameters (any[])
This is usually an error in your script, not in the mod
createPotion(ZenTypeNative: crafttweaker.potions.IPotionEffect[])
createPotion(ZenTypeNative: java.lang.Object[][])

What you expected to happen:

That the script would work. And this work, but on version 1.12-4.1.16.

Script used

https://pastebin.com/jr315S2S

crafttweaker.log file

https://pastebin.com/Xv2fsN0w


Affected Versions (Do not use "latest"):

  • Minecraft: 1.12.2
  • Forge: 14.23.5.2838
  • Crafttweaker: 1.12-4.1.17
  • Using a server: No

Your most recent log file where the issue was present:

https://pastebin.com/80Shasb2

commented

Use the new method signature instead:

itemUtils.createPotion(<potion:minecraft:strength>.makePotionEffect(1, 1));
commented

As kindlich said, use the new method, unfortunately we are in a position where we can't remove the old one while maintaining binary compatibility.