From 523f62787b6160fdaae17d2cfd12cc68e22ad3e6 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Tue, 30 Aug 2016 18:05:28 +1000 Subject: [PATCH] Fixes #269 --- core/src/main/java/com/boydti/fawe/example/NMSRelighter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/boydti/fawe/example/NMSRelighter.java b/core/src/main/java/com/boydti/fawe/example/NMSRelighter.java index 28b98616..5e726321 100644 --- a/core/src/main/java/com/boydti/fawe/example/NMSRelighter.java +++ b/core/src/main/java/com/boydti/fawe/example/NMSRelighter.java @@ -155,8 +155,8 @@ public class NMSRelighter { Collections.sort(chunksList); int size = chunksList.size(); if (size > DISPATCH_SIZE) { - int amount = (size + 1) / DISPATCH_SIZE; - for (int i = 0; i <= amount; i++) { + int amount = (size + DISPATCH_SIZE - 1) / DISPATCH_SIZE; + for (int i = 0; i < amount; i++) { int start = i * DISPATCH_SIZE; int end = Math.min(size, start + DISPATCH_SIZE); List sub = chunksList.subList(start, end);