From f3058eaa999c6a26f6b63bb87a0e53c3cb6bb962 Mon Sep 17 00:00:00 2001
From: lesleyrs <19632758+lesleyrs@users.noreply.github.com>
Date: Tue, 7 May 2024 00:16:56 +0200
Subject: [PATCH] fix unchecked operations, fix maven warnings, restore
original RSA keys
---
pom.xml | 14 +++++---------
src/main/java/Game.java | 4 ++--
src/main/java/LocType.java | 8 ++++----
3 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/pom.xml b/pom.xml
index 6f2ec0d..d7256d6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,6 +2,9 @@
+
+ UTF-8
+
4.0.0
runescape
@@ -12,19 +15,12 @@
org.apache.maven.plugins
maven-compiler-plugin
+ 3.13.0
7
7
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
- 9
- 9
-
-
@@ -51,4 +47,4 @@
-
\ No newline at end of file
+
diff --git a/src/main/java/Game.java b/src/main/java/Game.java
index 5f94416..1d5af67 100644
--- a/src/main/java/Game.java
+++ b/src/main/java/Game.java
@@ -22,9 +22,9 @@ public class Game extends GameShell {
public static final int[][] designPartColor = {{6798, 107, 10283, 16, 4797, 7744, 5799, 4634, 33697, 22433, 2983, 54193}, {8741, 12, 64030, 43162, 7735, 8404, 1701, 38430, 24094, 10153, 56621, 4783, 1341, 16578, 35003, 25239}, {25238, 8742, 12, 64030, 43162, 7735, 8404, 1701, 38430, 24094, 10153, 56621, 4783, 1341, 16578, 35003}, {4626, 11146, 6439, 12, 4758, 10270}, {4550, 4537, 5681, 5673, 5790, 6806, 8076, 4574}};
public static final int[] designHairColor = {9104, 10275, 7595, 3610, 7975, 8526, 918, 38802, 24466, 10145, 58654, 5027, 1457, 16565, 34991, 25486};
- public static final BigInteger RSA_MODULUS = new BigInteger("150437374157649496260907284144944613391868328356428312785170855566836496148649769873303054925785940753587048471819630374797613652942136320599534564023031743563833250113572385619350489566973866283982326500382760586083379242813677444239924493338426453599564333273724064297982529208425077775100347146662074078333");
+ public static final BigInteger RSA_MODULUS = new BigInteger("7162900525229798032761816791230527296329313291232324290237849263501208207972894053929065636522363163621000728841182238772712427862772219676577293600221789");
public static final int[] levelExperience;
- public static final BigInteger RSA_EXPONENT = new BigInteger("65537");
+ public static final BigInteger RSA_EXPONENT = new BigInteger("58778699976184461502525193738213253649000149147835990136706041084440742975821");
public static final String VALID_CHAT_CHARACTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!\"\243$%^&*()-_=+[{]};:'@#~,<.>/?\\| ";
public static final int[] BITMASK;
public static final int MAX_PLAYER_COUNT = 2048;
diff --git a/src/main/java/LocType.java b/src/main/java/LocType.java
index c9882c5..69cd26f 100644
--- a/src/main/java/LocType.java
+++ b/src/main/java/LocType.java
@@ -42,12 +42,12 @@ public class LocType {
/**
* This is where dynamically generated models go.
*/
- public static LRUMap modelCacheDynamic = new LRUMap(30);
+ public static LRUMap modelCacheDynamic = new LRUMap<>(30);
public static LocType[] cache;
/**
* This is where basic models go.
*/
- public static LRUMap modelCacheStatic = new LRUMap(500);
+ public static LRUMap modelCacheStatic = new LRUMap<>(500);
public static LocType get(int locID) {
if (locID >= count) {
@@ -296,7 +296,7 @@ public class LocType {
modelID += 0x10000;
}
- model = modelCacheStatic.get(modelID);
+ model = modelCacheStatic.get((long) modelID);
if (model == null) {
model = Model.tryGet(modelID & 0xffff);
if (model == null) {
@@ -346,7 +346,7 @@ public class LocType {
modelID += 0x10000;
}
- model = modelCacheStatic.get(modelID);
+ model = modelCacheStatic.get((long) modelID);
if (model == null) {
model = Model.tryGet(modelID & 0xffff);