Record Class PlaceRenderer.PlacementRecord

java.lang.Object
java.lang.Record
dev.boze.api.render.PlaceRenderer.PlacementRecord
Enclosing class:
PlaceRenderer

public static record PlaceRenderer.PlacementRecord(net.minecraft.util.math.BlockPos pos, long placeTime, long duration, ClientColor color, float fillOpacity, float outlineOpacity, float animOpacity, float animGrow, float animShrink, boolean useShader) extends Record
Record containing placement visualization data
  • Constructor Summary

    Constructors
    Constructor
    Description
    PlacementRecord(net.minecraft.util.math.BlockPos pos, long placeTime, long duration, ClientColor color, float fillOpacity, float outlineOpacity)
    Creates a placement record without animation or shader settings.
    PlacementRecord(net.minecraft.util.math.BlockPos pos, long placeTime, long duration, ClientColor color, float fillOpacity, float outlineOpacity, boolean useShader)
    Creates a placement record without animation settings but with shader setting.
    PlacementRecord(net.minecraft.util.math.BlockPos pos, long placeTime, long duration, ClientColor color, float fillOpacity, float outlineOpacity, float animOpacity, float animGrow, float animShrink)
    Creates a placement record with animation settings but without shader setting.
    PlacementRecord(net.minecraft.util.math.BlockPos pos, long placeTime, long duration, ClientColor color, float fillOpacity, float outlineOpacity, float animOpacity, float animGrow, float animShrink, boolean useShader)
    Creates a placement record with full animation and shader settings.
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    Returns the value of the animGrow record component.
    float
    Returns the value of the animOpacity record component.
    float
    Returns the value of the animShrink record component.
    Returns the value of the color record component.
    long
    Returns the value of the duration record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    float
    Returns the value of the fillOpacity record component.
    final int
    Returns a hash code value for this object.
    float
    Returns the value of the outlineOpacity record component.
    long
    Returns the value of the placeTime record component.
    net.minecraft.util.math.BlockPos
    pos()
    Returns the value of the pos record component.
    final String
    Returns a string representation of this record class.
    boolean
    Returns the value of the useShader record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PlacementRecord

      public PlacementRecord(net.minecraft.util.math.BlockPos pos, long placeTime, long duration, ClientColor color, float fillOpacity, float outlineOpacity, float animOpacity, float animGrow, float animShrink, boolean useShader)
      Creates a placement record with full animation and shader settings.
      Parameters:
      pos - The block position to render
      placeTime - The timestamp when placement occurred (System.currentTimeMillis())
      duration - How long to render the placement in milliseconds
      color - The color to use for rendering
      fillOpacity - Opacity for filled box faces (0.0 to 1.0)
      outlineOpacity - Opacity for box outline edges (0.0 to 1.0)
      animOpacity - Opacity animation duration (0 = no fade, 1 = fade over entire time)
      animGrow - Grow animation duration (starts at beginning)
      animShrink - Shrink animation duration (starts near end)
      useShader - Whether to use shader rendering instead of regular rendering
    • PlacementRecord

      public PlacementRecord(net.minecraft.util.math.BlockPos pos, long placeTime, long duration, ClientColor color, float fillOpacity, float outlineOpacity)
      Creates a placement record without animation or shader settings. Animation parameters default to 0 (no animation), useShader defaults to false.
      Parameters:
      pos - The block position to render
      placeTime - The timestamp when placement occurred (System.currentTimeMillis())
      duration - How long to render the placement in milliseconds
      color - The color to use for rendering
      fillOpacity - Opacity for filled box faces (0.0 to 1.0)
      outlineOpacity - Opacity for box outline edges (0.0 to 1.0)
    • PlacementRecord

      public PlacementRecord(net.minecraft.util.math.BlockPos pos, long placeTime, long duration, ClientColor color, float fillOpacity, float outlineOpacity, boolean useShader)
      Creates a placement record without animation settings but with shader setting. Animation parameters default to 0 (no animation).
      Parameters:
      pos - The block position to render
      placeTime - The timestamp when placement occurred (System.currentTimeMillis())
      duration - How long to render the placement in milliseconds
      color - The color to use for rendering
      fillOpacity - Opacity for filled box faces (0.0 to 1.0)
      outlineOpacity - Opacity for box outline edges (0.0 to 1.0)
      useShader - Whether to use shader rendering instead of regular rendering
    • PlacementRecord

      public PlacementRecord(net.minecraft.util.math.BlockPos pos, long placeTime, long duration, ClientColor color, float fillOpacity, float outlineOpacity, float animOpacity, float animGrow, float animShrink)
      Creates a placement record with animation settings but without shader setting. useShader defaults to false.
      Parameters:
      pos - The block position to render
      placeTime - The timestamp when placement occurred (System.currentTimeMillis())
      duration - How long to render the placement in milliseconds
      color - The color to use for rendering
      fillOpacity - Opacity for filled box faces (0.0 to 1.0)
      outlineOpacity - Opacity for box outline edges (0.0 to 1.0)
      animOpacity - Opacity animation duration (0 = no fade, 1 = fade over entire time)
      animGrow - Grow animation duration (starts at beginning)
      animShrink - Shrink animation duration (starts near end)
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • pos

      public net.minecraft.util.math.BlockPos pos()
      Returns the value of the pos record component.
      Returns:
      the value of the pos record component
    • placeTime

      public long placeTime()
      Returns the value of the placeTime record component.
      Returns:
      the value of the placeTime record component
    • duration

      public long duration()
      Returns the value of the duration record component.
      Returns:
      the value of the duration record component
    • color

      public ClientColor color()
      Returns the value of the color record component.
      Returns:
      the value of the color record component
    • fillOpacity

      public float fillOpacity()
      Returns the value of the fillOpacity record component.
      Returns:
      the value of the fillOpacity record component
    • outlineOpacity

      public float outlineOpacity()
      Returns the value of the outlineOpacity record component.
      Returns:
      the value of the outlineOpacity record component
    • animOpacity

      public float animOpacity()
      Returns the value of the animOpacity record component.
      Returns:
      the value of the animOpacity record component
    • animGrow

      public float animGrow()
      Returns the value of the animGrow record component.
      Returns:
      the value of the animGrow record component
    • animShrink

      public float animShrink()
      Returns the value of the animShrink record component.
      Returns:
      the value of the animShrink record component
    • useShader

      public boolean useShader()
      Returns the value of the useShader record component.
      Returns:
      the value of the useShader record component