public void renderItem(ItemRenderType type, ItemStack stack, Object... data) {
Item item = stack.getItem();
FluidStack fluid = null;
if (item instanceof IFluidContainerItem) {
IFluidContainerItem fluidItem = (IFluidContainerItem) item;
fluid = fluidItem.getFluid(stack);
} else if (item instanceof IFluidOverlayItem) {
if (item.getRenderPasses(ItemHelper.getItemDamage(stack)) == 2) {
fluid = FluidContainerRegistry.getFluidForFilledItem(stack);
}
}