File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
paper-server/patches/sources/net/minecraft/world/level/border Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 11--- a/net/minecraft/world/level/border/WorldBorder.java
22+++ b/net/minecraft/world/level/border/WorldBorder.java
3- @@ -33,6 +_,7 @@
3+ @@ -33,6 +_,8 @@
44 double centerZ;
55 int absoluteMaxSize = 29999984;
66 WorldBorder.BorderExtent extent = new WorldBorder.StaticBorderExtent(5.999997E7F);
77+ public net.minecraft.server.level.@org.jspecify.annotations.Nullable ServerLevel world; // CraftBukkit
8+ + private int lastTick = -1; // Paper - Prevent ticking virtual world borders multiple times per server tick
89
910 public WorldBorder() {
1011 this(WorldBorder.Settings.DEFAULT);
9192 this.listeners.add(listener);
9293 }
9394
95+ @@ -278,6 +_,12 @@
96+ }
97+
98+ public void tick() {
99+ + // Paper start - Prevent ticking virtual world borders multiple times per server tick
100+ + if (this.lastTick == net.minecraft.server.MinecraftServer.currentTick) {
101+ + return;
102+ + }
103+ + this.lastTick = net.minecraft.server.MinecraftServer.currentTick;
104+ + // Paper end - Prevent ticking virtual world borders multiple times per server tick
105+ this.extent = this.extent.update();
106+ }
107+
94108@@ -298,6 +_,22 @@
95109 }
96110 }
You can’t perform that action at this time.
0 commit comments