Trying to make a loot box

Started by jimmyim10 on

Topic category: Help with modding (Java Edition)

Last seen on 21:15, 26. Oct 2020
Joined Jul 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Trying to make a loot box

So im trying to make an item that when you right click in the air with it. it spawns an item where you are. Right now i'm setting a local variable to a random number and based on that number dropping an item with the spawn gem function. It's not working so i need a little help with this

Last seen on 05:23, 31. Jul 2023
Joined Mar 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Im not on MCreator at the…
Fri, 07/17/2020 - 06:08

Im not on MCreator at the moment so I may be wrong, but Im pretty sure you can just make it so once you right click remove it from the inventory, pick a random number, then have different if statements be activated if the number is the same as it. Again not on MCreator so I can't really check but that would be my first guess if I were to try something like this.

Last seen on 21:15, 26. Oct 2020
Joined Jul 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
that's what im doing, but it…
Fri, 07/24/2020 - 17:28

that's what im doing, but it won't work

Last seen on 00:59, 1. Dec 2023
Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This worked for me:
Fri, 07/24/2020 - 19:33

This worked for me:

Procedure

Last seen on 00:59, 1. Dec 2023
Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think you might have to…
Fri, 07/24/2020 - 19:34

I think you might have to open that image in a new tab to see it btw.