Class FabricEntityTypeBuilder<T extends net.minecraft.world.entity.Entity>

java.lang.Object
net.fabricmc.fabric.api.object.builder.v1.entity.FabricEntityTypeBuilder<T>
Direct Known Subclasses:
FabricEntityTypeBuilder.Living

@Deprecated public class FabricEntityTypeBuilder<T extends net.minecraft.world.entity.Entity> extends Object
Deprecated.
replace with EntityType.Builder
  • Constructor Details

    • FabricEntityTypeBuilder

      protected FabricEntityTypeBuilder(net.minecraft.world.entity.MobCategory mobCategory, net.minecraft.world.entity.EntityType.EntityFactory<T> factory)
      Deprecated.
  • Method Details

    • create

      @Deprecated public static <T extends net.minecraft.world.entity.Entity> FabricEntityTypeBuilder<T> create()
      Deprecated.
      use EntityType.Builder.createNothing(MobCategory)
      Creates an entity type builder.

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

      Type Parameters:
      T - the type of entity
      Returns:
      a new entity type builder
    • create

      @Deprecated public static <T extends net.minecraft.world.entity.Entity> FabricEntityTypeBuilder<T> create(net.minecraft.world.entity.MobCategory mobCategory)
      Deprecated.
      use EntityType.Builder.createNothing(MobCategory)
      Creates an entity type builder.
      Type Parameters:
      T - the type of entity
      Parameters:
      mobCategory - the entity mob category
      Returns:
      a new entity type builder
    • create

      @Deprecated public static <T extends net.minecraft.world.entity.Entity> FabricEntityTypeBuilder<T> create(net.minecraft.world.entity.MobCategory mobCategory, net.minecraft.world.entity.EntityType.EntityFactory<T> factory)
      Deprecated.
      use EntityType.Builder.of(EntityType.EntityFactory, MobCategory)
      Creates an entity type builder.
      Type Parameters:
      T - the type of entity
      Parameters:
      mobCategory - the entity mob category
      factory - the entity factory used to create this entity
      Returns:
      a new entity type builder
    • createLiving

      @Deprecated public static <T extends net.minecraft.world.entity.LivingEntity> FabricEntityTypeBuilder.Living<T> createLiving()
      Creates an entity type builder for a living entity.

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

      Type Parameters:
      T - the type of entity
      Returns:
      a new living entity type builder
    • createMob

      public static <T extends net.minecraft.world.entity.Mob> FabricEntityTypeBuilder.Mob<T> createMob()
      Creates an entity type builder for a mob entity.
      Type Parameters:
      T - the type of entity
      Returns:
      a new mob entity type builder
    • mobCategory

      @Deprecated public FabricEntityTypeBuilder<T> mobCategory(net.minecraft.world.entity.MobCategory category)
      Deprecated.
    • entityFactory

      @Deprecated public <N extends T> FabricEntityTypeBuilder<N> entityFactory(net.minecraft.world.entity.EntityType.EntityFactory<N> factory)
      Deprecated.
    • disableSummon

      @Deprecated public FabricEntityTypeBuilder<T> disableSummon()
      Deprecated.
      use EntityType.Builder.noSummon()
      Whether this entity type is summonable using the /summon command.
      Returns:
      this builder for chaining
    • disableSaving

      @Deprecated public FabricEntityTypeBuilder<T> disableSaving()
      Deprecated.
      use EntityType.Builder.noSave()
    • fireImmune

      @Deprecated public FabricEntityTypeBuilder<T> fireImmune()
      Deprecated.
      use EntityType.Builder.fireImmune()
      Sets this entity type to be fire immune.
      Returns:
      this builder for chaining
    • spawnableFarFromPlayer

      @Deprecated public FabricEntityTypeBuilder<T> spawnableFarFromPlayer()
      Deprecated.
      use EntityType.Builder.canSpawnFarFromPlayer()
      Sets whether this entity type can be spawned far away from a player.
      Returns:
      this builder for chaining
    • dimensions

      @Deprecated public FabricEntityTypeBuilder<T> dimensions(net.minecraft.world.entity.EntityDimensions dimensions)
      Deprecated.
      use EntityType.Builder.sized(float, float)
      Sets the dimensions of this entity type.
      Parameters:
      dimensions - the dimensions representing the entity's size
      Returns:
      this builder for chaining
    • trackable

      @Deprecated public FabricEntityTypeBuilder<T> trackable(int trackRangeBlocks, int trackedUpdateRate)
    • trackable

      @Deprecated public FabricEntityTypeBuilder<T> trackable(int trackRangeBlocks, int trackedUpdateRate, boolean forceTrackedVelocityUpdates)
    • trackRangeChunks

      @Deprecated public FabricEntityTypeBuilder<T> trackRangeChunks(int range)
      Deprecated.
      Sets the maximum chunk tracking range of this entity type.
      Parameters:
      range - the tracking range in chunks
      Returns:
      this builder for chaining
    • trackRangeBlocks

      @Deprecated public FabricEntityTypeBuilder<T> trackRangeBlocks(int range)
      Deprecated.
      Sets the maximum block range at which players can see this entity type.
      Parameters:
      range - the tracking range in blocks
      Returns:
      this builder for chaining
    • trackedUpdateRate

      @Deprecated public FabricEntityTypeBuilder<T> trackedUpdateRate(int rate)
      Deprecated.
    • forceTrackedVelocityUpdates

      @Deprecated public FabricEntityTypeBuilder<T> forceTrackedVelocityUpdates(boolean forceTrackedVelocityUpdates)
      Deprecated.
    • specificSpawnBlocks

      @Deprecated public FabricEntityTypeBuilder<T> specificSpawnBlocks(net.minecraft.world.level.block.Block... blocks)
      Deprecated.
      use EntityType.Builder.immuneTo(Block...)
      Sets the ImmutableSet of blocks this entity can spawn on.
      Parameters:
      blocks - the blocks the entity can spawn on
      Returns:
      this builder for chaining
    • requires

      @Deprecated public FabricEntityTypeBuilder<T> requires(net.minecraft.world.flag.FeatureFlag... requiredFeatures)
      Deprecated.
      use EntityType.Builder.requiredFeatures(FeatureFlag...)
      Sets the features this entity requires. If a feature is not enabled, the entity cannot be spawned, and existing ones will despawn immediately.
      Parameters:
      requiredFeatures - the features
      Returns:
      this builder for chaining
    • build

      @Deprecated public net.minecraft.world.entity.EntityType<T> build(net.minecraft.resources.ResourceKey<net.minecraft.world.entity.EntityType<?>> key)
      Deprecated.
      use EntityType.Builder.build(ResourceKey)
      Creates the entity type.
      Returns:
      a new EntityType