How do I check if an entity is an instance of the EntityLiving class?

Started by awesomecreeck on Tue, 04/13/2021 - 07:17

Topic category: Help with modding (Java Edition)

Last seen on 07:29, 7. May 2021
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How do I check if an entity is an instance of the EntityLiving class?
Tue, 04/13/2021 - 07:17

I'm making a mod for a Minecraft challenge called 'Minecraft, but random mobs spawn everytime you kill a mob'. So I made a mod workspace and added a procedure which triggers when an entity dies. I need to make sure that the died entity extends from the EntityLiving class. How do I check if an entity is an instance of the EntityLiving class? Is there any procedures for this?

Last seen on 07:29, 7. May 2021
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Got the procedure! It was Is…
Tue, 04/13/2021 - 07:24

Got the procedure! It was Is [Event/Target Entity] a (sub)type of [Entity]