PrettyPipes/src/main/java/de/ellpeck/prettypipes/pipe/ConnectionType.java

30 lines
637 B
Java
Raw Normal View History

2020-04-16 04:42:42 +02:00
package de.ellpeck.prettypipes.pipe;
2020-04-14 01:38:48 +02:00
2021-12-02 12:31:04 +01:00
import net.minecraft.util.StringRepresentable;
2020-04-14 01:38:48 +02:00
import java.util.Locale;
2021-12-02 12:31:04 +01:00
public enum ConnectionType implements StringRepresentable {
2020-04-15 18:35:00 +02:00
CONNECTED(true),
2020-04-14 01:38:48 +02:00
DISCONNECTED(false),
2020-04-16 19:47:09 +02:00
BLOCKED(false),
LEGS(false);
2020-04-14 01:38:48 +02:00
private final String name;
private final boolean isConnected;
ConnectionType(boolean isConnected) {
this.name = this.name().toLowerCase(Locale.ROOT);
this.isConnected = isConnected;
}
public boolean isConnected() {
return this.isConnected;
}
@Override
2021-12-02 12:31:04 +01:00
public String getSerializedName() {
2020-04-14 01:38:48 +02:00
return this.name;
}
}