/** * This class was created by . It's distributed as part of the ThaumicTinkerer Mod. * * ThaumicTinkerer is Open Source and distributed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 * License (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) * * ThaumicTinkerer is a Derivative Work on Thaumcraft 4. Thaumcraft 4 (c) Azanor 2012 * (http://www.minecraftforum.net/topic/1585216-) * * File Created @ [12 Sep 2013, 17:55:04 (GMT)] */ package thaumic.tinkerer.client.render.tile; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; import thaumic.tinkerer.client.core.helper.ClientHelper; import thaumic.tinkerer.client.lib.LibResources; import thaumic.tinkerer.client.model.ModelRelay; public class RenderTileRelay extends TileEntitySpecialRenderer { private static final ResourceLocation texture = new ResourceLocation(LibResources.MODEL_RELAY_TEXTURE); ModelRelay model = new ModelRelay(); @Override public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { GL11.glPushMatrix(); GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glColor4f(1F, 1F, 1F, 1F); GL11.glTranslatef((float) x, (float) y, (float) z); ClientHelper.minecraft().renderEngine.bindTexture(texture); GL11.glTranslatef(0.5F, 1.5F, 0.5F); GL11.glScalef(1F, -1F, -1F); model.render(); GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glPopMatrix(); } }