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

Started by 233Neon on Wed, 04/20/2022 - 12:38

Topic category: Help with modding (Java Edition)

Last seen on 01:05, 29. Apr 2022
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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
Last seen on 13:08, 29. Jun 2022
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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.

Last seen on 01:05, 29. Apr 2022
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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?

Last seen on 01:05, 29. Apr 2022
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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

Last seen on 01:05, 29. Apr 2022
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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.

Last seen on 13:08, 29. Jun 2022
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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.