From bd5fb0d7c741fdc8c55e7b36d3d87d8977024a68 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 26 Jun 2021 17:21:42 +0200 Subject: [PATCH] Fix HellsBells distribution --- .../src/de/steamwar/fightsystem/event/HellsBells.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/event/HellsBells.java b/FightSystem_Main/src/de/steamwar/fightsystem/event/HellsBells.java index d21b308..1d3d87f 100644 --- a/FightSystem_Main/src/de/steamwar/fightsystem/event/HellsBells.java +++ b/FightSystem_Main/src/de/steamwar/fightsystem/event/HellsBells.java @@ -36,6 +36,7 @@ import java.util.Arrays; import java.util.List; import java.util.Random; import java.util.concurrent.atomic.AtomicInteger; +import java.util.logging.Level; public class HellsBells { @@ -79,6 +80,7 @@ public class HellsBells { AtomicInteger length = new AtomicInteger(20 + random.nextInt(direction.getLength(zLength, xLength) - 20)); int width = 5 + random.nextInt(5); + Bukkit.getLogger().log(Level.INFO, "Calculating Starts"); int xOffset = getStart(direction.getLength(xLength, zLength), direction.getLength(length.get(), width)); int zOffset = getStart(direction.getLength(zLength, xLength), direction.getLength(width, length.get())); int yOffset = getHeightStart(); @@ -114,6 +116,7 @@ public class HellsBells { private int getStart(int regionSize, int length) { double randomNumber = (random.nextDouble() - random.nextDouble()) / 2 + 0.5; + Bukkit.getLogger().log(Level.INFO, "Calculated Start: " + (int) (randomNumber * (regionSize - length))); return Math.max(Math.min((int) (randomNumber * (regionSize - length)), regionSize - length), 0); }