Skip to content

fix: write correct entity y/z coordinates when saving clipboard to disk - #3626

Open
NyaNexNah wants to merge 1 commit into
IntellectualSites:mainfrom
NyaNexNah:fix/entity-position-disk-clipboard
Open

fix: write correct entity y/z coordinates when saving clipboard to disk#3626
NyaNexNah wants to merge 1 commit into
IntellectualSites:mainfrom
NyaNexNah:fix/entity-position-disk-clipboard

Conversation

@NyaNexNah

@NyaNexNah NyaNexNah commented Aug 19, 2026

Copy link
Copy Markdown

Overview

Fixes a bug in DiskOptimizedClipboard where entity positions saved to a disk clipboard are corrupted. When writing entity NBT data, all three elements of the Pos list were set to the entity's x coordinate:

pos.add(new DoubleTag(entity.getLocation().x()));
pos.add(new DoubleTag(entity.getLocation().x())); // should be y
pos.add(new DoubleTag(entity.getLocation().x())); // should be z

The read side (loadNBTFromFileFooter()) correctly reads Pos[0..2] as x, y, z, so every entity loaded from a disk clipboard ends up with its y and z position replaced by x. This fixes the write side to use the y and z coordinates respectively.

Submitter Checklist

  • Make sure you are opening from a topic branch (/feature/fix/docs/ branch (right side)) and not your main branch.
  • Ensure that the pull request title represents the desired changelog entry.
  • New public fields and methods are annotated with @since TODO.
  • I read and followed the contribution guidelines.

@NyaNexNah
NyaNexNah requested a review from a team as a code owner August 19, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant