How to make a block drop a random item

Started by LordUnstoppable on Sun, 12/04/2016 - 18:37

Topic category: Help with MCreator software

Last seen on 21:07, 29. Jan 2017
Joined Dec 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to make a block drop a random item
Mon, 12/05/2016 - 14:14 (edited)

Hello,

I would like to make one block that drops a random item.

I have already tried to create that block, but I always end having a block that drops always the same item.

 

Please help me.

Edited by LordUnstoppable on Mon, 12/05/2016 - 14:14
Last seen on 07:35, 20. Oct 2020
Joined Dec 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Add an event result in "When
Wed, 12/14/2016 - 16:08

Add an event result in "When Block destroyed by Player" in the events tab on the left is somewhere an "Spawn Gem" event click on it. Then click on the gray square and choose the item. You see the word "(in all cases)", too. click on the arrow right next to the word.

Then you need to find "randomPossibility[50%]". You can change the 50% of course! You have a Possibility to change it from 0% to 100%. When you are finished click on the"Add Event" button. If you are making more "When Block destroyed by Player" events that have a random Possibility to drop an item you have a "Lucky Block" like Block! But you have to choose an item that will be dropped every time because if you won't the Application says "you need a block/an item that has to drop every time.".

Last seen on 11:23, 5. Mar 2018
Joined Oct 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Can you add an amount that
Sun, 10/15/2017 - 10:42

Can you add an amount that the item drops?

Last seen on 20:35, 19. Jan 2019
Joined Dec 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Is there still a way to do…
Sat, 01/19/2019 - 18:35

Is there still a way to do this with the newest version of MCreator?

Last seen on 19:09, 30. Mar 2019
Joined Jan 2015
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
thats what i wan to know
Sun, 02/17/2019 - 17:26

thats what i wan to know

Last seen on 22:00, 27. Sep 2020
Joined Apr 2014
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
If random 0,1 = 0.2 "which…
Sun, 02/17/2019 - 18:38

If random 0,1 = 0.2 "which is 20%"

Do spawn gem 

Last seen on 20:13, 19. Jul 2019
Joined Apr 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Hell Wes, can you elaborate…
Tue, 06/04/2019 - 01:34

Hell Wes, can you elaborate. I do not see how adding a variable and a single number can change anything. Could you send a screen shot of your Element Editor

Last seen on 05:07, 18. Oct 2020
Joined Feb 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
no that's with 1 % if random…
Tue, 06/04/2019 - 06:00

no that's with 1 %

if random 0,1 < 20 it's 20%

Last seen on 23:01, 21. Aug 2020
Joined Dec 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
im doing something similar…
Mon, 06/10/2019 - 00:22

im doing something similar but as a crafting table giving you a random item  when placing my custom item in the crafting slots 

Last seen on 23:01, 21. Aug 2020
Joined Dec 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
also its a custom table  
Mon, 06/10/2019 - 00:23

also its a custom table