Class RenderHelperBlock

java.lang.Object
org.moddingx.libx.render.RenderHelperBlock

public class RenderHelperBlock extends Object
Helper to deal with Block rendering
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Invokes MultiBufferSource.BufferSource.endBatch(RenderType) on the crumbling buffer with the RenderType used for custom overlays and crumbling.
    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 a BlockState.
    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 a BlockState.
    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 a BlockState with the same method as the crumbling is rendered.
    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 a BlockState with the same method as the crumbling is rendered.
    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 a BlockState with the same method as the crumbling is rendered.
    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 a BlockState with the same method as the crumbling is rendered.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 a BlockState.
      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 a BlockState.
      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 via BlockState#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 a BlockState with the same method as the crumbling is rendered. However you cen specify your own TextureAtlasSprite here to be used. (It must be from InventoryMenu.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 a BlockState with the same method as the crumbling is rendered. However you cen specify your own TextureAtlasSprite here to be used. (It must be from InventoryMenu.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 a BlockState with the same method as the crumbling is rendered. However you cen specify your own TextureAtlasSprite here to be used. (It must be from InventoryMenu.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 a BlockState with the same method as the crumbling is rendered. However you cen specify your own TextureAtlasSprite here to be used. (It must be from InventoryMenu.BLOCK_ATLAS)
    • endOverlayBatch

      public static void endOverlayBatch()
      Invokes MultiBufferSource.BufferSource.endBatch(RenderType) on the crumbling buffer with the RenderType used for custom overlays and crumbling.