public CraftChunk(net.minecraft.server.Chunk chunk) { if (!(chunk instanceof EmptyChunk)) { this.weakChunk = new WeakReference<net.minecraft.server.Chunk>(chunk); } worldServer = (WorldServer) getHandle().world; x = getHandle().locX; z = getHandle().locZ; }
public net.minecraft.server.Chunk getHandle() { net.minecraft.server.Chunk c = weakChunk.get(); if (c == null) { c = worldServer.getChunkAt(x, z); if (!(c instanceof EmptyChunk)) { weakChunk = new WeakReference<net.minecraft.server.Chunk>(c); } } return c; }
public CraftChunk(net.minecraft.server.Chunk chunk) { if (!(chunk instanceof EmptyChunk)) { this.weakChunk = new WeakReference<net.minecraft.server.Chunk>(chunk); } worldServer = (WorldServer) getHandle().world; x = getHandle().x; z = getHandle().z; }