Class BeaconRenderer<T extends BlockEntity & BeaconBeamOwner>
java.lang.Object
net.minecraft.client.renderer.blockentity.BeaconRenderer<T>
- All Implemented Interfaces:
BlockEntityRenderer<T,,BeaconRenderState> IBlockEntityRendererExtension<T>
public class BeaconRenderer<T extends BlockEntity & BeaconBeamOwner>
extends Object
implements BlockEntityRenderer<T,BeaconRenderState>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final floatstatic final Identifierprivate static final floatstatic final intstatic final float -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidaddVertex(PoseStack.Pose pPose, VertexConsumer pConsumer, int pColor, int pY, float pX, float pZ, float pU, float pV) static <T extends BlockEntity & BeaconBeamOwner>
voidextract(T pSign, BeaconRenderState pRenderState, float pPartialTick, Vec3 pCameraPosition) voidextractRenderState(T p_447130_, BeaconRenderState p_446076_, float p_445698_, Vec3 p_445714_, @Nullable ModelFeatureRenderer.CrumblingOverlay p_447097_) getRenderBoundingBox(T blockEntity) Return anAABBthat controls the visible scope of thisBlockEntityRenderer.intprivate static voidrenderPart(PoseStack.Pose pPose, VertexConsumer pConsumer, int pColor, int pMinY, int pMaxY, float pX1, float pZ1, float pX2, float pZ2, float pX3, float pZ3, float pX4, float pZ4, float pMinU, float pMaxU, float pMinV, float pMaxV) private static voidrenderQuad(PoseStack.Pose pPose, VertexConsumer pConsumer, int pColor, int pMinY, int pMaxY, float pMinX, float pMinZ, float pMaxX, float pMaxZ, float pMinU, float pMaxU, float pMinV, float pMaxV) booleanshouldRender(T p_173534_, Vec3 p_173535_) booleanvoidsubmit(BeaconRenderState p_447169_, PoseStack p_440263_, SubmitNodeCollector p_439020_, CameraRenderState p_450986_) private static voidsubmitBeaconBeam(PoseStack pPoseStack, SubmitNodeCollector pNodeCollector, float pRadiusScale, float pAnimationTime, int pYOffset, int pHeight, int pColor) static voidsubmitBeaconBeam(PoseStack pPoseStack, SubmitNodeCollector pNodeCollector, Identifier pLocation, float pPartialTick, float pAnimationTime, int pYOffset, int pHeight, int pColor, float pBeamRadius, float pGlowRadius)
-
Field Details
-
BEAM_LOCATION
-
MAX_RENDER_Y
public static final int MAX_RENDER_Y- See Also:
-
BEAM_SCALE_THRESHOLD
private static final float BEAM_SCALE_THRESHOLD- See Also:
-
SOLID_BEAM_RADIUS
public static final float SOLID_BEAM_RADIUS- See Also:
-
BEAM_GLOW_RADIUS
public static final float BEAM_GLOW_RADIUS- See Also:
-
-
Constructor Details
-
BeaconRenderer
public BeaconRenderer()
-
-
Method Details
-
createRenderState
- Specified by:
createRenderStatein interfaceBlockEntityRenderer<T extends BlockEntity & BeaconBeamOwner,BeaconRenderState>
-
extractRenderState
public void extractRenderState(T p_447130_, BeaconRenderState p_446076_, float p_445698_, Vec3 p_445714_, @Nullable ModelFeatureRenderer.CrumblingOverlay p_447097_) - Specified by:
extractRenderStatein interfaceBlockEntityRenderer<T extends BlockEntity & BeaconBeamOwner,BeaconRenderState>
-
extract
public static <T extends BlockEntity & BeaconBeamOwner> void extract(T pSign, BeaconRenderState pRenderState, float pPartialTick, Vec3 pCameraPosition) -
submit
public void submit(BeaconRenderState p_447169_, PoseStack p_440263_, SubmitNodeCollector p_439020_, CameraRenderState p_450986_) - Specified by:
submitin interfaceBlockEntityRenderer<T extends BlockEntity & BeaconBeamOwner,BeaconRenderState>
-
submitBeaconBeam
private static void submitBeaconBeam(PoseStack pPoseStack, SubmitNodeCollector pNodeCollector, float pRadiusScale, float pAnimationTime, int pYOffset, int pHeight, int pColor) -
submitBeaconBeam
public static void submitBeaconBeam(PoseStack pPoseStack, SubmitNodeCollector pNodeCollector, Identifier pLocation, float pPartialTick, float pAnimationTime, int pYOffset, int pHeight, int pColor, float pBeamRadius, float pGlowRadius) -
renderPart
private static void renderPart(PoseStack.Pose pPose, VertexConsumer pConsumer, int pColor, int pMinY, int pMaxY, float pX1, float pZ1, float pX2, float pZ2, float pX3, float pZ3, float pX4, float pZ4, float pMinU, float pMaxU, float pMinV, float pMaxV) -
renderQuad
private static void renderQuad(PoseStack.Pose pPose, VertexConsumer pConsumer, int pColor, int pMinY, int pMaxY, float pMinX, float pMinZ, float pMaxX, float pMaxZ, float pMinU, float pMaxU, float pMinV, float pMaxV) -
addVertex
private static void addVertex(PoseStack.Pose pPose, VertexConsumer pConsumer, int pColor, int pY, float pX, float pZ, float pU, float pV) -
shouldRenderOffScreen
public boolean shouldRenderOffScreen()- Specified by:
shouldRenderOffScreenin interfaceBlockEntityRenderer<T extends BlockEntity & BeaconBeamOwner,BeaconRenderState>
-
getViewDistance
public int getViewDistance()- Specified by:
getViewDistancein interfaceBlockEntityRenderer<T extends BlockEntity & BeaconBeamOwner,BeaconRenderState>
-
shouldRender
- Specified by:
shouldRenderin interfaceBlockEntityRenderer<T extends BlockEntity & BeaconBeamOwner,BeaconRenderState>
-
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<T extends BlockEntity & BeaconBeamOwner>- Returns:
- an appropriately sized
AABBfor theBlockEntityRenderer
-