From 6bfc3ceb95dfb2781915ac1cd790bb8518519a96 Mon Sep 17 00:00:00 2001 From: MattBDev <4009945+MattBDev@users.noreply.github.com> Date: Thu, 3 Jun 2021 17:59:51 -0400 Subject: [PATCH] Removed cast to ResettableExtent in for loop. I have no idea why we were casting it when all objects in the loop were ResettableExtents in the first place. --- .../java/com/boydti/fawe/object/extent/RandomTransform.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/worldedit-core/src/main/java/com/boydti/fawe/object/extent/RandomTransform.java b/worldedit-core/src/main/java/com/boydti/fawe/object/extent/RandomTransform.java index 35823f090..a249a9f83 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/object/extent/RandomTransform.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/object/extent/RandomTransform.java @@ -48,10 +48,8 @@ public class RandomTransform extends SelectTransform { collection = RandomCollection.of(weights, random); extents = new LinkedHashSet<>(weights.keySet()); } - for (AbstractDelegateExtent current : extents) { - if (current instanceof ResettableExtent) { - ((ResettableExtent) current).setExtent(extent); - } + for (ResettableExtent current : extents) { + current.setExtent(extent); } return this; }