Package org.moddingx.libx.render
Class RenderHelperBlock
java.lang.Object
org.moddingx.libx.render.RenderHelperBlock
Helper to deal with
Block rendering-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidInvokesMultiBufferSource.BufferSource.endBatch(RenderType)on the crumbling buffer with theRenderTypeused for custom overlays and crumbling.static voidrenderBlockBreak(net.minecraft.world.level.block.state.BlockState state, com.mojang.blaze3d.vertex.PoseStack poseStack, int light, int overlay, int breakProgress) Renders the break effect for aBlockState.static voidrenderBlockBreak(net.minecraft.world.level.block.state.BlockState state, com.mojang.blaze3d.vertex.PoseStack poseStack, int light, int overlay, int breakProgress, long positionRandom) Renders the break effect for aBlockState.static voidrenderBlockOverlaySprite(net.minecraft.world.level.block.state.BlockState state, com.mojang.blaze3d.vertex.PoseStack poseStack, int light, int overlay, net.minecraft.client.renderer.texture.TextureAtlasSprite sprite) Renders a block overlay on top of aBlockStatewith the same method as the crumbling is rendered.static voidrenderBlockOverlaySprite(net.minecraft.world.level.block.state.BlockState state, com.mojang.blaze3d.vertex.PoseStack poseStack, int light, int overlay, net.minecraft.client.renderer.texture.TextureAtlasSprite sprite, long positionRandom) Renders a block overlay on top of aBlockStatewith the same method as the crumbling is rendered.static voidrenderBlockOverlaySprite(net.minecraft.world.level.block.state.BlockState state, com.mojang.blaze3d.vertex.PoseStack poseStack, int light, int overlay, net.minecraft.client.renderer.texture.TextureAtlasSprite sprite, long positionRandom, Predicate<net.minecraft.core.Direction> dirs) Renders a block overlay on top of aBlockStatewith the same method as the crumbling is rendered.static voidrenderBlockOverlaySprite(net.minecraft.world.level.block.state.BlockState state, com.mojang.blaze3d.vertex.PoseStack poseStack, int light, int overlay, net.minecraft.client.renderer.texture.TextureAtlasSprite sprite, Predicate<net.minecraft.core.Direction> dirs) Renders a block overlay on top of aBlockStatewith the same method as the crumbling is rendered.
-
Constructor Details
-
RenderHelperBlock
public RenderHelperBlock()
-
-
Method Details
-
renderBlockBreak
public static void renderBlockBreak(net.minecraft.world.level.block.state.BlockState state, com.mojang.blaze3d.vertex.PoseStack poseStack, int light, int overlay, int breakProgress) Renders the break effect for aBlockState.- Parameters:
breakProgress- How much the block already broke. 0 means no break. This should not be lower than 0 and not be greater than 10.
-
renderBlockBreak
public static void renderBlockBreak(net.minecraft.world.level.block.state.BlockState state, com.mojang.blaze3d.vertex.PoseStack poseStack, int light, int overlay, int breakProgress, long positionRandom) Renders the break effect for aBlockState.- Parameters:
breakProgress- How much the block already broke. 0 means no break. This should not be lower than 0 and not be greater than 10.positionRandom- The long value to randomize the position. This can be obtained viaBlockState#getPositionRandom.
-
renderBlockOverlaySprite
public static void renderBlockOverlaySprite(net.minecraft.world.level.block.state.BlockState state, com.mojang.blaze3d.vertex.PoseStack poseStack, int light, int overlay, net.minecraft.client.renderer.texture.TextureAtlasSprite sprite) Renders a block overlay on top of aBlockStatewith the same method as the crumbling is rendered. However you cen specify your own TextureAtlasSprite here to be used. (It must be fromInventoryMenu.BLOCK_ATLAS) -
renderBlockOverlaySprite
public static void renderBlockOverlaySprite(net.minecraft.world.level.block.state.BlockState state, com.mojang.blaze3d.vertex.PoseStack poseStack, int light, int overlay, net.minecraft.client.renderer.texture.TextureAtlasSprite sprite, long positionRandom) Renders a block overlay on top of aBlockStatewith the same method as the crumbling is rendered. However you cen specify your own TextureAtlasSprite here to be used. (It must be fromInventoryMenu.BLOCK_ATLAS) -
renderBlockOverlaySprite
public static void renderBlockOverlaySprite(net.minecraft.world.level.block.state.BlockState state, com.mojang.blaze3d.vertex.PoseStack poseStack, int light, int overlay, net.minecraft.client.renderer.texture.TextureAtlasSprite sprite, Predicate<net.minecraft.core.Direction> dirs) Renders a block overlay on top of aBlockStatewith the same method as the crumbling is rendered. However you cen specify your own TextureAtlasSprite here to be used. (It must be fromInventoryMenu.BLOCK_ATLAS) -
renderBlockOverlaySprite
public static void renderBlockOverlaySprite(net.minecraft.world.level.block.state.BlockState state, com.mojang.blaze3d.vertex.PoseStack poseStack, int light, int overlay, net.minecraft.client.renderer.texture.TextureAtlasSprite sprite, long positionRandom, Predicate<net.minecraft.core.Direction> dirs) Renders a block overlay on top of aBlockStatewith the same method as the crumbling is rendered. However you cen specify your own TextureAtlasSprite here to be used. (It must be fromInventoryMenu.BLOCK_ATLAS) -
endOverlayBatch
public static void endOverlayBatch()InvokesMultiBufferSource.BufferSource.endBatch(RenderType)on the crumbling buffer with theRenderTypeused for custom overlays and crumbling.
-