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
  • Enum Constant Details

    • MANUAL

      public static final RedstoneProgram.PlayMode MANUAL
      Manually play, pause, restart, and skip.
    • SWITCH_ON_PULSE

      public static final RedstoneProgram.PlayMode SWITCH_ON_PULSE
      If there is a redstone pulse, switch between playing and pausing. Restart if the end is reached.
    • RESTART_ON_PULSE

      public static final RedstoneProgram.PlayMode RESTART_ON_PULSE
      If there is a redstone pulse, start the program again, even if already running. Don't loop.
    • RESUME_WITH_POWER

      public static final RedstoneProgram.PlayMode RESUME_WITH_POWER
      If there is power, play. If not, pause. If the end is reached, start again.
    • RESTART_WITH_POWER

      public static final RedstoneProgram.PlayMode RESTART_WITH_POWER
      If there is power, play. If not, go back to the start and pause. Do not loop.
    • LOOP_WITH_POWER

      public static final RedstoneProgram.PlayMode LOOP_WITH_POWER
      If there is power, play. If not, pause and restart. If the end is reached, start again.
    • LOOP

      public static final RedstoneProgram.PlayMode LOOP
      Play on repeat infinitely.
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<RedstoneProgram.PlayMode> CODEC
    • pausesWhenFinished

      public final boolean pausesWhenFinished
      Whether we should stop once we reach the end and go back to the beginning, rather than play again.
    • powerRequired

      public final boolean powerRequired
      Whether we should pause if we don't have power and play if we do.
    • description

      public final net.minecraft.network.chat.Component description
    • icon

      public final PetrolparkIcon icon
  • Method Details

    • values

      public static RedstoneProgram.PlayMode[] 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

      public static RedstoneProgram.PlayMode valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getSerializedName

      public String getSerializedName()
      Specified by:
      getSerializedName in interface net.minecraft.util.StringRepresentable