SkytAsul / GlowingEntities

An API to easily make Minecraft entities glow. No dependencies, compatible 1.17 -> 1.21.
MIT License
68 stars 9 forks source link

Player is kicked on 1.19.3 #1

Closed SamB440 closed 1 year ago

SamB440 commented 1 year ago

This looks like a remapping problem to me? $b seems like $Item: https://github.com/SkytAsul/GlowingEntities/blob/master/src/main/java/fr/skytasul/glowingentities/GlowingEntities.java#L373-L386. This didn't happen on our 1.19.2 server, only after we updated to 1.19.3 and version 1.1.3 of glowing entities. Server is based on Paper, we run custom server software, but the same problem happens on Paper 1.19.3 #362.

[15:55:16 INFO]: [GlowingEntities] [GlowingEntities] Found server version 1.19.3
[15:55:16 INFO]: [GlowingEntities] [GlowingEntities] Loaded mappings V1_19
[15:55:16 ERROR]: Packet encoding of packet ID 78 threw (skippable? false)
java.lang.ClassCastException: class net.minecraft.network.syncher.DataWatcher$Item cannot be cast to class net.minecraft.network.syncher.DataWatcher$b (net.minecraft.network.syncher.DataWatcher$Item and net.minecraft.network.syncher.DataWatcher$b are in unnamed module of loader java.net.URLClassLoader @25f38edc)
        at net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket.pack(ClientboundSetEntityDataPacket.java:17) ~[?:?]
        at net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket.write(ClientboundSetEntityDataPacket.java:38) ~[?:?]
        at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:41) ~[treaty-1.19.3.jar:git-Treaty-"852eadf"]
        at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:14) ~[treaty-1.19.3.jar:git-Treaty-"852eadf"]
        at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[netty-codec-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:120) ~[netty-codec-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:764) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:790) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:758) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1020) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:311) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.writeAndFlush(NettyChannelProxy.java:227) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.writeAndFlush(NettyChannelProxy.java:233) ~[ProtocolLib.jar:?]
        at net.minecraft.network.Connection.doSendPacket(Connection.java:459) ~[?:?]
        at net.minecraft.network.Connection.lambda$sendPacket$11(Connection.java:433) ~[?:?]
        at com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.lambda$proxyRunnable$2(NettyEventLoopProxy.java:48) ~[ProtocolLib.jar:?]
        at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[netty-common-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[netty-common-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[netty-common-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:403) ~[netty-transport-classes-epoll-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.82.Final.jar:4.1.82.Final]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
[15:55:16 WARN]: io.netty.handler.codec.EncoderException: java.lang.ClassCastException: class net.minecraft.network.syncher.DataWatcher$Item cannot be cast to class net.minecraft.network.syncher.DataWatcher$b (net.minecraft.network.syncher.DataWatcher$Item and net.minecraft.network.syncher.DataWatcher$b are in unnamed module of loader java.net.URLClassLoader @25f38edc)
[15:55:16 WARN]:        at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:125)
[15:55:16 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717)
[15:55:16 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709)
[15:55:16 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792)
[15:55:16 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702)
[15:55:16 WARN]:        at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:120)
[15:55:16 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717)
[15:55:16 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:764)
[15:55:16 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:790)
[15:55:16 WARN]:        at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:758)
[15:55:16 WARN]:        at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1020)
[15:55:16 WARN]:        at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:311)
[15:55:16 WARN]:        at ProtocolLib.jar//com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.writeAndFlush(NettyChannelProxy.java:227)
[15:55:16 WARN]:        at ProtocolLib.jar//com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.writeAndFlush(NettyChannelProxy.java:233)
[15:55:16 WARN]:        at net.minecraft.network.Connection.doSendPacket(Connection.java:459)
[15:55:16 WARN]:        at net.minecraft.network.Connection.lambda$sendPacket$11(Connection.java:433)
[15:55:16 WARN]:        at ProtocolLib.jar//com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.lambda$proxyRunnable$2(NettyEventLoopProxy.java:48)
[15:55:16 WARN]:        at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
[15:55:16 WARN]:        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
[15:55:16 WARN]:        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
[15:55:16 WARN]:        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:403)
[15:55:16 WARN]:        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
[15:55:16 WARN]:        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
[15:55:16 WARN]:        at java.base/java.lang.Thread.run(Thread.java:833)
[15:55:16 WARN]: Caused by: java.lang.ClassCastException: class net.minecraft.network.syncher.DataWatcher$Item cannot be cast to class net.minecraft.network.syncher.DataWatcher$b (net.minecraft.network.syncher.DataWatcher$Item and net.minecraft.network.syncher.DataWatcher$b are in unnamed module of loader java.net.URLClassLoader @25f38edc)
[15:55:16 WARN]:        at net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket.pack(ClientboundSetEntityDataPacket.java:17)
[15:55:16 WARN]:        at net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket.write(ClientboundSetEntityDataPacket.java:38)
[15:55:16 WARN]:        at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:41)
[15:55:16 WARN]:        at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:14)
[15:55:16 WARN]:        at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107)
[15:55:16 WARN]:        ... 23 more
SkytAsul commented 1 year ago

That's not a mapping problem. Are you sure you are running GlowingEntities 1.1.3?

SamB440 commented 1 year ago

Yes, I'm certain, I have this: implementation("io.github.skytasul:glowingentities:1.1.3")

And made sure to refresh gradle dependencies and clean and rebuild.

I also checked inside the jar, the .class files there are from December 10th, which is the last commit made to this repository.

SkytAsul commented 1 year ago

Well, I just tested with Paper #362, it worked like a charm. No issue when setting an entity to glow, changing its color, and resetting its glowing state. Try again without ProtocolLib, maybe it's that, idk.

SamB440 commented 1 year ago

Ah, yes, I'm stupid, it's a protocollib thing and a plugin was depending on some stuff regarding glow stuff.

Edit: here is the problem, and how it is solved https://www.spigotmc.org/threads/unable-to-modify-entity-metadata-packet-using-protocollib-1-19-3.582442/#post-4517187