Implement APIs for per world view and simulation distances

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2023-12-23 14:32:49 +11:00
parent 6a6ddbcb6d
commit a9fb0c70f8
3 changed files with 38 additions and 19 deletions

View File

@@ -1032,6 +1032,16 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return Difficulty.getByValue(this.getHandle().getDifficulty().ordinal());
}
@Override
public int getViewDistance() {
return world.getChunkSource().chunkMap.serverViewDistance;
}
@Override
public int getSimulationDistance() {
return world.getChunkSource().chunkMap.getDistanceManager().simulationDistance;
}
public BlockMetadataStore getBlockMetadata() {
return blockMetadata;
}