mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 08:17:35 +00:00
Implement fluid overlay texture rendering for custom fluids.
This commit is contained in:
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),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user