reformat
This commit is contained in:
@@ -2,7 +2,8 @@ package storagecraft.tile;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public enum RedstoneMode {
|
||||
public enum RedstoneMode
|
||||
{
|
||||
IGNORE(0),
|
||||
HIGH(1),
|
||||
LOW(2);
|
||||
@@ -11,22 +12,27 @@ public enum RedstoneMode {
|
||||
|
||||
public final int id;
|
||||
|
||||
RedstoneMode(int id) {
|
||||
RedstoneMode(int id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public RedstoneMode next() {
|
||||
public RedstoneMode next()
|
||||
{
|
||||
RedstoneMode next = getById(id + 1);
|
||||
|
||||
if (next == null) {
|
||||
if (next == null)
|
||||
{
|
||||
return getById(0);
|
||||
}
|
||||
|
||||
return next;
|
||||
}
|
||||
|
||||
public boolean isEnabled(World world, int x, int y, int z) {
|
||||
switch (this) {
|
||||
public boolean isEnabled(World world, int x, int y, int z)
|
||||
{
|
||||
switch (this)
|
||||
{
|
||||
case IGNORE:
|
||||
return true;
|
||||
case HIGH:
|
||||
@@ -38,9 +44,12 @@ public enum RedstoneMode {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static RedstoneMode getById(int id) {
|
||||
for (RedstoneMode control : values()) {
|
||||
if (control.id == id) {
|
||||
public static RedstoneMode getById(int id)
|
||||
{
|
||||
for (RedstoneMode control : values())
|
||||
{
|
||||
if (control.id == id)
|
||||
{
|
||||
return control;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user