Started by
DeroPlayz
on
Topic category: Help with Minecraft modding (Java Edition)
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)
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
Sorry in the "else if" section I forgot to replace it with the "Item in main hand block"
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"
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"
Sorry, I didn't mean to be demanding. Thank you for helping. (:)
Thank you, would u be able to provide a higher res imgur w/ these new instructions? Thank you either way.