diff --git a/CustomNPC.iml b/CustomNPC.iml deleted file mode 100644 index 797656b98..000000000 --- a/CustomNPC.iml +++ /dev/null @@ -1,699 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MCP - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/java/noppes/npcs/client/ClientProxy.java b/src/main/java/noppes/npcs/client/ClientProxy.java index e6454a6a2..2a93f03e8 100644 --- a/src/main/java/noppes/npcs/client/ClientProxy.java +++ b/src/main/java/noppes/npcs/client/ClientProxy.java @@ -180,8 +180,12 @@ public class ClientProxy extends CommonProxy { RenderingRegistry.registerEntityRenderingHandler(EntityNpcDragon.class, new RenderNpcDragon(new ModelNpcDragon(0.0F), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityNpcSlime.class, new RenderNpcSlime(new ModelNpcSlime(16), new ModelNpcSlime(0), 0.25F)); RenderingRegistry.registerEntityRenderingHandler(EntityProjectile.class, new RenderProjectile()); + + // Changes Made Here: RenderingRegistry.registerEntityRenderingHandler(EntityCustomNpc.class, new RenderCustomNpc()); RenderingRegistry.registerEntityRenderingHandler(EntityNPC64x64.class, new RenderCustomNpc(1)); + + RenderingRegistry.registerEntityRenderingHandler(EntityNPCGolem.class, new RenderNPCHumanMale( new ModelNPCGolem(0), new ModelNPCGolem(1F), new ModelNPCGolem(0.5F))); FMLCommonHandler.instance().bus().register(new ClientTickHandler()); diff --git a/src/main/java/noppes/npcs/client/model/ModelMPM.java b/src/main/java/noppes/npcs/client/model/ModelMPM.java index af2396472..3c1770a60 100644 --- a/src/main/java/noppes/npcs/client/model/ModelMPM.java +++ b/src/main/java/noppes/npcs/client/model/ModelMPM.java @@ -118,6 +118,77 @@ public class ModelMPM extends ModelNPCMale{ this.bipedRightArm.addChild(clawsR = new ModelClaws(this, true)); } } + + public ModelMPM(float par1, boolean arms) { + + super(par1); + isArmor = par1 > 0; + float par2 = 0; + + // Changed Texture Size + int short1 = 64; + int short2 = 64; + + this.bipedCloak = new ModelRenderer(this, 0, 0); + 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)).setTextureSize(short1, short2); + 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)).setTextureSize(short1, short2); + 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)).setTextureSize(short1, short2); + 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)).setTextureSize(short1, short2); + this.bipedRightArm.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, par1); + this.bipedRightArm.setRotationPoint(-5.0F, 2.0F + par2, 0.0F); + + // Changed Texture Size + this.bipedLeftArm = (new ModelScaleRenderer(this, 32, 48)).setTextureSize(short1, short2); + 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)).setTextureSize(short1, short2); + this.bipedRightLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, par1); + this.bipedRightLeg.setRotationPoint(-1.9F, 12.0F + par2, 0.0F); + + // Changed Texture Size + this.bipedLeftLeg = (new ModelScaleRenderer(this, 16, 48)).setTextureSize(short1, short2); + 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); + + headwear = new ModelHeadwear(this); + legs = new ModelLegs(this, (ModelScaleRenderer)bipedRightLeg, (ModelScaleRenderer)bipedLeftLeg); + + this.bipedBody.addChild(breasts = new ModelBreasts(this)); + 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)); + this.bipedHead.addChild(snout = new ModelSnout(this)); + this.bipedHead.addChild(horns = new ModelHorns(this)); + + tail = new ModelTail(this); + + this.bipedBody.addChild(wings = new ModelWings(this)); + this.bipedBody.addChild(skirt = new ModelSkirt(this)); + this.bipedBody.addChild(fin = new ModelFin(this)); + + this.bipedLeftArm.addChild(clawsL = new ModelClaws(this, false)); + this.bipedRightArm.addChild(clawsR = new ModelClaws(this, true)); + } + } private void setPlayerData(EntityCustomNpc entity){ if(!isArmor){ diff --git a/src/main/java/noppes/npcs/client/model/ModelMPM64.java b/src/main/java/noppes/npcs/client/model/ModelMPM64.java index d518bbaea..835cbc9d3 100644 --- a/src/main/java/noppes/npcs/client/model/ModelMPM64.java +++ b/src/main/java/noppes/npcs/client/model/ModelMPM64.java @@ -25,7 +25,49 @@ import java.util.Random; public class ModelMPM64 extends ModelMPM{ + public EntityLivingBase entity; + public boolean isArmor; + public ModelMPM64(float par1) { super(par1); + this.textureHeight = 64; + this.textureWidth = 64; + + isArmor = par1 > 0; + float par2 = 0; + this.bipedCloak = new ModelRenderer(this, 0, 0); + 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, 32, 48); + this.bipedLeftArm.mirror = false; + 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, 16, 48); + this.bipedLeftLeg.mirror = false; + this.bipedLeftLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, par1); + this.bipedLeftLeg.setRotationPoint(1.9F, 12.0F + par2, 0.0F); + } } + diff --git a/src/main/java/noppes/npcs/client/model/ModelNPCMale64.java b/src/main/java/noppes/npcs/client/model/ModelNPCMale64.java new file mode 100644 index 000000000..5d81dd1de --- /dev/null +++ b/src/main/java/noppes/npcs/client/model/ModelNPCMale64.java @@ -0,0 +1,69 @@ +package noppes.npcs.client.model; + +import net.minecraft.client.model.ModelBiped; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.MathHelper; +import noppes.npcs.CustomNpcs; +import noppes.npcs.constants.EnumAnimation; +import noppes.npcs.entity.EntityNPCInterface; +import org.lwjgl.opengl.GL11; + +// DELETE IF NOT NEEDED + +public class ModelNPCMale64 extends ModelNPCMale +{ + public boolean isDancing; + public boolean isSleeping; + + public float animationTick; + public float dancingTicks; + + public ModelNPCMale64(float f) + { + super(f); + } + + @Override + public void init(float f, float f1) + { + heldItemLeft = 0; + heldItemRight = 0; + isSneak = false; + aimedBow = false; + bipedCloak = new ModelRenderer(this, 0, 0); + bipedCloak.textureHeight = 32; + bipedCloak.addBox(-5F, 0.0F, -1F, 10, 16, 1, f); + + bipedEars = new ModelRenderer(this, 24, 0); + bipedEars.addBox(-3F, -6F, -1F, 6, 6, 1, f); + + bipedHead = new ModelRenderer(this, 0, 0); + bipedHead.addBox(-4F, -8F, -4F, 8, 8, 8, f); + bipedHead.setRotationPoint(0.0F, 0.0F + f1, 0.0F); + + bipedHeadwear = new ModelRenderer(this, 32, 0); + bipedHeadwear.addBox(-4F, -8F, -4F, 8, 8, 8, f + 0.5F); + bipedHeadwear.setRotationPoint(0.0F, 0.0F + f1, 0.0F); + bipedBody = new ModelRenderer(this, 16, 16); + bipedBody.addBox(-4F, 0.0F, -2F, 8, 12, 4, f); + bipedBody.setRotationPoint(0.0F, 0.0F + f1, 0.0F); + bipedRightArm = new ModelRenderer(this, 40, 16); + bipedRightArm.addBox(-3F, -2F, -2F, 4, 12, 4, f); + bipedRightArm.setRotationPoint(-5F, 2.0F + f1, 0.0F); + bipedLeftArm = new ModelRenderer(this, 32, 48); + bipedLeftArm.mirror = false; + bipedLeftArm.addBox(-1F, -2F, -2F, 4, 12, 4, f); + bipedLeftArm.setRotationPoint(5F, 2.0F + f1, 0.0F); + bipedRightLeg = new ModelRenderer(this, 0, 16); + bipedRightLeg.addBox(-2F, 0.0F, -2F, 4, 12, 4, f); + bipedRightLeg.setRotationPoint(-2F, 12F + f1, 0.0F); + bipedLeftLeg = new ModelRenderer(this, 16, 48); + bipedLeftLeg.mirror = false; + bipedLeftLeg.addBox(-2F, 0.0F, -2F, 4, 12, 4, f); + bipedLeftLeg.setRotationPoint(2.0F, 12F + f1, 0.0F); + + } +} diff --git a/src/main/java/noppes/npcs/client/renderer/RenderCustomNpc.java b/src/main/java/noppes/npcs/client/renderer/RenderCustomNpc.java index 87a322c92..f45ff421a 100644 --- a/src/main/java/noppes/npcs/client/renderer/RenderCustomNpc.java +++ b/src/main/java/noppes/npcs/client/renderer/RenderCustomNpc.java @@ -10,7 +10,6 @@ import net.minecraft.entity.EntityList; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import noppes.npcs.client.model.ModelMPM; -import noppes.npcs.client.model.ModelMPM64; import noppes.npcs.client.model.util.ModelRenderPassHelper; import noppes.npcs.controllers.PixelmonHelper; import noppes.npcs.entity.EntityCustomNpc; @@ -30,7 +29,7 @@ public class RenderCustomNpc extends RenderNPCHumanMale{ } public RenderCustomNpc(int i) { - super(new ModelMPM64(0), new ModelMPM64(1), new ModelMPM64(0.5f)); + super(new ModelMPM(0, true), new ModelMPM(1, true), new ModelMPM(0.5f, true)); } @Override diff --git a/src/main/java/noppes/npcs/entity/EntityNPC64x64.java b/src/main/java/noppes/npcs/entity/EntityNPC64x64.java index 894871b03..c53069224 100644 --- a/src/main/java/noppes/npcs/entity/EntityNPC64x64.java +++ b/src/main/java/noppes/npcs/entity/EntityNPC64x64.java @@ -13,6 +13,6 @@ public class EntityNPC64x64 extends EntityCustomNpc{ public EntityNPC64x64(World world) { super(world); - display.setSkinTexture("customnpcs:textures/entity/humanmale/Steve64x32.png"); + display.setSkinTexture("customnpcs:textures/entity/humanmale/Steve64.png"); } } diff --git a/src/main/resources/assets/customnpcs/textures/entity/humanmale/Steve64.png b/src/main/resources/assets/customnpcs/textures/entity/humanmale/Steve64.png new file mode 100644 index 000000000..c5b91d054 Binary files /dev/null and b/src/main/resources/assets/customnpcs/textures/entity/humanmale/Steve64.png differ