Jump to content

Recommended Posts

Posted

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();
       }

Posted

[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

Posted

    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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.