Enum Class TrialSpawnerState
java.lang.Object
java.lang.Enum<TrialSpawnerState>
net.minecraft.world.level.block.entity.trialspawner.TrialSpawnerState
- All Implemented Interfaces:
Serializable, Comparable<TrialSpawnerState>, Constable, StringRepresentable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static interfaceprivate static classNested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>Nested classes/interfaces inherited from interface StringRepresentable
StringRepresentable.EnumCodec<E>, StringRepresentable.StringRepresentableCodec<S> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final floatprivate final booleanprivate final intprivate final Stringprivate final TrialSpawnerState.ParticleEmissionprivate final doubleprivate static final intFields inherited from interface StringRepresentable
PRE_BUILT_MAP_THRESHOLD -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateTrialSpawnerState(String name, int lightLevel, TrialSpawnerState.ParticleEmission particleEmission, double spinningMobSpeed, boolean isCapableOfSpawning) -
Method Summary
Modifier and TypeMethodDescriptioncalculatePositionAbove(Entity entityToSpawnItemAbove, ServerLevel level) calculatePositionToSpawnSpawner(ServerLevel level, BlockPos trialSpawnerPos, TrialSpawner trialSpawner, TrialSpawnerStateData data) voidemitParticles(Level level, BlockPos blockPos, boolean isOminous) booleanbooleanintprivate static @Nullable EntityselectEntityToSpawnItemAbove(List<Player> nearbyPlayers, Set<UUID> mobIds, TrialSpawner trialSpawner, BlockPos spawnerPos, ServerLevel level) private voidspawnOminousOminousItemSpawner(ServerLevel level, BlockPos trialSpawnerPos, TrialSpawner trialSpawner) double(package private) TrialSpawnerStatetickAndGetNext(BlockPos spawnerPos, TrialSpawner trialSpawner, ServerLevel serverLevel) private booleantimeToSpawnItemSpawner(ServerLevel serverLevel, TrialSpawnerStateData data) static TrialSpawnerStateReturns the enum constant of this class with the specified name.static TrialSpawnerState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INACTIVE
-
WAITING_FOR_PLAYERS
-
ACTIVE
-
WAITING_FOR_REWARD_EJECTION
-
EJECTING_REWARD
-
COOLDOWN
-
-
Field Details
-
DELAY_BEFORE_EJECT_AFTER_KILLING_LAST_MOB
private static final float DELAY_BEFORE_EJECT_AFTER_KILLING_LAST_MOB- See Also:
-
TIME_BETWEEN_EACH_EJECTION
private static final int TIME_BETWEEN_EACH_EJECTION -
name
-
lightLevel
private final int lightLevel -
spinningMobSpeed
private final double spinningMobSpeed -
particleEmission
-
isCapableOfSpawning
private final boolean isCapableOfSpawning
-
-
Constructor Details
-
TrialSpawnerState
private TrialSpawnerState(String name, int lightLevel, TrialSpawnerState.ParticleEmission particleEmission, double spinningMobSpeed, boolean isCapableOfSpawning)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
tickAndGetNext
TrialSpawnerState tickAndGetNext(BlockPos spawnerPos, TrialSpawner trialSpawner, ServerLevel serverLevel) -
spawnOminousOminousItemSpawner
private void spawnOminousOminousItemSpawner(ServerLevel level, BlockPos trialSpawnerPos, TrialSpawner trialSpawner) -
calculatePositionToSpawnSpawner
private static Optional<Vec3> calculatePositionToSpawnSpawner(ServerLevel level, BlockPos trialSpawnerPos, TrialSpawner trialSpawner, TrialSpawnerStateData data) -
calculatePositionAbove
private static Optional<Vec3> calculatePositionAbove(Entity entityToSpawnItemAbove, ServerLevel level) -
selectEntityToSpawnItemAbove
private static @Nullable Entity selectEntityToSpawnItemAbove(List<Player> nearbyPlayers, Set<UUID> mobIds, TrialSpawner trialSpawner, BlockPos spawnerPos, ServerLevel level) -
timeToSpawnItemSpawner
-
lightLevel
public int lightLevel() -
spinningMobSpeed
public double spinningMobSpeed() -
hasSpinningMob
public boolean hasSpinningMob() -
isCapableOfSpawning
public boolean isCapableOfSpawning() -
emitParticles
-
getSerializedName
- Specified by:
getSerializedNamein interfaceStringRepresentable
-