Posted September 26, 20168 yr 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++; }
September 26, 20168 yr 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.
September 28, 20168 yr 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.