Skip to content

Commit 40038e3

Browse files
authored
Fluids entering iron tanks use fallback texture when flowing texture is missing (#53)
* Fluids entering iron tanks will use still texture when flowing texture is missing * Code style fixes.
1 parent a994d8c commit 40038e3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/mods/railcraft/client/render/FluidRenderer.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,13 @@ public static ResourceLocation getFluidSheet(Fluid fluid) {
4949

5050
public static ResourceLocation setupFlowingLiquidTexture(Fluid fluid, IIcon[] texArray) {
5151
if (fluid == null) return null;
52-
IIcon top = RenderTools.getSafeIcon(fluid.getStillIcon());
52+
5353
IIcon side = RenderTools.getSafeIcon(fluid.getFlowingIcon());
54+
if ((fluid.getStillIcon() != null) && (fluid.getFlowingIcon() == null)) {
55+
side = RenderTools.getSafeIcon(fluid.getStillIcon());
56+
}
57+
58+
IIcon top = RenderTools.getSafeIcon(fluid.getStillIcon());
5459
texArray[0] = top;
5560
texArray[1] = top;
5661
texArray[2] = side;

0 commit comments

Comments
 (0)