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 anAABBthat controls the visible scope of thisBlockEntityRenderer.intvoidrender(PistonMovingBlockEntity blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, int packedOverlay) private voidrenderBlock(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, waitMethods 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:
renderin 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:
getViewDistancein interfaceBlockEntityRenderer<PistonMovingBlockEntity>
-
getRenderBoundingBox
Description copied from interface:IBlockEntityRendererExtensionReturn anAABBthat controls the visible scope of thisBlockEntityRenderer. Defaults to the unit cube at the given position.AABB.INFINITEcan be used to declare the BER should be visible everywhere.- Specified by:
getRenderBoundingBoxin interfaceIBlockEntityRendererExtension<PistonMovingBlockEntity>- Returns:
- an appropriately sized
AABBfor theBlockEntityRenderer
-