-
Notifications
You must be signed in to change notification settings - Fork 202
Description
Describe the bug
I ran an SMP with a couple of friends. As part of an event, many Compass items that point to Lodestones were given to players. During the event, one of the Lodestones was broken, which caused some of the compasses to point in wild directions. These broken compasses were eventually put into players' chests in the main woodland mansion where we all live. Supposedly, these compasses have an invalid minecraft:lodestone_target
NBT/Component value. Unfortunately, when attempting to import these chunks, MCA Selector fails with the following error:
22:32:40.171 [processPool-thread-3] WARN ChunkImporter: failed to process chunk import for r.-2.3.mca
java.lang.NullPointerException: Cannot invoke "net.querz.nbt.CompoundTag.getIntArrayTag(String)" because "lodestoneTarget" is null
at net.querz.mcaselector.version.anvil120.Anvil120ChunkRelocator.applyOffsetToItem(Anvil120ChunkRelocator.java:200) ~[mcaselector.jar:?]
at net.querz.mcaselector.version.anvil120.Anvil120ChunkRelocator.lambda$applyOffsetToTileEntity$6(Anvil120ChunkRelocator.java:180) ~[mcaselector.jar:?]
at java.lang.Iterable.forEach(Unknown Source) ~[?:?]
at net.querz.mcaselector.version.anvil120.Anvil120ChunkRelocator.applyOffsetToTileEntity(Anvil120ChunkRelocator.java:180) ~[mcaselector.jar:?]
at net.querz.mcaselector.version.anvil120.Anvil120ChunkRelocator.lambda$relocate$0(Anvil120ChunkRelocator.java:28) ~[mcaselector.jar:?]
at java.lang.Iterable.forEach(Unknown Source) ~[?:?]
at net.querz.mcaselector.version.anvil120.Anvil120ChunkRelocator.relocate(Anvil120ChunkRelocator.java:28) ~[mcaselector.jar:?]
at net.querz.mcaselector.io.mca.RegionChunk.relocate(RegionChunk.java:23) ~[mcaselector.jar:?]
at net.querz.mcaselector.io.mca.MCAFile.mergeChunksInto(MCAFile.java:450) ~[mcaselector.jar:?]
at net.querz.mcaselector.io.mca.RegionMCAFile.mergeChunksInto(RegionMCAFile.java:37) ~[mcaselector.jar:?]
at net.querz.mcaselector.io.job.ChunkImporter$MCAChunkImporterProcessJob.execute(ChunkImporter.java:358) ~[mcaselector.jar:?]
at net.querz.mcaselector.io.job.ProcessDataJob.run(ProcessDataJob.java:81) ~[mcaselector.jar:?]
at net.querz.mcaselector.io.JobHandler$WrapperJob.run(JobHandler.java:231) ~[mcaselector.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?]
at java.lang.Thread.run(Unknown Source) ~[?:?]
To Reproduce
Steps to reproduce the behavior:
- Create a Compass item that has an invalid
minecraft:lodestone_target
NBT/Component value by making it target a Lodestone, then breaking the Lodestone - Store this Compass item in a Chest
- Save and exit the game
- Export the chunks that contain the Chest
- Attempt to import the chunks that you just exported
Expected behavior
Chunks that have chests/containers containing Compass items that point to now-broken Lodestones should import into MCA Selector without failing or generating an error.
Screenshots and other files
If applicable, add screenshots to help explain your problem.
Relevant world files ('.mca'-files) and selection files ('.csv'-files) must be bundled in a '.zip'-archive.
To create the 'debug.log' file, follow these steps:
- Enable 'Print debug messages' in 'File'-->'Settings'.
- Restart MCA Selector.
- Reproduce the problem.
- Close MCA Selector and attach the 'debug.log' file to this bug report.
Here is the full debug log of opening a world and attempting to import world-exported-chunks
. I have also attached the full world file directly from the server, note the offending chunks are (-4, 1) through (-1, 5).
mcaselector.log
world-exported-chunks.zip
world.zip
Environment (please complete the following information):
- OS: Windows 11 Pro 23H2
- Java version: Zulu 21.32+17 392915b5-88b6-443f-912c-1b91f5e5d488
- Version of MCA Selector: 2.4.1
Additional context
Add any other context about the problem here, e.g.:
- Minecraft version used to generate affected parts of your world.
- Relevant debug messages from Minecraft.
- Mods used that change Minecraft save files or add blocks to the game.
- Previously used programs to alter the world files.
This world was generated with and on a ~vanilla Minecraft 1.20.6 server. The world works fine inside of Minecraft and produces no notable log messages. The world has previously been modified with WorldEdit and a custom Fabric mod, but this has had seemingly no effect on the world's integrity. I have not used any external programs to edit or view the world.