From 71bac009db7d470aeb2dcd37b3a4a856955d0958 Mon Sep 17 00:00:00 2001 From: Hannes Greule Date: Fri, 12 May 2023 23:13:35 +0200 Subject: [PATCH] Properly scale the random in SimpleRandomCollection (#2220) --- .../core/util/collection/SimpleRandomCollection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/collection/SimpleRandomCollection.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/collection/SimpleRandomCollection.java index d67227abe..dc2107559 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/collection/SimpleRandomCollection.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/collection/SimpleRandomCollection.java @@ -36,7 +36,7 @@ public class SimpleRandomCollection extends RandomCollection { @Override public E next(int x, int y, int z) { - return map.ceilingEntry(getRandom().nextDouble(x, y, z)).getValue(); + return map.ceilingEntry(getRandom().nextDouble(x, y, z) * this.total).getValue(); } }