Class EntityAttributes

java.lang.Object
net.ixdarklord.coolcatcore.api.registry.EntityAttributes

public final class EntityAttributes extends Object
The default attributes (health, speed, ...) of a mod's living entities, which every living entity type needs. Register from the mod constructor, after the entity types' DeferredRegister:
EntityAttributes.register(MyEntities.WISP, Wisp::createAttributes);
  • Method Details

    • register

      public static void register(Supplier<? extends net.minecraft.world.entity.EntityType<? extends net.minecraft.world.entity.LivingEntity>> type, Supplier<net.minecraft.world.entity.ai.attributes.AttributeSupplier.Builder> attributes)
      Parameters:
      type - the entity type, supplied so it can be a RegistryEntry
      attributes - builds the attributes, usually the entity class's static createAttributes method