All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bukkit.craftbukkit.chunkio.QueuedChunk Maven / Gradle / Ivy

There is a newer version: 2.4.0
Show newest version
package org.bukkit.craftbukkit.chunkio;

import net.minecraft.server.ChunkProviderServer;
import net.minecraft.server.ChunkRegionLoader;
import net.minecraft.server.NBTTagCompound;
import net.minecraft.server.World;

class QueuedChunk {
  final int x;
  final int z;
  final ChunkRegionLoader loader;
  final World world;
  final ChunkProviderServer provider;
  NBTTagCompound compound;

  public QueuedChunk(int x, int z, ChunkRegionLoader loader, World world, ChunkProviderServer provider) {
    this.x = x;
    this.z = z;
    this.loader = loader;
    this.world = world;
    this.provider = provider;
  }

  @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;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy