From bdcd2bdf24e678490d8740fca7e1d38cc9c1d53d Mon Sep 17 00:00:00 2001 From: "Luis C.M." <42545778+c0508383@users.noreply.github.com> Date: Sun, 6 Apr 2025 21:54:06 -0500 Subject: [PATCH] Made DBC rendering handled by the DBC addon, attached tail to body properly in ModelMPM. --- .../java/noppes/npcs/AnimationMixinFunctions.java | 12 +++++++++--- src/main/java/noppes/npcs/client/model/ModelMPM.java | 7 ++----- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/main/java/noppes/npcs/AnimationMixinFunctions.java b/src/main/java/noppes/npcs/AnimationMixinFunctions.java index 903862e38..e08cd7787 100644 --- a/src/main/java/noppes/npcs/AnimationMixinFunctions.java +++ b/src/main/java/noppes/npcs/AnimationMixinFunctions.java @@ -53,9 +53,15 @@ public class AnimationMixinFunctions { return false; } - if(DBCAddon.IsAvailable() && ClientEventHandler.renderingPlayer != null){ - return DBCClient.Instance.applyRenderModel(modelRenderer); - } else if (!DBCAddon.IsAvailable() && ClientEventHandler.renderingPlayer != null) { + if (DBCAddon.IsAvailable()) { + if (ClientEventHandler.renderingPlayer != null) { + return DBCClient.Instance.applyRenderModel(modelRenderer); + } else if (DBCClient.Instance.applyRenderModel(modelRenderer)) { + return false; + } + } + + if (ClientEventHandler.renderingPlayer != null) { ClientEventHandler.playerModel = (modelRenderer).baseModel; if (ClientCacheHandler.playerAnimations.containsKey(ClientEventHandler.renderingPlayer.getUniqueID())) { AnimationData animData = ClientCacheHandler.playerAnimations.get(ClientEventHandler.renderingPlayer.getUniqueID()); diff --git a/src/main/java/noppes/npcs/client/model/ModelMPM.java b/src/main/java/noppes/npcs/client/model/ModelMPM.java index df103fd85..f4d92a8dd 100644 --- a/src/main/java/noppes/npcs/client/model/ModelMPM.java +++ b/src/main/java/noppes/npcs/client/model/ModelMPM.java @@ -185,8 +185,7 @@ public class ModelMPM extends ModelNPCMale { this.bipedHead.addChild(horns = new ModelHorns(this)); // Completed - tail = new ModelTail(this); - + this.bipedBody.addChild(tail = new ModelTail(this)); this.bipedBody.addChild(wings = new ModelWings(this)); this.bipedBody.addChild(fin = new ModelFin(this)); @@ -303,8 +302,7 @@ public class ModelMPM extends ModelNPCMale { this.bipedHead.addChild(horns = new ModelHorns(this)); // Completed - tail = new ModelTail(this); - + this.bipedBody.addChild(tail = new ModelTail(this)); this.bipedBody.addChild(wings = new ModelWings(this)); this.bipedBody.addChild(fin = new ModelFin(this)); @@ -920,7 +918,6 @@ public class ModelMPM extends ModelNPCMale { this.legs.render(f); if (!isArmor) { this.tail.setConfig(legs, 0, y, z); - this.tail.render(f); } GL11.glPopMatrix(); }