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
Modifier and TypeFieldDescriptionprivate boolean
private MobCategory
private int
private BiFunction<FMLPlayMessages.SpawnEntity,Level,T>
private EntityDimensions
private EntityType.EntityFactory<T>
private boolean
private com.google.common.collect.ImmutableSet<Block>
private boolean
private boolean
private ToIntFunction<EntityType<?>>
private int
private ToIntFunction<EntityType<?>>
private Predicate<EntityType<?>>
-
Constructor Summary
ModifierConstructorDescriptionprivate
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_)
setCustomClientFactory(BiFunction<FMLPlayMessages.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
-
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
-
setUpdateInterval
-
setTrackingRange
-
setShouldReceiveVelocityUpdates
-
setCustomClientFactory
public EntityType.Builder<T> setCustomClientFactory(BiFunction<FMLPlayMessages.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
-