From a379d60f62a692ae6cc477fdaa058fd2983d1e47 Mon Sep 17 00:00:00 2001 From: SirYwell Date: Mon, 23 Oct 2023 16:02:25 +0200 Subject: [PATCH] remove unneeded generic type --- .../fawe/v1_17_R1_2/PaperweightStarlightRelighter.java | 4 +--- .../v1_17_R1_2/PaperweightStarlightRelighterFactory.java | 5 +---- .../impl/fawe/v1_18_R2/PaperweightStarlightRelighter.java | 4 +--- .../v1_18_R2/PaperweightStarlightRelighterFactory.java | 5 +---- .../impl/fawe/v1_19_R3/PaperweightStarlightRelighter.java | 4 +--- .../v1_19_R3/PaperweightStarlightRelighterFactory.java | 5 +---- .../impl/fawe/v1_20_R1/PaperweightStarlightRelighter.java | 4 +--- .../v1_20_R1/PaperweightStarlightRelighterFactory.java | 5 +---- .../impl/fawe/v1_20_R2/PaperweightStarlightRelighter.java | 4 +--- .../v1_20_R2/PaperweightStarlightRelighterFactory.java | 5 +---- .../bukkit/adapter/NMSRelighterFactory.java | 4 +--- .../core/extent/processor/lighting/NMSRelighter.java | 8 +++----- .../core/extent/processor/lighting/RelighterFactory.java | 3 +-- 13 files changed, 15 insertions(+), 45 deletions(-) diff --git a/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_17_R1_2/PaperweightStarlightRelighter.java b/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_17_R1_2/PaperweightStarlightRelighter.java index 8298be6f1f..d80c82aa21 100644 --- a/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_17_R1_2/PaperweightStarlightRelighter.java +++ b/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_17_R1_2/PaperweightStarlightRelighter.java @@ -3,7 +3,6 @@ import com.fastasyncworldedit.core.configuration.Settings; import com.fastasyncworldedit.core.extent.processor.lighting.NMSRelighter; import com.fastasyncworldedit.core.extent.processor.lighting.Relighter; -import com.fastasyncworldedit.core.queue.IQueueChunk; import com.fastasyncworldedit.core.queue.IQueueExtent; import com.fastasyncworldedit.core.util.MathMan; import com.fastasyncworldedit.core.util.TaskManager; @@ -70,8 +69,7 @@ public class PaperweightStarlightRelighter implements Relighter { private final ReentrantLock areaLock = new ReentrantLock(); private final NMSRelighter delegate; - @SuppressWarnings("rawtypes") - public PaperweightStarlightRelighter(ServerLevel serverLevel, IQueueExtent queue) { + public PaperweightStarlightRelighter(ServerLevel serverLevel, IQueueExtent queue) { this.serverLevel = serverLevel; this.delegate = new NMSRelighter(queue); } diff --git a/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_17_R1_2/PaperweightStarlightRelighterFactory.java b/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_17_R1_2/PaperweightStarlightRelighterFactory.java index 2672c5b626..9cd0a1ef84 100644 --- a/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_17_R1_2/PaperweightStarlightRelighterFactory.java +++ b/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_17_R1_2/PaperweightStarlightRelighterFactory.java @@ -4,7 +4,6 @@ import com.fastasyncworldedit.core.extent.processor.lighting.RelightMode; import com.fastasyncworldedit.core.extent.processor.lighting.Relighter; import com.fastasyncworldedit.core.extent.processor.lighting.RelighterFactory; -import com.fastasyncworldedit.core.queue.IQueueChunk; import com.fastasyncworldedit.core.queue.IQueueExtent; import com.sk89q.worldedit.world.World; import org.bukkit.Bukkit; @@ -15,9 +14,7 @@ public class PaperweightStarlightRelighterFactory implements RelighterFactory { @Override - public @Nonnull - @SuppressWarnings("rawtypes") - Relighter createRelighter(RelightMode relightMode, World world, IQueueExtent queue) { + public @Nonnull Relighter createRelighter(RelightMode relightMode, World world, IQueueExtent queue) { org.bukkit.World w = Bukkit.getWorld(world.getName()); if (w == null) { return NullRelighter.INSTANCE; diff --git a/worldedit-bukkit/adapters/adapter-1_18_2/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_18_R2/PaperweightStarlightRelighter.java b/worldedit-bukkit/adapters/adapter-1_18_2/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_18_R2/PaperweightStarlightRelighter.java index 397931bc5f..0e27ec7ee2 100644 --- a/worldedit-bukkit/adapters/adapter-1_18_2/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_18_R2/PaperweightStarlightRelighter.java +++ b/worldedit-bukkit/adapters/adapter-1_18_2/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_18_R2/PaperweightStarlightRelighter.java @@ -3,7 +3,6 @@ import com.fastasyncworldedit.core.configuration.Settings; import com.fastasyncworldedit.core.extent.processor.lighting.NMSRelighter; import com.fastasyncworldedit.core.extent.processor.lighting.Relighter; -import com.fastasyncworldedit.core.queue.IQueueChunk; import com.fastasyncworldedit.core.queue.IQueueExtent; import com.fastasyncworldedit.core.util.MathMan; import com.fastasyncworldedit.core.util.TaskManager; @@ -45,8 +44,7 @@ public class PaperweightStarlightRelighter implements Relighter { private final ReentrantLock areaLock = new ReentrantLock(); private final NMSRelighter delegate; - @SuppressWarnings("rawtypes") - public PaperweightStarlightRelighter(ServerLevel serverLevel, IQueueExtent queue) { + public PaperweightStarlightRelighter(ServerLevel serverLevel, IQueueExtent queue) { this.serverLevel = serverLevel; this.delegate = new NMSRelighter(queue); } diff --git a/worldedit-bukkit/adapters/adapter-1_18_2/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_18_R2/PaperweightStarlightRelighterFactory.java b/worldedit-bukkit/adapters/adapter-1_18_2/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_18_R2/PaperweightStarlightRelighterFactory.java index 960174342e..735bcc677d 100644 --- a/worldedit-bukkit/adapters/adapter-1_18_2/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_18_R2/PaperweightStarlightRelighterFactory.java +++ b/worldedit-bukkit/adapters/adapter-1_18_2/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_18_R2/PaperweightStarlightRelighterFactory.java @@ -4,7 +4,6 @@ import com.fastasyncworldedit.core.extent.processor.lighting.RelightMode; import com.fastasyncworldedit.core.extent.processor.lighting.Relighter; import com.fastasyncworldedit.core.extent.processor.lighting.RelighterFactory; -import com.fastasyncworldedit.core.queue.IQueueChunk; import com.fastasyncworldedit.core.queue.IQueueExtent; import com.sk89q.worldedit.world.World; import org.bukkit.Bukkit; @@ -15,9 +14,7 @@ public class PaperweightStarlightRelighterFactory implements RelighterFactory { @Override - public @Nonnull - @SuppressWarnings("rawtypes") - Relighter createRelighter(RelightMode relightMode, World world, IQueueExtent queue) { + public @Nonnull Relighter createRelighter(RelightMode relightMode, World world, IQueueExtent queue) { org.bukkit.World w = Bukkit.getWorld(world.getName()); if (w == null) { return NullRelighter.INSTANCE; diff --git a/worldedit-bukkit/adapters/adapter-1_19_4/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_19_R3/PaperweightStarlightRelighter.java b/worldedit-bukkit/adapters/adapter-1_19_4/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_19_R3/PaperweightStarlightRelighter.java index 62d781212d..7fe32f6167 100644 --- a/worldedit-bukkit/adapters/adapter-1_19_4/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_19_R3/PaperweightStarlightRelighter.java +++ b/worldedit-bukkit/adapters/adapter-1_19_4/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_19_R3/PaperweightStarlightRelighter.java @@ -3,7 +3,6 @@ import com.fastasyncworldedit.core.configuration.Settings; import com.fastasyncworldedit.core.extent.processor.lighting.NMSRelighter; import com.fastasyncworldedit.core.extent.processor.lighting.Relighter; -import com.fastasyncworldedit.core.queue.IQueueChunk; import com.fastasyncworldedit.core.queue.IQueueExtent; import com.fastasyncworldedit.core.util.MathMan; import com.fastasyncworldedit.core.util.TaskManager; @@ -45,8 +44,7 @@ public class PaperweightStarlightRelighter implements Relighter { private final ReentrantLock areaLock = new ReentrantLock(); private final NMSRelighter delegate; - @SuppressWarnings("rawtypes") - public PaperweightStarlightRelighter(ServerLevel serverLevel, IQueueExtent queue) { + public PaperweightStarlightRelighter(ServerLevel serverLevel, IQueueExtent queue) { this.serverLevel = serverLevel; this.delegate = new NMSRelighter(queue); } diff --git a/worldedit-bukkit/adapters/adapter-1_19_4/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_19_R3/PaperweightStarlightRelighterFactory.java b/worldedit-bukkit/adapters/adapter-1_19_4/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_19_R3/PaperweightStarlightRelighterFactory.java index ad525f242d..78c623c7ac 100644 --- a/worldedit-bukkit/adapters/adapter-1_19_4/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_19_R3/PaperweightStarlightRelighterFactory.java +++ b/worldedit-bukkit/adapters/adapter-1_19_4/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_19_R3/PaperweightStarlightRelighterFactory.java @@ -4,7 +4,6 @@ import com.fastasyncworldedit.core.extent.processor.lighting.RelightMode; import com.fastasyncworldedit.core.extent.processor.lighting.Relighter; import com.fastasyncworldedit.core.extent.processor.lighting.RelighterFactory; -import com.fastasyncworldedit.core.queue.IQueueChunk; import com.fastasyncworldedit.core.queue.IQueueExtent; import com.sk89q.worldedit.world.World; import org.bukkit.Bukkit; @@ -15,9 +14,7 @@ public class PaperweightStarlightRelighterFactory implements RelighterFactory { @Override - public @Nonnull - @SuppressWarnings("rawtypes") - Relighter createRelighter(RelightMode relightMode, World world, IQueueExtent queue) { + public @Nonnull Relighter createRelighter(RelightMode relightMode, World world, IQueueExtent queue) { org.bukkit.World w = Bukkit.getWorld(world.getName()); if (w == null) { return NullRelighter.INSTANCE; diff --git a/worldedit-bukkit/adapters/adapter-1_20/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_20_R1/PaperweightStarlightRelighter.java b/worldedit-bukkit/adapters/adapter-1_20/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_20_R1/PaperweightStarlightRelighter.java index 2cc67360b1..235078ee0b 100644 --- a/worldedit-bukkit/adapters/adapter-1_20/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_20_R1/PaperweightStarlightRelighter.java +++ b/worldedit-bukkit/adapters/adapter-1_20/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_20_R1/PaperweightStarlightRelighter.java @@ -3,7 +3,6 @@ import com.fastasyncworldedit.core.configuration.Settings; import com.fastasyncworldedit.core.extent.processor.lighting.NMSRelighter; import com.fastasyncworldedit.core.extent.processor.lighting.Relighter; -import com.fastasyncworldedit.core.queue.IQueueChunk; import com.fastasyncworldedit.core.queue.IQueueExtent; import com.fastasyncworldedit.core.util.MathMan; import com.fastasyncworldedit.core.util.TaskManager; @@ -45,8 +44,7 @@ public class PaperweightStarlightRelighter implements Relighter { private final ReentrantLock areaLock = new ReentrantLock(); private final NMSRelighter delegate; - @SuppressWarnings("rawtypes") - public PaperweightStarlightRelighter(ServerLevel serverLevel, IQueueExtent queue) { + public PaperweightStarlightRelighter(ServerLevel serverLevel, IQueueExtent queue) { this.serverLevel = serverLevel; this.delegate = new NMSRelighter(queue); } diff --git a/worldedit-bukkit/adapters/adapter-1_20/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_20_R1/PaperweightStarlightRelighterFactory.java b/worldedit-bukkit/adapters/adapter-1_20/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_20_R1/PaperweightStarlightRelighterFactory.java index e2658ee0ee..83509a2bbd 100644 --- a/worldedit-bukkit/adapters/adapter-1_20/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_20_R1/PaperweightStarlightRelighterFactory.java +++ b/worldedit-bukkit/adapters/adapter-1_20/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_20_R1/PaperweightStarlightRelighterFactory.java @@ -4,7 +4,6 @@ import com.fastasyncworldedit.core.extent.processor.lighting.RelightMode; import com.fastasyncworldedit.core.extent.processor.lighting.Relighter; import com.fastasyncworldedit.core.extent.processor.lighting.RelighterFactory; -import com.fastasyncworldedit.core.queue.IQueueChunk; import com.fastasyncworldedit.core.queue.IQueueExtent; import com.sk89q.worldedit.world.World; import org.bukkit.Bukkit; @@ -15,9 +14,7 @@ public class PaperweightStarlightRelighterFactory implements RelighterFactory { @Override - public @Nonnull - @SuppressWarnings("rawtypes") - Relighter createRelighter(RelightMode relightMode, World world, IQueueExtent queue) { + public @Nonnull Relighter createRelighter(RelightMode relightMode, World world, IQueueExtent queue) { org.bukkit.World w = Bukkit.getWorld(world.getName()); if (w == null) { return NullRelighter.INSTANCE; diff --git a/worldedit-bukkit/adapters/adapter-1_20_2/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_20_R2/PaperweightStarlightRelighter.java b/worldedit-bukkit/adapters/adapter-1_20_2/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_20_R2/PaperweightStarlightRelighter.java index 6c6527c021..d02b784e8d 100644 --- a/worldedit-bukkit/adapters/adapter-1_20_2/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_20_R2/PaperweightStarlightRelighter.java +++ b/worldedit-bukkit/adapters/adapter-1_20_2/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_20_R2/PaperweightStarlightRelighter.java @@ -3,7 +3,6 @@ import com.fastasyncworldedit.core.configuration.Settings; import com.fastasyncworldedit.core.extent.processor.lighting.NMSRelighter; import com.fastasyncworldedit.core.extent.processor.lighting.Relighter; -import com.fastasyncworldedit.core.queue.IQueueChunk; import com.fastasyncworldedit.core.queue.IQueueExtent; import com.fastasyncworldedit.core.util.MathMan; import com.fastasyncworldedit.core.util.TaskManager; @@ -45,8 +44,7 @@ public class PaperweightStarlightRelighter implements Relighter { private final ReentrantLock areaLock = new ReentrantLock(); private final NMSRelighter delegate; - @SuppressWarnings("rawtypes") - public PaperweightStarlightRelighter(ServerLevel serverLevel, IQueueExtent queue) { + public PaperweightStarlightRelighter(ServerLevel serverLevel, IQueueExtent queue) { this.serverLevel = serverLevel; this.delegate = new NMSRelighter(queue); } diff --git a/worldedit-bukkit/adapters/adapter-1_20_2/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_20_R2/PaperweightStarlightRelighterFactory.java b/worldedit-bukkit/adapters/adapter-1_20_2/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_20_R2/PaperweightStarlightRelighterFactory.java index 4e5b9b7ff0..4afc48689f 100644 --- a/worldedit-bukkit/adapters/adapter-1_20_2/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_20_R2/PaperweightStarlightRelighterFactory.java +++ b/worldedit-bukkit/adapters/adapter-1_20_2/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_20_R2/PaperweightStarlightRelighterFactory.java @@ -4,7 +4,6 @@ import com.fastasyncworldedit.core.extent.processor.lighting.RelightMode; import com.fastasyncworldedit.core.extent.processor.lighting.Relighter; import com.fastasyncworldedit.core.extent.processor.lighting.RelighterFactory; -import com.fastasyncworldedit.core.queue.IQueueChunk; import com.fastasyncworldedit.core.queue.IQueueExtent; import com.sk89q.worldedit.world.World; import org.bukkit.Bukkit; @@ -15,9 +14,7 @@ public class PaperweightStarlightRelighterFactory implements RelighterFactory { @Override - public @Nonnull - @SuppressWarnings("rawtypes") - Relighter createRelighter(RelightMode relightMode, World world, IQueueExtent queue) { + public @Nonnull Relighter createRelighter(RelightMode relightMode, World world, IQueueExtent queue) { org.bukkit.World w = Bukkit.getWorld(world.getName()); if (w == null) { return NullRelighter.INSTANCE; diff --git a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/adapter/NMSRelighterFactory.java b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/adapter/NMSRelighterFactory.java index 4fd78df851..39c3279915 100644 --- a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/adapter/NMSRelighterFactory.java +++ b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/adapter/NMSRelighterFactory.java @@ -5,7 +5,6 @@ import com.fastasyncworldedit.core.extent.processor.lighting.RelightMode; import com.fastasyncworldedit.core.extent.processor.lighting.Relighter; import com.fastasyncworldedit.core.extent.processor.lighting.RelighterFactory; -import com.fastasyncworldedit.core.queue.IQueueChunk; import com.fastasyncworldedit.core.queue.IQueueExtent; import com.sk89q.worldedit.world.World; @@ -14,8 +13,7 @@ public class NMSRelighterFactory implements RelighterFactory { @Override - public @Nonnull - Relighter createRelighter(RelightMode relightMode, World world, IQueueExtent queue) { + public @Nonnull Relighter createRelighter(RelightMode relightMode, World world, IQueueExtent queue) { return new NMSRelighter( queue, relightMode != null ? relightMode : RelightMode.valueOf(Settings.settings().LIGHTING.MODE) diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/lighting/NMSRelighter.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/lighting/NMSRelighter.java index 97a97f9a7b..e38df12f54 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/lighting/NMSRelighter.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/lighting/NMSRelighter.java @@ -4,7 +4,6 @@ import com.fastasyncworldedit.core.configuration.Settings; import com.fastasyncworldedit.core.math.BlockVectorSet; import com.fastasyncworldedit.core.math.MutableBlockVector3; -import com.fastasyncworldedit.core.queue.IQueueChunk; import com.fastasyncworldedit.core.queue.IQueueExtent; import com.fastasyncworldedit.core.queue.implementation.chunk.ChunkHolder; import com.fastasyncworldedit.core.util.MathMan; @@ -34,7 +33,6 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.locks.ReentrantLock; -@SuppressWarnings("rawtypes") public class NMSRelighter implements Relighter { private static final int DISPATCH_SIZE = 64; @@ -51,7 +49,7 @@ public class NMSRelighter implements Relighter { } public final MutableBlockVector3 mutableBlockPos = new MutableBlockVector3(0, 0, 0); - private final IQueueExtent queue; + private final IQueueExtent queue; private final Map skyToRelight; private final Object present = new Object(); private final Map chunksToSend; @@ -66,11 +64,11 @@ public class NMSRelighter implements Relighter { private final AtomicBoolean finished = new AtomicBoolean(false); private boolean removeFirst; - public NMSRelighter(IQueueExtent queue) { + public NMSRelighter(IQueueExtent queue) { this(queue, null); } - public NMSRelighter(IQueueExtent queue, RelightMode relightMode) { + public NMSRelighter(IQueueExtent queue, RelightMode relightMode) { this.queue = queue; this.skyToRelight = new Long2ObjectOpenHashMap<>(12); this.lightQueue = new Long2ObjectOpenHashMap<>(12); diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/lighting/RelighterFactory.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/lighting/RelighterFactory.java index 34275f77d1..f0bca36ed7 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/lighting/RelighterFactory.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/lighting/RelighterFactory.java @@ -1,6 +1,5 @@ package com.fastasyncworldedit.core.extent.processor.lighting; -import com.fastasyncworldedit.core.queue.IQueueChunk; import com.fastasyncworldedit.core.queue.IQueueExtent; import com.sk89q.worldedit.world.World; @@ -25,6 +24,6 @@ public interface RelighterFactory { * @return a new Relighter instance with the specified settings. */ @Nonnull - Relighter createRelighter(RelightMode relightMode, World world, IQueueExtent queue); + Relighter createRelighter(RelightMode relightMode, World world, IQueueExtent queue); }