mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-11 15:57:55 +00:00
fix npe from drops render
This commit is contained in:
1 parent
72c2673768
commit
c7925b2b6c
1 file changed
+9
-2
@@ -82,8 +82,15 @@ public class ItemDropRender implements IItemRenderer {
|
||||
}
|
||||
int colour = fluid.getColor();
|
||||
if (colour == 0xFFFFFF) {
|
||||
TextureAtlasSprite sprite = Minecraft.getMinecraft().getTextureMapBlocks()
|
||||
.getTextureExtry(fluid.getStillIcon().getIconName());
|
||||
TextureAtlasSprite sprite;
|
||||
try {
|
||||
sprite = Minecraft.getMinecraft().getTextureMapBlocks()
|
||||
.getTextureExtry(fluid.getStillIcon().getIconName());
|
||||
} catch (NullPointerException e) {
|
||||
colourCache.put(fluid.getName(), colour);
|
||||
return colour;
|
||||
}
|
||||
|
||||
if (sprite != null && sprite.getFrameCount() > 0) {
|
||||
int[][] image = sprite.getFrameTextureData(0);
|
||||
int r = 0, g = 0, b = 0, count = 0;
|
||||
|
||||
Reference in new issue
Block a user