Class TrialSpawnerData
java.lang.Object
net.minecraft.world.level.block.entity.trialspawner.TrialSpawnerData
-
Field Summary
Modifier and TypeFieldDescriptionprotected long
protected Entity
protected Optional<ResourceLocation>
static com.mojang.serialization.MapCodec<TrialSpawnerData>
protected long
protected double
protected SimpleWeightedRandomList<SpawnData>
protected double
private static final String
static final String
protected int
-
Constructor Summary
ConstructorDescriptionTrialSpawnerData
(Set<UUID> p_312543_, Set<UUID> p_311274_, long p_312908_, long p_311373_, int p_311452_, Optional<SpawnData> p_311258_, Optional<ResourceLocation> p_312612_) -
Method Summary
Modifier and TypeMethodDescriptionint
countAdditionalPlayers
(BlockPos p_310055_) getOrCreateDisplayEntity
(TrialSpawner p_310895_, Level p_310374_, TrialSpawnerState p_310556_) protected SpawnData
getOrCreateNextSpawnData
(TrialSpawner p_311810_, RandomSource p_311692_) double
getOSpin()
double
getSpin()
getUpdateTag
(TrialSpawnerState p_310015_) boolean
hasFinishedSpawningAllMobs
(TrialSpawnerConfig p_310871_, int p_313160_) boolean
boolean
boolean
isCooldownFinished
(ServerLevel p_312277_) boolean
isReadyToEjectItems
(ServerLevel p_309478_, TrialSpawnerConfig p_310848_, float p_310189_) boolean
isReadyToOpenShutter
(ServerLevel p_311936_, TrialSpawnerConfig p_312846_, float p_312381_) boolean
isReadyToSpawnNextMob
(ServerLevel p_312376_, TrialSpawnerConfig p_313089_, int p_311969_) void
reset()
void
setEntityId
(TrialSpawner p_311233_, RandomSource p_312395_, EntityType<?> p_311226_) void
setSpawnPotentialsFromConfig
(TrialSpawnerConfig p_311202_) void
tryDetectPlayers
(ServerLevel p_313049_, BlockPos p_310981_, PlayerDetector p_312393_, int p_310864_)
-
Field Details
-
TAG_SPAWN_DATA
- See Also:
-
TAG_NEXT_MOB_SPAWNS_AT
- See Also:
-
MAP_CODEC
-
detectedPlayers
-
currentMobs
-
cooldownEndsAt
protected long cooldownEndsAt -
nextMobSpawnsAt
protected long nextMobSpawnsAt -
totalMobsSpawned
protected int totalMobsSpawned -
nextSpawnData
-
ejectingLootTable
-
spawnPotentials
-
displayEntity
-
spin
protected double spin -
oSpin
protected double oSpin
-
-
Constructor Details
-
TrialSpawnerData
public TrialSpawnerData() -
TrialSpawnerData
-
-
Method Details
-
setSpawnPotentialsFromConfig
-
reset
public void reset() -
hasMobToSpawn
public boolean hasMobToSpawn() -
hasFinishedSpawningAllMobs
-
haveAllCurrentMobsDied
public boolean haveAllCurrentMobsDied() -
isReadyToSpawnNextMob
public boolean isReadyToSpawnNextMob(ServerLevel p_312376_, TrialSpawnerConfig p_313089_, int p_311969_) -
countAdditionalPlayers
-
tryDetectPlayers
public void tryDetectPlayers(ServerLevel p_313049_, BlockPos p_310981_, PlayerDetector p_312393_, int p_310864_) -
isReadyToOpenShutter
public boolean isReadyToOpenShutter(ServerLevel p_311936_, TrialSpawnerConfig p_312846_, float p_312381_) -
isReadyToEjectItems
public boolean isReadyToEjectItems(ServerLevel p_309478_, TrialSpawnerConfig p_310848_, float p_310189_) -
isCooldownFinished
-
setEntityId
-
getOrCreateNextSpawnData
-
getOrCreateDisplayEntity
@Nullable public Entity getOrCreateDisplayEntity(TrialSpawner p_310895_, Level p_310374_, TrialSpawnerState p_310556_) -
getUpdateTag
-
getSpin
public double getSpin() -
getOSpin
public double getOSpin()
-