mirror of
https://github.com/GTNewHorizons/CodeChickenCore.git
synced 2026-11-27 23:45:56 +00:00
Wrapped fluid rendering with safeIcon method.
This commit is contained in:
1 parent
3b762d300f
commit
112c0abc08
2 files changed
+9
-1
No files matched your search
@@ -236,7 +236,7 @@ public class RenderUtils
|
|||||||
Fluid fluid = stack.getFluid();
|
Fluid fluid = stack.getFluid();
|
||||||
CCRenderState.setColour(fluid.getColor(stack)<<8|alpha);
|
CCRenderState.setColour(fluid.getColor(stack)<<8|alpha);
|
||||||
TextureUtils.bindAtlas(fluid.getSpriteNumber());
|
TextureUtils.bindAtlas(fluid.getSpriteNumber());
|
||||||
return fluid.getIcon(stack);
|
return TextureUtils.safeIcon(fluid.getIcon(stack));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -176,4 +176,12 @@ public class TextureUtils
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Icon safeIcon(Icon icon)
|
||||||
|
{
|
||||||
|
if(icon == null)
|
||||||
|
icon = ((TextureMap)Minecraft.getMinecraft().getTextureManager().getTexture(TextureMap.locationBlocksTexture)).getAtlasSprite("missingno");
|
||||||
|
|
||||||
|
return icon;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user