Package net.minecraft.entity
Class EntityType.Builder<T extends Entity>
- java.lang.Object
-
- net.minecraft.entity.EntityType.Builder<T>
-
- Enclosing class:
- EntityType<T extends Entity>
public static class EntityType.Builder<T extends Entity> extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
canSpawnFarFromPlayer
private EntityClassification
category
private int
clientTrackingRange
private java.util.function.BiFunction<FMLPlayMessages.SpawnEntity,World,T>
customClientFactory
private EntitySize
dimensions
private EntityType.IFactory<T>
factory
private boolean
fireImmune
private com.google.common.collect.ImmutableSet<Block>
immuneTo
private boolean
serialize
private boolean
summon
private java.util.function.ToIntFunction<EntityType<?>>
trackingRangeSupplier
private int
updateInterval
private java.util.function.ToIntFunction<EntityType<?>>
updateIntervalSupplier
private java.util.function.Predicate<EntityType<?>>
velocityUpdateSupplier
-
Constructor Summary
Constructors Modifier Constructor Description private
Builder(EntityType.IFactory<T> p_i50479_1_, EntityClassification p_i50479_2_)
-
Method Summary
-
-
-
Field Detail
-
factory
private final EntityType.IFactory<T extends Entity> factory
-
category
private final EntityClassification category
-
immuneTo
private com.google.common.collect.ImmutableSet<Block> 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
private EntitySize dimensions
-
velocityUpdateSupplier
private java.util.function.Predicate<EntityType<?>> velocityUpdateSupplier
-
trackingRangeSupplier
private java.util.function.ToIntFunction<EntityType<?>> trackingRangeSupplier
-
updateIntervalSupplier
private java.util.function.ToIntFunction<EntityType<?>> updateIntervalSupplier
-
customClientFactory
private java.util.function.BiFunction<FMLPlayMessages.SpawnEntity,World,T extends Entity> customClientFactory
-
-
Constructor Detail
-
Builder
private Builder(EntityType.IFactory<T> p_i50479_1_, EntityClassification p_i50479_2_)
-
-
Method Detail
-
of
public static <T extends Entity> EntityType.Builder<T> of(EntityType.IFactory<T> p_220322_0_, EntityClassification p_220322_1_)
-
createNothing
public static <T extends Entity> EntityType.Builder<T> createNothing(EntityClassification p_220319_0_)
-
sized
public EntityType.Builder<T> sized(float p_220321_1_, float p_220321_2_)
-
noSummon
public EntityType.Builder<T> noSummon()
-
noSave
public EntityType.Builder<T> noSave()
-
fireImmune
public EntityType.Builder<T> fireImmune()
-
immuneTo
public EntityType.Builder<T> immuneTo(Block... p_233607_1_)
-
canSpawnFarFromPlayer
public EntityType.Builder<T> canSpawnFarFromPlayer()
-
clientTrackingRange
public EntityType.Builder<T> clientTrackingRange(int p_233606_1_)
-
updateInterval
public EntityType.Builder<T> updateInterval(int p_233608_1_)
-
setUpdateInterval
public EntityType.Builder<T> setUpdateInterval(int interval)
-
setTrackingRange
public EntityType.Builder<T> setTrackingRange(int range)
-
setShouldReceiveVelocityUpdates
public EntityType.Builder<T> setShouldReceiveVelocityUpdates(boolean value)
-
setCustomClientFactory
public EntityType.Builder<T> setCustomClientFactory(java.util.function.BiFunction<FMLPlayMessages.SpawnEntity,World,T> customClientFactory)
By default, entities are spawned clientside viaEntityType.create(World)
. If you need finer control over the spawning process, use this to get read access to the spawn packet.
-
build
public EntityType<T> build(java.lang.String p_206830_1_)
-
-