Class TrialSpawner
java.lang.Object
net.minecraft.world.level.block.entity.trialspawner.TrialSpawner
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final TrialSpawnerConfig
private final TrialSpawnerData
static final int
private static final int
private static final int
private boolean
private PlayerDetector
private static final float
private final TrialSpawner.StateAccessor
-
Constructor Summary
ConstructorDescriptionTrialSpawner
(TrialSpawner.StateAccessor p_312198_, PlayerDetector p_312690_) TrialSpawner
(TrialSpawnerConfig p_311878_, TrialSpawnerData p_311831_, TrialSpawner.StateAccessor p_312676_, PlayerDetector p_312004_) -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addDetectPlayerParticles
(Level p_312225_, BlockPos p_311759_, RandomSource p_312553_, int p_312188_) static void
addEjectItemParticles
(Level p_312009_, BlockPos p_312583_, RandomSource p_312715_) static void
addSpawnParticles
(Level p_312303_, BlockPos p_312392_, RandomSource p_312825_) boolean
canSpawnInLevel
(Level p_312615_) com.mojang.serialization.Codec<TrialSpawner>
codec()
void
ejectReward
(ServerLevel p_312892_, BlockPos p_312668_, ResourceLocation p_312284_) getData()
getState()
private static boolean
inLineOfSight
(Level p_312623_, Vec3 p_312390_, Vec3 p_312652_) void
void
Deprecated, for removal: This API element is subject to removal in a future version.void
setPlayerDetector
(PlayerDetector p_312510_) Deprecated, for removal: This API element is subject to removal in a future version.void
setState
(Level p_312688_, TrialSpawnerState p_312718_) private static boolean
shouldMobBeUntracked
(ServerLevel p_312908_, BlockPos p_312807_, UUID p_311952_) spawnMob
(ServerLevel p_312582_, BlockPos p_312518_) void
tickClient
(Level p_312771_, BlockPos p_312484_) void
tickServer
(ServerLevel p_312132_, BlockPos p_312062_)
-
Field Details
-
DETECT_PLAYER_SPAWN_BUFFER
public static final int DETECT_PLAYER_SPAWN_BUFFER- See Also:
-
MAX_MOB_TRACKING_DISTANCE
private static final int MAX_MOB_TRACKING_DISTANCE- See Also:
-
MAX_MOB_TRACKING_DISTANCE_SQR
private static final int MAX_MOB_TRACKING_DISTANCE_SQR -
SPAWNING_AMBIENT_SOUND_CHANCE
private static final float SPAWNING_AMBIENT_SOUND_CHANCE- See Also:
-
config
-
data
-
stateAccessor
-
playerDetector
-
overridePeacefulAndMobSpawnRule
private boolean overridePeacefulAndMobSpawnRule
-
-
Constructor Details
-
TrialSpawner
-
TrialSpawner
public TrialSpawner(TrialSpawnerConfig p_311878_, TrialSpawnerData p_311831_, TrialSpawner.StateAccessor p_312676_, PlayerDetector p_312004_)
-
-
Method Details
-
codec
-
getConfig
-
getData
-
getState
-
setState
-
markUpdated
public void markUpdated() -
getPlayerDetector
-
canSpawnInLevel
-
spawnMob
-
ejectReward
-
tickClient
-
tickServer
-
shouldMobBeUntracked
private static boolean shouldMobBeUntracked(ServerLevel p_312908_, BlockPos p_312807_, UUID p_311952_) -
inLineOfSight
-
addSpawnParticles
-
addDetectPlayerParticles
public static void addDetectPlayerParticles(Level p_312225_, BlockPos p_311759_, RandomSource p_312553_, int p_312188_) -
addEjectItemParticles
public static void addEjectItemParticles(Level p_312009_, BlockPos p_312583_, RandomSource p_312715_) -
setPlayerDetector
Deprecated, for removal: This API element is subject to removal in a future version. -
overridePeacefulAndMobSpawnRule
Deprecated, for removal: This API element is subject to removal in a future version.
-