package net.minecraftforge.common.chunkio; import com.google.common.base.Objects; // Sponge import net.minecraft.world.World; class QueuedChunk { final int x; final int z; final World world; public QueuedChunk(int x, int z, World world) { this.x = x; this.z = z; this.world = world; } @Override public int hashCode() { return (x * 31 + z * 29) ^ world.hashCode(); } @Override public boolean equals(Object object) { if (object instanceof QueuedChunk) { QueuedChunk other = (QueuedChunk) object; return x == other.x && z == other.z && world == other.world; } return false; } /* Sponge start: Replace toString @Override public String toString() { StringBuilder result = new StringBuilder(); String NEW_LINE = System.getProperty("line.separator"); result.append(this.getClass().getName() + " {" + NEW_LINE); result.append(" x: " + x + NEW_LINE); result.append(" z: " + z + NEW_LINE); result.append(" world: " + world.getWorldInfo().getWorldName() + NEW_LINE); result.append(" dimension: " + world.provider.getDimension() + NEW_LINE); result.append(" provider: " + world.provider.getClass().getName() + NEW_LINE); result.append("}"); return result.toString(); }*/ @Override public String toString() { return Objects.toStringHelper(this) .addValue(this.world) .add("x", this.x) .add("z", this.z) .toString(); } // Sponge end }