Class EntityRegistrationEvent


public class EntityRegistrationEvent extends ClientEvent
Register entity classes that are not a typical LivingEntity or Entity that is used by vanilla that needs to be displayed on the map.

To add custom icons use this style of pathing `enderzoo:textures/entity_icon/wither_cat.png`. LivingEntities will likely have their icons auto generated. Non-LivingEntities will not.

Some limitations with this api, only entity types can be added. Adding Item or TileEntities may cause issues. The interfaces Npc.class and Enemy.class are handled internally by JourneyMap.

JourneyMap already adds the following classes, no need to re-add them.

Hostiles - PathfinderMob.class Villagers - Villager.class Passives - AbstractGolem.class, WaterAnimal.class, PathfinderMob.class, Animal.class Ambients - AmbientCreatures.class Entities - Minecrafts.class

  • Constructor Details

  • Method Details

    • addPassiveEntity

      public EntityRegistrationEvent addPassiveEntity(Class<? extends net.minecraft.world.entity.LivingEntity> entityClass)
      Adds passive entities like animals.
      Parameters:
      entityClass - - the entity class
    • addHostileEntity

      public EntityRegistrationEvent addHostileEntity(Class<? extends net.minecraft.world.entity.LivingEntity> entityClass)
      Adds hostile entities, monsters, aggressive creatures.
      Parameters:
      entityClass - - the entity class
    • addVillagerEntity

      public EntityRegistrationEvent addVillagerEntity(Class<? extends net.minecraft.world.entity.LivingEntity> entityClass)
      Adds villager entities like villagers or npcs.
      Parameters:
      entityClass - - the entity class
    • addAmbientEntity

      public EntityRegistrationEvent addAmbientEntity(Class<? extends net.minecraft.world.entity.LivingEntity> entityClass)
      Adds ambient entities like bats.
      Parameters:
      entityClass - - the entity class
    • getEntityClasses

      @Internal public List<Class<? extends net.minecraft.world.entity.Entity>> getEntityClasses(EntityRegistrationEvent.Type type)