diff --git a/src/main/java/net/querz/mcaselector/version/anvil120/Anvil120ChunkRelocator.java b/src/main/java/net/querz/mcaselector/version/anvil120/Anvil120ChunkRelocator.java index dbb80efa..425728e9 100644 --- a/src/main/java/net/querz/mcaselector/version/anvil120/Anvil120ChunkRelocator.java +++ b/src/main/java/net/querz/mcaselector/version/anvil120/Anvil120ChunkRelocator.java @@ -196,9 +196,10 @@ static void applyOffsetToItem(CompoundTag item, Point3i offset, int dataVersion) String id = Helper.stringFromCompound(item, "id", ""); switch (id) { case "minecraft:compass": - CompoundTag lodestoneTarget = Helper.tagFromCompound(components, "minecraft:lodestone_target"); - if (lodestoneTarget != null) { - IntArrayTag pos = lodestoneTarget.getIntArrayTag("pos"); + CompoundTag lodestoneTracker = Helper.tagFromCompound(components, "minecraft:lodestone_tracker"); + if (lodestoneTracker != null) { + CompoundTag target = Helper.tagFromCompound(lodestoneTracker, "target"); + IntArrayTag pos = target.getIntArrayTag("pos"); if (pos != null) { Helper.applyOffsetToIntArrayPos(pos, offset); } diff --git a/src/main/java/net/querz/mcaselector/version/anvil121/Anvil121ChunkRelocator.java b/src/main/java/net/querz/mcaselector/version/anvil121/Anvil121ChunkRelocator.java index 1823d73e..f4222a99 100644 --- a/src/main/java/net/querz/mcaselector/version/anvil121/Anvil121ChunkRelocator.java +++ b/src/main/java/net/querz/mcaselector/version/anvil121/Anvil121ChunkRelocator.java @@ -189,10 +189,13 @@ static void applyOffsetToItem(CompoundTag item, Point3i offset) { String id = Helper.stringFromCompound(item, "id", ""); switch (id) { case "minecraft:compass": - CompoundTag lodestoneTarget = Helper.tagFromCompound(components, "minecraft:lodestone_target"); - IntArrayTag pos = lodestoneTarget.getIntArrayTag("pos"); - if (pos != null) { - Helper.applyOffsetToIntArrayPos(pos, offset); + CompoundTag lodestoneTracker = Helper.tagFromCompound(components, "minecraft:lodestone_tracker"); + if (lodestoneTracker != null) { + CompoundTag target = Helper.tagFromCompound(lodestoneTracker, "target"); + IntArrayTag pos = target.getIntArrayTag("pos"); + if (pos != null) { + Helper.applyOffsetToIntArrayPos(pos, offset); + } } break; }