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

These two events look promising:

RenderWorldEvent.Pre

RenderWorldEvent.Post

 

They effectively let you push/pop the OpenGL transform matrix before/after the world is rendered, which is probably what you need.

That is, you'd handle those events like this:

onEvent(RenderWorldEvent.Pre event) {
  glPushMatrix(); // Save the current transform "state" of OpenGL
  // Do whatever OpenGl transforms you need to zoom out
  // For example,
  glTranslatef(100f, 100f, -100f);
}

onEvent(RenderWorldEvent.Post event) {
  glPopMatrix(); // Reset the OpenGL to what it was
}

 

Here's a good event tutorial/reference, in case you need it:

http://jabelarminecraft.blogspot.com/p/minecraft-forge-172-event-handling.html

  • Author

...

 

I tried this but the blocks change the localization, not my third person cam :/

--

Nvm, i got it! thx a lot!!!

 

I just change a few in your code

If anyone need help, this is mine code:

@SubscribeEvent
public void onEvent(RenderPlayerEvent.Pre event) {
	GL11.glPushMatrix();
	GL11.glTranslatef(0.0F, -5.0F, 0.0F);
}
@SubscribeEvent
public void onEvent (RenderPlayerEvent.Post event) {
	GL11.glPopMatrix();
}

You can change the fov with mc.gameSettings.fovSetting = 0F; just change the fov to a large negative number and it will achieve the effect i think you want

Thats really not a good option because not only dose it not do what he wants (he wants to change the camera position not the fov) but it actually changes the fov setting so you have to find a way to store the current value and restore that value when you are done.

 

That is why forge added FOVUpdateEvent That dose exactly the same thing as changing mc.gameSettings.fovSetting;

I am the author of Draconic Evolution

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.