Class RenderHelper

java.lang.Object
team.lodestar.lodestone.helpers.RenderHelper

public class RenderHelper extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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
    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
    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
    static net.minecraft.client.renderer.ShaderInstance
    getShader(net.minecraft.client.renderer.RenderType type)
     
    static net.minecraft.client.renderer.RenderStateShard.TransparencyStateShard
    getTransparencyShard(net.minecraft.client.renderer.RenderType type)
     
    static org.joml.Vector4f
    midpoint(org.joml.Vector4f a, org.joml.Vector4f b)
     
    static org.joml.Vector3f
    parametricSphere(float u, float v, float r)
     
    static net.minecraft.world.phys.Vec2
    screenSpaceQuadOffsets(org.joml.Vector4f start, org.joml.Vector4f end, float width)
     
    static void
    vertexPos(com.mojang.blaze3d.vertex.VertexConsumer vertexConsumer, org.joml.Matrix4f last, float x, float y, float z)
     
    static void
    vertexPosColor(com.mojang.blaze3d.vertex.VertexConsumer vertexConsumer, org.joml.Matrix4f last, float x, float y, float z, float r, float g, float b, float a)
     
    static void
    vertexPosColorUV(com.mojang.blaze3d.vertex.VertexConsumer vertexConsumer, org.joml.Matrix4f last, float x, float y, float z, float r, float g, float b, float a, float u, float v)
     
    static void
    vertexPosColorUVLight(com.mojang.blaze3d.vertex.VertexConsumer vertexConsumer, org.joml.Matrix4f last, float x, float y, float z, float r, float g, float b, float a, float u, float v, int light)
     
    static void
    vertexPosUV(com.mojang.blaze3d.vertex.VertexConsumer vertexConsumer, org.joml.Matrix4f last, float x, float y, float z, float u, float v)
     
    static void
    vertexPosUVLight(com.mojang.blaze3d.vertex.VertexConsumer vertexConsumer, org.joml.Matrix4f last, float x, float y, float z, float u, float v, int light)
     
    static net.minecraft.world.phys.Vec2
    worldPosToTexCoord(org.joml.Vector3f worldPos, com.mojang.blaze3d.vertex.PoseStack viewModelStack)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • 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, org.joml.Matrix4f last, float x, float y, float z)
    • vertexPosUV

      public static void vertexPosUV(com.mojang.blaze3d.vertex.VertexConsumer vertexConsumer, org.joml.Matrix4f last, float x, float y, float z, float u, float v)
    • vertexPosUVLight

      public static void vertexPosUVLight(com.mojang.blaze3d.vertex.VertexConsumer vertexConsumer, org.joml.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, org.joml.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, org.joml.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, org.joml.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 org.joml.Vector3f parametricSphere(float u, float v, float r)
    • screenSpaceQuadOffsets

      public static net.minecraft.world.phys.Vec2 screenSpaceQuadOffsets(org.joml.Vector4f start, org.joml.Vector4f end, float width)
    • midpoint

      public static org.joml.Vector4f midpoint(org.joml.Vector4f a, org.joml.Vector4f b)
    • worldPosToTexCoord

      public static net.minecraft.world.phys.Vec2 worldPosToTexCoord(org.joml.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 to
      ps - The pose stack to draw with
      lineWidth - The width of the line
      points - 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 to
      ps - The pose stack to draw with
      start - The start point
      end - The end point
      steps - The number of steps to divide the line into
      lineWidth - The width of the line
      pointConsumer - 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 to
      ps - The pose stack to draw with
      local - The start point
      target - The end point
      lineWidth - The width of the line