Lucky Block creation

Started by DeroPlayz on Sun, 10/11/2020 - 22:38

Topic category: Help with modding (Java Edition)

Last seen on 19:00, 5. Sep 2021
Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Lucky Block creation
Sun, 10/11/2020 - 22:38

How the hell do I make it so it can drop various items or start various events upon opening? I haven't a clue what to do and I'm getting annoyed (been working on the project for a couple days)

Last seen on 21:12, 27. May 2022
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Hello DeroPlayz First off,…
Mon, 10/12/2020 - 06:14

Hello DeroPlayz

First off, its not a good idea to come on to a forum while your annoyed and make a post demanding someone give you a answer to your question. I'm not flaming here just giving you some advice.

Secondly here is my approach to a lucky block that gives items at a % chance

↓↓↓

https://i.imgur.com/JEOVjUz.png

Last seen on 21:12, 27. May 2022
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Sorry in the "else if"…
Mon, 10/12/2020 - 06:17

Sorry in the "else if" section I forgot to replace it with the "Item in main hand block"

Last seen on 21:12, 27. May 2022
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Ok sorry again, I misread…
Mon, 10/12/2020 - 06:44

Ok sorry again, I misread the post, I thought you wanted an item when right clicked, which is still how that would work for the above post, but if you want a block that when broken gives a random item then this is it, its pretty much the same concept.

To clarify the block that has the 'Random number', then says less than or equal to 0.5 , the 0.5 means it has a 50% chance to give a piece of coal, and the 0.25 means a 25% chance to give a diamond. All you have to do is change the items, and if you want more items just copy and paste the structure of the code and change the items and %'s.

on block properties, make sure to set the "Amount dropped" to 0, don't want it to drop itself and give a random item.

on the trigger its the second row first trigger "when block destroyed by player"

Last seen on 21:12, 27. May 2022
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Ok sorry again, I misread…
Mon, 10/12/2020 - 06:45

Ok sorry again, I misread the post, I thought you wanted an item when right clicked, which is still how that would work for the above post, but if you want a block that when broken gives a random item then this is it, its pretty much the same concept.

To clarify the block that has the 'Random number', then says less than or equal to 0.5 , the 0.5 means it has a 50% chance to give a piece of coal, and the 0.25 means a 25% chance to give a diamond. All you have to do is change the items, and if you want more items just copy and paste the structure of the code and change the items and %'s.

on block properties, make sure to set the "Amount dropped" to 0, don't want it to drop itself and give a random item.

on the trigger its the second row first trigger "when block destroyed by player"

Last seen on 19:00, 5. Sep 2021
Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Sorry, I didn't mean to be…
Mon, 10/12/2020 - 15:53

Sorry, I didn't mean to be demanding. Thank you for helping. (:)

Last seen on 19:00, 5. Sep 2021
Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Thank you, would u be able…
Mon, 10/12/2020 - 22:30

Thank you, would u be able to provide a higher res imgur w/ these new instructions? Thank you either way.