WORLD --[RegionManager]--> REGION --[ChunkLoader]--> CHUNK
This commit is contained in:
@@ -6,8 +6,11 @@ import lombok.Setter;
|
||||
import mc.core.Location;
|
||||
import mc.core.WarpPosition;
|
||||
import mc.core.player.Look;
|
||||
import mc.core.world.*;
|
||||
import mc.world.generated_world.chunk.InMemoryCacheChunkLoader;
|
||||
import mc.core.world.Chunk;
|
||||
import mc.core.world.IWorldType;
|
||||
import mc.core.world.Region;
|
||||
import mc.core.world.World;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -20,32 +23,29 @@ public class CubicWorld implements World {
|
||||
private final int seed;
|
||||
private volatile WarpPosition warpPosition;
|
||||
private final transient Object spawnLocationLock = new Object();
|
||||
private final transient ChunkLoader chunkLoader;
|
||||
private final Map<String, Tag<?>> nbtTagMap = new HashMap<>();
|
||||
@Autowired
|
||||
private RegionManager regionManager;
|
||||
@Getter@Setter
|
||||
private String name;
|
||||
|
||||
public CubicWorld(UUID worldId, int seed) {
|
||||
this.worldId = worldId;
|
||||
chunkLoader = new InMemoryCacheChunkLoader(this);
|
||||
this.seed = seed;
|
||||
}
|
||||
|
||||
public CubicWorld(int seed) {
|
||||
this.worldId = UUID.randomUUID();
|
||||
chunkLoader = new InMemoryCacheChunkLoader(this);
|
||||
this.seed = seed;
|
||||
}
|
||||
|
||||
public CubicWorld(UUID worldId) {
|
||||
this.worldId = worldId;
|
||||
chunkLoader = new InMemoryCacheChunkLoader(this);
|
||||
this.seed = 0;
|
||||
}
|
||||
|
||||
public CubicWorld () {
|
||||
this.worldId = UUID.randomUUID();
|
||||
chunkLoader = new InMemoryCacheChunkLoader(this);
|
||||
this.seed = 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user