OpenJDK 11
This commit is contained in:
@@ -39,8 +39,8 @@ public class AddonInfo {
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (!(obj instanceof AddonInfo other)) return false;
|
||||
|
||||
if (!(obj instanceof AddonInfo)) return false;
|
||||
AddonInfo other = (AddonInfo) obj;
|
||||
return other.name.equalsIgnoreCase(name) && other.version.equalsIgnoreCase(version) && other.author.equalsIgnoreCase(author);
|
||||
}
|
||||
|
||||
|
@@ -202,7 +202,8 @@ public class NetworkClient extends DefaultMethodsOverrider {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (received instanceof Integer id) {
|
||||
if (received instanceof Integer) {
|
||||
int id = (Integer) received;
|
||||
if (command.equalsIgnoreCase("s2c_connect")) {
|
||||
clientID = id;
|
||||
command = "";
|
||||
|
@@ -127,7 +127,8 @@ public class ClientHandler {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (received instanceof Integer id) {
|
||||
if (received instanceof Integer) {
|
||||
int id = (Integer) received;
|
||||
if (command.equalsIgnoreCase("c2s_connect")) {
|
||||
if (clientID == id) continue;
|
||||
command = "";
|
||||
|
@@ -76,7 +76,8 @@ public class Quaternion {
|
||||
|
||||
@Override
|
||||
public final boolean equals(Object obj) {
|
||||
if (!(obj instanceof Quaternion quaternion)) return false;
|
||||
if (!(obj instanceof Quaternion)) return false;
|
||||
Quaternion quaternion = (Quaternion) obj;
|
||||
return quaternion.x == x && quaternion.y == y && quaternion.z == z && quaternion.w == w;
|
||||
}
|
||||
|
||||
|
@@ -100,7 +100,8 @@ public class Vector2 {
|
||||
|
||||
@Override
|
||||
public final boolean equals(Object obj) {
|
||||
if (!(obj instanceof Vector2 vector2)) return false;
|
||||
if (!(obj instanceof Vector2)) return false;
|
||||
Vector2 vector2 = (Vector2) obj;
|
||||
return vector2.x == x && vector2.y == y;
|
||||
}
|
||||
|
||||
|
@@ -124,7 +124,8 @@ public class Vector3 {
|
||||
|
||||
@Override
|
||||
public final boolean equals(Object obj) {
|
||||
if (!(obj instanceof Vector3 vector3)) return false;
|
||||
if (!(obj instanceof Vector3)) return false;
|
||||
Vector3 vector3 = (Vector3) obj;
|
||||
return vector3.x == x && vector3.y == y && vector3.z == z;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user