Package net.minecraft.world.spawner
Class AbstractSpawner
- java.lang.Object
-
- net.minecraft.world.spawner.AbstractSpawner
-
public abstract class AbstractSpawner extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private Entity
displayEntity
private static org.apache.logging.log4j.Logger
LOGGER
private int
maxNearbyEntities
private int
maxSpawnDelay
private int
minSpawnDelay
private WeightedSpawnerEntity
nextSpawnData
private double
oSpin
private int
requiredPlayerRange
private int
spawnCount
private int
spawnDelay
private java.util.List<WeightedSpawnerEntity>
spawnPotentials
private int
spawnRange
private double
spin
-
Constructor Summary
Constructors Constructor Description AbstractSpawner()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
broadcastEvent(int p_98267_1_)
private void
delay()
private ResourceLocation
getEntityId()
abstract World
getLevel()
Entity
getOrCreateDisplayEntity()
double
getoSpin()
abstract BlockPos
getPos()
Entity
getSpawnerEntity()
double
getSpin()
private boolean
isNearPlayer()
void
load(CompoundNBT p_98270_1_)
boolean
onEventTriggered(int p_98268_1_)
CompoundNBT
save(CompoundNBT p_189530_1_)
void
setEntityId(EntityType<?> p_200876_1_)
void
setNextSpawnData(WeightedSpawnerEntity p_184993_1_)
void
tick()
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
spawnDelay
private int spawnDelay
-
spawnPotentials
private final java.util.List<WeightedSpawnerEntity> spawnPotentials
-
nextSpawnData
private WeightedSpawnerEntity nextSpawnData
-
spin
private double spin
-
oSpin
private double oSpin
-
minSpawnDelay
private int minSpawnDelay
-
maxSpawnDelay
private int maxSpawnDelay
-
spawnCount
private int spawnCount
-
displayEntity
@Nullable private Entity displayEntity
-
maxNearbyEntities
private int maxNearbyEntities
-
requiredPlayerRange
private int requiredPlayerRange
-
spawnRange
private int spawnRange
-
-
Method Detail
-
getEntityId
@Nullable private ResourceLocation getEntityId()
-
setEntityId
public void setEntityId(EntityType<?> p_200876_1_)
-
isNearPlayer
private boolean isNearPlayer()
-
tick
public void tick()
-
delay
private void delay()
-
load
public void load(CompoundNBT p_98270_1_)
-
save
public CompoundNBT save(CompoundNBT p_189530_1_)
-
getOrCreateDisplayEntity
@Nullable public Entity getOrCreateDisplayEntity()
-
onEventTriggered
public boolean onEventTriggered(int p_98268_1_)
-
setNextSpawnData
public void setNextSpawnData(WeightedSpawnerEntity p_184993_1_)
-
broadcastEvent
public abstract void broadcastEvent(int p_98267_1_)
-
getLevel
public abstract World getLevel()
-
getPos
public abstract BlockPos getPos()
-
getSpin
public double getSpin()
-
getoSpin
public double getoSpin()
-
getSpawnerEntity
@Nullable public Entity getSpawnerEntity()
-
-