Class SkullBlockRenderer
java.lang.Object
net.minecraft.client.renderer.blockentity.SkullBlockRenderer
- All Implemented Interfaces:
BlockEntityRenderer<SkullBlockEntity, SkullBlockRenderState>, IBlockEntityRendererExtension<SkullBlockEntity>
public class SkullBlockRenderer
extends Object
implements BlockEntityRenderer<SkullBlockEntity, SkullBlockRenderState>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Function<SkullBlock.Type, SkullModelBase> private final PlayerSkinRenderCachestatic final Map<SkullBlock.Type, Identifier> static final WallAndGroundTransformations<Transformation> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static TransformationcreateGroundTransformation(int segment) static @Nullable SkullModelBasecreateModel(EntityModelSet modelSet, SkullBlock.Type type) private static TransformationcreateWallTransformation(Direction wallDirection) voidextractRenderState(SkullBlockEntity blockEntity, SkullBlockRenderState state, float partialTicks, Vec3 cameraPosition, @Nullable ModelFeatureRenderer.CrumblingOverlay breakProgress) static RenderTypegetPlayerSkinRenderType(Identifier texture) getRenderBoundingBox(SkullBlockEntity blockEntity) Return anAABBthat controls the visible scope of thisBlockEntityRenderer.static RenderTypegetSkullRenderType(SkullBlock.Type type, @Nullable Identifier texture) private RenderTyperesolveSkullRenderType(SkullBlock.Type type, SkullBlockEntity entity) voidsubmit(SkullBlockRenderState state, PoseStack poseStack, SubmitNodeCollector submitNodeCollector, CameraRenderState camera) static voidsubmitSkull(float animationValue, PoseStack poseStack, SubmitNodeCollector submitNodeCollector, int lightCoords, SkullModelBase model, RenderType renderType, int outlineColor, @Nullable ModelFeatureRenderer.CrumblingOverlay breakProgress) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BlockEntityRenderer
getViewDistance, shouldRender, shouldRenderOffScreen
-
Field Details
-
TRANSFORMATIONS
-
modelByType
-
SKIN_BY_TYPE
-
playerSkinRenderCache
-
-
Constructor Details
-
SkullBlockRenderer
-
-
Method Details
-
createModel
-
createRenderState
- Specified by:
createRenderStatein interfaceBlockEntityRenderer<SkullBlockEntity, SkullBlockRenderState>
-
extractRenderState
public void extractRenderState(SkullBlockEntity blockEntity, SkullBlockRenderState state, float partialTicks, Vec3 cameraPosition, @Nullable ModelFeatureRenderer.CrumblingOverlay breakProgress) - Specified by:
extractRenderStatein interfaceBlockEntityRenderer<SkullBlockEntity, SkullBlockRenderState>
-
submit
public void submit(SkullBlockRenderState state, PoseStack poseStack, SubmitNodeCollector submitNodeCollector, CameraRenderState camera) - Specified by:
submitin interfaceBlockEntityRenderer<SkullBlockEntity, SkullBlockRenderState>
-
submitSkull
public static void submitSkull(float animationValue, PoseStack poseStack, SubmitNodeCollector submitNodeCollector, int lightCoords, SkullModelBase model, RenderType renderType, int outlineColor, @Nullable ModelFeatureRenderer.CrumblingOverlay breakProgress) -
resolveSkullRenderType
-
getSkullRenderType
-
getPlayerSkinRenderType
-
createWallTransformation
-
createGroundTransformation
-
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<SkullBlockEntity>- Returns:
- an appropriately sized
AABBfor theBlockEntityRenderer
-