From 301aa1746378220b94a817606194330f4881f39a Mon Sep 17 00:00:00 2001 From: KAMKEEL Date: Tue, 27 Apr 2021 21:05:00 -0400 Subject: [PATCH] Add NPC64 Files Note* NPC 64x64 does not work as of right now, I can't get the model and textures to line up correctly. If anyone wants to reach out please do. --- CustomNPC.iml | 699 ------------------ .../java/noppes/npcs/client/ClientProxy.java | 4 + .../noppes/npcs/client/model/ModelMPM.java | 71 ++ .../noppes/npcs/client/model/ModelMPM64.java | 42 ++ .../npcs/client/model/ModelNPCMale64.java | 69 ++ .../npcs/client/renderer/RenderCustomNpc.java | 3 +- .../noppes/npcs/entity/EntityNPC64x64.java | 2 +- .../textures/entity/humanmale/Steve64.png | Bin 0 -> 2696 bytes 8 files changed, 188 insertions(+), 702 deletions(-) delete mode 100644 CustomNPC.iml create mode 100644 src/main/java/noppes/npcs/client/model/ModelNPCMale64.java create mode 100644 src/main/resources/assets/customnpcs/textures/entity/humanmale/Steve64.png 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 0000000000000000000000000000000000000000..c5b91d054d4def145cf9666442a6e6b75983301c GIT binary patch literal 2696 zcmV;33U~F1P)o_%(<=;IyXjy? zg(3O|VlHBqi|u%3lXz5?77^ZwtkP-mm%Qu?tK9B zrw6^DX~G?G14GxL^Pi@{^*lV@GY&aU5Z!>i~>{#z-(+w`i`|2D3Fy172;p%XfjM+EVUv!Z>YYl}(=k z51M@MIdDC|r|XE>4s6Fp(DcED41zwx2i|}huxtrQz89i_uFG8`*E!;1&)}#kypt}X z5x|JT#f-VViHRFJe1;Coaz>2Npc@)OJ`FyfiSB3&w(FoIV8V7>xQ;87z}UbSyy!Zo zt_dKy&Jh>7hKdVdX??__k)Gy>t&OWLf}Z0-(={xtpMmE#tb^w12>AVQZTf(Y{+=%E z+ItXZu6Dw6Js5_tRv1fVXr2bsG+;Z9JUiq#N1Xd~xVQk8%qsI7X%iPqOqdV|!|)l{ z_Utn#4F<%a$IwieJ{^A3K;PgXdb>NZ{m=X0*mM)FI$eUsGFZx35wk4hJ4du#=`SvT z#dTqilV_u^bMoK)@&kwtS@?U~c|8A}XRz)^zd-YY?Ra_98}NJ@p8x%39Q}AccK_^$ zc=hc+V(sF22$z`Hx&OF;sE?RLh}<>uog<14U{P&|3Wl!fLiXjM5`62Sc_=Rpqc1*; zy6PDSM=GFeejGm8CP1xTwOm}=&m2SCaS`zc(K{H$AC8_!@4%372iJ2Y2<1{a&Jjfi zKoNyqs_&nP3+)}~?Hdq=mq$XFJ--%Lu3m(xYj7M3 zp6~5k&{^;`$X{bwxS+em^`{7YpXN7WxKgkucQCE21d-Ab7`iEh%)hO_ z`DXt6zx9@f+FE&!jt*@3&ChYIcK|cWL*n}G$L$3Hy=Cxt0NC=A?`Jh~$4jq`9l)VO z9!g5&{fC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