Class ClaimLocation

java.lang.Object
xaero.pac.common.claims.api.ClaimLocation

public class ClaimLocation extends Object
A location which includes the dimension ID and the chunk position coordinates that may be used for a claim
  • Constructor Summary

    Constructors
    Constructor
    Description
    ClaimLocation(net.minecraft.resources.ResourceLocation dimId, int chunkX, int chunkZ)
    Constructs a new claim location for a specified dimension ID and chunk position.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    net.minecraft.world.level.ChunkPos
    Gets the chunk position.
    int
    Gets the X chunk coordinate.
    int
    Gets the Z chunk coordinate.
    net.minecraft.resources.ResourceLocation
    Gets the dimension ID.
    int
     

    Methods inherited from class java.lang.Object

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

    • ClaimLocation

      public ClaimLocation(@Nonnull net.minecraft.resources.ResourceLocation dimId, int chunkX, int chunkZ)
      Constructs a new claim location for a specified dimension ID and chunk position.
      Parameters:
      dimId - the dimension ID, not null
      chunkX - the X chunk coordinate
      chunkZ - the Z chunk coordinate
  • Method Details

    • getDimId

      @Nonnull public net.minecraft.resources.ResourceLocation getDimId()
      Gets the dimension ID.
      Returns:
      the dimension ID of the claim, not null
    • getChunkX

      public int getChunkX()
      Gets the X chunk coordinate.
      Returns:
      the X chunk coordinate of the claim
    • getChunkZ

      public int getChunkZ()
      Gets the Z chunk coordinate.
      Returns:
      the Z chunk coordinate of the claim
    • getChunkPos

      @Nonnull public net.minecraft.world.level.ChunkPos getChunkPos()
      Gets the chunk position.
      Returns:
      the chunk position of the claim, not null
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object