Class RenderHelper
java.lang.Object
team.lodestar.lodestone.helpers.render.RenderHelper
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddrawLineBetween(net.minecraft.client.renderer.MultiBufferSource buffer, com.mojang.blaze3d.vertex.PoseStack ps, net.minecraft.world.phys.Vec3 local, net.minecraft.world.phys.Vec3 target, float lineWidth, int r, int g, int b, int a) Draw a line between two pointsstatic voiddrawSteppedLineBetween(net.minecraft.client.renderer.MultiBufferSource buffer, com.mojang.blaze3d.vertex.PoseStack ps, List<net.minecraft.world.phys.Vec3> points, float lineWidth, int r, int g, int b, int a) Draw a segmented line between two points, subdividing the line into a number of segmentsstatic voiddrawSteppedLineBetween(net.minecraft.client.renderer.MultiBufferSource buffer, com.mojang.blaze3d.vertex.PoseStack ps, net.minecraft.world.phys.Vec3 start, net.minecraft.world.phys.Vec3 end, int steps, float lineWidth, int r, int g, int b, int a, Consumer<net.minecraft.world.phys.Vec3> pointConsumer) Draw a segmented line between two points, subdividing the line into a number of segmentsstatic net.minecraft.client.renderer.ShaderInstancegetShaderFromRenderType(net.minecraft.client.renderer.RenderType type) static com.mojang.math.Vector4fmidpoint(com.mojang.math.Vector4f a, com.mojang.math.Vector4f b) static com.mojang.math.Vector3fparametricSphere(float u, float v, float r) static net.minecraft.world.phys.Vec2screenSpaceQuadOffsets(com.mojang.math.Vector4f start, com.mojang.math.Vector4f end, float width) static net.minecraft.world.phys.Vec2worldPosToTexCoord(com.mojang.math.Vector3f worldPos, com.mojang.blaze3d.vertex.PoseStack viewModelStack)
-
Field Details
-
FULL_BRIGHT
public static final int FULL_BRIGHT- See Also:
-
-
Constructor Details
-
RenderHelper
public RenderHelper()
-
-
Method Details
-
getShaderFromRenderType
public static net.minecraft.client.renderer.ShaderInstance getShaderFromRenderType(net.minecraft.client.renderer.RenderType type) -
parametricSphere
public static com.mojang.math.Vector3f parametricSphere(float u, float v, float r) -
screenSpaceQuadOffsets
public static net.minecraft.world.phys.Vec2 screenSpaceQuadOffsets(com.mojang.math.Vector4f start, com.mojang.math.Vector4f end, float width) -
midpoint
public static com.mojang.math.Vector4f midpoint(com.mojang.math.Vector4f a, com.mojang.math.Vector4f b) -
worldPosToTexCoord
public static net.minecraft.world.phys.Vec2 worldPosToTexCoord(com.mojang.math.Vector3f worldPos, com.mojang.blaze3d.vertex.PoseStack viewModelStack) -
drawSteppedLineBetween
public static void drawSteppedLineBetween(net.minecraft.client.renderer.MultiBufferSource buffer, com.mojang.blaze3d.vertex.PoseStack ps, List<net.minecraft.world.phys.Vec3> points, float lineWidth, int r, int g, int b, int a) Draw a segmented line between two points, subdividing the line into a number of segments- Parameters:
buffer- The buffer to draw tops- The pose stack to draw withlineWidth- The width of the linepoints- The points to draw between
-
drawSteppedLineBetween
public static void drawSteppedLineBetween(net.minecraft.client.renderer.MultiBufferSource buffer, com.mojang.blaze3d.vertex.PoseStack ps, net.minecraft.world.phys.Vec3 start, net.minecraft.world.phys.Vec3 end, int steps, float lineWidth, int r, int g, int b, int a, Consumer<net.minecraft.world.phys.Vec3> pointConsumer) Draw a segmented line between two points, subdividing the line into a number of segments- Parameters:
buffer- The buffer to draw tops- The pose stack to draw withstart- The start pointend- The end pointsteps- The number of steps to divide the line intolineWidth- The width of the linepointConsumer- A consumer to call for each point in the line
-
drawLineBetween
public static void drawLineBetween(net.minecraft.client.renderer.MultiBufferSource buffer, com.mojang.blaze3d.vertex.PoseStack ps, net.minecraft.world.phys.Vec3 local, net.minecraft.world.phys.Vec3 target, float lineWidth, int r, int g, int b, int a) Draw a line between two points- Parameters:
buffer- The buffer to draw tops- The pose stack to draw withlocal- The start pointtarget- The end pointlineWidth- The width of the line
-