Trying to make a loot box

Started by jimmyim10 on

Topic category: Help with Minecraft modding (Java Edition)

Active 4 years ago
Joined Jul 2017
Points:
714

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 3
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

Active 1 year ago
Joined Mar 2019
Points:
756

User statistics:

  • Modifications: 2
  • Forum topics: 9
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 44
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.

Active 4 years ago
Joined Jul 2017
Points:
714

User statistics:

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

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

Active 3 days ago
Joined Feb 2016
Points:
868

User statistics:

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

This worked for me:

Procedure

Active 3 days ago
Joined Feb 2016
Points:
868

User statistics:

  • Modifications: 4
  • Forum topics: 13
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 104
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.