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

I have no idea why but my block "SteamGenerator" is not rendering I've copied my other two classes that also use special rendering but this one doesn't work when I use t.addVertexWithUV() (t=tessellator.instance)

 

heres my renderer class:

@Override
public void renderTileEntityAt(TileEntity te, double x, double y, double z, float meta) {


	GL11.glTranslated(x, y, z);
	GL11.glDisable(GL11.GL_LIGHTING);
	bindTexture(steamgentext);
	t.startDrawingQuads();
	t.setTextureUV(1/4, 1/4);
	t.addVertexWithUV(0, 1, 1, 1/4, 1/4);
	t.setTextureUV(1/4, 0/4);
	t.addVertexWithUV(1, 1, 1, 1/4, 0);
	t.setTextureUV(0/4, 0/4);
	t.addVertexWithUV(1, 1, 0, 0, 0);
	t.setTextureUV(0/4, 1/4);
	t.addVertexWithUV(0, 1, 0, 0, 1/4);
	t.draw();
	GL11.glEnable(GL11.GL_LIGHTING);
	GL11.glTranslated(-x, -y, -z);
}

 

in my block class I have:

	 @Override
	public boolean isOpaqueCube(){
		return false;
	}
	@Override
    public int getRenderType() {
            return -1;
    }
	 public boolean renderAsNormalBlock() {
         return false;
    }

 

I've registered the tileEntity,the TileEntitySpecialRenderer but it still doesn't render

 

sidenote:my .png file has 16 textures (4x4)

The proud(ish) developer of Ancients

  • Author

I registered it in my clientproxy like all my other blocks

The proud(ish) developer of Ancients

Hi

 

I'd suggest you put a breakpoint or System.out.println("here"); into your renderTileEntityAt()

 

This will show you if it's a rendering problem or a registration problem, and give you a good clue on where to look next.

 

-TGG

 

PS I don't think you need to use

t.setTextureUV(1/4, 1/4);

before each

t.addVertexWithUV(0, 1, 1, 1/4, 1/4);

 

Also, 1/4 gets converted to 0 due to integer arithmetic.  Use 0.25 or 1.0/4.0 instead.

 

  • Author

I've tried putting a break point it's rendering but not drawing anything. I'll try it with a float instead of an int.

The proud(ish) developer of Ancients

Guest
This topic is now closed to further replies.

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.