From a29e88f535b0ec9695f0c42aca1a9b96c0aad180 Mon Sep 17 00:00:00 2001 From: KennyTV <28825609+KennyTV@users.noreply.github.com> Date: Wed, 22 May 2019 19:55:19 +0200 Subject: [PATCH] Make 'em blocks placeable again! --- .../viabackwards/api/entities/types/EntityType1_13.java | 2 +- .../matsv/viabackwards/api/rewriters/BlockItemRewriter.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/nl/matsv/viabackwards/api/entities/types/EntityType1_13.java b/core/src/main/java/nl/matsv/viabackwards/api/entities/types/EntityType1_13.java index 3424363a..752aca0f 100644 --- a/core/src/main/java/nl/matsv/viabackwards/api/entities/types/EntityType1_13.java +++ b/core/src/main/java/nl/matsv/viabackwards/api/entities/types/EntityType1_13.java @@ -287,7 +287,7 @@ public class EntityType1_13 { FISHIHNG_HOOK(90, EntityType.FISHING_BOBBER), SPECTRAL_ARROW(91, EntityType.SPECTRAL_ARROW), DRAGON_FIREBALL(93, EntityType.DRAGON_FIREBALL), - TRIDENT(94, EntityType.TRIDENT); + TRIDENT(94, EntityType.ARROW); private final int id; private final EntityType type; diff --git a/core/src/main/java/nl/matsv/viabackwards/api/rewriters/BlockItemRewriter.java b/core/src/main/java/nl/matsv/viabackwards/api/rewriters/BlockItemRewriter.java index 92657638..fffd4ba4 100644 --- a/core/src/main/java/nl/matsv/viabackwards/api/rewriters/BlockItemRewriter.java +++ b/core/src/main/java/nl/matsv/viabackwards/api/rewriters/BlockItemRewriter.java @@ -88,8 +88,9 @@ public abstract class BlockItemRewriter extends Rew } protected Item handleItemToServer(Item item) { - if (item == null || item.getTag() == null) - return null; + if (item == null) return null; + if (item.getTag() == null) return item; + CompoundTag tag = item.getTag(); if (tag.contains("ViaBackwards|" + getProtocolName())) { CompoundTag via = tag.get("ViaBackwards|" + getProtocolName());