Jump to content

[1.10.2] Tile entity special renderer


Egietje

Recommended Posts

Hello, I have a TESR for my TE but when I render an item it rotates it in a random way, here is the TESR:

public class RenderCheeseBoard extends TileEntitySpecialRenderer<TileEntityCheeseBoard> {

private static final EntityItem ITEM = new EntityItem(Minecraft.getMinecraft().theWorld, 0, 0, 0, new ItemStack(CheeseItems.CHEESE));

@Override
public void renderTileEntityAt(TileEntityCheeseBoard te, double x, double y, double z, float partialTicks, int destroyStage) {
	GlStateManager.pushMatrix(); {
		GlStateManager.translate(x + 0.5, y + 0.066, z + 0.75);
		GlStateManager.rotate(90F, 1.0F, 0.0F, 0.0F);
		GlStateManager.scale(0.25F, 0.25F, 0.25F);
		for (int i = 0; i < te.CHEESE_COUNT; i++) {
			Minecraft.getMinecraft().getRenderManager().doRenderEntity(ITEM, 0, 0, 0, 0F, 0F, true);
			GlStateManager.translate(0, -0.4F, 0);
		}
	}
	GlStateManager.popMatrix();
}

}

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.