Random possibility for item not working.

Started by meep123 on Sun, 12/10/2017 - 13:30

Topic category: Help with modding (Java Edition)

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

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Random possibility for item not working.
Sun, 12/10/2017 - 13:30

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.

Last seen on 19:58, 3. Dec 2020
Joined Feb 2013
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
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
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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 .