Posted April 9, 20205 yr I want to be able to spawn an item as a drop, I think I need to use this.world.addEntity(); but I don't know how to get my item as an entity. Thanks for your help!
April 9, 20205 yr Author 4 minutes ago, diesieben07 said: Please use loot tables for drops. Item entities use the ItemEntity class. Thank you for your reply. I want a thrown Item to have a chance to drop itself when it hits the ground, would I still use Loot Tables for this?
April 9, 20205 yr Author 26 minutes ago, diesieben07 said: Thats not really a "drop", so no. Thank you, how would I use ItemEntity to get my specific item?
April 9, 20205 yr Scan vanilla code for something to drops an item. You should try looking a little more in the vanilla code, it's really useful and has lots of stuff to learn from/give ideas, I notice that you ask a lot of things without trying/looking first. You'd be surprised what you can accomplish if you check out existing code that does things similar to what you want I did a quick search in my IDE for something that calls ItemEntity and the LecternBlock popped up.
April 9, 20205 yr Author 21 minutes ago, Ugdhar said: Scan vanilla code for something to drops an item. You should try looking a little more in the vanilla code, it's really useful and has lots of stuff to learn from/give ideas, I notice that you ask a lot of things without trying/looking first. You'd be surprised what you can accomplish if you check out existing code that does things similar to what you want I did a quick search in my IDE for something that calls ItemEntity and the LecternBlock popped up. Thanks for the advice! I feel bad for taking up all the team's time with basic questions so I'll start looking into the code myself, Thanks for all your help
April 9, 20205 yr 6 minutes ago, ultra_reemun said: Thanks for the advice! I feel bad for taking up all the team's time with basic questions so I'll start looking into the code myself, Thanks for all your help No problem, and don't think if you get stuck you can't come ask for help, because of course you can! But dig through some vanilla code first, see if you can find examples, also searching the forums often yields great results. I was messing with custom shields for fun, and couldn't figure out why the texture wasn't working, and searching on here led me to the answer without having to make my own topic and ask
April 9, 20205 yr Author 6 minutes ago, Ugdhar said: No problem, and don't think if you get stuck you can't come ask for help, because of course you can! But dig through some vanilla code first, see if you can find examples, also searching the forums often yields great results. I was messing with custom shields for fun, and couldn't figure out why the texture wasn't working, and searching on here led me to the answer without having to make my own topic and ask Thank you, You've been very helpful with all my enquiries
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.