Class BannerRenderer
java.lang.Object
net.minecraft.client.renderer.blockentity.BannerRenderer
- All Implemented Interfaces:
BlockEntityRenderer<BannerBlockEntity>
,IBlockEntityRendererExtension<BannerBlockEntity>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LayerDefinition
getRenderBoundingBox
(BannerBlockEntity blockEntity) Return anAABB
that controls the visible scope of thisBlockEntityRenderer
.void
render
(BannerBlockEntity pBlockEntity, float pPartialTick, PoseStack pPoseStack, MultiBufferSource pBufferSource, int pPackedLight, int pPackedOverlay) private static void
renderPatternLayer
(PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight, int pPackedOverlay, ModelPart pFlagPart, Material pMaterial, DyeColor pColor) static void
renderPatterns
(PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight, int pPackedOverlay, ModelPart pFlagPart, Material pFlagMaterial, boolean pBanner, DyeColor pBaseColor, BannerPatternLayers pPatterns) static void
renderPatterns
(PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight, int pPackedOverlay, ModelPart pFlagPart, Material pFlagMaterial, boolean pBanner, DyeColor pBaseColor, BannerPatternLayers pPatterns, boolean pGlint) 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
-
Field Details
-
BANNER_WIDTH
private static final int BANNER_WIDTH- See Also:
-
BANNER_HEIGHT
private static final int BANNER_HEIGHT- See Also:
-
MAX_PATTERNS
private static final int MAX_PATTERNS- See Also:
-
FLAG
- See Also:
-
POLE
- See Also:
-
BAR
- See Also:
-
flag
-
pole
-
bar
-
-
Constructor Details
-
BannerRenderer
-
-
Method Details
-
createBodyLayer
-
render
public void render(BannerBlockEntity pBlockEntity, float pPartialTick, PoseStack pPoseStack, MultiBufferSource pBufferSource, int pPackedLight, int pPackedOverlay) - Specified by:
render
in interfaceBlockEntityRenderer<BannerBlockEntity>
-
renderPatterns
public static void renderPatterns(PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight, int pPackedOverlay, ModelPart pFlagPart, Material pFlagMaterial, boolean pBanner, DyeColor pBaseColor, BannerPatternLayers pPatterns) - Parameters:
pBanner
- iftrue
, uses banner material; otherwise iffalse
uses shield material
-
renderPatterns
public static void renderPatterns(PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight, int pPackedOverlay, ModelPart pFlagPart, Material pFlagMaterial, boolean pBanner, DyeColor pBaseColor, BannerPatternLayers pPatterns, boolean pGlint) - Parameters:
pBanner
- iftrue
, uses banner material; otherwise iffalse
uses shield material
-
renderPatternLayer
private static void renderPatternLayer(PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight, int pPackedOverlay, ModelPart pFlagPart, Material pMaterial, DyeColor pColor) -
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<BannerBlockEntity>
- Returns:
- an appropriately sized
AABB
for theBlockEntityRenderer
-