Skip to content

Commit 4ce2046

Browse files
committed
Add chunk-version to debug command
1 parent 397762d commit 4ce2046

File tree

1 file changed

+7
-6
lines changed
  • common/src/main/java/de/bluecolored/bluemap/common/commands/commands

1 file changed

+7
-6
lines changed

common/src/main/java/de/bluecolored/bluemap/common/commands/commands/DebugCommand.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@
3030
import de.bluecolored.bluecommands.annotations.Argument;
3131
import de.bluecolored.bluecommands.annotations.Command;
3232
import de.bluecolored.bluemap.common.BlueMapService;
33-
import de.bluecolored.bluemap.common.commands.Permission;
34-
import de.bluecolored.bluemap.common.commands.Unloaded;
35-
import de.bluecolored.bluemap.common.commands.WithPosition;
36-
import de.bluecolored.bluemap.common.commands.WithWorld;
33+
import de.bluecolored.bluemap.common.commands.*;
3734
import de.bluecolored.bluemap.common.config.BlueMapConfigManager;
3835
import de.bluecolored.bluemap.common.debug.StateDumper;
3936
import de.bluecolored.bluemap.common.plugin.Plugin;
@@ -45,6 +42,7 @@
4542
import de.bluecolored.bluemap.core.world.ChunkConsumer;
4643
import de.bluecolored.bluemap.core.world.LightData;
4744
import de.bluecolored.bluemap.core.world.World;
45+
import de.bluecolored.bluemap.core.world.mca.chunk.MCAChunk;
4846
import lombok.RequiredArgsConstructor;
4947
import net.kyori.adventure.text.Component;
5048

@@ -126,11 +124,14 @@ public Component block(CommandSource source, World world, @Argument("x") int x,
126124
text(chunkPos.getY()).color(HIGHLIGHT_COLOR)
127125
)
128126
.appendNewline()
129-
.append(details(BASE_COLOR,
127+
.append(details(BASE_COLOR, TextFormat.stripNulls(
130128
item("is generated", chunk.isGenerated()),
131129
item("has lightdata", chunk.hasLightData()),
130+
chunk instanceof MCAChunk mcaChunk ?
131+
item("data-version", mcaChunk.getDataVersion()) :
132+
null,
132133
item("inhabited-time", chunk.getInhabitedTime())
133-
))
134+
)))
134135
),
135136
item("world", text(world.getId()).color(HIGHLIGHT_COLOR)
136137
.appendNewline()

0 commit comments

Comments
 (0)