Class TrialSpawner
java.lang.Object
net.minecraft.world.level.block.entity.trialspawner.TrialSpawner
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TrialSpawnerDataprivate static final intprivate static final intstatic final intprivate final PlayerDetector.EntitySelectorprivate booleanprivate static final intprivate static final intstatic final Stringprivate final TrialSpawnerConfigstatic final Stringprivate final TrialSpawnerConfigprivate booleanprivate PlayerDetectorprivate final intprivate static final floatprivate final TrialSpawner.StateAccessorprivate final int -
Constructor Summary
ConstructorsConstructorDescriptionTrialSpawner(TrialSpawner.StateAccessor p_310216_, PlayerDetector p_309626_, PlayerDetector.EntitySelector p_328170_) TrialSpawner(TrialSpawnerConfig p_327983_, TrialSpawnerConfig p_327832_, TrialSpawnerData p_330822_, int p_330441_, int p_335693_, TrialSpawner.StateAccessor p_310539_, PlayerDetector p_312974_, PlayerDetector.EntitySelector p_333634_) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddBecomeOminousParticles(Level p_312837_, BlockPos p_311261_, RandomSource p_312356_) static voidaddDetectPlayerParticles(Level p_309415_, BlockPos p_309941_, RandomSource p_310263_, int p_310988_, ParticleOptions p_331085_) static voidaddEjectItemParticles(Level p_311170_, BlockPos p_309958_, RandomSource p_309409_) static voidaddSpawnParticles(Level p_333032_, BlockPos p_328008_, RandomSource p_330922_, SimpleParticleType p_331431_) voidapplyOminous(ServerLevel p_334207_, BlockPos p_327778_) booleancanSpawnInLevel(Level p_312209_) com.mojang.serialization.Codec<TrialSpawner> codec()voidejectReward(ServerLevel p_310080_, BlockPos p_311547_, ResourceKey<LootTable> p_330647_) getData()private TrialSpawnerConfigintgetState()intprivate static booleaninLineOfSight(Level p_311873_, Vec3 p_311845_, Vec3 p_312229_) booleanvoidvoidDeprecated, for removal: This API element is subject to removal in a future version.voidremoveOminous(ServerLevel p_336080_, BlockPos p_328593_) voidsetPlayerDetector(PlayerDetector p_311472_) Deprecated, for removal: This API element is subject to removal in a future version.voidsetState(Level p_310153_, TrialSpawnerState p_312484_) private static booleanshouldMobBeUntracked(ServerLevel p_312275_, BlockPos p_310158_, UUID p_312011_) spawnMob(ServerLevel p_312690_, BlockPos p_313108_) voidtickClient(Level p_309627_, BlockPos p_311485_, boolean p_332221_) voidtickServer(ServerLevel p_310996_, BlockPos p_312836_, boolean p_332881_)
-
Field Details
-
NORMAL_CONFIG_TAG_NAME
- See Also:
-
OMINOUS_CONFIG_TAG_NAME
- See Also:
-
DETECT_PLAYER_SPAWN_BUFFER
public static final int DETECT_PLAYER_SPAWN_BUFFER- See Also:
-
DEFAULT_TARGET_COOLDOWN_LENGTH
private static final int DEFAULT_TARGET_COOLDOWN_LENGTH- See Also:
-
DEFAULT_PLAYER_SCAN_RANGE
private static final int DEFAULT_PLAYER_SCAN_RANGE- 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:
-
normalConfig
-
ominousConfig
-
data
-
requiredPlayerRange
private final int requiredPlayerRange -
targetCooldownLength
private final int targetCooldownLength -
stateAccessor
-
playerDetector
-
entitySelector
-
overridePeacefulAndMobSpawnRule
private boolean overridePeacefulAndMobSpawnRule -
isOminous
private boolean isOminous
-
-
Constructor Details
-
TrialSpawner
public TrialSpawner(TrialSpawner.StateAccessor p_310216_, PlayerDetector p_309626_, PlayerDetector.EntitySelector p_328170_) -
TrialSpawner
public TrialSpawner(TrialSpawnerConfig p_327983_, TrialSpawnerConfig p_327832_, TrialSpawnerData p_330822_, int p_330441_, int p_335693_, TrialSpawner.StateAccessor p_310539_, PlayerDetector p_312974_, PlayerDetector.EntitySelector p_333634_)
-
-
Method Details
-
codec
-
getConfig
-
getNormalConfig
-
getOminousConfig
-
getOminousConfigForSerialization
-
applyOminous
-
removeOminous
-
isOminous
public boolean isOminous() -
getData
-
getTargetCooldownLength
public int getTargetCooldownLength() -
getRequiredPlayerRange
public int getRequiredPlayerRange() -
getState
-
setState
-
markUpdated
public void markUpdated() -
getPlayerDetector
-
getEntitySelector
-
canSpawnInLevel
-
spawnMob
-
ejectReward
public void ejectReward(ServerLevel p_310080_, BlockPos p_311547_, ResourceKey<LootTable> p_330647_) -
tickClient
-
tickServer
-
shouldMobBeUntracked
private static boolean shouldMobBeUntracked(ServerLevel p_312275_, BlockPos p_310158_, UUID p_312011_) -
inLineOfSight
-
addSpawnParticles
public static void addSpawnParticles(Level p_333032_, BlockPos p_328008_, RandomSource p_330922_, SimpleParticleType p_331431_) -
addBecomeOminousParticles
public static void addBecomeOminousParticles(Level p_312837_, BlockPos p_311261_, RandomSource p_312356_) -
addDetectPlayerParticles
public static void addDetectPlayerParticles(Level p_309415_, BlockPos p_309941_, RandomSource p_310263_, int p_310988_, ParticleOptions p_331085_) -
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.
-