Class FluidSpriteCache
java.lang.Object
net.neoforged.neoforge.client.textures.FluidSpriteCache
Helper class for safely accessing fluid textures on a render worker (such as in
LiquidBlockRenderer
)
to avoid potential issues when a chunk gets re-batched while resources are being reloaded.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static TextureAtlasSprite
private static Map<ResourceLocation,
TextureAtlasSprite> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TextureAtlasSprite[]
getFluidSprites
(BlockAndTintGetter level, BlockPos pos, FluidState fluid) Returns an array holding the still sprite, the flowing sprite and the overlay sprite (if specified, otherwise null) of the given fluid at the given position.static void
reload()
-
Field Details
-
textureLookup
-
missingSprite
-
-
Constructor Details
-
FluidSpriteCache
private FluidSpriteCache()
-
-
Method Details
-
getFluidSprites
public static TextureAtlasSprite[] getFluidSprites(BlockAndTintGetter level, BlockPos pos, FluidState fluid) Returns an array holding the still sprite, the flowing sprite and the overlay sprite (if specified, otherwise null) of the given fluid at the given position.- Returns:
- an array holding the still sprite, the flowing sprite and the overlay sprite (if specified, otherwise null) of the given fluid at the given position
-
reload
@Internal public static void reload()
-