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_310539_, PlayerDetector p_312974_) TrialSpawner
(TrialSpawnerConfig p_310434_, TrialSpawnerData p_311518_, TrialSpawner.StateAccessor p_310216_, PlayerDetector p_309626_) -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addDetectPlayerParticles
(Level p_309415_, BlockPos p_309941_, RandomSource p_310263_, int p_310988_) static void
addEjectItemParticles
(Level p_311170_, BlockPos p_309958_, RandomSource p_309409_) static void
addSpawnParticles
(Level p_312837_, BlockPos p_311261_, RandomSource p_312356_) boolean
canSpawnInLevel
(Level p_312209_) com.mojang.serialization.Codec<TrialSpawner>
codec()
void
ejectReward
(ServerLevel p_310080_, BlockPos p_311547_, ResourceLocation p_311861_) getData()
getState()
private static boolean
inLineOfSight
(Level p_311873_, Vec3 p_311845_, Vec3 p_312229_) void
void
Deprecated, for removal: This API element is subject to removal in a future version.void
setPlayerDetector
(PlayerDetector p_311472_) Deprecated, for removal: This API element is subject to removal in a future version.void
setState
(Level p_310153_, TrialSpawnerState p_312484_) private static boolean
shouldMobBeUntracked
(ServerLevel p_312275_, BlockPos p_310158_, UUID p_312011_) spawnMob
(ServerLevel p_312690_, BlockPos p_313108_) void
tickClient
(Level p_309627_, BlockPos p_311485_) void
tickServer
(ServerLevel p_310996_, BlockPos p_312836_)
-
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_310434_, TrialSpawnerData p_311518_, TrialSpawner.StateAccessor p_310216_, PlayerDetector p_309626_)
-
-
Method Details
-
codec
-
getConfig
-
getData
-
getState
-
setState
-
markUpdated
public void markUpdated() -
getPlayerDetector
-
canSpawnInLevel
-
spawnMob
-
ejectReward
-
tickClient
-
tickServer
-
shouldMobBeUntracked
private static boolean shouldMobBeUntracked(ServerLevel p_312275_, BlockPos p_310158_, UUID p_312011_) -
inLineOfSight
-
addSpawnParticles
-
addDetectPlayerParticles
public static void addDetectPlayerParticles(Level p_309415_, BlockPos p_309941_, RandomSource p_310263_, int p_310988_) -
addEjectItemParticles
public static void addEjectItemParticles(Level p_311170_, BlockPos p_309958_, RandomSource p_309409_) -
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.
-