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

So with forge, how would I go about first off, finding the rotation angles that a player's head is rotated at? This is so I can make some tesselator code 'stick' to the player's head. Also, how can I make an armor pieces texture different IF it has a certain NBT tag? This tag can be applied to any armour be it vanilla armor, or armour from another mod. Are these things possible?

while(awake)

{

    coffee++;

}

Version?

 

You can remove (on game startup) ArmorLayer (name might be different) and add custom one that also checks and renders based on NBT.

Other option is to use RenderPlayerEvent and render independenly (worse I think).

Another one (I only know it from what I hear) is return different armor model from Item class - but that won't work for vanilla I guess.

 

As to head rotation - just look at Entity's pitch/yaw from EntityPlayer point.

1.7.10 is no longer supported by forge, you are on your own.

So with forge, how would I go about first off, finding the rotation angles that a player's head is rotated at? This is so I can make some tesselator code 'stick' to the player's head. Also, how can I make an armor pieces texture different IF it has a certain NBT tag? This tag can be applied to any armour be it vanilla armor, or armour from another mod. Are these things possible?

If you're interested in doing some rayTracing or are in general going to be working with vectors I would suggest using these methods:

final Vec3d posVec = player.getPositionEyes(1.0F);
final Vec3d lookVec = player.getLookVec();

The first method gives you the position of the vector position of the players eyes and the second one is a vector that tells us where the player is looking at. The pitch and rotation data should be readily available in the EntityPlayer instance, just access it and search for rotationPitch, rotationYaw and rotationYawHead.

I still haven't published a mod because I can never get that in-dev version just right to warrant a public release. And yes, after two years of mod development I am still learning to speak Java.

 

Follow me on GitHub: https://github.com/yooksi

Contact me on Twitter: https://twitter.com/yooksi

Read my Minecraft blog: https://yooksidoesminecraft.blogspot.de/

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.