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.

what are these rarely used primitive methods in EntityRenderer.orientCamera()

Featured Replies

Posted

Hi everyone, i recently fixed the bug when riding a dragon that would cause the camera to be used as an xray passing through the blocks below, basing from rideable vanilla mobs like horse or pigs they orient the camera by using raytraceresult and subtract the distance from behind hence reducing the zoom dist thus fixing xray, their parameters are filled with rarely used methods what are their purposes?

                for (int i = 0; i < 8; ++i) // max thirdPersonDistance = 4 so 8 is a X 2 version?
                {
                    float f3 = (float)((i & 1) * 2 - 1); // is 2 half of thirdPersonDistance?
                    float f4 = (float)((i >> 1 & 1) * 2 - 1); // what the point of 1?
                    float f5 = (float)((i >> 2 & 1) * 2 - 1);
                    f3 = f3 * 0.1F; // why are they converted to 10 %?
                    f4 = f4 * 0.1F;
                    f5 = f5 * 0.1F;
                    RayTraceResult raytraceresult = this.mc.world.rayTraceBlocks(new Vec3d(d0 + (double)f3, d1 + (double)f4, d2 + (double)f5), new Vec3d(d0 - d4 + (double)f3 + (double)f5, d1 - d6 + (double)f4, d2 - d5 + (double)f5));

Their purpose might help improve my xray fix. It isnt perfect XD

Edited by TheRPGAdventurer

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.