Enum Class RedstoneProgram.PlayMode
java.lang.Object
java.lang.Enum<RedstoneProgram.PlayMode>
com.petrolpark.compat.create.common.redstone.programmer.RedstoneProgram.PlayMode
- All Implemented Interfaces:
Serializable,Comparable<RedstoneProgram.PlayMode>,Constable,net.minecraft.util.StringRepresentable
- Enclosing class:
RedstoneProgram
public static enum RedstoneProgram.PlayMode
extends Enum<RedstoneProgram.PlayMode>
implements net.minecraft.util.StringRepresentable
-
Nested Class Summary
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
net.minecraft.util.StringRepresentable.EnumCodec<E extends Enum<E> & net.minecraft.util.StringRepresentable>, net.minecraft.util.StringRepresentable.StringRepresentableCodec<S extends net.minecraft.util.StringRepresentable> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionPlay on repeat infinitely.If there is power, play.Manually play, pause, restart, and skip.If there is a redstone pulse, start the program again, even if already running.If there is power, play.If there is power, play.If there is a redstone pulse, switch between playing and pausing. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<RedstoneProgram.PlayMode> final net.minecraft.network.chat.Componentfinal PetrolparkIconfinal booleanWhether we should stop once we reach the end and go back to the beginning, rather than play again.final booleanWhether we should pause if we don't have power and play if we do.Fields inherited from interface net.minecraft.util.StringRepresentable
PRE_BUILT_MAP_THRESHOLD -
Method Summary
Modifier and TypeMethodDescriptionstatic RedstoneProgram.PlayModeReturns the enum constant of this class with the specified name.static RedstoneProgram.PlayMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MANUAL
Manually play, pause, restart, and skip. -
SWITCH_ON_PULSE
If there is a redstone pulse, switch between playing and pausing. Restart if the end is reached. -
RESTART_ON_PULSE
If there is a redstone pulse, start the program again, even if already running. Don't loop. -
RESUME_WITH_POWER
If there is power, play. If not, pause. If the end is reached, start again. -
RESTART_WITH_POWER
If there is power, play. If not, go back to the start and pause. Do not loop. -
LOOP_WITH_POWER
If there is power, play. If not, pause and restart. If the end is reached, start again. -
LOOP
Play on repeat infinitely.
-
-
Field Details
-
CODEC
-
pausesWhenFinished
public final boolean pausesWhenFinishedWhether we should stop once we reach the end and go back to the beginning, rather than play again. -
powerRequired
public final boolean powerRequiredWhether we should pause if we don't have power and play if we do. -
description
public final net.minecraft.network.chat.Component description -
icon
-
-
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
-
getSerializedName
- Specified by:
getSerializedNamein interfacenet.minecraft.util.StringRepresentable
-