Package net.minecraft.world.entity
Class EntityType.Builder<T extends Entity>
java.lang.Object
net.minecraft.world.entity.EntityType.Builder<T>
- Enclosing class:
- EntityType<T extends Entity>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private final MobCategory
private int
private BiFunction<PlayMessages.SpawnEntity,
Level, T> private EntityDimensions
private final EntityType.EntityFactory<T>
private boolean
private com.google.common.collect.ImmutableSet<Block>
private FeatureFlagSet
private boolean
private boolean
private ToIntFunction<EntityType<?>>
private int
private ToIntFunction<EntityType<?>>
private Predicate<EntityType<?>>
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Builder
(EntityType.EntityFactory<T> p_20696_, MobCategory p_20697_) -
Method Summary
Modifier and TypeMethodDescriptionclientTrackingRange
(int p_20703_) static <T extends Entity>
EntityType.Builder<T>createNothing
(MobCategory p_20711_) noSave()
noSummon()
static <T extends Entity>
EntityType.Builder<T>of
(EntityType.EntityFactory<T> p_20705_, MobCategory p_20706_) requiredFeatures
(FeatureFlag... p_251646_) setCustomClientFactory
(BiFunction<PlayMessages.SpawnEntity, Level, T> customClientFactory) By default, entities are spawned clientside viaEntityType.create(Level)
}.setShouldReceiveVelocityUpdates
(boolean value) setTrackingRange
(int range) setUpdateInterval
(int interval) sized
(float p_20700_, float p_20701_) updateInterval
(int p_20718_)
-
Field Details
-
factory
-
category
-
immuneTo
-
serialize
private boolean serialize -
summon
private boolean summon -
fireImmune
private boolean fireImmune -
canSpawnFarFromPlayer
private boolean canSpawnFarFromPlayer -
clientTrackingRange
private int clientTrackingRange -
updateInterval
private int updateInterval -
dimensions
-
requiredFeatures
-
velocityUpdateSupplier
-
trackingRangeSupplier
-
updateIntervalSupplier
-
customClientFactory
-
-
Constructor Details
-
Builder
-
-
Method Details
-
of
public static <T extends Entity> EntityType.Builder<T> of(EntityType.EntityFactory<T> p_20705_, MobCategory p_20706_) -
createNothing
-
sized
-
noSummon
-
noSave
-
fireImmune
-
immuneTo
-
canSpawnFarFromPlayer
-
clientTrackingRange
-
updateInterval
-
requiredFeatures
-
setUpdateInterval
-
setTrackingRange
-
setShouldReceiveVelocityUpdates
-
setCustomClientFactory
public EntityType.Builder<T> setCustomClientFactory(BiFunction<PlayMessages.SpawnEntity, Level, T> customClientFactory) By default, entities are spawned clientside viaEntityType.create(Level)
}. If you need finer control over the spawning process, use this to get read access to the spawn packet. -
build
-