Get entity type parent

When I want get exact entity type, I can use for example
getEntity().getType().equals(EntityTypes.BLAZE) ,
but can I get any type parent to get something like “animal”, “agresive mob”, “pasive mob” etc. ?

You’d be better to use Java’s instanceof to check inheritance.

For example, all of the passive animals inherit from Animal, aside from a few odd ones such as Squids and Bats. Same for the Monster class being all agressive mobs.

1 Like

You are right. Thanks, solved my problem. :wink: