Lucky Block creation

Started by DeroPlayz on

Topic category: Help with Minecraft modding (Java Edition)

Active 10 months ago
Joined Jan 2020
Points:
672

User statistics:

  • Modifications: 0
  • Forum topics: 5
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 14
Lucky Block creation

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)

Active 1 month ago
Joined Apr 2020
Points:
787

User statistics:

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

Active 1 month ago
Joined Apr 2020
Points:
787

User statistics:

  • Modifications: 4
  • Forum topics: 14
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 101
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"

Active 1 month ago
Joined Apr 2020
Points:
787

User statistics:

  • Modifications: 4
  • Forum topics: 14
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 101
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"

Active 1 month ago
Joined Apr 2020
Points:
787

User statistics:

  • Modifications: 4
  • Forum topics: 14
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 101
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"

Active 10 months ago
Joined Jan 2020
Points:
672

User statistics:

  • Modifications: 0
  • Forum topics: 5
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 14
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. (:)

Active 10 months ago
Joined Jan 2020
Points:
672

User statistics:

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