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 pBlockEntity, float pPartialTick, PoseStack pPoseStack, MultiBufferSource pBufferSource, int pPackedLight, int pPackedOverlay) private voidrenderBlock(BlockPos pPos, BlockState pState, PoseStack pPoseStack, MultiBufferSource pBufferSource, Level pLevel, boolean pExtended, int pPackedOverlay) 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 pBlockEntity, float pPartialTick, PoseStack pPoseStack, MultiBufferSource pBufferSource, int pPackedLight, int pPackedOverlay) - Specified by:
renderin interfaceBlockEntityRenderer<PistonMovingBlockEntity>
-
renderBlock
private void renderBlock(BlockPos pPos, BlockState pState, PoseStack pPoseStack, MultiBufferSource pBufferSource, Level pLevel, boolean pExtended, int pPackedOverlay) - Parameters:
pExtended- 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
-