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

Hey there, I'm trying to create a Quaternion like so:

Vector3f.YP.rotationDegrees(180.f)

This is happening server-side, on start up. It's throwing the error:

Caused by: java.lang.NoSuchMethodError: 'net.minecraft.util.math.vector.Quaternion net.minecraft.util.math.vector.Vector3f.func_229187_a_(float)'

Even though Quaternion has the constructor in question:

public Quaternion(Vector3f pVector, float pAngle, boolean pDegrees)

of which, 

Vector3f.YP.rotationDegrees(180.f)

uses.

 

So I'm quite confused as to why this might be happening. What I'm using this in is included both client and server-side, yet server-side is the only one throwing this error. By that, it led me to think Quaternions might only be client-side, but I'm unsure if that's correct. Thanks!

  • Author
3 hours ago, diesieben07 said:

It is rotationDegrees which is the problem. rotationDegress is annotated with @OnlyIn(Dist.CLIENT). This means it only exists in the client jar and you cannot use it from common code as it will crash on servers, because the method simply does not exist there.

Oh good catch. Thanks!

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.