From 3016e774ffa00e2ced2e9deb537ec3367aef822a Mon Sep 17 00:00:00 2001 From: PureGero Date: Wed, 18 Jul 2018 18:38:11 +1000 Subject: [PATCH] Skulls don't have 'Rot'; Painting names Skulls on walls don't always have a 'Rot' tag if it's rotation is 0. 'DonkeyKong', 'SkullAndRoses' and 'BurningSkull' weren't displaying. --- .../providers/PaintingProvider.java | 6 +++--- .../providers/blockentities/SkullHandler.java | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/providers/PaintingProvider.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/providers/PaintingProvider.java index be82ae206..10798027c 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/providers/PaintingProvider.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/providers/PaintingProvider.java @@ -28,14 +28,14 @@ public class PaintingProvider implements Provider { add("bust"); add("stage"); add("void"); - add("skull_and_roses"); + add("skullandroses"); add("wither"); add("fighters"); add("pointer"); add("pigscene"); - add("burning_skull"); + add("burningskull"); add("skeleton"); - add("donkey_kong"); + add("donkeykong"); } private void add(String motive) { diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/providers/blockentities/SkullHandler.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/providers/blockentities/SkullHandler.java index ab6b859b9..34d63f247 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/providers/blockentities/SkullHandler.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/providers/blockentities/SkullHandler.java @@ -23,7 +23,10 @@ public class SkullHandler implements BlockEntityProvider.BlockEntityHandler { int id = storage.get(position).getOriginal(); if (id >= SKULL_WALL_START && id <= SKULL_END) { - id += (byte) tag.get("SkullType").getValue() * 20 + (byte) tag.get("Rot").getValue(); + id += (byte) tag.get("SkullType").getValue() * 20; + if (tag.contains("Rot")) { + id += (byte) tag.get("Rot").getValue(); + } } else { System.out.println("Why does this block have the skull block entity? :(" + tag); return -1;