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.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceFabricEntityType.Builder.Living<T extends LivingEntity>A builder for additional properties of a living entity, use viacreateLiving(EntityType.EntityFactory, SpawnGroup, UnaryOperator).static interfaceFabricEntityType.Builder.Mob<T extends MobEntity>A builder for additional properties of a mob entity, use viacreateMob(EntityType.EntityFactory, SpawnGroup, UnaryOperator). -
Method Summary
Modifier and TypeMethodDescriptiondefault EntityType.Builder<T> alwaysUpdateVelocity(boolean alwaysUpdateVelocity) Sets whether the entity's velocity should always be updated.default EntityType.Builder<T> canPotentiallyExecuteCommands(boolean canPotentiallyExecuteCommands) Sets whether the entity is able to execute commands.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.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.
-
Method Details
-
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
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
-