Additional Enchanted Miner

Additional Enchanted Miner

22M Downloads

[Fabric][1.18] Quarry loses enchantment.

5cript opened this issue ยท 4 comments

commented

Describe the bug

I cannot reproduce this in single player, only multiplayer. I also use mining dimensions.
https://www.curseforge.com/minecraft/mc-mods/mining-dimensions-fabric
Quarry loses enchantments when broken or when the server restarts, i dont know which exactly.
The quarry also stop working on server restart.

Very detailed steps:

  • Craft quarry
  • Enchant in enchanting table
  • Enter mining dimension (used Mining Dim)
  • Setup Chunk marker range
  • place quarry and power
    -> Everything works as expected
  • (optional? Then i restarted the server)
  • Broke quarry
  • quarry no longer enchanted.

Versions

  • Minecraft version: 1.18
  • Single Player or Multi Player?: multi
  • Forge version: 0.12.10 loader, 0.44.0 api
  • QuarryPlus version: 18.0.455
  • Other mods: mining-dimensions-fabric
commented

I found these in my server startup log.

default -> throw new IllegalArgumentException("Invalid target nbt. " + tag);

[02:00:38] [Server thread/ERROR]: Failed to load data for block entity quarryplus:quarry
java.lang.IllegalArgumentException: Invalid target nbt. {area:{direction:"west",maxX:200,maxY:72,maxZ:-553,minX:71,minY:-63,minZ:-682},index:1353010,maxY:72,minY:-63}
        at com.yogpc.qp.machines.quarry.Target.fromNbt(Target.java:39) ~[AdditionalEnchantedMiner-1.18-fabric-18.0.457.jar:?]
        at com.yogpc.qp.machines.quarry.TileQuarry.method_11014(TileQuarry.java:97) ~[AdditionalEnchantedMiner-1.18-fabric-18.0.457.jar:?]
        at net.minecraft.class_2586.method_17897(class_2586.java:132) ~[server-intermediary.jar:?]
        at java.util.Optional.map(Optional.java:260) ~[?:?]
        at net.minecraft.class_2586.method_11005(class_2586.java:130) ~[server-intermediary.jar:?]
        at net.minecraft.class_2852.method_39797(class_2852.java:414) ~[server-intermediary.jar:?]
        at net.minecraft.class_2818.method_12206(class_2818.java:431) ~[server-intermediary.jar:?]
        at net.minecraft.class_3898.method_17227(class_3898.java:704) ~[server-intermediary.jar:?]
        at com.mojang.datafixers.util.Either.lambda$mapLeft$0(Either.java:162) ~[datafixerupper-4.0.26.jar:?]
        at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[datafixerupper-4.0.26.jar:?]
        at com.mojang.datafixers.util.Either.mapLeft(Either.java:162) ~[datafixerupper-4.0.26.jar:?]
        at net.minecraft.class_3898.method_20460(class_3898.java:692) ~[server-intermediary.jar:?]
        at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646) ~[?:?]
        at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?]
        at net.minecraft.class_3900.method_17634(class_3900.java:58) ~[server-intermediary.jar:?]
        at net.minecraft.class_1255.method_18859(class_1255.java:151) ~[server-intermediary.jar:?]
        at net.minecraft.class_3215$class_4212.method_18859(class_3215.java:552) ~[server-intermediary.jar:?]
        at net.minecraft.class_1255.method_16075(class_1255.java:125) ~[server-intermediary.jar:?]
        at net.minecraft.class_3215$class_4212.method_16075(class_3215.java:561) ~[server-intermediary.jar:?]
        at net.minecraft.class_3215.method_19492(class_3215.java:282) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_20415(MinecraftServer.java:768) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_16075(MinecraftServer.java:756) ~[server-intermediary.jar:?]
        at net.minecraft.class_1255.method_5383(class_1255.java:110) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_16208(MinecraftServer.java:740) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:688) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270) ~[server-intermediary.jar:?]
        at java.lang.Thread.run(Thread.java:833) [?:?]
[02:00:38] [Server thread/WARN]: Skipping BlockEntity with id quarryplus:quarry
[02:00:38] [Server thread/ERROR]: Failed to load data for block entity quarryplus:quarry
java.lang.IllegalArgumentException: Invalid target nbt. {area:{direction:"west",maxX:205,maxY:89,maxZ:-344,minX:76,minY:-63,minZ:-473},index:1338752,maxY:89,minY:-63}
        at com.yogpc.qp.machines.quarry.Target.fromNbt(Target.java:39) ~[AdditionalEnchantedMiner-1.18-fabric-18.0.457.jar:?]
        at com.yogpc.qp.machines.quarry.TileQuarry.method_11014(TileQuarry.java:97) ~[AdditionalEnchantedMiner-1.18-fabric-18.0.457.jar:?]
        at net.minecraft.class_2586.method_17897(class_2586.java:132) ~[server-intermediary.jar:?]
        at java.util.Optional.map(Optional.java:260) ~[?:?]
        at net.minecraft.class_2586.method_11005(class_2586.java:130) ~[server-intermediary.jar:?]
        at net.minecraft.class_2852.method_39797(class_2852.java:414) ~[server-intermediary.jar:?]
        at net.minecraft.class_2818.method_12206(class_2818.java:431) ~[server-intermediary.jar:?]
        at net.minecraft.class_3898.method_17227(class_3898.java:704) ~[server-intermediary.jar:?]
        at com.mojang.datafixers.util.Either.lambda$mapLeft$0(Either.java:162) ~[datafixerupper-4.0.26.jar:?]
        at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[datafixerupper-4.0.26.jar:?]
        at com.mojang.datafixers.util.Either.mapLeft(Either.java:162) ~[datafixerupper-4.0.26.jar:?]
        at net.minecraft.class_3898.method_20460(class_3898.java:692) ~[server-intermediary.jar:?]
        at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646) ~[?:?]
        at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?]
        at net.minecraft.class_3900.method_17634(class_3900.java:58) ~[server-intermediary.jar:?]
        at net.minecraft.class_1255.method_18859(class_1255.java:151) ~[server-intermediary.jar:?]
        at net.minecraft.class_3215$class_4212.method_18859(class_3215.java:552) ~[server-intermediary.jar:?]
        at net.minecraft.class_1255.method_16075(class_1255.java:125) ~[server-intermediary.jar:?]
        at net.minecraft.class_3215$class_4212.method_16075(class_3215.java:561) ~[server-intermediary.jar:?]
        at net.minecraft.class_3215.method_19492(class_3215.java:282) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_20415(MinecraftServer.java:768) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_16075(MinecraftServer.java:756) ~[server-intermediary.jar:?]
        at net.minecraft.class_1255.method_5383(class_1255.java:110) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_16208(MinecraftServer.java:740) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:688) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270) ~[server-intermediary.jar:?]
        at java.lang.Thread.run(Thread.java:833) [?:?]

commented

Thank you for this report. I didn't noticed that the target nbt was not set correctly in some cases. I will add some code to prevent this, and a way to reset the progress data for your world.

This may happen in single player world, but no one has save nbt in a situation where this bug happen.

commented

@Kotori316
There's no target value in

commented

Fixed. Try this