Posted August 19, 20169 yr I'm wondering how possible it would be to set up a loot system (In which right-clicking blocks would return a custom inventory holding items from a set list.) Surely this should be possible with the use of NBT? (Would be interesting to have a conversation about this) http://i.imgur.com/vmqyxTE.png[/img]
August 19, 20169 yr Wouldn't be that hard, all you would need is a block with a TE and the TE would need a List of either a List of ItemStacks or an array of ItemStacks. And a boolean to determine if it has been right clicked if you want it to choose at right click and not placed. Actually I would do it with a Map so you can set the key to the percentage. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
August 19, 20169 yr Author A string array list with concatenation between the ID and Amount could work. Picking a random from the index and returning it as an NBT in the block as a container. http://i.imgur.com/vmqyxTE.png[/img]
August 19, 20169 yr Yes that would work, but don't forget NBT :3 *Edit wow can't believe I just said that, I meant metadata. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
August 19, 20169 yr There's also the existing loot table system which you could purpose for this. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
August 19, 20169 yr Author Never managed to work my way around the available loot system Spending all day looking into it, ofc. Gotta teach myself some more metadata crap. http://i.imgur.com/vmqyxTE.png[/img]
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.