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 float
static final ResourceLocation
private static final float
static final int
static final float
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
addVertex
(PoseStack.Pose pPose, VertexConsumer pConsumer, int pColor, int pY, float pX, float pZ, float pU, float pV) getRenderBoundingBox
(T blockEntity) Return anAABB
that controls the visible scope of thisBlockEntityRenderer
.int
void
render
(T pBlockEntity, float pPartialTick, PoseStack pPoseStack, MultiBufferSource pBufferSource, int pPackedLight, int pPackedOverlay, Vec3 pCameraPos) private static void
renderBeaconBeam
(PoseStack pPoseStack, MultiBufferSource pBufferSource, float pPartialTick, float pRadius, long pGameTime, int pYOffset, int pHeight, int pColor) static void
renderBeaconBeam
(PoseStack pPoseStack, MultiBufferSource pBufferSource, ResourceLocation pBeamLocation, float pPartialTick, float pTextureScale, long pGameTime, int pYOffset, int pHeight, int pColor, float pBeamRadius, float pGlowRadius) private static void
renderPart
(PoseStack pPoseStack, 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 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) boolean
shouldRender
(T pBlockEntity, Vec3 pCameraPos) boolean
-
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 pBlockEntity, float pPartialTick, PoseStack pPoseStack, MultiBufferSource pBufferSource, int pPackedLight, int pPackedOverlay, Vec3 pCameraPos) - Specified by:
render
in interfaceBlockEntityRenderer<T extends BlockEntity & BeaconBeamOwner>
-
renderBeaconBeam
private static void renderBeaconBeam(PoseStack pPoseStack, MultiBufferSource pBufferSource, float pPartialTick, float pRadius, long pGameTime, int pYOffset, int pHeight, int pColor) -
renderBeaconBeam
public static void renderBeaconBeam(PoseStack pPoseStack, MultiBufferSource pBufferSource, ResourceLocation pBeamLocation, float pPartialTick, float pTextureScale, long pGameTime, int pYOffset, int pHeight, int pColor, float pBeamRadius, float pGlowRadius) -
renderPart
private static void renderPart(PoseStack pPoseStack, 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:
shouldRenderOffScreen
in interfaceBlockEntityRenderer<T extends BlockEntity & BeaconBeamOwner>
-
getViewDistance
public int getViewDistance()- Specified by:
getViewDistance
in interfaceBlockEntityRenderer<T extends BlockEntity & BeaconBeamOwner>
-
shouldRender
- Specified by:
shouldRender
in interfaceBlockEntityRenderer<T extends BlockEntity & BeaconBeamOwner>
-
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<T extends BlockEntity & BeaconBeamOwner>
- Returns:
- an appropriately sized
AABB
for theBlockEntityRenderer
-