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

I wanted to see if there was a simple or easy way to detect how fast a mob is turning left or right and have the value sent or used in its respected model class(es) before attempting to write something on my own.

 

I do not necessarily need actual code but it something is open source to look at, great! If not, some general ideas such as what functions or classes to use or write would be helpful too.

 

If I would have to do the detection in the server side Entity class and send it to the client side Model class. If that is true, I might ask for the least resource intensive way to send that information there.

  • Author

When I run a test of what those values are in the model class or in the Entity's LivingUpdate(), prevRotationPitch and rotationPitch are always the same value. Is there a difference between them?

  • Author

I am actually working on mob model animation to give the illusion of my mobs' parts obeying physics better (such as a mob with a long tail turning around). Eventually I'll move on to jumps and falling.

 

I played around for a while and decided the variable, renderYawOffset, seemed to work best for my needs. The biggest challenge I had to face was what you mentioned with the rotation amount rollback but I did overcome that after a few hours. All the math I have handled in the client side version of the Entity class which the model class just calls over the results so as to ensure it is unique to that mob.

 

It works great. Thanks, your suggestions gave me a good idea of where to even start trying this.

 

You say you do this in your mod's animations? Which mod is that?

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.