ProtocolLib

3M Downloads

ProtocolLib for CatServer, Magma and Mohist (Forge Support)

regix1 opened this issue ยท 12 comments

commented

Hello, I know this feature hasn't been mentioned since ProtocolLib 3.6.4 but I was wondering would it be possible to receive an update that makes ProtocolLib compatible with a forge server again?

Link:
CatServer
Magma
Mohist

The version of Minecraft that these servers are running on is 1.12.2 and they support more spigot and bukkit plugins then the old MCPC/Cauldron. I was wondering if some kind of support could be added back?

Thank you. (The reason for my Request is that (I AM) receiving errors while using protocolib with these versions of Minecraft and that is why I'm posting about this)

commented

Hi, I found that although ProtocolLib does load and seemingly work, there are issues identifying PacketType when receiving packets (sending not tested). This caused issues with plugins. I have found that IllegalStacks and FastLogin have encountered the issue.

Here is the stack trace from FastLogin: https://pastebin.com/sYJGCyup

From the debug message at first line, we can see that the packet "class" is: [class=PacketLoginInStart, id=0]

However, in the code, the condition if (packetEvent.getPacketType() packetType == START) evaluated to false and went to the else branch, trying to parse the packet as an encryption_begin packet, causing errors.

I understand that forge servers are not supposed to be supported, but it would be great if ProtocolLib works. ๐Ÿ˜ƒ

Related workaround fix: games647/FastLogin#360

commented

@NewbieOrange can you make a new ticket with that info?

commented

@NewbieOrange can you make a new ticket with that info?

Created new issue #858.

commented

One more thing, I see that there was a forum thread about Magma/CatServer awhile back (August 2019).
But it looks like nothing was done to update the plugin. I was wondering if there has been any progress?
#676

commented

I would also like to see Forge support again, Magma has so many possibilities, but I know it is difficult to tackle as well.

commented

protocollib doesnt support forge, this is out of scope, and such these hacks dont work

PRs are welcome tho I guess

commented

It doesn't seem like the MCPC/Cauldron successors have much traction. Same goes for Sponge, for that matter. Doesn't seem super worth it, at least at this point, to support it.

commented

@red0fireus give the latest build a shot and let me know if it works better

commented

I tried the most recent Dev Version. It allows me to connect to the server now, but plugins don't seem to register well with ProtocolLib. I noticed this with Lockette, IllegalStack and Orebfuscator. These plugins see ProtocolLib and hook in to the plugin, but don't utilize the plugin.

Here is the error code.

[11:25:32] [Netty Epoll Server IO #3/ERROR] [Minecraft]: [IllegalStack] Unhandled exception occured in onPacketReceiving(PacketEvent) for IllegalStack com.comphenix.protocol.reflect.FieldAccessException: No field with type int exists in class PacketPlayInPositionLook. at com.comphenix.protocol.reflect.StructureModifier.readInternal(StructureModifier.java:216) ~[ProtocolLib%20(1).jar:4.5.1-SNAPSHOT-b456] at com.comphenix.protocol.reflect.StructureModifier.read(StructureModifier.java:195) ~[ProtocolLib%20(1).jar:4.5.1-SNAPSHOT-b456] at listeners.pLisbListener$2.onPacketReceiving(pLisbListener.java:81) ~[IllegalStack.jar:?] at com.comphenix.protocol.injector.SortedPacketListenerList.invokeReceivingListener(SortedPacketListenerList.java:114) [ProtocolLib%20(1).jar:4.5.1-SNAPSHOT-b456] at com.comphenix.protocol.injector.SortedPacketListenerList.invokePacketRecieving(SortedPacketListenerList.java:67) [ProtocolLib%20(1).jar:4.5.1-SNAPSHOT-b456] at com.comphenix.protocol.injector.PacketFilterManager.handlePacket(PacketFilterManager.java:590) [ProtocolLib%20(1).jar:4.5.1-SNAPSHOT-b456] at com.comphenix.protocol.injector.PacketFilterManager.invokePacketRecieving(PacketFilterManager.java:557) [ProtocolLib%20(1).jar:4.5.1-SNAPSHOT-b456] at com.comphenix.protocol.injector.netty.ProtocolInjector.packetReceived(ProtocolInjector.java:350) [ProtocolLib%20(1).jar:4.5.1-SNAPSHOT-b456] at com.comphenix.protocol.injector.netty.ProtocolInjector.onPacketReceiving(ProtocolInjector.java:315) [ProtocolLib%20(1).jar:4.5.1-SNAPSHOT-b456] at com.comphenix.protocol.injector.netty.ChannelInjector.decode(ChannelInjector.java:538) [ProtocolLib%20(1).jar:4.5.1-SNAPSHOT-b456] at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:411) [minecraft_server.1.12.2.jar:?] at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248) [minecraft_server.1.12.2.jar:?] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [minecraft_server.1.12.2.jar:?] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [minecraft_server.1.12.2.jar:?] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [minecraft_server.1.12.2.jar:?] at com.comphenix.protocol.injector.netty.ChannelInjector$2.channelRead(ChannelInjector.java:259) [ProtocolLib%20(1).jar:4.5.1-SNAPSHOT-b456] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [minecraft_server.1.12.2.jar:?] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [minecraft_server.1.12.2.jar:?] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [minecraft_server.1.12.2.jar:?] at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293) [minecraft_server.1.12.2.jar:?] at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267) [minecraft_server.1.12.2.jar:?] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [minecraft_server.1.12.2.jar:?] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [minecraft_server.1.12.2.jar:?] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [minecraft_server.1.12.2.jar:?] at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293) [minecraft_server.1.12.2.jar:?] at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267) [minecraft_server.1.12.2.jar:?] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [minecraft_server.1.12.2.jar:?] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [minecraft_server.1.12.2.jar:?] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [minecraft_server.1.12.2.jar:?] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) [minecraft_server.1.12.2.jar:?] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [minecraft_server.1.12.2.jar:?] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [minecraft_server.1.12.2.jar:?] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [minecraft_server.1.12.2.jar:?] at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:287) [minecraft_server.1.12.2.jar:?] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [minecraft_server.1.12.2.jar:?] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [minecraft_server.1.12.2.jar:?] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [minecraft_server.1.12.2.jar:?] at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) [minecraft_server.1.12.2.jar:?] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [minecraft_server.1.12.2.jar:?] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [minecraft_server.1.12.2.jar:?] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) [minecraft_server.1.12.2.jar:?] at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:1017) [minecraft_server.1.12.2.jar:?] at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:394) [minecraft_server.1.12.2.jar:?] at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:299) [minecraft_server.1.12.2.jar:?] at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [minecraft_server.1.12.2.jar:?] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252] [11:25:32] [Netty Epoll Server IO #3/ERROR] [Minecraft]: Parameters: net.minecraft.network.play.client.CPacketPlayer$PositionRotation@73798500[ field_149479_a=896.3216859365814 field_149477_b=145.3590587110461 field_149478_c=1229.538329417423 field_149476_e=-50.696594 field_149473_f=0.1499479 field_149474_g=false field_149480_h=true field_149481_i=true ]

commented

Here's a better view of the error:
https://pastebin.com/T7aGjZLX

commented

The plugin is incompatible with your minecraft version

commented

It does look like ProtocolLib itself is working, so I'm going to count this as resolved on our end.