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

Started by 233Neon on

Topic category: Help with Minecraft modding (Java Edition)

Active 4 months ago
Joined Aug 2019
Points:
641

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 3
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
Active 6 days ago
Joined Jul 2020
Points:
1156

User statistics:

  • Modifications: 5
  • Forum topics: 82
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 228
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.

Active 4 months ago
Joined Aug 2019
Points:
641

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 3
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?

Active 4 months ago
Joined Aug 2019
Points:
641

User statistics:

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

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

Active 4 months ago
Joined Aug 2019
Points:
641

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 3
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.

Active 6 days ago
Joined Jul 2020
Points:
1156

User statistics:

  • Modifications: 5
  • Forum topics: 82
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 228
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.