Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fr.zcraft.imageonmap.quartzlib.tools.reflection.NMSException: Cannot set item stack tags #268

Open
manul694 opened this issue Jun 7, 2022 · 3 comments

Comments

@manul694
Copy link

manul694 commented Jun 7, 2022

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

@pacificminer
Copy link

Can confirm. Exact same issue I'm having; only 1x1 maps work.

@Zhincore
Copy link

Zhincore commented Jun 9, 2022

Duplicate of #255

@eyeb0l
Copy link

eyeb0l commented Jun 15, 2022

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.

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

No branches or pull requests

4 participants