How do you know if an Entity is Living?
Examples of Living entities are cows, sheep, and zombies. Non-examples are arrows, snowballs, and minecarts.
How do you know if an Entity is Living?
Examples of Living entities are cows, sheep, and zombies. Non-examples are arrows, snowballs, and minecarts.
Living extends Entity, so if you have an Entity object, you can do an instanceof check
if(myEntity instanceof Living) {
There’s also examples where if you wanted to know if an Entity
is an “AI” controlled entity, can check if it is an instance of Agent
.