Java tutorial
/** * This class was created by Anthony Anderson(Lord Illyohs) * It is distributed as part of the ScienceAndMagickMagoi * Source Code: https://github.com/LordIllyohs/ScienceAndMagickMagoi * * ScienceAndMagickMagoi is Open Source and distributed under a * Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License * (http://creativecommons.org/licenses/by-nc-nd/4.0/) * * * Class created on Mar 1, 2014 at 7:39:00 PM * */ package us.illyohs.magoi.client.render.tile; import org.lwjgl.opengl.GL11; import us.illyohs.magoi.client.model.ModelManaStore; import us.illyohs.magoi.lib.MRef; import us.illyohs.magoi.tile.TileManaStore; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; public class RenderModelManaStore extends TileEntitySpecialRenderer { private ModelManaStore model; public RenderModelManaStore() { model = new ModelManaStore(); } private static final ResourceLocation TEXTURE = new ResourceLocation(MRef.MOD_ID, "textures/models/manastore.png"); @Override public void renderTileEntityAt(TileEntity te, double x, double y, double z, float tick) { TileManaStore tms = (TileManaStore) te; GL11.glDisable(GL11.GL_CULL_FACE); GL11.glDisable(GL11.GL_LIGHTING); GL11.glPushMatrix(); GL11.glTranslated((float) x + 0.5, (float) y + 1.5, (float) z + 0.5); GL11.glScalef(1F, -1F, -1F); Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE); model.render(.0625F); GL11.glPopMatrix(); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glEnable(GL11.GL_LIGHTING); } }