From 1ef1a861ca268a62dca3184ff713673aa7399d8c Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Thu, 16 Sep 2021 18:31:03 +0200 Subject: [PATCH] Fix block entity ids --- .../protocol/protocol1_17_1to1_18/data/BlockEntityIds.java | 6 +++++- settings.gradle.kts | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_17_1to1_18/data/BlockEntityIds.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_17_1to1_18/data/BlockEntityIds.java index 0ba58e10..cbe63576 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_17_1to1_18/data/BlockEntityIds.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_17_1to1_18/data/BlockEntityIds.java @@ -9,8 +9,12 @@ public final class BlockEntityIds { static { final int[] ids = com.viaversion.viaversion.protocols.protocol1_18to1_17_1.BlockEntityIds.getIds(); IDS = new int[Arrays.stream(ids).max().getAsInt() + 1]; + Arrays.fill(IDS, -1); for (int i = 0; i < ids.length; i++) { - IDS[ids[i]] = i; + final int id = ids[i]; + if (id != -1) { + IDS[id] = i; + } } } diff --git a/settings.gradle.kts b/settings.gradle.kts index c504fdac..9bd54f5a 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -5,7 +5,6 @@ rootProject.name = "viabackwards-parent" dependencyResolutionManagement { repositories { - mavenLocal() maven("https://repo.viaversion.com") maven("https://papermc.io/repo/repository/maven-public/") maven("https://oss.sonatype.org/content/repositories/snapshots/")