From 03d4f4e6d8244bc203f10dda14881e1567bda8c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20M=C3=BCller?= Date: Mon, 23 Jun 2025 20:28:13 +0200 Subject: [PATCH] fixed bug in ShrinkingBorder --- .../metaGameplay/shrinkingBorder/ShrinkingBorderListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/varo/src/main/java/eu/mhsl/craftattack/spawn/varo/appliances/metaGameplay/shrinkingBorder/ShrinkingBorderListener.java b/varo/src/main/java/eu/mhsl/craftattack/spawn/varo/appliances/metaGameplay/shrinkingBorder/ShrinkingBorderListener.java index 8450b1f..317af1f 100644 --- a/varo/src/main/java/eu/mhsl/craftattack/spawn/varo/appliances/metaGameplay/shrinkingBorder/ShrinkingBorderListener.java +++ b/varo/src/main/java/eu/mhsl/craftattack/spawn/varo/appliances/metaGameplay/shrinkingBorder/ShrinkingBorderListener.java @@ -42,8 +42,8 @@ public class ShrinkingBorderListener extends ApplianceListener Location relativeLocation = playerLocation.clone().subtract(worldBorder.getCenter()); double playerBorderDistanceX = worldBorder.getSize()/2 - Math.abs(relativeLocation.getX()); double playerBorderDistanceZ = worldBorder.getSize()/2 - Math.abs(relativeLocation.getZ()); - int xSteps = (int) Math.ceil(playerBorderDistanceX / this.getAppliance().getOption(ShrinkingBorderCommand.Argument.SHRINK_PER_DAY)); - int zSteps = (int) Math.ceil(playerBorderDistanceZ / this.getAppliance().getOption(ShrinkingBorderCommand.Argument.SHRINK_PER_DAY)); + int xSteps = (int) Math.ceil(playerBorderDistanceX / ((double) this.getAppliance().getOption(ShrinkingBorderCommand.Argument.SHRINK_PER_DAY) / 2)); + int zSteps = (int) Math.ceil(playerBorderDistanceZ / ((double) this.getAppliance().getOption(ShrinkingBorderCommand.Argument.SHRINK_PER_DAY) / 2)); return Math.min(xSteps, zSteps); }