修复了避免选取过大造成的卡顿
All checks were successful
Java CI-CD with Maven / build (push) Successful in 57m14s

This commit is contained in:
zhangyuheng 2024-04-26 22:39:11 +08:00
parent f3fb232fa6
commit eb431c65cf
2 changed files with 7 additions and 1 deletions

View File

@ -6,7 +6,7 @@
<groupId>cn.lunadeer</groupId>
<artifactId>LiteWorldEdit</artifactId>
<version>2.4.3.0</version>
<version>2.4.3.1</version>
<packaging>jar</packaging>
<name>LiteWorldEdit</name>

View File

@ -59,6 +59,12 @@ public class Events implements Listener {
if (xplayer.getPoints().get(1) != null && xplayer.getPoints().get(2) != null) {
Point p1 = xplayer.getPoints().get(1);
Point p2 = xplayer.getPoints().get(2);
int deltaX = Math.abs(p1.x - p2.x);
int deltaY = Math.abs(p1.y - p2.y);
int deltaZ = Math.abs(p1.z - p2.z);
if (deltaX > LiteWorldEdit.config.getXMax() || deltaY > LiteWorldEdit.config.getYMax() || deltaZ > LiteWorldEdit.config.getZMax()) {
return;
}
ParticleRender.showBoxBorder(LiteWorldEdit.instance, player.getWorld().getName(), p1.x, p1.y, p1.z, p2.x, p2.y, p2.z);
}
}