Amulet-Team / Amulet-Core

A Python library for reading and writing the Minecraft save formats. See Amulet for the actual editor.
https://www.amuletmc.com/
215 stars 33 forks source link

[Bug report] The coordinates of the block in blocks_tick was mistakenly changed while saving without doing not make any changes to it #286

Closed 3093FengMing closed 4 weeks ago

3093FengMing commented 2 months ago

Describe the bug The coordinates of the block in blocks_tick was mistakenly changed while saving without doing not make any changes to it. This seems to be the code about decode block_ticks, as you can see that it has been marked with TODO.

https://github.com/Amulet-Team/Amulet-Core/blob/ac72c15417c9bd86d9332d7a6488311ad1cb30ab/amulet/level/interfaces/chunk/anvil/anvil_1444.py#L159

To Reproduce Steps to reproduce the behavior:

  1. Load a save.
  2. Make some changes to the block_entities, but do not change the coordinates.
  3. Save it and you can see that the coordinates of the block in the blocks_tick has been changed

Expected behavior blocks_tick should not have made any changes.

Screenshots c.png

Desktop (please complete the following information):

Additional context Here is the region file and test command block is in chunk [0,0]. Google Drive

PREMIEREHELL commented 4 weeks ago

found the issue, simple typo , https://github.com/Amulet-Team/Amulet-Core/blob/ac72c15417c9bd86d9332d7a6488311ad1cb30ab/amulet/level/interfaces/chunk/anvil/anvil_na.py#L540