From 15883177de8216a4318d89e71ce808d161266e64 Mon Sep 17 00:00:00 2001 From: ACGaming <4818419+ACGaming@users.noreply.github.com> Date: Thu, 8 Feb 2024 19:19:02 +0100 Subject: [PATCH] Directly access loaded entity list #124 --- gradle.properties | 2 +- src/main/java/drzhark/mocreatures/MoCConstants.java | 2 +- src/main/java/drzhark/mocreatures/MoCTools.java | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gradle.properties b/gradle.properties index 2534df217..34d581ae5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx3G # Mod Information mod_id=mocreatures -mod_version=12.4.0 +mod_version=12.4.1 maven_group=drzhark.mocreatures archives_base_name=DrZharks-MoCreatures-Extended # License Plugin diff --git a/src/main/java/drzhark/mocreatures/MoCConstants.java b/src/main/java/drzhark/mocreatures/MoCConstants.java index 7cf2d1b56..1f4ce7ed1 100644 --- a/src/main/java/drzhark/mocreatures/MoCConstants.java +++ b/src/main/java/drzhark/mocreatures/MoCConstants.java @@ -8,7 +8,7 @@ public class MoCConstants { public static final String MOD_ID = "mocreatures"; public static final String MOD_PREFIX = MOD_ID + ":"; public static final String MOD_NAME = "DrZhark's Mo'Creatures Extended"; - public static final String MOD_VERSION = "12.4.0"; + public static final String MOD_VERSION = "12.4.1"; public static final String MOD_ACCEPTED_VERSIONS = "[" + MOD_VERSION + "]"; public static final String MOD_DEPENDENCIES = "after:futuremc;after:thaumcraft;after:thermalexpansion;after:traverse"; public static final Integer DATAFIXER_VERSION = 1; diff --git a/src/main/java/drzhark/mocreatures/MoCTools.java b/src/main/java/drzhark/mocreatures/MoCTools.java index b7497e2e4..c1e2541dc 100644 --- a/src/main/java/drzhark/mocreatures/MoCTools.java +++ b/src/main/java/drzhark/mocreatures/MoCTools.java @@ -1200,9 +1200,9 @@ public static Entity findTheCorrectEntity(World world, UUID searchFor) { return null; } Entity entity = null; - for (int i = 0; i < world.getLoadedEntityList().size(); i++) { - if (world.getLoadedEntityList().get(i) != null) { - Entity entity2 = (Entity) world.getLoadedEntityList().get(i); + for (int i = 0; i < world.loadedEntityList.size(); i++) { + if (world.loadedEntityList.get(i) != null) { + Entity entity2 = world.loadedEntityList.get(i); if (entity2.getUniqueID().equals(searchFor)) { entity = entity2; }