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_312283_, Set<UUID> p_312919_, long p_312537_, long p_311955_, int p_312227_, Optional<SpawnData> p_312562_, Optional<ResourceLocation> p_312406_) -
Method Summary
Modifier and TypeMethodDescriptionint
countAdditionalPlayers
(BlockPos p_312262_) getOrCreateDisplayEntity
(TrialSpawner p_312366_, Level p_312148_, TrialSpawnerState p_311790_) protected SpawnData
getOrCreateNextSpawnData
(TrialSpawner p_312745_, RandomSource p_312242_) double
getOSpin()
double
getSpin()
getUpdateTag
(TrialSpawnerState p_312104_) boolean
hasFinishedSpawningAllMobs
(TrialSpawnerConfig p_311805_, int p_312034_) boolean
boolean
boolean
isCooldownFinished
(ServerLevel p_312743_) boolean
isReadyToEjectItems
(ServerLevel p_312692_, TrialSpawnerConfig p_312027_, float p_312374_) boolean
isReadyToOpenShutter
(ServerLevel p_312291_, TrialSpawnerConfig p_312182_, float p_312417_) boolean
isReadyToSpawnNextMob
(ServerLevel p_311818_, TrialSpawnerConfig p_312100_, int p_312550_) void
reset()
void
setEntityId
(TrialSpawner p_312044_, RandomSource p_312864_, EntityType<?> p_312415_) void
setSpawnPotentialsFromConfig
(TrialSpawnerConfig p_312066_) void
tryDetectPlayers
(ServerLevel p_311852_, BlockPos p_312503_, PlayerDetector p_312592_, int p_312480_)
-
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_311818_, TrialSpawnerConfig p_312100_, int p_312550_) -
countAdditionalPlayers
-
tryDetectPlayers
public void tryDetectPlayers(ServerLevel p_311852_, BlockPos p_312503_, PlayerDetector p_312592_, int p_312480_) -
isReadyToOpenShutter
public boolean isReadyToOpenShutter(ServerLevel p_312291_, TrialSpawnerConfig p_312182_, float p_312417_) -
isReadyToEjectItems
public boolean isReadyToEjectItems(ServerLevel p_312692_, TrialSpawnerConfig p_312027_, float p_312374_) -
isCooldownFinished
-
setEntityId
-
getOrCreateNextSpawnData
-
getOrCreateDisplayEntity
@Nullable public Entity getOrCreateDisplayEntity(TrialSpawner p_312366_, Level p_312148_, TrialSpawnerState p_311790_) -
getUpdateTag
-
getSpin
public double getSpin() -
getOSpin
public double getOSpin()
-