package mapped;

import net.runelite.mapping.ObfuscatedGetter;
import net.runelite.mapping.ObfuscatedName;
import net.runelite.mapping.ObfuscatedSignature;
import net.runelite.rs.api.RSCoord;

@ObfuscatedName("mh")
public class Coord implements RSCoord {
   @ObfuscatedName("at")
   @ObfuscatedGetter(
      intValue = 18874645
   )
   public int plane;
   @ObfuscatedName("ah")
   @ObfuscatedGetter(
      intValue = -1733966023
   )
   public int x;
   @ObfuscatedName("ar")
   @ObfuscatedGetter(
      intValue = -7006855
   )
   public int y;

   @ObfuscatedSignature(
      descriptor = "(Lmh;)V"
   )
   public Coord(Coord var1) {
      this.plane = var1.plane;
      this.x = var1.x;
      this.y = var1.y;
   }

   public Coord(int var1, int var2, int var3) {
      this.plane = var1;
      this.x = var2;
      this.y = var3;
   }

   public Coord(int var1) {
      if(var1 == -1) {
         this.plane = -1;
      } else {
         this.plane = var1 >> 28 & 3;
         this.x = var1 >> 14 & 16383;
         this.y = var1 & 16383;
      }

   }

   @ObfuscatedName("at")
   @ObfuscatedSignature(
      descriptor = "(I)I",
      garbageValue = "-497441948"
   )
   public int packed_base() {
      return VarpDefinition.method3549_base(this.plane, this.x, this.y);
   }

   @ObfuscatedName("ar")
   @ObfuscatedSignature(
      descriptor = "(Lmh;I)Z",
      garbageValue = "-578750151"
   )
   boolean method6267(Coord var1) {
      return this.plane != var1.plane?false:(this.x != var1.x?false:this.y == var1.y);
   }

   @ObfuscatedName("ao")
   @ObfuscatedSignature(
      descriptor = "(Ljava/lang/String;I)Ljava/lang/String;",
      garbageValue = "-1754319501"
   )
   String toString_base(String var1) {
      return this.plane + var1 + (this.x >> 6) + var1 + (this.y >> 6) + var1 + (this.x & 63) + var1 + (this.y & 63);
   }

   public boolean equals(Object var1) {
      return this == var1?true:(!(var1 instanceof Coord)?false:this.method6267((Coord)var1));
   }

   public int hashCode() {
      return this.packed_base();
   }

   public String toString() {
      return this.toString_base(",");
   }

   public int getPlane() {
      return this.plane;
   }

   public int getX() {
      return this.x;
   }

   public int getY() {
      return this.y;
   }
}
