From 1b207251e8edbb204dc47ec428a53962eb463267 Mon Sep 17 00:00:00 2001 From: KennyTV <28825609+KennyTV@users.noreply.github.com> Date: Mon, 25 Nov 2019 22:41:59 +0100 Subject: [PATCH] Add extra mappings constructor for VB --- .../us/myles/ViaVersion/api/data/Mappings.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/common/src/main/java/us/myles/ViaVersion/api/data/Mappings.java b/common/src/main/java/us/myles/ViaVersion/api/data/Mappings.java index 8c5998935..18cd4a737 100644 --- a/common/src/main/java/us/myles/ViaVersion/api/data/Mappings.java +++ b/common/src/main/java/us/myles/ViaVersion/api/data/Mappings.java @@ -8,13 +8,17 @@ import java.util.Arrays; public class Mappings { protected final short[] oldToNew; + protected Mappings(short[] oldToNew) { + this.oldToNew = oldToNew; + } + /** * Maps old identifiers to the new ones. * If an old value cannot be found in the new mappings, the diffmapping will be checked for the given entry. * - * @param size set size of the underlying short array - * @param oldMapping mappings to map from - * @param newMapping mappings to map to + * @param size set size of the underlying short array + * @param oldMapping mappings to map from + * @param newMapping mappings to map to * @param diffMapping extra mappings that will be used/scanned when an entry cannot be found */ public Mappings(int size, JsonObject oldMapping, JsonObject newMapping, JsonObject diffMapping) { @@ -30,7 +34,7 @@ public class Mappings { /** * Maps old identifiers to the new ones. * - * @param size set size of the underlying short array + * @param size set size of the underlying short array * @param oldMapping mappings to map from * @param newMapping mappings to map to */ @@ -47,7 +51,7 @@ public class Mappings { /** * Maps old identifiers to the new ones. * - * @param size set size of the underlying short array + * @param size set size of the underlying short array * @param oldMapping mappings to map from * @param newMapping mappings to map to */