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 p_112452_, float p_112453_, PoseStack p_112454_, MultiBufferSource p_112455_, int p_112456_, int p_112457_, Vec3 p_401129_) 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 p_112452_, float p_112453_, PoseStack p_112454_, MultiBufferSource p_112455_, int p_112456_, int p_112457_, Vec3 p_401129_) - 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 viainvalid reference
net.minecraft.world.level.block.Block#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
-