@SubscribeEvent public void renderItemInFrameEvent(final RenderItemInFrameEvent event) { ItemStack stack = event.getItem(); if (stack.isEmpty() || stack.getItem() != ItemBlacklisted.I) return; if (!ItemBlacklisted.canUnpack(stack)) return; ItemStack unpacked = ItemBlacklisted.unpack(stack); GlStateManager.pushMatrix(); GlStateManager.scale(0.5F, 0.5F, 0.5F); GlStateManager.pushAttrib(); RenderHelper.enableStandardItemLighting(); GlStateManager.translate(0.001, -0.001, 0.001); Minecraft.getMinecraft().getRenderItem().renderItem(unpacked, ItemCameraTransforms.TransformType.FIXED); RenderHelper.disableStandardItemLighting(); GlStateManager.popAttrib(); GlStateManager.popMatrix(); }
@SubscribeEvent public void onItemFrameRender(RenderItemInFrameEvent event) { if (shouldHandle(event.getItem(), true)) { event.setCanceled(true); handleRender(event.getItem(), true); } }
@SideOnly(Side.CLIENT) @SubscribeEvent public void onRenderItemInFrame (RenderItemInFrameEvent event) { if (!ItemStack.areItemStacksEqual(event.getItem(), ItemStack.EMPTY)) if (event.getItem().getItem() instanceof ItemKeyblade) GlStateManager.scale(0.02f, 0.02f, 0.02f); }