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.

[1.9.4 / 1.10.2] issues with handlePerspective and custom IBakedModel

Featured Replies

Posted

I am updating my mod, BiblioCraft, from 1.8.9 to 1.9.4 / 1.10.2 (tried both, same issue) and I have some custom models that implement IPerspectiveAwareModel. The interface adds the handlePerspective method to my custom model and in 1.8.9 would run every tick on item models. Now in 1.9.4 / 1.10.2 it doesn't get called at all and my models transforms are unaffected by anything that happens in this method.

ย 

What changed here? Is there something new I need to do to make the handlePerspective method fire in 1.9.4 / 1.10.2?

  • Author

I should also mention I am loading an OBJ model so I am pretty sure it is using the OBJBakedModel class when rendering. After further investigation, the OBJBakedModel class implements IPerspectiveAwareModel and it calls the handlePerspective method like this:

ย 

ย  ย  ย  ย  @Override
ย  ย  ย  ย  public Pair<? extends IBakedModel, Matrix4f> handlePerspective(TransformType cameraTransformType)
ย  ย  ย  ย  {
ย  ย  ย  ย  ย  ย  return IPerspectiveAwareModel.MapWrapper.handlePerspective(this, state, cameraTransformType);
ย  ย  ย  ย  }

ย 

So it looks like it is calling the static, state sensitive method of handlePerspective for IPerspectiveAwareModel instead of the method with just the TransformType, which is the one I need to get called in my custom OBJ model that extends IPerspectiveAwareModel. In debug mode in Eclipse I can see that the state sensitive version of handlePerspective is indeed running on IPerspectiveAwareModel, but the handlePerspective on my custom model never gets called.

ย 

This is starting to maybe look like a bug in forge, but I'd like a second opinion. Should I create an issue on the forge github for this? I am still wondering too if maybe there is just something new I have to do that wasn't in 1.8.9 that I am unaware of.

ย 

ย 

ย 

  • 2 months later...

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.