Class RotatedBlockRenderer<T extends net.minecraft.world.level.block.entity.BlockEntity>

java.lang.Object
org.moddingx.libx.render.block.TransformingBlockRenderer<T>
org.moddingx.libx.render.block.RotatedBlockRenderer<T>
All Implemented Interfaces:
net.minecraft.client.renderer.blockentity.BlockEntityRenderer<T>

public abstract class RotatedBlockRenderer<T extends net.minecraft.world.level.block.entity.BlockEntity> extends TransformingBlockRenderer<T>
A BlockEntityRenderer that before calling the actual render code rotates the PoseStack depending on the horizontal facing. This may only be used with blocks that have the property BlockStateProperties.HORIZONTAL_FACING. The block entity should be rendered as if it was facing north.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected final void
    transform(T blockEntity, float partialTicks, com.mojang.blaze3d.vertex.PoseStack poseStack)
    Applies the pre-redner transformation to the pose stack.

    Methods inherited from class org.moddingx.libx.render.block.TransformingBlockRenderer

    doRender, render

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.client.renderer.blockentity.BlockEntityRenderer

    getViewDistance, shouldRender, shouldRenderOffScreen
  • Constructor Details

    • RotatedBlockRenderer

      public RotatedBlockRenderer()
  • Method Details

    • transform

      protected final void transform(@Nonnull T blockEntity, float partialTicks, @Nonnull com.mojang.blaze3d.vertex.PoseStack poseStack)
      Description copied from class: TransformingBlockRenderer
      Applies the pre-redner transformation to the pose stack.
      Specified by:
      transform in class TransformingBlockRenderer<T extends net.minecraft.world.level.block.entity.BlockEntity>