don't ping for preserved mobs main
authorIan Sutton <iasutton@equinix.com>
Thu, 25 Jan 2024 04:36:11 +0000 (22:36 -0600)
committerIan Sutton <iasutton@equinix.com>
Thu, 25 Jan 2024 04:36:11 +0000 (22:36 -0600)
src/net/encode/wurmesp/feature/hook/MobileModelRenderableInit.java

index b4b3f72d63c75ef2d5b368503106d87f7ebe628e..a4d6c1f18ad1df14760679f41577c0ab89c7488f 100644 (file)
@@ -15,6 +15,11 @@ extends Hook {
             method.invoke(proxy, args);
             PickableUnit pUnit = (PickableUnit)proxy;
             Unit unit = new Unit(CellRenderable.world, pUnit.getId(), pUnit, ((CreatureCellRenderable)proxy).getModelName().toString(), ((CreatureCellRenderable)proxy).getHoverName());
             method.invoke(proxy, args);
             PickableUnit pUnit = (PickableUnit)proxy;
             Unit unit = new Unit(CellRenderable.world, pUnit.getId(), pUnit, ((CreatureCellRenderable)proxy).getModelName().toString(), ((CreatureCellRenderable)proxy).getHoverName());
+
+            if(unit.getHoverName().contains("preserved")) {
+                return null;
+            }
+
             if (unit.isPlayer() || unit.isMob()) {
                 WurmEspMod.pickableUnits.add(unit);
                 if (unit.isUnique() && WurmEspMod.uniques && WurmEspMod.playsoundunique) {
             if (unit.isPlayer() || unit.isMob()) {
                 WurmEspMod.pickableUnits.add(unit);
                 if (unit.isUnique() && WurmEspMod.uniques && WurmEspMod.playsoundunique) {