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 TypeClassDescription(package private) static class(package private) static interface(package private) static classNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>Nested classes/interfaces inherited from interface net.minecraft.util.StringRepresentable
StringRepresentable.EnumCodec<E extends Enum<E> & StringRepresentable>, StringRepresentable.StringRepresentableCodec<S extends StringRepresentable> -
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 net.minecraft.util.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 entity, ServerLevel level) calculatePositionToSpawnSpawner(ServerLevel level, BlockPos pos, TrialSpawner spawner, TrialSpawnerData spawnerData) voidemitParticles(Level level, BlockPos pos, boolean isOminous) booleanbooleanintprivate static EntityselectEntityToSpawnItemAbove(List<Player> player, Set<UUID> currentMobs, TrialSpawner spawner, BlockPos pos, ServerLevel level) private voidspawnOminousOminousItemSpawner(ServerLevel level, BlockPos pos, TrialSpawner spawner) double(package private) TrialSpawnerStatetickAndGetNext(BlockPos pos, TrialSpawner spawner, ServerLevel level) private booleantimeToSpawnItemSpawner(ServerLevel level, TrialSpawnerData spawnerData) 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
-
spawnOminousOminousItemSpawner
-
calculatePositionToSpawnSpawner
private static Optional<Vec3> calculatePositionToSpawnSpawner(ServerLevel level, BlockPos pos, TrialSpawner spawner, TrialSpawnerData spawnerData) -
calculatePositionAbove
-
selectEntityToSpawnItemAbove
@Nullable private static Entity selectEntityToSpawnItemAbove(List<Player> player, Set<UUID> currentMobs, TrialSpawner spawner, BlockPos pos, 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
-