Interface FabricEntityType.Builder<T extends Entity>

Enclosing interface:
FabricEntityType

public static interface FabricEntityType.Builder<T extends Entity>
General-purpose Fabric-provided extensions for EntityType.Builder.

Note: This interface is automatically implemented on EntityType.Builder via Mixin and interface injection.

  • Method Details

    • alwaysUpdateVelocity

      default EntityType.Builder<T> alwaysUpdateVelocity(boolean alwaysUpdateVelocity)
      Sets whether the entity's velocity should always be updated.
      Parameters:
      alwaysUpdateVelocity - whether the entity's velocity should always be updated
      Returns:
      this builder
    • canPotentiallyExecuteCommands

      default EntityType.Builder<T> canPotentiallyExecuteCommands(boolean canPotentiallyExecuteCommands)
      Sets whether the entity is able to execute commands.
      Parameters:
      canPotentiallyExecuteCommands - whether the entity is able to execute commands
      Returns:
      this builder
    • createLiving

      static <T extends LivingEntity> EntityType.Builder<T> createLiving(EntityType.EntityFactory<T> factory, SpawnGroup spawnGroup, UnaryOperator<FabricEntityType.Builder.Living<T>> livingBuilder)
      Creates an entity type builder for a living entity.

      This entity's spawn group will automatically be set to SpawnGroup.MISC.

      Type Parameters:
      T - the type of entity
      Parameters:
      livingBuilder - a function to configure living entity specific properties
      Returns:
      a new living entity type builder
    • createMob

      static <T extends MobEntity> EntityType.Builder<T> createMob(EntityType.EntityFactory<T> factory, SpawnGroup spawnGroup, UnaryOperator<FabricEntityType.Builder.Mob<T>> mobBuilder)
      Creates an entity type builder for a mob entity.
      Type Parameters:
      T - the type of entity
      Parameters:
      mobBuilder - a function to configure mob entity specific properties
      Returns:
      a new mob entity type builder