Posted February 20, 201411 yr Hello, Is there any way to make custom Player Model(s) because i want to make dwarfs and hobbits and much more for my mod.
February 20, 201411 yr Author English: I has this code from an old dated tutorial but it underlines event.renderer.ModelBipedMain; because there is no getter and setter German: Es unterstreicht mir Zeile 6, den Code habe ich von einem Tutorial bzw. einem thread von Minecraft Forum habe den Link aber leider nicht mehr was soll ich anders machen? private ModelBiped hdr = new ModelBiped(); Minecraft mc = Minecraft.getMinecraft(); ModelBiped main; @ForgeSubscribe public void PlayerPrerenderer(RenderPlayerEvent.SetArmorModel event) { main = event.renderer.modelBipedMain; renderhdrPlayer(event.entityPlayer, event.partialRenderTick); } public void renderhdrPlayer(EntityPlayer player, float partialTick) { float base = 0.0625f; //base value for models GL11.glPushMatrix(); //starts the rendering proce mc.renderEngine.bindTexture(new ResourceLocation("herrderringe_hdr:textures/mobs/Rohirim.png")); //sets texture hdr.bipedHead.render(base); //renders head over the players head hdr.bipedBody.render(base); //renders body over the players body hdr.bipedRightArm.render(base); //renders right arm over players right arm hdr.bipedLeftArm.render(base); //renders left arm over players left arm hdr.bipedLeftLeg.render(base); //renders left leg over players left leg hdr.bipedRightLeg.render(base); //renders rigth leg over players right leg. //This mess of code sets the rotation angles for the the player and the new model. //This is important because without it the model won't move with the player hdr.bipedHead.rotateAngleX = main.bipedHead.rotateAngleX; hdr.bipedHead.rotateAngleY = main.bipedHead.rotateAngleY; hdr.bipedHead.rotateAngleZ = main.bipedHead.rotateAngleZ; hdr.bipedBody.rotateAngleX = main.bipedBody.rotateAngleX; hdr.bipedBody.rotateAngleY = main.bipedBody.rotateAngleY; hdr.bipedBody.rotateAngleZ = main.bipedBody.rotateAngleZ; hdr.bipedLeftArm.rotateAngleX = main.bipedLeftArm.rotateAngleX; hdr.bipedLeftArm.rotateAngleY = main.bipedLeftArm.rotateAngleY; hdr.bipedLeftArm.rotateAngleZ = main.bipedLeftArm.rotateAngleZ; hdr.bipedRightArm.rotateAngleX = main.bipedRightArm.rotateAngleX; hdr.bipedRightArm.rotateAngleY = main.bipedRightArm.rotateAngleY; hdr.bipedRightArm.rotateAngleZ = main.bipedRightArm.rotateAngleZ; hdr.bipedLeftLeg.rotateAngleX = main.bipedLeftLeg.rotateAngleX; hdr.bipedLeftLeg.rotateAngleY = main.bipedLeftLeg.rotateAngleY; hdr.bipedLeftLeg.rotateAngleZ = main.bipedLeftLeg.rotateAngleZ; hdr.bipedRightLeg.rotateAngleX = main.bipedRightLeg.rotateAngleX; hdr.bipedRightLeg.rotateAngleY = main.bipedRightLeg.rotateAngleY; hdr.bipedRightLeg.rotateAngleZ = main.bipedRightLeg.rotateAngleZ; GL11.glPopMatrix(); }
February 20, 201411 yr Author [Ja ich schreibe es auch in Englisch dachte mir berreits das du deutsch kannst wegen deinem Namen,...] How does i make this i don't understand what you mean with reflection
February 20, 201411 yr Author I only found this thing but I don't know how to use it Method method = RenderPlayer.getClass().getMethod("doSomething", null); method.invoke(foo, null);
February 20, 201411 yr Author Can you only give me a simple example for a new model with a small cube or something like that?
February 20, 201411 yr Author But how i must use the reflection i probed some things but it crashs or i get errors
February 20, 201411 yr Author Method method = RenderPlayer.getClass().getMethod("RenderPlayer", null); method.invoke(RenderPlayer, null); But this is wrong and i don't find a good tutorial
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.