From 95581a6fa5919f29f2a86fdf02fd4610444c09d0 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Thu, 5 Sep 2024 10:02:55 +0200 Subject: [PATCH] Fix mapping reading of changed_id type --- .../viaversion/viaversion/api/data/MappingDataLoader.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/src/main/java/com/viaversion/viaversion/api/data/MappingDataLoader.java b/api/src/main/java/com/viaversion/viaversion/api/data/MappingDataLoader.java index 27a12934f..58ff10001 100644 --- a/api/src/main/java/com/viaversion/viaversion/api/data/MappingDataLoader.java +++ b/api/src/main/java/com/viaversion/viaversion/api/data/MappingDataLoader.java @@ -247,15 +247,15 @@ public class MappingDataLoader { final boolean fillBetween = tag.get("nofill") == null; mappings = holderSupplier.get(size); - int previousChangedId = 0; + int nextUnhandledId = 0; for (int i = 0; i < changesAt.length; i++) { final int changedId = changesAt[i]; if (fillBetween) { // Fill from after the last change to before this change with unchanged ids - for (int id = previousChangedId + 1; id < changedId; id++) { + for (int id = nextUnhandledId; id < changedId; id++) { addConsumer.addTo(mappings, id, id); } - previousChangedId = changedId; + nextUnhandledId = changedId + 1; } // Assign the changed value