Random possibility for item not working.

Started by meep123 on

Topic category: Help with modding (Java Edition)

Last seen on 03:38, 31. May 2019
Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Random possibility for item not working.

C:\Pylo\MCreator173\forge\build\sources\java\mod\mcreator\mcreator_undertaleCardPackCommonGUI.java:218: error: illegal start of expression
if(entity instanceof EntityPlayer)((EntityPlayer)entity).inventory.addItemStackToInventory(new ItemStack(mcreator_friskCard.block, ));
                                                                                                                                   ^
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Looks like you forgot to set…
Tue, 12/12/2017 - 16:03

Looks like you forgot to set the number of items (Frisk Cards) it adds to your inventory. You can try to redo the gui events or you can fix it by adding a number to the code itself here (replace [number_of_items] with a number):

new ItemStack(mcreator_friskCard.block, [number_of_items]));

Last seen on 03:38, 31. May 2019
Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks so much! I always…
Tue, 12/12/2017 - 18:50

Thanks so much! I always remember to do that but I forgot .