From c9c0ea6a3e3382fd236345b89bd0991c8b8cbb17 Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Fri, 22 Apr 2022 01:41:18 -0400 Subject: Fix of inquistor not counted in tracker Manually added from #118 --- .../me/Danker/features/loot/MythologicalTracker.java | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/main/java/me/Danker/features/loot/MythologicalTracker.java b/src/main/java/me/Danker/features/loot/MythologicalTracker.java index 1784b41..9a98466 100644 --- a/src/main/java/me/Danker/features/loot/MythologicalTracker.java +++ b/src/main/java/me/Danker/features/loot/MythologicalTracker.java @@ -2,10 +2,14 @@ package me.Danker.features.loot; import me.Danker.handlers.ConfigHandler; import me.Danker.utils.Utils; +import net.minecraft.client.Minecraft; +import net.minecraft.entity.Entity; import net.minecraft.util.StringUtils; import net.minecraftforge.client.event.ClientChatReceivedEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import java.util.List; + public class MythologicalTracker { public static double mythCoins; @@ -73,9 +77,19 @@ public class MythologicalTracker { gaiaConstructsSession++; ConfigHandler.writeIntConfig("mythological", "gaiaConstruct", gaiaConstructs); } else if (message.contains("a Minos Champion!")) { - minosChampions++; - minosChampionsSession++; - ConfigHandler.writeIntConfig("mythological", "minosChampion", minosChampions); + Minecraft mc = Minecraft.getMinecraft(); + List listWorldEntity = mc.theWorld.getLoadedEntityList(); + for (Entity entity : listWorldEntity) { + if (entity.getName().contains("Minos Champion")) { + minosChampions++; + minosChampionsSession++; + ConfigHandler.writeIntConfig("mythological", "minosChampion", minosChampions); + } else if (entity.getName().contains("Minos Inquisitor")) { + minosInquisitors++; + minosInquisitorsSession++; + ConfigHandler.writeIntConfig("mythological", "minosInquisitor", minosInquisitors); + } + } } else if (message.contains("a Minos Inquisitor!")) { minosInquisitors++; minosInquisitorsSession++; -- cgit