public static class EntityType.Builder<T extends Entity>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private EntityClassification |
classification |
private java.util.function.BiFunction<FMLPlayMessages.SpawnEntity,World,T> |
customClientFactory |
private EntityType.IFactory<T> |
factory |
private boolean |
field_225436_f |
private boolean |
immuneToFire |
private boolean |
serializable |
private EntitySize |
size |
private boolean |
summonable |
private java.util.function.ToIntFunction<EntityType<?>> |
trackingRangeSupplier |
private java.util.function.ToIntFunction<EntityType<?>> |
updateIntervalSupplier |
private java.util.function.Predicate<EntityType<?>> |
velocityUpdateSupplier |
Modifier | Constructor and Description |
---|---|
private |
Builder(EntityType.IFactory<T> factoryIn,
EntityClassification classificationIn) |
Modifier and Type | Method and Description |
---|---|
EntityType<T> |
build(java.lang.String id) |
static <T extends Entity> |
create(EntityClassification classificationIn) |
static <T extends Entity> |
create(EntityType.IFactory<T> factoryIn,
EntityClassification classificationIn) |
EntityType.Builder<T> |
disableSerialization() |
EntityType.Builder<T> |
disableSummoning() |
EntityType.Builder<T> |
func_225435_d() |
EntityType.Builder<T> |
immuneToFire() |
EntityType.Builder<T> |
setCustomClientFactory(java.util.function.BiFunction<FMLPlayMessages.SpawnEntity,World,T> customClientFactory)
By default, entities are spawned clientside via
EntityType.create(World) . |
EntityType.Builder<T> |
setShouldReceiveVelocityUpdates(boolean value) |
EntityType.Builder<T> |
setTrackingRange(int range) |
EntityType.Builder<T> |
setUpdateInterval(int interval) |
EntityType.Builder<T> |
size(float width,
float height) |
private final EntityType.IFactory<T extends Entity> factory
private final EntityClassification classification
private boolean serializable
private boolean summonable
private boolean immuneToFire
private java.util.function.Predicate<EntityType<?>> velocityUpdateSupplier
private java.util.function.ToIntFunction<EntityType<?>> trackingRangeSupplier
private java.util.function.ToIntFunction<EntityType<?>> updateIntervalSupplier
private java.util.function.BiFunction<FMLPlayMessages.SpawnEntity,World,T extends Entity> customClientFactory
private boolean field_225436_f
private EntitySize size
private Builder(EntityType.IFactory<T> factoryIn, EntityClassification classificationIn)
public static <T extends Entity> EntityType.Builder<T> create(EntityType.IFactory<T> factoryIn, EntityClassification classificationIn)
public static <T extends Entity> EntityType.Builder<T> create(EntityClassification classificationIn)
public EntityType.Builder<T> size(float width, float height)
public EntityType.Builder<T> disableSummoning()
public EntityType.Builder<T> disableSerialization()
public EntityType.Builder<T> immuneToFire()
public EntityType.Builder<T> func_225435_d()
public EntityType.Builder<T> setUpdateInterval(int interval)
public EntityType.Builder<T> setTrackingRange(int range)
public EntityType.Builder<T> setShouldReceiveVelocityUpdates(boolean value)
public EntityType.Builder<T> setCustomClientFactory(java.util.function.BiFunction<FMLPlayMessages.SpawnEntity,World,T> customClientFactory)
EntityType.create(World)
.
If you need finer control over the spawning process, use this to get read access to the spawn packet.public EntityType<T> build(java.lang.String id)