Record Class GlobalPos

java.lang.Object
java.lang.Record
net.minecraft.util.math.GlobalPos
Record Components:
dimension -
pos -

public record GlobalPos(RegistryKey<World> dimension, BlockPos pos) extends Record
Mappings:
Namespace Name
named net/minecraft/util/math/GlobalPos
intermediary net/minecraft/class_4208
official jh
named dimension
intermediary comp_2207
official d
named pos
intermediary comp_2208
official e
  • Field Details

    • dimension

      private final RegistryKey<World> dimension
      The field for the dimension record component.
    • pos

      private final BlockPos pos
      The field for the pos record component.
    • MAP_CODEC

      public static final com.mojang.serialization.MapCodec<GlobalPos> MAP_CODEC
      Mappings:
      Namespace Name Mixin selector
      named MAP_CODEC Lnet/minecraft/util/math/GlobalPos;MAP_CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_49583 Lnet/minecraft/class_4208;field_49583:Lcom/mojang/serialization/MapCodec;
      official a Ljh;a:Lcom/mojang/serialization/MapCodec;
    • CODEC

      public static final com.mojang.serialization.Codec<GlobalPos> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/util/math/GlobalPos;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_25066 Lnet/minecraft/class_4208;field_25066:Lcom/mojang/serialization/Codec;
      official b Ljh;b:Lcom/mojang/serialization/Codec;
    • PACKET_CODEC

      public static final PacketCodec<ByteBuf,GlobalPos> PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named PACKET_CODEC Lnet/minecraft/util/math/GlobalPos;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_48451 Lnet/minecraft/class_4208;field_48451:Lnet/minecraft/class_9139;
      official c Ljh;c:Lzn;
  • Constructor Details

    • GlobalPos

      public GlobalPos(RegistryKey<World> dimension, BlockPos pos)
      Creates an instance of a GlobalPos record class.
      Parameters:
      dimension - the value for the dimension record component
      pos - the value for the pos record component
  • Method Details

    • create

      public static GlobalPos create(RegistryKey<World> dimension, BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      named create Lnet/minecraft/util/math/GlobalPos;create(Lnet/minecraft/registry/RegistryKey;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/GlobalPos;
      intermediary method_19443 Lnet/minecraft/class_4208;method_19443(Lnet/minecraft/class_5321;Lnet/minecraft/class_2338;)Lnet/minecraft/class_4208;
      official a Ljh;a(Lale;Liz;)Ljh;
    • toString

      public 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.
    • dimension

      public RegistryKey<World> dimension()
      Returns the value of the dimension record component.
      Returns:
      the value of the dimension record component
    • pos

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