OpenJDK 11

This commit is contained in:
2024-07-22 20:13:14 +02:00
parent 158edf5d40
commit b1b0eb4337
8 changed files with 16 additions and 11 deletions

2
.idea/misc.xml generated
View File

@@ -8,7 +8,7 @@
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="21" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="corretto-11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

View File

@@ -6,11 +6,11 @@
<groupId>me.finn.unlegitlibrary</groupId>
<artifactId>unlegitlibrary</artifactId>
<version>1.3.1</version>
<version>1.3.1-OpenJDK11</version>
<properties>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

View File

@@ -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);
}

View File

@@ -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 = "";

View File

@@ -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 = "";

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}