Record Class BlockArea

java.lang.Object
java.lang.Record
net.minecraft.util.math.BlockArea
Record Components:
min -
max -
All Implemented Interfaces:
Iterable<BlockPos>

public record BlockArea(BlockPos min, BlockPos max) extends Record implements Iterable<BlockPos>
Mappings:
Namespace Name
official ik
intermediary net/minecraft/class_9380
named net/minecraft/util/math/BlockArea
official b
intermediary comp_2466
named min
official c
intermediary comp_2467
named max
  • Field Details

    • min

      private final BlockPos min
      The field for the min record component.
    • max

      private final BlockPos max
      The field for the max record component.
    • PACKET_CODEC

      public static final PacketCodec<ByteBuf,BlockArea> PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      official a Lik;a:Lyq;
      intermediary field_49907 Lnet/minecraft/class_9380;field_49907:Lnet/minecraft/class_9139;
      named PACKET_CODEC Lnet/minecraft/util/math/BlockArea;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
  • Constructor Details

    • BlockArea

      public BlockArea(BlockPos min, BlockPos max)
      Creates an instance of a BlockArea record class.
      Parameters:
      min - the value for the min record component
      max - the value for the max record component
  • Method Details

    • of

      public static BlockArea of(BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      official a Lik;a(Lim;)Lik;
      intermediary method_58236 Lnet/minecraft/class_9380;method_58236(Lnet/minecraft/class_2338;)Lnet/minecraft/class_9380;
      named of Lnet/minecraft/util/math/BlockArea;of(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/BlockArea;
    • of

      public static BlockArea of(BlockPos min, BlockPos max)
      Mappings:
      Namespace Name Mixin selector
      official a Lik;a(Lim;Lim;)Lik;
      intermediary method_58237 Lnet/minecraft/class_9380;method_58237(Lnet/minecraft/class_2338;Lnet/minecraft/class_2338;)Lnet/minecraft/class_9380;
      named of Lnet/minecraft/util/math/BlockArea;of(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/BlockArea;
    • extendTo

      public BlockArea extendTo(BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      official b Lik;b(Lim;)Lik;
      intermediary method_58241 Lnet/minecraft/class_9380;method_58241(Lnet/minecraft/class_2338;)Lnet/minecraft/class_9380;
      named extendTo Lnet/minecraft/util/math/BlockArea;extendTo(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/BlockArea;
    • isSingleBlock

      public boolean isSingleBlock()
      Mappings:
      Namespace Name Mixin selector
      official a Lik;a()Z
      intermediary method_58235 Lnet/minecraft/class_9380;method_58235()Z
      named isSingleBlock Lnet/minecraft/util/math/BlockArea;isSingleBlock()Z
    • contains

      public boolean contains(BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      official c Lik;c(Lim;)Z
      intermediary method_58244 Lnet/minecraft/class_9380;method_58244(Lnet/minecraft/class_2338;)Z
      named contains Lnet/minecraft/util/math/BlockArea;contains(Lnet/minecraft/util/math/BlockPos;)Z
    • asBox

      public Box asBox()
      Mappings:
      Namespace Name Mixin selector
      official b Lik;b()Leta;
      intermediary method_58240 Lnet/minecraft/class_9380;method_58240()Lnet/minecraft/class_238;
      named asBox Lnet/minecraft/util/math/BlockArea;asBox()Lnet/minecraft/util/math/Box;
    • iterator

      public Iterator<BlockPos> iterator()
      Specified by:
      iterator in interface Iterable<BlockPos>
    • getSizeX

      public int getSizeX()
      Mappings:
      Namespace Name Mixin selector
      official c Lik;c()I
      intermediary method_58243 Lnet/minecraft/class_9380;method_58243()I
      named getSizeX Lnet/minecraft/util/math/BlockArea;getSizeX()I
    • getSizeY

      public int getSizeY()
      Mappings:
      Namespace Name Mixin selector
      official d Lik;d()I
      intermediary method_58245 Lnet/minecraft/class_9380;method_58245()I
      named getSizeY Lnet/minecraft/util/math/BlockArea;getSizeY()I
    • getSizeZ

      public int getSizeZ()
      Mappings:
      Namespace Name Mixin selector
      official e Lik;e()I
      intermediary method_58246 Lnet/minecraft/class_9380;method_58246()I
      named getSizeZ Lnet/minecraft/util/math/BlockArea;getSizeZ()I
    • extend

      public BlockArea extend(Direction direction, int amount)
      Mappings:
      Namespace Name Mixin selector
      official a Lik;a(Lir;I)Lik;
      intermediary method_58238 Lnet/minecraft/class_9380;method_58238(Lnet/minecraft/class_2350;I)Lnet/minecraft/class_9380;
      named extend Lnet/minecraft/util/math/BlockArea;extend(Lnet/minecraft/util/math/Direction;I)Lnet/minecraft/util/math/BlockArea;
    • offset

      public BlockArea offset(Direction direction, int amount)
      Mappings:
      Namespace Name Mixin selector
      official b Lik;b(Lir;I)Lik;
      intermediary method_58242 Lnet/minecraft/class_9380;method_58242(Lnet/minecraft/class_2350;I)Lnet/minecraft/class_9380;
      named offset Lnet/minecraft/util/math/BlockArea;offset(Lnet/minecraft/util/math/Direction;I)Lnet/minecraft/util/math/BlockArea;
    • offset

      public BlockArea offset(Vec3i amount)
      Mappings:
      Namespace Name Mixin selector
      official a Lik;a(Ljq;)Lik;
      intermediary method_58239 Lnet/minecraft/class_9380;method_58239(Lnet/minecraft/class_2382;)Lnet/minecraft/class_9380;
      named offset Lnet/minecraft/util/math/BlockArea;offset(Lnet/minecraft/util/math/Vec3i;)Lnet/minecraft/util/math/BlockArea;
    • 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 object)
      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:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • min

      public BlockPos min()
      Returns the value of the min record component.
      Returns:
      the value of the min record component
    • max

      public BlockPos max()
      Returns the value of the max record component.
      Returns:
      the value of the max record component