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

No field with type net.minecraft.server.v1_15_R1.DataWatcher exists in class PacketPlayOutSpawnEntityLiving #738

Closed
bundabrg opened this issue Dec 21, 2019 · 5 comments

Comments

@bundabrg
Copy link

bundabrg commented Dec 21, 2019

Description and relevant errors:

Dev of BetonQuest here. I'm having issues with 1.15.1 when spawning an armourstand.

10:27:33 [INFO] [s2-lobby] [10:27:33 WARN]: [BetonQuest] Task #224 for BetonQuest v1.11-dev generated an exception
10:27:33 [INFO] [s2-lobby] com.comphenix.protocol.reflect.FieldAccessException: No field with type net.minecraft.server.v1_15_R1.DataWatcher exists in class PacketPlayOutSpawnEntityLiving.
10:27:33 [INFO] [s2-lobby]     at com.comphenix.protocol.reflect.StructureModifier.writeInternal(StructureModifier.java:363) ~[?:?]
10:27:33 [INFO] [s2-lobby]     at com.comphenix.protocol.reflect.StructureModifier.write(StructureModifier.java:343) ~[?:?]
10:27:33 [INFO] [s2-lobby]     at pl.betoncraft.betonquest.compatibility.protocollib.wrappers.WrapperPlayServerSpawnEntityLiving.setMetadata(WrapperPlayServerSpawnEntityLiving.java:311) ~[?:?]
10:27:33 [INFO] [s2-lobby]     at pl.betoncraft.betonquest.compatibility.protocollib.conversation.MenuConvIO.start(MenuConvIO.java:190) ~[?:?]
10:27:33 [INFO] [s2-lobby]     at pl.betoncraft.betonquest.compatibility.protocollib.conversation.MenuConvIO.display(MenuConvIO.java:313) ~[?:?]
10:27:33 [INFO] [s2-lobby]     at pl.betoncraft.betonquest.conversation.Conversation$1.run(Conversation.java:269) ~[?:?]
10:27:33 [INFO] [s2-lobby]     at org.bukkit.craftbukkit.v1_15_R1.scheduler.CraftTask.run(CraftTask.java:84) ~[patched_1.15.1.jar:git-Paper-25]
10:27:33 [INFO] [s2-lobby]     at org.bukkit.craftbukkit.v1_15_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:452) ~[patched_1.15.1.jar:git-Paper-25]
10:27:33 [INFO] [s2-lobby]     at net.minecraft.server.v1_15_R1.MinecraftServer.b(MinecraftServer.java:1179) ~[patched_1.15.1.jar:git-Paper-25]
10:27:33 [INFO] [s2-lobby]     at net.minecraft.server.v1_15_R1.DedicatedServer.b(DedicatedServer.java:417) ~[patched_1.15.1.jar:git-Paper-25]
10:27:33 [INFO] [s2-lobby]     at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:1106) ~[patched_1.15.1.jar:git-Paper-25]
10:27:33 [INFO] [s2-lobby]     at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:933) ~[patched_1.15.1.jar:git-Paper-25]
10:27:33 [INFO] [s2-lobby]     at java.lang.Thread.run(Thread.java:834) [?:?]

The relevant line in BQ that triggers this which then calls the wrapper here

Let me know if I can provide any assistance.

@dmulloy2
Copy link
Owner

Mojang removed data watchers from the packet in 1.15. BQ needs to update and take that into account. Nothing we can do on the ProtocolLib side.

@bundabrg
Copy link
Author

Thanks, I'll do some research on what to change then. TBH I don't yet quite get Datawatchers and used it purely to make the armorstand invisible.

@SimonIT
Copy link

SimonIT commented Jan 11, 2020

Hello, I'm using a lib called NameTagChanger by Alvin-LB which uses DataWatchers at this line:
https://github.com/Alvin-LB/NameTagChanger/blob/80d19924bf492dfde0b4b7c1936a633e4a854bb9/src/main/java/com/bringholm/nametagchanger/ProtocolLibPacketHandler.java#L140
What's the alternative/solution so I can fix it myself? I'm not very familiar with ProtocolLib

@dmulloy2
Copy link
Owner

@SimonIT essentially you have to send a separate metadata packet with that data

@SimonIT
Copy link

SimonIT commented Jan 12, 2020

Thank you. I will try it

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

3 participants