From 345d78976ada1afd914c02cab679d1bf878ec8fc Mon Sep 17 00:00:00 2001 From: KennyTV Date: Fri, 17 Apr 2020 21:11:36 +0200 Subject: [PATCH] Add VB version to dumps --- all/pom.xml | 43 +++++++++++++------ .../api/ViaBackwardsPlatform.java | 2 + .../packets/BlockItemPackets1_16.java | 6 ++- 3 files changed, 37 insertions(+), 14 deletions(-) diff --git a/all/pom.xml b/all/pom.xml index f45869b7..301fdcfa 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -27,6 +27,37 @@ clean install + + + net.md-5 + scriptus + 0.3.2 + + git-ViaBackwards-${project.parent.version}:%s + + + + initialize + + describe + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.0 + + + + + ${describe} + + + + + org.apache.maven.plugins maven-compiler-plugin @@ -46,22 +77,10 @@ false false - - com.github.steveice10.opennbt - us.myles.viaversion.libs.opennbt - com.google.gson us.myles.viaversion.libs.gson - - javassist - us.myles.viaversion.libs.javassist - - - org.yaml.snakeyaml - us.myles.viaversion.libs.snakeyaml - net.md_5.bungee us.myles.viaversion.libs.bungeecordchat diff --git a/core/src/main/java/nl/matsv/viabackwards/api/ViaBackwardsPlatform.java b/core/src/main/java/nl/matsv/viabackwards/api/ViaBackwardsPlatform.java index 43b1124a..18ddd2a5 100644 --- a/core/src/main/java/nl/matsv/viabackwards/api/ViaBackwardsPlatform.java +++ b/core/src/main/java/nl/matsv/viabackwards/api/ViaBackwardsPlatform.java @@ -55,6 +55,8 @@ public interface ViaBackwardsPlatform { if (isOutdated()) return; + Via.getManager().getSubPlatforms().add(ViaBackwards.class.getPackage().getImplementationVersion()); + getLogger().info("Loading translations..."); TranslatableRewriter.loadTranslatables(); diff --git a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_15_2to1_16/packets/BlockItemPackets1_16.java b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_15_2to1_16/packets/BlockItemPackets1_16.java index 2811d234..bf07e5b0 100644 --- a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_15_2to1_16/packets/BlockItemPackets1_16.java +++ b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_15_2to1_16/packets/BlockItemPackets1_16.java @@ -160,8 +160,10 @@ public class BlockItemPackets1_16 extends nl.matsv.viabackwards.api.rewriters.It } else if (id.equals("minecraft:skull") && blockEntity.get("SkullOwner") instanceof CompoundTag) { CompoundTag skullOwnerTag = blockEntity.remove("SkullOwner"); IntArrayTag ownerUuidTag = skullOwnerTag.remove("Id"); - UUID ownerUuid = UUIDIntArrayType.uuidFromIntArray(ownerUuidTag.getValue()); - skullOwnerTag.put(new StringTag("Id", ownerUuid.toString())); + if (ownerUuidTag != null) { + UUID ownerUuid = UUIDIntArrayType.uuidFromIntArray(ownerUuidTag.getValue()); + skullOwnerTag.put(new StringTag("Id", ownerUuid.toString())); + } // SkullOwner -> Owner CompoundTag ownerTag = new CompoundTag("Owner");