Mob kills players so hard It deletes all their items upon death

Started by 233Neon on

Topic category: Help with Minecraft modding (Java Edition)

Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Mob kills players so hard It deletes all their items upon death
Wed, 04/20/2022 - 12:39 (edited)

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
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The items are getting…
Wed, 04/20/2022 - 12:45

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.

Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks, which block(s)…
Wed, 04/20/2022 - 12:53

Thanks, which block(s) should I use to check if the entity is not an item?

Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Nevermind I found it, if…
Wed, 04/20/2022 - 13:34

Nevermind I found it, if anyone else runs into this issue, useHere

Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oops. My bad seems to still…
Wed, 04/20/2022 - 13:39

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.

Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This should work, can you…
Wed, 04/20/2022 - 14:24

This should work, can you show me a screenshot of the entire procedure? I want to see how are you damaging the player.