SPIGOT-6829: Add per-player world border API

By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
CraftBukkit/Spigot
2022-04-09 09:39:33 +10:00
parent 6cd6b91c36
commit b0e366dc99
5 changed files with 170 additions and 56 deletions

View File

@@ -7,8 +7,8 @@
- this.newCenterX = worldborder.getCenterX();
- this.newCenterZ = worldborder.getCenterZ();
+ // CraftBukkit start - multiply out nether border
+ this.newCenterX = worldborder.getCenterX() * worldborder.world.dimensionType().coordinateScale();
+ this.newCenterZ = worldborder.getCenterZ() * worldborder.world.dimensionType().coordinateScale();
+ this.newCenterX = worldborder.getCenterX() * (worldborder.world != null ? worldborder.world.dimensionType().coordinateScale() : 1.0);
+ this.newCenterZ = worldborder.getCenterZ() * (worldborder.world != null ? worldborder.world.dimensionType().coordinateScale() : 1.0);
+ // CraftBukkit end
}