Record Class WorldBounds

java.lang.Object
java.lang.Record
com.render.api.world.WorldBounds

public record WorldBounds(net.minecraft.world.phys.Vec3 min, net.minecraft.world.phys.Vec3 max) extends Record
Immutable local or world-space bounds used for culling and picking.
  • Constructor Summary

    Constructors
    Constructor
    Description
    WorldBounds(net.minecraft.world.phys.Vec3 min, net.minecraft.world.phys.Vec3 max)
    Creates an instance of a WorldBounds record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.phys.AABB
     
    around(net.minecraft.world.phys.Vec3 center, double radius)
     
    net.minecraft.world.phys.Vec3
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    inflate(double amount)
     
    net.minecraft.world.phys.Vec3
    max()
    Returns the value of the max record component.
    net.minecraft.world.phys.Vec3
    min()
    Returns the value of the min record component.
    move(net.minecraft.world.phys.Vec3 amount)
     
    of(net.minecraft.world.phys.AABB box)
     
    final String
    Returns a string representation of this record class.
     
     

    Methods inherited from class Object

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

    • WorldBounds

      public WorldBounds(net.minecraft.world.phys.Vec3 min, net.minecraft.world.phys.Vec3 max)
      Creates an instance of a WorldBounds record class.
      Parameters:
      min - the value for the min record component
      max - the value for the max record component
  • Method Details

    • of

      public static WorldBounds of(net.minecraft.world.phys.AABB box)
    • around

      public static WorldBounds around(net.minecraft.world.phys.Vec3 center, double radius)
    • aabb

      public net.minecraft.world.phys.AABB aabb()
    • center

      public net.minecraft.world.phys.Vec3 center()
    • inflate

      public WorldBounds inflate(double amount)
    • move

      public WorldBounds move(net.minecraft.world.phys.Vec3 amount)
    • union

      public WorldBounds union(WorldBounds other)
    • transform

      public WorldBounds transform(WorldTransform transform)
    • 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.
    • min

      public net.minecraft.world.phys.Vec3 min()
      Returns the value of the min record component.
      Returns:
      the value of the min record component
    • max

      public net.minecraft.world.phys.Vec3 max()
      Returns the value of the max record component.
      Returns:
      the value of the max record component