Package org.moddingx.libx.render.block
Class TransformingBlockRenderer<T extends net.minecraft.world.level.block.entity.BlockEntity>
java.lang.Object
org.moddingx.libx.render.block.TransformingBlockRenderer<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
net.minecraft.client.renderer.blockentity.BlockEntityRenderer<T>
- Direct Known Subclasses:
DirectionalBlockRenderer
,RotatedBlockRenderer
public abstract class TransformingBlockRenderer<T extends net.minecraft.world.level.block.entity.BlockEntity>
extends Object
implements net.minecraft.client.renderer.blockentity.BlockEntityRenderer<T>
A
BlockEntityRenderer
that transforms the pose stack
in some way before
the actual render code. The render
methode takes care of the pose stack
being pushed and popped.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
doRender
(T blockEntity, float partialTicks, com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.MultiBufferSource buffer, int light, int overlay) Renders theblock entity
.final void
render
(T blockEntity, float partialTicks, com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.MultiBufferSource buffer, int light, int overlay) protected abstract void
Applies the pre-redner transformation to thepose stack
.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
-
TransformingBlockRenderer
public TransformingBlockRenderer()
-
-
Method Details
-
render
public final void render(@Nonnull T blockEntity, float partialTicks, @Nonnull com.mojang.blaze3d.vertex.PoseStack poseStack, @Nonnull net.minecraft.client.renderer.MultiBufferSource buffer, int light, int overlay) - Specified by:
render
in interfacenet.minecraft.client.renderer.blockentity.BlockEntityRenderer<T extends net.minecraft.world.level.block.entity.BlockEntity>
-
transform
protected abstract void transform(@Nonnull T blockEntity, float partialTicks, @Nonnull com.mojang.blaze3d.vertex.PoseStack poseStack) Applies the pre-redner transformation to thepose stack
. -
doRender
protected abstract void doRender(@Nonnull T blockEntity, float partialTicks, @Nonnull com.mojang.blaze3d.vertex.PoseStack poseStack, @Nonnull net.minecraft.client.renderer.MultiBufferSource buffer, int light, int overlay) Renders theblock entity
.
-