Class RenderHelper

java.lang.Object
team.lodestar.lodestone.helpers.render.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
    getShaderFromRenderType(net.minecraft.client.renderer.RenderType type)
     
    static com.mojang.math.Vector4f
    midpoint(com.mojang.math.Vector4f a, com.mojang.math.Vector4f b)
     
    static com.mojang.math.Vector3f
    parametricSphere(float u, float v, float r)
     
    static net.minecraft.world.phys.Vec2
    screenSpaceQuadOffsets(com.mojang.math.Vector4f start, com.mojang.math.Vector4f end, float width)
     
    static net.minecraft.world.phys.Vec2
    worldPosToTexCoord(com.mojang.math.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

    • 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 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