fr.zcraft.imageonmap.quartzlib.tools.reflection.NMSException: Cannot set item stack tags
manul694 opened this issue ยท 3 comments
Video with this problem: https://youtu.be/3btjNlDeZFI
1x1 maps working perfectly
error:
[20:16:09 WARN]: [ImageOnMap] CraftItem failed
fr.zcraft.imageonmap.quartzlib.tools.reflection.NMSException: Cannot set item stack tags
at fr.zcraft.imageonmap.quartzlib.components.nbt.NBT.addToItemStack(NBT.java:241) ~[ImageOnMap-4.2.2 (3).jar:?]
at fr.zcraft.imageonmap.quartzlib.tools.items.ItemStackBuilder.craftItem(ItemStackBuilder.java:264) ~[ImageOnMap-4.2.2 (3).jar:?]
at fr.moribus.imageonmap.ui.SplatterMapManager.lambda$placeSplatterMap$0(SplatterMapManager.java:249) ~[ImageOnMap-4.2.2 (3).jar:?]
at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.18.2.jar:git-Purpur-1623]
at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483) ~[purpur-1.18.2.jar:git-Purpur-1623]
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1558) ~[purpur-1.18.2.jar:git-Purpur-1623]
at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:522) ~[purpur-1.18.2.jar:git-Purpur-1623]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1482) ~[purpur-1.18.2.jar:git-Purpur-1623]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1246) ~[purpur-1.18.2.jar:git-Purpur-1623]
at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:320) ~[purpur-1.18.2.jar:git-Purpur-1623]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: fr.zcraft.imageonmap.quartzlib.tools.reflection.NMSException: Unable to retrieve NBT data
at fr.zcraft.imageonmap.quartzlib.components.nbt.NBT.fromItemStack(NBT.java:77) ~[ImageOnMap-4.2.2 (3).jar:?]
at fr.zcraft.imageonmap.quartzlib.components.nbt.NBT.addToItemStack(NBT.java:211) ~[ImageOnMap-4.2.2 (3).jar:?]
... 10 more
Caused by: fr.zcraft.imageonmap.quartzlib.tools.reflection.NMSException: Unable to retrieve NBT tag from item
at fr.zcraft.imageonmap.quartzlib.components.nbt.NBT.getMcNBTCompound(NBT.java:340) ~[ImageOnMap-4.2.2 (3).jar:?]
at fr.zcraft.imageonmap.quartzlib.components.nbt.NBT.fromItemStack(NBT.java:75) ~[ImageOnMap-4.2.2 (3).jar:?]
at fr.zcraft.imageonmap.quartzlib.components.nbt.NBT.addToItemStack(NBT.java:211) ~[ImageOnMap-4.2.2 (3).jar:?]
... 10 more
Caused by: java.lang.NoSuchFieldException: tag
at java.lang.Class.getDeclaredField(Class.java:2610) ~[?:?]
at fr.zcraft.imageonmap.quartzlib.tools.reflection.Reflection.getField(Reflection.java:170) ~[ImageOnMap-4.2.2 (3).jar:?]
at fr.zcraft.imageonmap.quartzlib.tools.reflection.Reflection.getFieldValue(Reflection.java:137) ~[ImageOnMap-4.2.2 (3).jar:?]
at fr.zcraft.imageonmap.quartzlib.components.nbt.NBT.getMcNBTCompound(NBT.java:324) ~[ImageOnMap-4.2.2 (3).jar:?]
at fr.zcraft.imageonmap.quartzlib.components.nbt.NBT.fromItemStack(NBT.java:75) ~[ImageOnMap-4.2.2 (3).jar:?]
at fr.zcraft.imageonmap.quartzlib.components.nbt.NBT.addToItemStack(NBT.java:211) ~[ImageOnMap-4.2.2 (3).jar:?]
... 10 more
zDevelopers/QuartzLib/pull/87 fixed this for 1.18.2 but the problem occurs again on 1.19, so QuartzLib is the issue. If anyone here knows anything about method names for NBTCompound on an ItemStack this seems like an easy fix, I may try doing it myself later.
Duplicate of #255