diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/v1_20_3to1_20_5/rewriter/BlockItemPacketRewriter1_20_5.java b/common/src/main/java/com/viaversion/viaversion/protocols/v1_20_3to1_20_5/rewriter/BlockItemPacketRewriter1_20_5.java index 78170ddf9..c14ba1f21 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/v1_20_3to1_20_5/rewriter/BlockItemPacketRewriter1_20_5.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/v1_20_3to1_20_5/rewriter/BlockItemPacketRewriter1_20_5.java @@ -469,10 +469,11 @@ public final class BlockItemPacketRewriter1_20_5 extends ItemRewriter effectsTag = tag.getListTag("effects", CompoundTag.class); @@ -1047,12 +1048,14 @@ public final class BlockItemPacketRewriter1_20_5 extends ItemRewriter convertItemList(connection, data, tag, "ChargedProjectiles")); register(StructuredDataKey.BUNDLE_CONTENTS, (connection, data, tag) -> convertItemList(connection, data, tag, "Items")); register(StructuredDataKey.LODESTONE_TRACKER, (data, tag) -> { - final CompoundTag positionTag = new CompoundTag(); - tag.put("LodestonePos", positionTag); tag.putBoolean("LodestoneTracked", data.tracked()); - tag.putString("LodestoneDimension", data.position().dimension()); - positionTag.putInt("X", data.position().x()); - positionTag.putInt("Y", data.position().y()); - positionTag.putInt("Z", data.position().z()); + if (data.position() != null) { + final CompoundTag positionTag = new CompoundTag(); + positionTag.putInt("X", data.position().x()); + positionTag.putInt("Y", data.position().y()); + positionTag.putInt("Z", data.position().z()); + tag.put("LodestonePos", positionTag); + tag.putString("LodestoneDimension", data.position().dimension()); + } }); register(StructuredDataKey.FIREWORKS, (data, tag) -> { final CompoundTag fireworksTag = new CompoundTag();