geforkt von Mirrors/Paper
Implemented Chunk.getWorld()
Dieser Commit ist enthalten in:
Ursprung
8680ee387f
Commit
a2c944d3c0
@ -2,16 +2,28 @@
|
||||
package org.bukkit.craftbukkit;
|
||||
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.World;
|
||||
|
||||
public class CraftChunk implements Chunk {
|
||||
private final CraftWorld world;
|
||||
private final int x;
|
||||
private final int z;
|
||||
|
||||
protected CraftChunk(final int x, final int z) {
|
||||
protected CraftChunk(final CraftWorld world, final int x, final int z) {
|
||||
this.world = world;
|
||||
this.x = x;
|
||||
this.z = z;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the world containing this chunk
|
||||
*
|
||||
* @return World
|
||||
*/
|
||||
public World getWorld() {
|
||||
return world;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the X-coordinate of this chunk
|
||||
*
|
||||
|
@ -52,7 +52,7 @@ public class CraftWorld implements World {
|
||||
Chunk chunk = chunkCache.get(loc);
|
||||
|
||||
if (chunk == null) {
|
||||
chunk = new CraftChunk(x, z);
|
||||
chunk = new CraftChunk(this, x, z);
|
||||
chunkCache.put(loc, chunk);
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren