Record Class ColoredShape

java.lang.Object
java.lang.Record
dev.latvian.mods.klib.shape.ColoredShape

public record ColoredShape(Shape shape, Gradient quads, Gradient lines) extends Record
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<ColoredShape> CODEC
    • STREAM_CODEC

      public static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, ColoredShape> STREAM_CODEC
  • Constructor Details

    • ColoredShape

      public ColoredShape(Shape shape, Gradient quads, Gradient lines)
      Creates an instance of a ColoredShape record class.
      Parameters:
      shape - the value for the shape record component
      quads - the value for the quads record component
      lines - the value for the lines record component
  • Method Details

    • of

      public static ColoredShape of(Shape shape, Gradient quads, Gradient lines)
    • quads

      public static ColoredShape quads(Shape shape, Gradient color)
    • lines

      public static ColoredShape lines(Shape shape, Gradient color)
    • at

      public PositionedColoredShape at(net.minecraft.world.phys.Vec3 pos)
    • at

      public PositionedColoredShape at(org.joml.Vector3dc pos)
    • at

      public PositionedColoredShape at(double x, double y, double z)
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • shape

      public Shape shape()
      Returns the value of the shape record component.
      Returns:
      the value of the shape record component
    • quads

      public Gradient quads()
      Returns the value of the quads record component.
      Returns:
      the value of the quads record component
    • lines

      public Gradient lines()
      Returns the value of the lines record component.
      Returns:
      the value of the lines record component