From c538312ebb22895b41453081a034de1810c873bf Mon Sep 17 00:00:00 2001 From: Penal Buffalo Date: Sat, 10 Jun 2023 10:02:01 -0500 Subject: [PATCH] v3.10.2 b760 * fix exception that sometimes occurs on 1.20 servers --- pom.xml | 2 +- .../me/lokka30/levelledmobs/nametag/Definitions.java | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index a9da2a4c2..2e7d848a4 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ me.lokka30 LevelledMobs - 3.10.1 b759 + 3.10.2 b760 LevelledMobs The Ultimate RPG Mob Levelling Solution diff --git a/src/main/java/me/lokka30/levelledmobs/nametag/Definitions.java b/src/main/java/me/lokka30/levelledmobs/nametag/Definitions.java index 903fdf8fa..9ffa38358 100644 --- a/src/main/java/me/lokka30/levelledmobs/nametag/Definitions.java +++ b/src/main/java/me/lokka30/levelledmobs/nametag/Definitions.java @@ -211,8 +211,14 @@ private void getMethodTextComponents() throws NoSuchMethodException { // net.minecraft.network.chat.MutableComponent empty() if (ver.getMinecraftVersion() >= 1.19) { - // 1.19.0 = g, 1.19.1+ = h - final String methodName = ver.getRevision() == 0 ? "g" : "h"; + String methodName; + if (ver.getMinecraftVersion() >= 1.20){ + methodName = "h"; + } + else { + // 1.19.0 = g, 1.19.1+ = h + methodName = ver.getRevision() == 0 ? "g" : "h"; + } // net.minecraft.network.chat.Component -> // net.minecraft.network.chat.MutableComponent empty()