Kill entity event

Started by DragonOfAsparas on

Topic category: Feature requests and ideas for MCreator

Active 3 years ago
Joined Apr 2016
Points:
779

User statistics:

  • Modifications: 0
  • Forum topics: 9
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 56
Kill entity event

I have always found it strange that Mcreator has a "spawn entity" event but not one to kill an entity. I know how to make the event through the code but i thought i it would be nice as an idea to make it easier to kill an entity using an event.

Active 5 years ago
Joined Jan 2017
Points:
818

User statistics:

  • Modifications: 4
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 80
Check in global settings
Mon, 03/05/2018 - 21:13

Check in global settings

Active 7 years ago
Joined Feb 2018
Points:
721

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 37
This is the "kill entity…
Sat, 03/10/2018 - 12:49

This is the "kill entity event"

       public void onKillEntity(EntityLivingBase entityLivingBase) {
            super.onKillEntity(entityLivingBase);
            int i = (int) this.posX;
            int j = (int) this.posY;
            int k = (int) this.posZ;
            Entity entity = this;

        }

Active 3 years ago
Joined Apr 2016
Points:
779

User statistics:

  • Modifications: 0
  • Forum topics: 9
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 56
I just use setDead(); Will…
Sat, 03/10/2018 - 13:03

I just use setDead(); Will instantly kill the mob.

Active 3 years ago
Joined Apr 2016
Points:
779

User statistics:

  • Modifications: 0
  • Forum topics: 9
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 56
But as i mentioned in the…
Sat, 03/10/2018 - 13:06

But as i mentioned in the post ''i know how to do it'' its just a suggestion to make it easier.