diff --git a/src/main/java/noppes/npcs/client/model/ModelMPM.java b/src/main/java/noppes/npcs/client/model/ModelMPM.java index 04eba7bc2..7c89c0894 100644 --- a/src/main/java/noppes/npcs/client/model/ModelMPM.java +++ b/src/main/java/noppes/npcs/client/model/ModelMPM.java @@ -65,13 +65,10 @@ public class ModelMPM extends ModelNPCMale{ public boolean isArmor; public float alpha = 1; - // Check Legacy Code for Old Version - - // Updated False = 64x32 Skin // Steve 64x64 and Alex 64x64 - public ModelMPM(float par1, boolean arms) { + public ModelMPM(float par1, boolean alex, boolean steve32) { - super(par1, arms); + super(par1, alex, steve32); isArmor = par1 > 0; float par2 = 0; @@ -101,7 +98,7 @@ public class ModelMPM extends ModelNPCMale{ // this.bipedBodywear.setRotationPoint(0.0F, 0.0F + par2, 0.0F); // Steve 64x64 Model or Alex 64x64 Model - if (arms){ + if (alex){ // Alex Version this.bipedRightArm = (new ModelScaleRenderer(this, 40, 16)); this.bipedRightArm.addBox(-2.0F, -2.0F, -2.0F, 3, 12, 4, par1); @@ -195,6 +192,101 @@ public class ModelMPM extends ModelNPCMale{ } } + // Fake Steve32 + public ModelMPM(float par1, boolean fakeSteve) { + super(par1, false, true); + + isArmor = par1 > 0; + float par2 = 0; + + this.bipedCloak = new ModelRenderer(this, 0, 0); + this.bipedCloak.setTextureSize(64,32); + this.bipedCloak.addBox(-5.0F, 0.0F, -1.0F, 10, 16, 1, par1); + + this.bipedEars = new ModelRenderer(this, 24, 0); + this.bipedEars.addBox(-3.0F, -6.0F, -1.0F, 6, 6, 1, par1); + + this.bipedHead = (new ModelScaleRenderer(this, 0, 0)); + this.bipedHead.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, par1); + this.bipedHead.setRotationPoint(0.0F, 0.0F + par2, 0.0F); + + this.bipedHeadwear = (new ModelScaleRenderer(this, 32, 0)); + this.bipedHeadwear.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, par1 + 0.5F); + this.bipedHeadwear.setRotationPoint(0.0F, 0.0F + par2, 0.0F); + + this.bipedBody = (new ModelScaleRenderer(this, 16, 16)); + this.bipedBody.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, par1); + this.bipedBody.setRotationPoint(0.0F, 0.0F + par2, 0.0F); + + this.bipedRightArm = new ModelScaleRenderer(this, 40, 16); + this.bipedRightArm.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, par1); + this.bipedRightArm.setRotationPoint(-5.0F, 2.0F + par2, 0.0F); + + this.bipedLeftArm = new ModelScaleRenderer(this, 40, 16); + this.bipedLeftArm.mirror = true; + this.bipedLeftArm.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, par1); + this.bipedLeftArm.setRotationPoint(5.0F, 2.0F + par2, 0.0F); + + this.bipedRightLeg = new ModelScaleRenderer(this, 0, 16); + this.bipedRightLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, par1); + this.bipedRightLeg.setRotationPoint(-1.9F, 12.0F + par2, 0.0F); + + this.bipedLeftLeg = new ModelScaleRenderer(this, 0, 16); + this.bipedLeftLeg.mirror = true; + this.bipedLeftLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, par1); + this.bipedLeftLeg.setRotationPoint(1.9F, 12.0F + par2, 0.0F); + + // Body + this.bipedBodywear = (new ModelScaleRenderer(this, 0, 0)); + this.bipedBody.addChild(this.bipedBodywear); + + // Arms + this.bipedRightArmWear = (new ModelScaleRenderer(this, 0, 0)); + this.bipedRightArm.addChild(this.bipedRightArmWear); + this.solidRightArmWear = (new ModelScaleRenderer(this, 0, 0)); + this.bipedRightArm.addChild(this.solidRightArmWear); + this.bipedLeftArmwear = new ModelScaleRenderer(this, 0, 0); + this.bipedLeftArm.addChild(this.bipedLeftArmwear); + this.solidLeftArmWear = (new ModelScaleRenderer(this, 0, 0)); + this.bipedLeftArm.addChild(this.solidLeftArmWear); + + // Legs + this.bipedRightLegWear = (new ModelScaleRenderer(this, 0, 0)); + this.bipedRightLeg.addChild(this.bipedRightLegWear); + this.solidRightLegWear = new ModelScaleRenderer(this, 0, 0); + this.bipedRightLeg.addChild(this.solidRightLegWear); + this.bipedLeftLegWear = new ModelScaleRenderer(this, 0, 0); + this.bipedLeftLeg.addChild(this.bipedLeftLegWear); + this.solidLeftLegWear = new ModelScaleRenderer(this, 0, 0); + this.bipedLeftLeg.addChild(this.solidLeftLegWear); + + headwear = new ModelHeadwear(this, true); + legs = new ModelLegs(this, (ModelScaleRenderer)bipedRightLeg, (ModelScaleRenderer)bipedLeftLeg, 64, 32); + + this.bipedBody.addChild(breasts = new ModelBreasts(this, 64, 32)); + if(!isArmor){ + this.bipedHead.addChild(ears = new ModelEars(this)); + this.bipedHead.addChild(mohawk = new ModelMohawk(this)); + this.bipedHead.addChild(hair = new ModelHair(this)); + this.bipedHead.addChild(beard = new ModelBeard(this)); + + // Completed + this.bipedHead.addChild(snout = new ModelSnout(this)); + this.bipedHead.addChild(horns = new ModelHorns(this)); + + // Completed + tail = new ModelTail(this); + + this.bipedBody.addChild(wings = new ModelWings(this)); + this.bipedBody.addChild(fin = new ModelFin(this)); + + // Fix This + this.bipedBody.addChild(skirt = new ModelSkirt(this)); + this.bipedLeftArm.addChild(clawsL = new ModelClaws(this, false)); + this.bipedRightArm.addChild(clawsR = new ModelClaws(this, true)); + } + } + // Steve 64x32 public ModelMPM(float par1) { diff --git a/src/main/java/noppes/npcs/client/model/ModelNPCMale.java b/src/main/java/noppes/npcs/client/model/ModelNPCMale.java index dd9202135..395c469bc 100644 --- a/src/main/java/noppes/npcs/client/model/ModelNPCMale.java +++ b/src/main/java/noppes/npcs/client/model/ModelNPCMale.java @@ -28,10 +28,15 @@ public class ModelNPCMale extends ModelBiped init(f, 0.0F); } - public ModelNPCMale(float f, boolean arms) + public ModelNPCMale(float f, boolean alex, boolean fakeSteve) { super(f, 0.0F, 64, 64); - init(f, 0.0F, arms); + if(fakeSteve){ + init(f, 0.0F); + } + else{ + init(f, 0.0F, alex); + } } @Override diff --git a/src/main/java/noppes/npcs/client/renderer/RenderNPCHumanMale.java b/src/main/java/noppes/npcs/client/renderer/RenderNPCHumanMale.java index 3c5924fbe..5ecc71d49 100644 --- a/src/main/java/noppes/npcs/client/renderer/RenderNPCHumanMale.java +++ b/src/main/java/noppes/npcs/client/renderer/RenderNPCHumanMale.java @@ -4,6 +4,7 @@ import static net.minecraftforge.client.IItemRenderer.ItemRenderType.EQUIPPED; import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.BLOCK_3D; import net.minecraft.block.Block; +import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.RenderBlocks; @@ -11,7 +12,6 @@ import net.minecraft.client.renderer.entity.RenderBiped; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.init.Items; import net.minecraft.item.*; import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; @@ -23,8 +23,6 @@ import noppes.npcs.client.model.ModelNPCMale; import noppes.npcs.constants.EnumAnimation; import noppes.npcs.entity.EntityCustomNpc; import noppes.npcs.entity.EntityNPCInterface; -import noppes.npcs.items.ItemClaw; -import noppes.npcs.items.ItemShield; import org.lwjgl.opengl.GL11; @@ -36,8 +34,9 @@ public class RenderNPCHumanMale extends RenderNPCInterface protected ModelNPCMale modelArmor; protected final ModelNPCMale originalBipedMain; - protected final ModelMPM steve = new ModelMPM(0, false); - protected final ModelMPM alex = new ModelMPM(0, true); + protected final static ModelMPM steve32fake = new ModelMPM(0, true); + protected final static ModelMPM steve64 = new ModelMPM(0, false, false); + protected final static ModelMPM alex = new ModelMPM(0, true, false); public RenderNPCHumanMale(ModelNPCMale mainmodel, ModelNPCMale armorChest, ModelNPCMale armor) { @@ -113,14 +112,14 @@ public class RenderNPCHumanMale extends RenderNPCInterface public void renderPlayer(EntityNPCInterface npc, double d, double d1, double d2, float f, float f1) { - // SEEMS TO WORK FOR NOW. Keeps NPC from outsyncing with Creature Models + // SEEMS TO WORK FOR NOW. Keeps NPC from out-syncing with Creature Models if(npc instanceof EntityCustomNpc){ EntityCustomNpc test = (EntityCustomNpc) npc; if(test.modelData.entityClass == null){ int modelVal = npc.display.modelType; if(modelVal == 1){ - this.mainModel = steve; - this.modelBipedMain = steve; + this.mainModel = steve64; + this.modelBipedMain = steve64; } else if(modelVal == 2){ this.mainModel = alex; diff --git a/src/main/java/noppes/npcs/client/renderer/RenderNPCInterface.java b/src/main/java/noppes/npcs/client/renderer/RenderNPCInterface.java index 5039cd2e4..a14750ffa 100644 --- a/src/main/java/noppes/npcs/client/renderer/RenderNPCInterface.java +++ b/src/main/java/noppes/npcs/client/renderer/RenderNPCInterface.java @@ -293,7 +293,6 @@ public class RenderNPCInterface extends RenderLiving{ for(byte b : hash){ sb.append(String.format("%02x", b&0xff)); } - // SKIN CHANGE if(npc.display.skinType == 2){ npc.textureLocation = new ResourceLocation("skins/" + sb.toString()); loadSkin(null, npc.textureLocation, npc.display.url, false);