public static class EntityType.Builder<T extends Entity> extends Object
Modifier and Type | Field and Description |
---|---|
private ImmutableSet<Block> |
canSpawnInside |
private EntityDimensions |
dimensions |
private EntityType.EntityFactory<T> |
factory |
private boolean |
fireImmune |
private int |
maxTrackingRange |
private boolean |
saveable |
private boolean |
spawnableFarFromPlayer |
private SpawnGroup |
spawnGroup |
private boolean |
summonable |
private int |
trackingTickInterval |
Modifier | Constructor and Description |
---|---|
private |
Builder(EntityType.EntityFactory<T> factory,
SpawnGroup spawnGroup) |
Modifier and Type | Method and Description |
---|---|
EntityType.Builder<T> |
allowSpawningInside(Block[] block)
Allows this type of entity to spawn inside the given block, bypassing the default
wither rose, sweet berry bush, cactus, and fire-damage-dealing blocks for
non-fire-resistant mobs.
|
EntityType<T> |
build(String id) |
static <T extends Entity> |
create(EntityType.EntityFactory<T> factory,
SpawnGroup spawnGroup) |
static <T extends Entity> |
create(SpawnGroup spawnGroup) |
EntityType.Builder<T> |
disableSaving() |
EntityType.Builder<T> |
disableSummon() |
EntityType.Builder<T> |
makeFireImmune() |
EntityType.Builder<T> |
maxTrackingRange(int maxTrackingRange) |
EntityType.Builder<T> |
setDimensions(float width,
float height) |
EntityType.Builder<T> |
spawnableFarFromPlayer() |
EntityType.Builder<T> |
trackingTickInterval(int trackingTickInterval) |
private final EntityType.EntityFactory<T extends Entity> factory
private final SpawnGroup spawnGroup
private ImmutableSet<Block> canSpawnInside
private boolean saveable
private boolean summonable
private boolean fireImmune
private boolean spawnableFarFromPlayer
private int maxTrackingRange
private int trackingTickInterval
private EntityDimensions dimensions
private Builder(EntityType.EntityFactory<T> factory, SpawnGroup spawnGroup)
public static <T extends Entity> EntityType.Builder<T> create(EntityType.EntityFactory<T> factory, SpawnGroup spawnGroup)
public static <T extends Entity> EntityType.Builder<T> create(SpawnGroup spawnGroup)
public EntityType.Builder<T> setDimensions(float width, float height)
public EntityType.Builder<T> disableSummon()
public EntityType.Builder<T> disableSaving()
public EntityType.Builder<T> makeFireImmune()
public EntityType.Builder<T> allowSpawningInside(Block[] block)
minecraft:prevent_mob_spawning_inside
tag overrides this.
With this setting, fire resistant mobs can spawn on/in fire damage dealing blocks,
and wither skeletons can spawn in wither roses. If a block added is not in the default
blacklist, the addition has no effect.
public EntityType.Builder<T> spawnableFarFromPlayer()
public EntityType.Builder<T> maxTrackingRange(int maxTrackingRange)
public EntityType.Builder<T> trackingTickInterval(int trackingTickInterval)
public EntityType<T> build(String id)