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 everyone,

Lately I've been working with the Tessellator, and it's almost nice. It seems that most people who use it, use it for blocks or for GUIs, however I'm not using it for either.

Instead I'm trying to render a box above entity heads. So far this is going okay, except it obviously doesn't rotate because I haven't set the vertices to update with the client. The actual code for the vertices is just:

// tw is just a worldrenderer from a tessellator object.
tw.addVertex(0,2,0);
tw.addVertex(0,3,0);
tw.addVertex(1,3,0);
tw.addVertex(1,2,0);

 

Like I said this works fine, but I am lost as to how to get this to rotate with the client. So I did some searching in the vanilla code and it looks like they handle it slightly differently. Their code for rotation is:

 

GlStateManager.rotate(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
GlStateManager.rotate(this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);

 

Because I'm using Tessellator and not a GlStateManager, I'm not sure how to go about this.

 

Any help would be appreciated!

minecraft version should be provided for these kind of question,

because rendering system changed a lot in 1.8

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Then just use GlStateManager to rotate it.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

  • Author

Then just use GlStateManager to rotate it.

In my attempt to use the GlStateManager I gave the player a permanent superman-pose disability.

 

While I won't ask for a tutorial on using GlStateManager, how do you access the statemanager for a Tessellator and a WorldRenderer object? The vanilla code on this doesn't make much sense to me...

Then just use GlStateManager to rotate it.

In my attempt to use the GlStateManager I gave the player a permanent superman-pose disability.

 

While I won't ask for a tutorial on using GlStateManager, how do you access the statemanager for a Tessellator and a WorldRenderer object? The vanilla code on this doesn't make much sense to me...

You don't have to, and should not access the WorldRenderer object..

 

You need to put this before rendering yours:

GlStateManager.pushMatrix();

 

and this after yours:

GlStateManager.popMatrix();

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

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.