Skip to content

"EntityCreature", "EntityLiving", and "EntityAINearestAttackableTarget" #658

@Runemoro

Description

@Runemoro

The following string reveals the mojang names for "EntityCreature", "EntityLiving", "EntityAINearestAttackableTarget".

    public EntityAIFindEntityNearestPlayer(final EntityLiving entityLivingIn) {
        this.entityLiving = entityLivingIn;
        if (entityLivingIn instanceof EntityCreature) {
            LOGGER.warn("Use NearestAttackableTargetGoal.class for PathfinerMob mobs!");
        }

We can also see that entities do not have an "Entity" prefix in the vanilla code, but that might not be worth changing in MCP.

  • EntityLiving -> EntityMob

This is a more accurate name which would make it clear that EntityPlayer is not a subclass of it. Someone may think think that EntityPlayer extends EntityLiving since a player is living, but not that EntityPlayer extends EntityMob since a player is not a mob.

  • EntityMob -> EntityHostileMob

"Mob" refers to both hostile and non-hostile creatures in Minecraft. This change would make it clear that this subclass of EntityLiving is intended for hostile mobs only. The change would be necessary if EntityLiving is renamed to EntityMob.

  • EntityCreature -> EntityPathfinderMob

The current name doesn't describe how EntityCreature is different from EntityMob or EntityLiving. Changing to the vanilla name (but with the Entity prefix) would help clear up this confusion.

  • EntityLivingBase -> EntityLiving

If EntityLiving is renamed to EntityMob, the "Base" suffix becomes unnecessary. EntityLiving makes sense as a superclass for both EntityMob and EntityPlayer as they are obviously both living.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions