Implement fluid overlay texture rendering for custom fluids.

This commit is contained in:
David Quintana committed 2020-02-02 23:02:56 +01:00
1 parent d86f58a0df
commit a901d80dd5
4 files changed
+39 -7

No files matched your search

@@ -525,9 +525,11 @@ public class ForgeHooksClient
@SuppressWarnings("deprecation")
public static TextureAtlasSprite[] getFluidSprites(ILightReader world, BlockPos pos, IFluidState fluidStateIn)
{
ResourceLocation overlayTexture = fluidStateIn.getFluid().getAttributes().getOverlayTexture();
return new TextureAtlasSprite[] {
Minecraft.getInstance().func_228015_a_(AtlasTexture.LOCATION_BLOCKS_TEXTURE).apply(fluidStateIn.getFluid().getAttributes().getStillTexture(world, pos)),
Minecraft.getInstance().func_228015_a_(AtlasTexture.LOCATION_BLOCKS_TEXTURE).apply(fluidStateIn.getFluid().getAttributes().getFlowingTexture(world, pos)),
overlayTexture == null ? null : Minecraft.getInstance().func_228015_a_(AtlasTexture.LOCATION_BLOCKS_TEXTURE).apply(overlayTexture),
};
}