mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-21 03:33:23 +00:00
57 lines
672 B
Java
57 lines
672 B
Java
package com.volmit.iris.util;
|
|
|
|
import java.util.Objects;
|
|
|
|
public class ChunkPosition
|
|
{
|
|
private int x;
|
|
private int z;
|
|
|
|
public ChunkPosition(int x, int z)
|
|
{
|
|
this.x = x;
|
|
this.z = z;
|
|
}
|
|
|
|
public int getX()
|
|
{
|
|
return x;
|
|
}
|
|
|
|
public void setX(int x)
|
|
{
|
|
this.x = x;
|
|
}
|
|
|
|
public int getZ()
|
|
{
|
|
return z;
|
|
}
|
|
|
|
public void setZ(int z)
|
|
{
|
|
this.z = z;
|
|
}
|
|
|
|
@Override
|
|
public int hashCode()
|
|
{
|
|
return Objects.hash(x, z);
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object obj)
|
|
{
|
|
if(this == obj)
|
|
{
|
|
return true;
|
|
}
|
|
if(!(obj instanceof ChunkPosition))
|
|
{
|
|
return false;
|
|
}
|
|
ChunkPosition other = (ChunkPosition) obj;
|
|
return x == other.x && z == other.z;
|
|
}
|
|
}
|