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,

I am recently new to modding mine craft, but I am a fairly experienced coder. I would like to make a mod that modifies some of the hand code, specifically where the hand punches. After searching around for a long while, I have not found where the code for the transformations of the hand punching are. Any help would be appreciated. Thanks.

If you were experienced with coding you'd know the HUD is displayed last, after world rendering

But to answer your question, the hand rendering, is actually in RenderPlayer.renderFirstPersonArm(). But the swing is handled in in ModelBiped

I think its my java of the variables.

  • Author

I do know that the HUD is rendered last, but I don't really know where all the renders and everything are for the hud, minecraft's class structure is fairly new to me. What I meant is the arm rotation to the first person fist when one punches.

One tip about minecraft structure, It's scattered...

arm rotation is a variable in EntityPlayer.swingProgress and EntityPlayer.prevSwingProgress, which is read in rendering by EntityPlayer.getSwingProgress(float f); float f being the partial tick

I think its my java of the variables.

  • Author

That helped alot, thanks. I instantly realized how scattered Minecrat's code is. One last thing. Do you know where the client side breaking begins? I want to stop the player from breaking blocks like adventure mode if they don't have a tool.

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.