private void renderItem(ItemStack stack, int slot)
{
if (stack != null && !stack.isEmpty())
{
int slotX = slot;
int slotY = 0;
if (slot >= 6)
{
slotX = slot - 6;
slotY = 2;
} else if (slot >= 3)
{
slotX = slot - 3;
slotY = 1;
}
RenderHelper.enableStandardItemLighting();
GlStateManager.enableLighting();
GlStateManager.pushMatrix();
GlStateManager.translate((slotX / 5.35d) + 0.315, .675, (slotY / 5.35d) + 0.315);
GlStateManager.scale(.1f, .1f, .1f);
if (!(stack.getItem() instanceof ItemBlock))
{
GlStateManager.rotate(-90, 1, 0, 0);
GlStateManager.translate(0, 0, -0.5);
}
Minecraft.getMinecraft().getRenderItem().renderItem(stack, ItemCameraTransforms.TransformType.NONE);
GlStateManager.popMatrix();
}
}
ArcaneTransfigurationTableTESR.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:ArcaneMagic
作者:
评论列表
文章目录