Class PistonHeadRenderer
java.lang.Object
net.minecraft.client.renderer.blockentity.PistonHeadRenderer
- All Implemented Interfaces:
BlockEntityRenderer<PistonMovingBlockEntity>
,IBlockEntityRendererExtension<PistonMovingBlockEntity>
public class PistonHeadRenderer
extends Object
implements BlockEntityRenderer<PistonMovingBlockEntity>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetRenderBoundingBox
(PistonMovingBlockEntity blockEntity) Return anAABB
that controls the visible scope of thisBlockEntityRenderer
.int
void
render
(PistonMovingBlockEntity blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay) private void
renderBlock
(BlockPos pos, BlockState state, PoseStack poseStack, MultiBufferSource bufferSource, Level level, boolean extended, int packedOverlay) 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
shouldRender, shouldRenderOffScreen
-
Field Details
-
blockRenderer
-
-
Constructor Details
-
PistonHeadRenderer
-
-
Method Details
-
render
public void render(PistonMovingBlockEntity blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay) - Specified by:
render
in interfaceBlockEntityRenderer<PistonMovingBlockEntity>
-
renderBlock
private void renderBlock(BlockPos pos, BlockState state, PoseStack poseStack, MultiBufferSource bufferSource, Level level, boolean extended, int packedOverlay) - Parameters:
extended
- iftrue
, checks all sides before rendering viaBlock.shouldRenderFace(net.minecraft.world.level.block.state.BlockState, net.minecraft.world.level.BlockGetter, net.minecraft.core.BlockPos, net.minecraft.core.Direction, net.minecraft.core.BlockPos)
-
getViewDistance
public int getViewDistance()- Specified by:
getViewDistance
in interfaceBlockEntityRenderer<PistonMovingBlockEntity>
-
getRenderBoundingBox
Description copied from interface:IBlockEntityRendererExtension
Return anAABB
that controls the visible scope of thisBlockEntityRenderer
. Defaults to the unit cube at the given position.AABB.INFINITE
can be used to declare the BER should be visible everywhere.- Specified by:
getRenderBoundingBox
in interfaceIBlockEntityRendererExtension<PistonMovingBlockEntity>
- Returns:
- an appropriately sized
AABB
for theBlockEntityRenderer
-