Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion chunky/src/java/se/llbit/chunky/world/EmptyChunk.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class EmptyChunk extends Chunk {
}

private EmptyChunk() {
super(new ChunkPosition(0, 0), EmptyDimension.INSTANCE);
super(new ChunkPosition(0, 0), EmptyWorld.INSTANCE.currentDimension());
surface = IconLayer.CORRUPT;
}

Expand Down
4 changes: 1 addition & 3 deletions chunky/src/java/se/llbit/chunky/world/EmptyDimension.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
import java.util.Collections;

public class EmptyDimension extends Dimension {
public static final EmptyDimension INSTANCE = new EmptyDimension();

private EmptyDimension() {
EmptyDimension() {
super(EmptyWorld.INSTANCE, Dimension.Identifier.OVERWORLD, null, Collections.emptySet());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class EmptyRegionChunk extends Chunk {
}

private EmptyRegionChunk() {
super(new ChunkPosition(0, 0), EmptyDimension.INSTANCE);
super(new ChunkPosition(0, 0), EmptyWorld.INSTANCE.currentDimension());
surface = IconLayer.CORRUPT;
}

Expand Down
10 changes: 8 additions & 2 deletions chunky/src/java/se/llbit/chunky/world/EmptyWorld.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,16 @@ public class EmptyWorld extends World {

private EmptyWorld() {
super("[empty world]", null, 0, -1);
this.currentDimension = EmptyDimension.INSTANCE;
this.currentDimension = new EmptyDimension();
}

@Override public String toString() {
@Override
public void loadDimension(Dimension.Identifier dimensionId) {
// no-op
}

@Override
public String toString() {
return "[empty world]";
}

Expand Down
Loading