Пропал свет

71
1
Доброго времени суток, подскажите, почему итем черный?1585612714095.png
Java:
public class RenederTileEntityVeshka extends TileEntitySpecialRenderer {

    //public static final ModelSit model = new ModelSit();
    public static final ResourceLocation texture = new ResourceLocation("textures/blocks/stone_slab_top.png");
    protected RenderManager renderManager = RenderManager.instance;
    

    @Override
    public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float parTick) {
        render((TileEntityVeshalka)tile, x, y, z, parTick);
    }

    //renderItemAndEffectIntoGUI Пытался, плохо работает.
    private void render(TileEntityVeshalka tile, double x, double y, double z, float parTick) {
        GL11.glPushMatrix();
        GL11.glDisable(GL11.GL_LIGHTING);
        GL11.glTranslated(x, y, z);
          GL11.glColor4f(1.0f, 1.0f, 1.0f, 0.5f);

        if (tile != null) {
            ItemStack itemstack = tile.getStackInSlot(0);
            if (itemstack != null) {
                GL11.glPushMatrix();
                GL11.glTranslatef(0.5F, 1.5F, 0.5F);
                if (renderManager.options.fancyGraphics) {
                    if (tile.age >= Short.MAX_VALUE) tile.age = 0; else tile.age += 1;
                    GL11.glRotatef((((float)tile.age + parTick) / 60.0F) * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
                }
                
                EntityItem entityitem = new EntityItem(tile.getWorldObj(),0.0D, 0.0D, 0.0D, itemstack);
                entityitem.hoverStart = 0.0F;
                //System.out.println("+");
                renderManager.renderEntityWithPosYaw(entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
                GL11.glDisable(GL11.GL_LIGHTING);
                GL11.glColor3f(1F, 1F, 1F);
                GL11.glPopMatrix();
            }
        }

        bindTexture(texture);
        //UtilModel.boxWithUV(tessellator, 1D, 3D, 0D, 1D, 1D, 1D);
        GL11.glEnable(GL11.GL_LIGHTING);
        GL11.glPopMatrix();
    }

}
 
Сверху