Started by
233Neon
on
Topic category: Help with Minecraft modding (Java Edition)
I've recently made a mob that deals percentage damage to the player when they collide with it. The problem is, without keep inventory enabled, the mob will delete all the players items upon death. How do I fix this?
Edited by 233Neon on Wed, 04/20/2022 - 12:39
The items are getting deleted probably because the mob collides with the item gem entity and damages it too. So you better add an if statement block around the damaging part so that it checks if the entity is not an item.
in the procedures, you must check whether the entity the mob is colliding is not a dropped item before damaging, since dropped items also count as entities/mobs.
Thanks, which block(s) should I use to check if the entity is not an item?
Nevermind I found it, if anyone else runs into this issue, use
Oops. My bad seems to still not be working! Whenever I get killed all my items are still vaporized, and when I drop an item near the mob it doesn't get destroyed.
This should work, can you show me a screenshot of the entire procedure? I want to see how are you damaging the player.