Skip to content

Commit

Permalink
Fix rendering of empty tank items
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Sep 15, 2014
1 parent 0b82f7d commit 6f9d557
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -28,14 +28,15 @@ public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
Block block = Block.getBlockFromItem(item.getItem());
int meta = item.getItemDamage();

GL11.glEnable(GL11.GL_BLEND);

if(item.hasTagCompound() && item.getTagCompound().hasKey("Fluid"))
{
FluidStack liquid = FluidStack.loadFluidStackFromNBT(item.getTagCompound().getCompoundTag("Fluid"));
if(liquid != null && liquid.getFluid().getBlock() != null)
{
float height = (float)liquid.amount / 4000f - 0.01f;
renderblocks.setRenderBounds(0.01, 0.01, 0.01, 0.99, height, 0.99);
GL11.glEnable(GL11.GL_BLEND);
ItemHelper.renderStandardInvBlock(renderblocks, liquid.getFluid().getBlock(), 0);
}
}
Expand Down

0 comments on commit 6f9d557

Please sign in to comment.