So, I have a problem with my TitleEntityRenderer class for my custom block.
Here is the src;
package com.regablith.trashcan;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import org.lwjgl.opengl.GL11;
import java.io.IOException;
import java.io.InputStream;
public class TileEntityTrashcanRenderer extends TileEntitySpecialRenderer{
public TileEntityTrashcanRenderer(){
}
public void renderAModelAt(TileEntityTrashcan par1TileEntity, double par2, double par4, double par6, float par8TileEntityTrashcan tile, double d, double d1, double d2, float f)
{
int rotation = 0;
if(tile.worldObj != null)
{
rotation = tile.getBlockMetadata();
}
bindTextureByName("trashCanBlock.png"); //texture
GL11.glPushMatrix();
GL11.glTranslatef((float)d + 0.5F, (float)d1 + 1.5F, (float)d2 + 0.5F);
GL11.glScalef(1.0F, -1F, -1F);
GL11.glRotatef(rotation*90, 0.0F, 1.0F, 0.0F);
model.renderAll();
GL11.glPopMatrix(); //end
}
private ModelTrashcan model;
public void renderTileEntityAt(TileEntity par1TileEntity, double par2, double par4, double par6, float par8)
{
this.renderAModelAt((TileEntityTrashcan)par1TileEntity, par2, par4, par6, par8); //par2, par4, par6, par8, par6, par6, par8
}
}