How to make a block drop a random item

Started by LordUnstoppable on

Topic category: Help with MCreator software

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

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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 21:54, 28. Mar 2024
Joined Dec 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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
Points:

User statistics:

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

thats what i wan to know

Last seen on 03:03, 6. Feb 2024
Joined Apr 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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:52, 18. Oct 2021
Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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 00:46, 1. Aug 2023
Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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 00:46, 1. Aug 2023
Joined Dec 2018
Points:

User statistics:

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

also its a custom table

 

Last seen on 14:06, 23. Jan 2024
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Im making a reforging anvil.
Sat, 07/03/2021 - 20:59

Im making a reforging anvil.

Last seen on 04:26, 13. Feb 2022
Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
using premade choises is…
Thu, 01/06/2022 - 18:17

using premade choises is really easy with an if statement but I want to make it so it can get any item in the game how do I do that ?

maybe even items from other mods without defying what items it can drop