From 5812b946086dfcf3302c1155e2d6cf9ab20c06fc Mon Sep 17 00:00:00 2001 From: Hannes Greule Date: Sat, 10 Apr 2021 14:30:20 +0200 Subject: [PATCH] Make use of invokeExact --- .../bukkit/adapter/mc1_16_5/TuinityRelighter_1_16_5.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/adapter/mc1_16_5/TuinityRelighter_1_16_5.java b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/adapter/mc1_16_5/TuinityRelighter_1_16_5.java index 080d9af25..5937a67e1 100644 --- a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/adapter/mc1_16_5/TuinityRelighter_1_16_5.java +++ b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/adapter/mc1_16_5/TuinityRelighter_1_16_5.java @@ -55,8 +55,9 @@ public class TuinityRelighter_1_16_5 implements Relighter { TaskManager.IMP.task(() -> { try { - relight.invoke(world.getChunkProvider().getLightEngine(), - new HashSet<>(chunks), + // cast is required for invokeExact + int unused = (int) relight.invokeExact(world.getChunkProvider().getLightEngine(), + (Set) new HashSet<>(chunks), // explicit cast to make invokeExact work (Consumer) coord -> sendChunk(cx, cz), // send chunk after lighting was done nothingIntConsumer );