Interface BlockRenderLayerMap
public interface BlockRenderLayerMap
Use to associate blocks or fluids with block render layer other than default.
RenderLayers control how sprite pixels for fluids and blocks are blended
with the scene. Consult the vanilla RenderLayers implementation for examples.
The Fabric Renderer API can be used to control this at a per-quad level at the code
via BlendMode.
Client-side only.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidputBlock(Block block, RenderLayer renderLayer) Map (or re-map) a block state with a render layer.voidputBlocks(RenderLayer renderLayer, Block... blocks) Map (or re-map) multiple block states with a render layer.voidputFluid(Fluid fluid, RenderLayer renderLayer) Map (or re-map) a fluid state with a render layer.voidputFluids(RenderLayer renderLayer, Fluid... fluids) Map (or re-map) multiple fluid states with a render layer.voidputItem(Item item, RenderLayer renderLayer) Deprecated, for removal: This API element is subject to removal in a future version.voidputItems(RenderLayer renderLayer, Item... items) Deprecated, for removal: This API element is subject to removal in a future version.For blocks, callingputBlocks(RenderLayer, Block...)is enough.
-
Field Details
-
INSTANCE
-
-
Method Details
-
putBlock
Map (or re-map) a block state with a render layer. Re-mapping is not recommended but if done, last one in wins. Must be called from client thread prior to world load/rendering. Best practice will be to call from mod's client initializer.- Parameters:
block- Identifies block to be mapped.renderLayer- Render layer. Should be one of the layers used for terrain rendering.
-
putBlocks
Map (or re-map) multiple block states with a render layer. Re-mapping is not recommended but if done, last one in wins. Must be called from client thread prior to world load/rendering. Best practice will be to call from mod's client initializer.- Parameters:
renderLayer- Render layer. Should be one of the layers used for terrain rendering.blocks- Identifies blocks to be mapped.
-
putItem
Deprecated, for removal: This API element is subject to removal in a future version.For blocks, callingputBlock(Block, RenderLayer)is enough. Other items always use a translucent render layer. -
putItems
Deprecated, for removal: This API element is subject to removal in a future version.For blocks, callingputBlocks(RenderLayer, Block...)is enough. Other items always use a translucent render layer. -
putFluid
Map (or re-map) a fluid state with a render layer. Re-mapping is not recommended but if done, last one in wins. Must be called from client thread prior to world load/rendering. Best practice will be to call from mod's client initializer.- Parameters:
fluid- Identifies fluid to be mapped.renderLayer- Render layer. Should be one of the layers used for terrain rendering.
-
putFluids
Map (or re-map) multiple fluid states with a render layer. Re-mapping is not recommended but if done, last one in wins. Must be called from client thread prior to world load/rendering. Best practice will be to call from mod's client initializer.- Parameters:
renderLayer- Render layer. Should be one of the layers used for terrain rendering.fluids- Identifies fluids to be mapped.
-
putBlock(Block, RenderLayer)is enough.