making a block that drops random items

Started by 0rightsign0 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Mar 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
making a block that drops random items

how to make a block that drops random stuff? i am making a lucky block and i need help.

Joined Nov 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
1 : create a procedure when…
Tue, 04/01/2025 - 06:09

1 : create a procedure when your block is breaked or smth like that

2 : make a integer/number local variable (you can also make it a global variable but if you need it just for this procedure make it a local) 

3 : take the procedure block like "set number your variable to___" (in "custom variables" section) take the "random number beetween XX and max XX" (math section) make the min as 1 and the max as the number of events you want for your lucky block and then place this block in the empty space of the "set number" thing 

4 : place the thing like "if your variable value is = to number from 1 to the max thing do :" and then you place the procedure of your events (do that for every number with a different event)

you have it

 

(sorry i'm bad at explaining)

 

Joined Nov 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
here an image of the…
Tue, 04/01/2025 - 06:13

here an image of the procedure :

Joined Nov 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
oh... the image dont work…
Tue, 04/01/2025 - 06:14

oh... the image dont work sorry