Package team.lodestar.lodestone.helpers
Class RenderHelper
java.lang.Object
team.lodestar.lodestone.helpers.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.ShaderInstancegetShader(net.minecraft.client.renderer.RenderType type) static net.minecraft.client.renderer.RenderStateShard.TransparencyStateShardgetTransparencyShard(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 voidvertexPos(com.mojang.blaze3d.vertex.VertexConsumer vertexConsumer, com.mojang.math.Matrix4f last, float x, float y, float z) static voidvertexPosColor(com.mojang.blaze3d.vertex.VertexConsumer vertexConsumer, com.mojang.math.Matrix4f last, float x, float y, float z, float r, float g, float b, float a) static voidvertexPosColorUV(com.mojang.blaze3d.vertex.VertexConsumer vertexConsumer, com.mojang.math.Matrix4f last, float x, float y, float z, float r, float g, float b, float a, float u, float v) static voidvertexPosColorUVLight(com.mojang.blaze3d.vertex.VertexConsumer vertexConsumer, com.mojang.math.Matrix4f last, float x, float y, float z, float r, float g, float b, float a, float u, float v, int light) static voidvertexPosUV(com.mojang.blaze3d.vertex.VertexConsumer vertexConsumer, com.mojang.math.Matrix4f last, float x, float y, float z, float u, float v) static voidvertexPosUVLight(com.mojang.blaze3d.vertex.VertexConsumer vertexConsumer, com.mojang.math.Matrix4f last, float x, float y, float z, float u, float v, int light) 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
-
getShader
public static net.minecraft.client.renderer.ShaderInstance getShader(net.minecraft.client.renderer.RenderType type) -
getTransparencyShard
public static net.minecraft.client.renderer.RenderStateShard.TransparencyStateShard getTransparencyShard(net.minecraft.client.renderer.RenderType type) -
vertexPos
public static void vertexPos(com.mojang.blaze3d.vertex.VertexConsumer vertexConsumer, com.mojang.math.Matrix4f last, float x, float y, float z) -
vertexPosUV
public static void vertexPosUV(com.mojang.blaze3d.vertex.VertexConsumer vertexConsumer, com.mojang.math.Matrix4f last, float x, float y, float z, float u, float v) -
vertexPosUVLight
public static void vertexPosUVLight(com.mojang.blaze3d.vertex.VertexConsumer vertexConsumer, com.mojang.math.Matrix4f last, float x, float y, float z, float u, float v, int light) -
vertexPosColor
public static void vertexPosColor(com.mojang.blaze3d.vertex.VertexConsumer vertexConsumer, com.mojang.math.Matrix4f last, float x, float y, float z, float r, float g, float b, float a) -
vertexPosColorUV
public static void vertexPosColorUV(com.mojang.blaze3d.vertex.VertexConsumer vertexConsumer, com.mojang.math.Matrix4f last, float x, float y, float z, float r, float g, float b, float a, float u, float v) -
vertexPosColorUVLight
public static void vertexPosColorUVLight(com.mojang.blaze3d.vertex.VertexConsumer vertexConsumer, com.mojang.math.Matrix4f last, float x, float y, float z, float r, float g, float b, float a, float u, float v, int light) -
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
-