Interface FabricEntityType.Builder<T extends net.minecraft.world.entity.Entity>
- All Known Implementing Classes:
EntityTypeBuilderMixin
- Enclosing interface:
FabricEntityType
public static interface FabricEntityType.Builder<T extends net.minecraft.world.entity.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 net.minecraft.world.entity.LivingEntity>A builder for additional properties of a living entity, use viacreateLiving(EntityType.EntityFactory, MobCategory, UnaryOperator).static interfaceFabricEntityType.Builder.Mob<T extends net.minecraft.world.entity.Mob>A builder for additional properties of a mob entity, use viacreateMob(EntityType.EntityFactory, MobCategory, UnaryOperator). -
Method Summary
Modifier and TypeMethodDescriptiondefault net.minecraft.world.entity.EntityType.Builder<T> alwaysUpdateVelocity(boolean alwaysUpdateVelocity) Sets whether the entity's velocity should always be updated.default net.minecraft.world.entity.EntityType.Builder<T> canPotentiallyExecuteCommands(boolean canPotentiallyExecuteCommands) Sets whether the entity is able to execute commands.static <T extends net.minecraft.world.entity.LivingEntity>
net.minecraft.world.entity.EntityType.Builder<T> createLiving(net.minecraft.world.entity.EntityType.EntityFactory<T> factory, net.minecraft.world.entity.MobCategory mobCategory, UnaryOperator<FabricEntityType.Builder.Living<T>> livingBuilder) Creates an entity type builder for a living entity.static <T extends net.minecraft.world.entity.Mob>
net.minecraft.world.entity.EntityType.Builder<T> createMob(net.minecraft.world.entity.EntityType.EntityFactory<T> factory, net.minecraft.world.entity.MobCategory mobCategory, UnaryOperator<FabricEntityType.Builder.Mob<T>> mobBuilder) Creates an entity type builder for a mob entity.
-
Method Details
-
alwaysUpdateVelocity
default net.minecraft.world.entity.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 net.minecraft.world.entity.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 net.minecraft.world.entity.LivingEntity> net.minecraft.world.entity.EntityType.Builder<T> createLiving(net.minecraft.world.entity.EntityType.EntityFactory<T> factory, net.minecraft.world.entity.MobCategory mobCategory, UnaryOperator<FabricEntityType.Builder.Living<T>> livingBuilder) Creates an entity type builder for a living entity.This entity's mob category will automatically be set to
MobCategory.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 net.minecraft.world.entity.Mob> net.minecraft.world.entity.EntityType.Builder<T> createMob(net.minecraft.world.entity.EntityType.EntityFactory<T> factory, net.minecraft.world.entity.MobCategory mobCategory, 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
-