Skip to content

Commit

Permalink
Fix Querz#508 by update lodestone_target to lodestone_tracker
Browse files Browse the repository at this point in the history
  • Loading branch information
Nervonment committed Dec 3, 2024
1 parent bec215e commit 4e36b56
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 4e36b56

Please sign in to comment.