Class BannerRenderer
java.lang.Object
net.minecraft.client.renderer.blockentity.BannerRenderer
- All Implemented Interfaces:
BlockEntityRenderer<BannerBlockEntity>
,IBlockEntityRendererExtension<BannerBlockEntity>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private static final float
private final BannerFlagModel
private final BannerModel
private final BannerFlagModel
private final BannerModel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
getExtents
(Set<org.joml.Vector3f> pOutput) 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, Vec3 pCameraPos) private static void
renderBanner
(PoseStack pPoseStack, MultiBufferSource pBufferSource, int pPackedLight, int pPackedOverlay, float pRotation, BannerModel pStandingModel, BannerFlagModel pStandingFlagModel, float pAngle, DyeColor pBaseColor, BannerPatternLayers pPatterns) void
renderInHand
(PoseStack pPoseStack, MultiBufferSource pBufferSource, int pPackedLight, int pPackedOverlay, DyeColor pBaseColor, BannerPatternLayers pPatterns) private static void
renderPatternLayer
(PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight, int pPackedOverlay, ModelPart pFlagPart, Material pMaterial, DyeColor pColor) static void
renderPatterns
(PoseStack pPoseStack, MultiBufferSource pBufferSource, int pPackedLight, int pPackedOverlay, ModelPart pFlagPart, Material pFlagMaterial, boolean pBanner, DyeColor pBaseColor, BannerPatternLayers pPatterns) static void
renderPatterns
(PoseStack pPoseStack, MultiBufferSource pBufferSource, int pPackedLight, int pPackedOverlay, ModelPart pFlagPart, Material pFlagMaterial, boolean pBanner, DyeColor pBaseColor, BannerPatternLayers pPatterns, boolean pWithGlint, boolean pNoEntity) 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
-
MAX_PATTERNS
private static final int MAX_PATTERNS- See Also:
-
SIZE
private static final float SIZE- See Also:
-
standingModel
-
wallModel
-
standingFlagModel
-
wallFlagModel
-
-
Constructor Details
-
BannerRenderer
-
BannerRenderer
-
-
Method Details
-
render
public void render(BannerBlockEntity pBlockEntity, float pPartialTick, PoseStack pPoseStack, MultiBufferSource pBufferSource, int pPackedLight, int pPackedOverlay, Vec3 pCameraPos) - Specified by:
render
in interfaceBlockEntityRenderer<BannerBlockEntity>
-
renderInHand
public void renderInHand(PoseStack pPoseStack, MultiBufferSource pBufferSource, int pPackedLight, int pPackedOverlay, DyeColor pBaseColor, BannerPatternLayers pPatterns) -
renderBanner
private static void renderBanner(PoseStack pPoseStack, MultiBufferSource pBufferSource, int pPackedLight, int pPackedOverlay, float pRotation, BannerModel pStandingModel, BannerFlagModel pStandingFlagModel, float pAngle, DyeColor pBaseColor, BannerPatternLayers pPatterns) -
renderPatterns
public static void renderPatterns(PoseStack pPoseStack, MultiBufferSource pBufferSource, 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 pBufferSource, int pPackedLight, int pPackedOverlay, ModelPart pFlagPart, Material pFlagMaterial, boolean pBanner, DyeColor pBaseColor, BannerPatternLayers pPatterns, boolean pWithGlint, boolean pNoEntity) -
renderPatternLayer
private static void renderPatternLayer(PoseStack pPoseStack, MultiBufferSource pBuffer, int pPackedLight, int pPackedOverlay, ModelPart pFlagPart, Material pMaterial, DyeColor pColor) -
getExtents
-
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
-