1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-07-03 18:42:53 +00:00
SquidDev 156023b154 Create more work for myself
This ensures no lines start with an empty line, and all files finish
with exactly one "\n".
2020-05-11 16:08:25 +01:00

48 lines
1.1 KiB
Java

/*
* This file is part of ComputerCraft - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2020. Do not distribute without permission.
* Send enquiries to dratcliffe@gmail.com
*/
package dan200.computercraft.shared.computer.blocks;
import net.minecraft.util.IStringSerializable;
import javax.annotation.Nonnull;
public enum ComputerState implements IStringSerializable
{
Off( "off" ),
On( "on" ),
Blinking( "blinking" );
private static final ComputerState[] VALUES = ComputerState.values();
// TODO: Move to dan200.computercraft.shared.computer.core in the future. We can't do it now
// as Plethora depends on it.
private final String name;
ComputerState( String name )
{
this.name = name;
}
@Nonnull
@Override
public String getName()
{
return name;
}
@Override
public String toString()
{
return name;
}
public static ComputerState valueOf( int ordinal )
{
return ordinal < 0 || ordinal >= VALUES.length ? ComputerState.Off : VALUES[ordinal];
}
}