mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-16 10:55:01 -04:00
remove useless enum::getId to Enum::ordinal aliases
This commit is contained in:
parent
46d4a0ab06
commit
d1b6a581f7
@ -21,8 +21,4 @@ public enum ChatTextPositions {
|
||||
public static ChatTextPositions byId(int id) {
|
||||
return values()[id];
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return ordinal();
|
||||
}
|
||||
}
|
||||
|
@ -22,8 +22,4 @@ public enum Difficulties {
|
||||
public static Difficulties byId(int id) {
|
||||
return values()[id];
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return ordinal();
|
||||
}
|
||||
}
|
||||
|
@ -24,8 +24,4 @@ public enum Directions {
|
||||
public static Directions byId(int id) {
|
||||
return values()[id];
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return ordinal();
|
||||
}
|
||||
}
|
||||
|
@ -28,8 +28,4 @@ public enum SoundCategories {
|
||||
public static SoundCategories byId(int id) {
|
||||
return values()[id];
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return ordinal();
|
||||
}
|
||||
}
|
@ -25,8 +25,4 @@ public enum Poses {
|
||||
public static Poses byId(int id) {
|
||||
return values()[id];
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return ordinal();
|
||||
}
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ public class PacketHandshake implements ServerboundPacket {
|
||||
buffer.writeVarInt((nextState == ConnectionStates.STATUS ? -1 : connection.getVersion().getProtocolVersion())); // get best protocol version
|
||||
buffer.writeString(address.getHostname());
|
||||
buffer.writeShort((short) address.getPort());
|
||||
buffer.writeVarInt(nextState.getId());
|
||||
buffer.writeVarInt(nextState.ordinal());
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ public class PacketClientSettings implements ServerboundPacket {
|
||||
buffer.writeByte((byte) 0x00); // chat settings (nobody uses them)
|
||||
buffer.writeBoolean(true); // chat colors
|
||||
if (buffer.getProtocolId() < 6) {
|
||||
buffer.writeByte((byte) Difficulties.NORMAL.getId()); // difficulty
|
||||
buffer.writeByte((byte) Difficulties.NORMAL.ordinal()); // difficulty
|
||||
buffer.writeBoolean(true); // cape
|
||||
} else {
|
||||
buffer.writeByte((byte) 0b01111111); // ToDo: skin parts
|
||||
|
@ -27,8 +27,4 @@ public enum ConnectionStates {
|
||||
public static ConnectionStates byId(int id) {
|
||||
return values()[id];
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return ordinal();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user