Class LinePreview

java.lang.Object
tschipp.linear.client.LinePreview

public final class LinePreview extends Object
Shows the line being dragged as ghost blocks, tinted red where they won't be placed (out of blocks, out of range or over the limit) and blue on the end. The block count is only updated when the line changes or once a second, since it can be expensive (e.g. a bag that has to craft).
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static @Nullable LinePreview.Counter
    The block shown next to the crosshair and how many of it the line uses, or null when not dragging.
    static void
    render(com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.Camera camera)
    Called from each loader's world render hook, after translucent blocks.

    Methods inherited from class java.lang.Object

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

    • render

      public static void render(com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.Camera camera)
      Called from each loader's world render hook, after translucent blocks.
    • counter

      @Nullable public static @Nullable LinePreview.Counter counter()
      The block shown next to the crosshair and how many of it the line uses, or null when not dragging. incomplete if some positions won't get a block.