Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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.

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

  • 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

  • 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);

  • Author

Can you only give me a simple example for a new model with a small cube or something like that?

  • Author

But how i must use the reflection i probed some things but it crashs or i get errors

  • 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.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.