From c0bac481ad9e8cbada9b40779397205246953b6a Mon Sep 17 00:00:00 2001 From: KAMKEEL Date: Tue, 15 Mar 2022 02:03:58 -0400 Subject: [PATCH 1/2] [WIP] Arm Fix --- .../noppes/npcs/client/model/ModelMPM.java | 14 +- .../npcs/client/model/part/ModelLimbWear.java | 122 ++++++++++++++++-- 2 files changed, 121 insertions(+), 15 deletions(-) diff --git a/src/main/java/noppes/npcs/client/model/ModelMPM.java b/src/main/java/noppes/npcs/client/model/ModelMPM.java index c5c50a4d8..5b5221274 100644 --- a/src/main/java/noppes/npcs/client/model/ModelMPM.java +++ b/src/main/java/noppes/npcs/client/model/ModelMPM.java @@ -98,7 +98,6 @@ public class ModelMPM extends ModelNPCMale{ this.bipedBodywear = (new ModelScaleRenderer(this, 16, 32)); this.bipedBodywear.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, par1 + 0.5F); this.bipedBody.addChild(this.bipedBodywear); - // this.bipedBodywear.setRotationPoint(0.0F, 0.0F + par2, 0.0F); // Steve 64x64 Model or Alex 64x64 Model if (arms){ @@ -114,13 +113,14 @@ public class ModelMPM extends ModelNPCMale{ this.bipedRightArmWear = (new ModelScaleRenderer(this, 40, 32)); this.bipedRightArmWear.addBox(-2.0F, -2.0F, -2.0F, 3, 12, 4, par1 + 0.25F); this.bipedRightArm.addChild(this.bipedRightArmWear); - this.solidRightArmWear = new ModelLimbWear(this,"arm","right"); + + this.solidRightArmWear = new ModelLimbWear(this,"arm","right", true); this.bipedRightArm.addChild(this.solidRightArmWear); this.bipedLeftArmwear = new ModelScaleRenderer(this, 48, 48); this.bipedLeftArmwear.addBox(-1.0F, -2.0F, -2.0F, 3, 12, 4, par1 + 0.25F); this.bipedLeftArm.addChild(this.bipedLeftArmwear); - this.solidLeftArmWear = new ModelLimbWear(this,"arm","left"); + this.solidLeftArmWear = new ModelLimbWear(this,"arm","left", true); this.bipedLeftArm.addChild(this.solidLeftArmWear); } else{ @@ -136,13 +136,13 @@ public class ModelMPM extends ModelNPCMale{ this.bipedRightArmWear = (new ModelScaleRenderer(this, 40, 32)); this.bipedRightArmWear.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, par1 + 0.25F); this.bipedRightArm.addChild(this.bipedRightArmWear); - this.solidRightArmWear = new ModelLimbWear(this,"arm","right"); + this.solidRightArmWear = new ModelLimbWear(this,"arm","right", false); this.bipedRightArm.addChild(this.solidRightArmWear); this.bipedLeftArmwear = new ModelScaleRenderer(this, 48, 48); this.bipedLeftArmwear.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, par1 + 0.25F); this.bipedLeftArm.addChild(this.bipedLeftArmwear); - this.solidLeftArmWear = new ModelLimbWear(this,"arm","left"); + this.solidLeftArmWear = new ModelLimbWear(this,"arm","left", false); this.bipedLeftArm.addChild(this.solidLeftArmWear); } @@ -157,13 +157,13 @@ public class ModelMPM extends ModelNPCMale{ this.bipedRightLegWear = (new ModelScaleRenderer(this, 0, 32)); this.bipedRightLegWear.addBox(-2.08F, 0.0F, -2.0F, 4, 12, 4, par1 + 0.25F); this.bipedRightLeg.addChild(this.bipedRightLegWear); - this.solidRightLegWear = new ModelLimbWear(this,"leg","right"); + this.solidRightLegWear = new ModelLimbWear(this,"leg","right", false); this.bipedRightLeg.addChild(this.solidRightLegWear); this.bipedLeftLegWear = new ModelScaleRenderer(this, 0, 48); this.bipedLeftLegWear.addBox(-1.92F, 0.0F, -2.0F, 4, 12, 4, par1 + 0.25F); this.bipedLeftLeg.addChild(this.bipedLeftLegWear); - this.solidLeftLegWear = new ModelLimbWear(this,"leg","left"); + this.solidLeftLegWear = new ModelLimbWear(this,"leg","left", false); this.bipedLeftLeg.addChild(this.solidLeftLegWear); diff --git a/src/main/java/noppes/npcs/client/model/part/ModelLimbWear.java b/src/main/java/noppes/npcs/client/model/part/ModelLimbWear.java index 62a325ee5..5a56d3df4 100644 --- a/src/main/java/noppes/npcs/client/model/part/ModelLimbWear.java +++ b/src/main/java/noppes/npcs/client/model/part/ModelLimbWear.java @@ -6,19 +6,30 @@ import noppes.npcs.client.model.util.Model2DRenderer; import noppes.npcs.client.model.util.ModelScaleRenderer; public class ModelLimbWear extends ModelScaleRenderer { - public ModelLimbWear(ModelBase base, String limb, String side) { + public ModelLimbWear(ModelBase base, String limb, String side, boolean alex) { super(base); float thick = 0.55f; switch (limb){ case "arm": - switch (side){ - case "right": - rightArm(base,thick); - break; - case "left": - leftArm(base,thick); - break; + if (alex) { + switch (side) { + case "right": + rightArmAlex(base, thick); + break; + case "left": + leftArmAlex(base, thick); + break; + } + } else { + switch (side) { + case "right": + rightArm(base, thick); + break; + case "left": + leftArm(base, thick); + break; + } } break; case "leg": @@ -131,6 +142,101 @@ public class ModelLimbWear extends ModelScaleRenderer { this.addChild(bottom); } + public void rightArmAlex(ModelBase base, float thick){ + float x = 0.95f; + float y = -2.0f; + + Model2DRenderer front = new Model2DRenderer(base, 44, 36, 3, 12, 64, 64); + front.setRotationPoint(-4.52f+x, 12.535f+y, -2.58f); + front.setScale(0.96f,0.8175f); + front.setThickness(thick); + setRotation(front, 0, 0, 0); + this.addChild(front); + + Model2DRenderer back = new Model2DRenderer(base, 51, 36, 3, 12, 64, 64); + back.setRotationPoint(0.6f+x, 12.535f+y, 2.58f); + back.setScale(0.96f,0.8175f); + back.setThickness(thick); + setRotation(back, 0, (float)(Math.PI), 0); + this.addChild(back); + + Model2DRenderer right = new Model2DRenderer(base, 47, 36, 4, 12, 64, 64); + right.setRotationPoint(0.1f+x, 12.55f+y, 2.55f); + right.setScale(0.96f,0.82f); + right.setThickness(thick); + setRotation(right, 0, (float)(Math.PI/2f), 0); + this.addChild(right); + + Model2DRenderer left = new Model2DRenderer(base, 40, 36, 4, 12, 64, 64); + left.setRotationPoint(-3.98f+x, 12.55f+y, -2.55f); + left.setScale(0.96f,0.82f); + left.setThickness(thick); + setRotation(left, 0, (float)(Math.PI/-2f), 0); + this.addChild(left); + + Model2DRenderer top = new Model2DRenderer(base, 44, 32, 3, 4, 64, 64); + top.setRotationPoint(-4.525f+x, -0.6f+y, -2.55f); + top.setScale(0.32f); + top.setThickness(thick); + setRotation(top, (float)(Math.PI / -2), 0, 0); + this.addChild(top); + + Model2DRenderer bottom = new Model2DRenderer(base, 47, 32, 3, 4, 64, 64); + bottom.setRotationPoint(-4.5f+x, 12.0f+y, -2.525f); + bottom.setScale(0.32f); + bottom.setThickness(thick); + setRotation(bottom, (float)(Math.PI / -2), 0, 0); + this.addChild(bottom); + } + + public void leftArmAlex(ModelBase base,float thick){ + float x = 2.95f; + float y = -2.0f; + + Model2DRenderer front = new Model2DRenderer(base, 52, 52, 4, 12, 64, 64); + front.setRotationPoint(-4.52f+x, 12.535f+y, -2.58f); + front.setScale(0.96f,0.8175f); + front.setThickness(thick); + setRotation(front, 0, 0, 0); + this.addChild(front); + + Model2DRenderer back = new Model2DRenderer(base, 60, 52, 4, 12, 64, 64); + back.setRotationPoint(0.6f+x, 12.535f+y, 2.58f); + back.setScale(0.96f,0.8175f); + back.setThickness(thick); + setRotation(back, 0, (float)(Math.PI), 0); + this.addChild(back); + + Model2DRenderer right = new Model2DRenderer(base, 56, 52, 4, 12, 64, 64); + right.setRotationPoint(0.06f+x, 12.55f+y, 2.55f); + right.setScale(0.96f,0.82f); + right.setThickness(thick); + setRotation(right, 0, (float)(Math.PI/2f), 0); + this.addChild(right); + + Model2DRenderer left = new Model2DRenderer(base, 48, 52, 4, 12, 64, 64); + left.setRotationPoint(-4.03f+x, 12.55f+y, -2.55f); + left.setScale(0.96f,0.82f); + left.setThickness(thick); + setRotation(left, 0, (float)(Math.PI/-2f), 0); + this.addChild(left); + + + Model2DRenderer top = new Model2DRenderer(base, 52, 48, 4, 4, 64, 64); + top.setRotationPoint(-4.525f+x, -0.6f+y, -2.55f); + top.setScale(0.32f); + top.setThickness(thick); + setRotation(top, (float)(Math.PI / -2), 0, 0); + this.addChild(top); + + Model2DRenderer bottom = new Model2DRenderer(base, 56, 48, 4, 4, 64, 64); + bottom.setRotationPoint(-4.56f+x, 12.0f+y, -2.55f); + bottom.setScale(0.32f); + bottom.setThickness(thick); + setRotation(bottom, (float)(Math.PI / -2), 0, 0); + this.addChild(bottom); + } + public void rightLeg(ModelBase base, float thick){ float x = 1.8f; float y = 0.0f; From 3454ecb78a610a5ac3cc7238fc68efe58e715a47 Mon Sep 17 00:00:00 2001 From: KAMKEEL Date: Sun, 3 Apr 2022 14:37:50 -0400 Subject: [PATCH 2/2] Update Version --- build.gradle | 2 +- src/main/java/noppes/npcs/CustomNpcs.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 0fa989b42..a4be69890 100644 --- a/build.gradle +++ b/build.gradle @@ -17,7 +17,7 @@ buildscript { apply plugin: 'forge' -version = "1.5.1" +version = "1.5.2" group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "CustomNPC-Plus" diff --git a/src/main/java/noppes/npcs/CustomNpcs.java b/src/main/java/noppes/npcs/CustomNpcs.java index 654a8a712..c14ad8f83 100644 --- a/src/main/java/noppes/npcs/CustomNpcs.java +++ b/src/main/java/noppes/npcs/CustomNpcs.java @@ -33,7 +33,7 @@ import java.io.File; import java.util.Set; import java.util.concurrent.Executors; -@Mod(modid = "customnpcs", name = "CustomNpcs", version = "1.5.1-beta") +@Mod(modid = "customnpcs", name = "CustomNpcs", version = "1.5.2") public class CustomNpcs { @ConfigProp(info = "Disable Chat Bubbles")