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 class
Nested 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 float
private final boolean
private final int
private final String
private final TrialSpawnerState.ParticleEmission
private final double
private static final int
Fields inherited from interface net.minecraft.util.StringRepresentable
PRE_BUILT_MAP_THRESHOLD
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
TrialSpawnerState
(String pName, int pLightLevel, TrialSpawnerState.ParticleEmission pParticleEmission, double pSpinningMobSpeed, boolean pIsCapableOfSpawning) -
Method Summary
Modifier and TypeMethodDescriptioncalculatePositionAbove
(Entity pEntity, ServerLevel pLevel) calculatePositionToSpawnSpawner
(ServerLevel pLevel, BlockPos pPos, TrialSpawner pSpawner, TrialSpawnerData pSpawnerData) void
emitParticles
(Level pLevel, BlockPos pPos, boolean pIsOminous) boolean
boolean
int
private static Entity
selectEntityToSpawnItemAbove
(List<Player> pPlayer, Set<UUID> pCurrentMobs, TrialSpawner pSpawner, BlockPos pPos, ServerLevel pLevel) private void
spawnOminousOminousItemSpawner
(ServerLevel pLevel, BlockPos pPos, TrialSpawner pSpawner) double
(package private) TrialSpawnerState
tickAndGetNext
(BlockPos pPos, TrialSpawner pSpawner, ServerLevel pLevel) private boolean
timeToSpawnItemSpawner
(ServerLevel pLevel, TrialSpawnerData pSpawnerData) static TrialSpawnerState
Returns 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 pName, int pLightLevel, TrialSpawnerState.ParticleEmission pParticleEmission, double pSpinningMobSpeed, boolean pIsCapableOfSpawning)
-
-
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
private void spawnOminousOminousItemSpawner(ServerLevel pLevel, BlockPos pPos, TrialSpawner pSpawner) -
calculatePositionToSpawnSpawner
private static Optional<Vec3> calculatePositionToSpawnSpawner(ServerLevel pLevel, BlockPos pPos, TrialSpawner pSpawner, TrialSpawnerData pSpawnerData) -
calculatePositionAbove
-
selectEntityToSpawnItemAbove
@Nullable private static Entity selectEntityToSpawnItemAbove(List<Player> pPlayer, Set<UUID> pCurrentMobs, TrialSpawner pSpawner, BlockPos pPos, ServerLevel pLevel) -
timeToSpawnItemSpawner
-
lightLevel
public int lightLevel() -
spinningMobSpeed
public double spinningMobSpeed() -
hasSpinningMob
public boolean hasSpinningMob() -
isCapableOfSpawning
public boolean isCapableOfSpawning() -
emitParticles
-
getSerializedName
- Specified by:
getSerializedName
in interfaceStringRepresentable
-