Class BeaconRenderer<T extends BlockEntity & BeaconBeamOwner>
java.lang.Object
net.minecraft.client.renderer.blockentity.BeaconRenderer<T>
- All Implemented Interfaces:
BlockEntityRenderer<T>,IBlockEntityRendererExtension<T>
public class BeaconRenderer<T extends BlockEntity & BeaconBeamOwner>
extends Object
implements BlockEntityRenderer<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final floatstatic final ResourceLocationprivate static final floatstatic final intstatic final float -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidaddVertex(PoseStack.Pose pose, VertexConsumer consumer, int color, int y, float x, float z, float u, float v) getRenderBoundingBox(T blockEntity) Return anAABBthat controls the visible scope of thisBlockEntityRenderer.intvoidrender(T p_112149_, float p_112150_, PoseStack p_112151_, MultiBufferSource p_112152_, int p_112153_, int p_112154_, Vec3 p_401093_) private static voidrenderBeaconBeam(PoseStack poseStack, MultiBufferSource bufferSource, float partialTick, float radius, long gameTime, int yOffset, int height, int color) static voidrenderBeaconBeam(PoseStack poseStack, MultiBufferSource bufferSource, ResourceLocation beamLocation, float partialTick, float textureScale, long gameTime, int yOffset, int height, int color, float beamRadius, float glowRadius) private static voidrenderPart(PoseStack poseStack, VertexConsumer consumer, int color, int minY, int maxY, float x1, float z1, float x2, float z2, float x3, float z3, float x4, float z4, float minU, float maxU, float minV, float maxV) private static voidrenderQuad(PoseStack.Pose pose, VertexConsumer consumer, int color, int minY, int maxY, float minX, float minZ, float maxX, float maxZ, float minU, float maxU, float minV, float maxV) booleanshouldRender(T p_173534_, Vec3 p_173535_) booleanshouldRenderOffScreen(T p_112147_)
-
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
-
-
Method Details
-
render
public void render(T p_112149_, float p_112150_, PoseStack p_112151_, MultiBufferSource p_112152_, int p_112153_, int p_112154_, Vec3 p_401093_) - Specified by:
renderin interfaceBlockEntityRenderer<T extends BlockEntity & BeaconBeamOwner>
-
renderBeaconBeam
private static void renderBeaconBeam(PoseStack poseStack, MultiBufferSource bufferSource, float partialTick, float radius, long gameTime, int yOffset, int height, int color) -
renderBeaconBeam
public static void renderBeaconBeam(PoseStack poseStack, MultiBufferSource bufferSource, ResourceLocation beamLocation, float partialTick, float textureScale, long gameTime, int yOffset, int height, int color, float beamRadius, float glowRadius) -
renderPart
private static void renderPart(PoseStack poseStack, VertexConsumer consumer, int color, int minY, int maxY, float x1, float z1, float x2, float z2, float x3, float z3, float x4, float z4, float minU, float maxU, float minV, float maxV) -
renderQuad
private static void renderQuad(PoseStack.Pose pose, VertexConsumer consumer, int color, int minY, int maxY, float minX, float minZ, float maxX, float maxZ, float minU, float maxU, float minV, float maxV) -
addVertex
private static void addVertex(PoseStack.Pose pose, VertexConsumer consumer, int color, int y, float x, float z, float u, float v) -
shouldRenderOffScreen
- Specified by:
shouldRenderOffScreenin interfaceBlockEntityRenderer<T extends BlockEntity & BeaconBeamOwner>
-
getViewDistance
public int getViewDistance()- Specified by:
getViewDistancein interfaceBlockEntityRenderer<T extends BlockEntity & BeaconBeamOwner>
-
shouldRender
- Specified by:
shouldRenderin interfaceBlockEntityRenderer<T extends BlockEntity & BeaconBeamOwner>
-
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
-