BungeeForge Conflict
samuelask opened this issue · 3 comments
Minecraft 1.12.2
Forge
Im getting the following in my server console regularly
[17:40:56] [Netty Server IO #1/DEBUG] [mixin]: Mixing NettyVarint21FrameDecoderMixin from packetfixer.mixins.json into net.minecraft.network.NettyVarint21FrameDecoder
[17:40:56] [Netty Server IO #1/TRACE] [mixin]: Added class metadata for io/netty/handler/codec/ByteToMessageDecoder to metadata cache
[17:40:56] [Netty Server IO #1/DEBUG] [mixin]: Mixing Varint21LengthFieldPrependerMixin from packetfixer.mixins.json into net.minecraft.network.NettyVarint21FrameDecoder
[17:40:56] [Netty Server IO #1/DEBUG] [mixin]: Mixing Varint21FrameDecoderMixin from packetfixer.mixins.json into net.minecraft.network.NettyVarint21FrameDecoder
[17:40:56] [Netty Server IO #1/TRACE] [mixin]: Added class metadata for io/netty/buffer/ByteBuf to metadata cache
[17:40:56] [Netty Server IO #1/TRACE] [mixin]: Added class metadata for io/netty/channel/ChannelHandlerContext to metadata cache
[17:40:56] [Netty Server IO #1/WARN] [mixin]: @ModifyConstant conflict. Skipping packetfixer.mixins.json:Varint21LengthFieldPrependerMixin from owner unknown-owner->@ModifyConstant::newSize(I)I with priority 1000, already redirected by packetfixer.mixins.json:NettyVarint21FrameDecoderMixin from owner unknown-owner->@ModifyConstant::newSize$decode(I)I with priority 1000
[17:40:56] [Netty Server IO #1/DEBUG] [mixin]: packetfixer.mixins.json:Varint21FrameDecoderMixin from owner unknown-owner->@Inject::decode(Lio/netty/channel/ChannelHandlerContext;Lio/netty/buffer/ByteBuf;Ljava/util/List;Lorg/spongepowered/asm/mixin/injection/callback/CallbackInfo;)V doesn't use it's CallbackInfo
[17:40:56] [Netty Server IO #1/DEBUG] [mixin]: packetfixer.mixins.json:Varint21FrameDecoderMixin from owner unknown-owner->@Inject::decode(Lio/netty/channel/ChannelHandlerContext;Lio/netty/buffer/ByteBuf;Ljava/util/List;Lorg/spongepowered/asm/mixin/injection/callback/CallbackInfo;)V has 0 override(s) in child classes
[17:40:56] [Netty Server IO #1/DEBUG] [mixin]: packetfixer.mixins.json:Varint21FrameDecoderMixin from owner unknown-owner->@Inject::decode(Lio/netty/channel/ChannelHandlerContext;Lio/netty/buffer/ByteBuf;Ljava/util/List;Lorg/spongepowered/asm/mixin/injection/callback/CallbackInfo;)V won't be passed a CallbackInfo as a result
[17:40:56] [Netty Server IO #1/WARN] [mixin]: @ModifyConstant conflict. Skipping packetfixer.mixins.json:NettyVarint21FrameDecoderMixin from owner unknown-owner->@ModifyConstant::newSize$decode(I)I with priority 1000, already redirected by packetfixer.mixins.json:Varint21FrameDecoderMixin from owner unknown-owner->@ModifyConstant::newSize(I)I with priority 1001
[17:40:56] [Netty Server IO #1/DEBUG] [mixin]: Mixing NettyVarint21FrameEncoderMixin from packetfixer.mixins.json into net.minecraft.network.NettyVarint21FrameEncoder
[17:40:56] [Netty Server IO #1/TRACE] [mixin]: Added class metadata for io/netty/handler/codec/MessageToByteEncoder to metadata cache
[17:40:56] [Netty Server IO #1/TRACE] [mixin]: Added class metadata for io/netty/channel/ChannelOutboundHandlerAdapter to metadata cache
[17:40:56] [Netty Server IO #1/TRACE] [mixin]: Added class metadata for io/netty/channel/ChannelOutboundHandler to metadata cache
[17:40:56] [Netty Server IO #1/DEBUG] [mixin]: Mixing server.network.NetHandlerHandshakeTCP from bungeeforge.mixins.json into net.minecraft.server.network.NetHandlerHandshakeTCP
[17:40:56] [Netty Server IO #1/TRACE] [mixin]: Added class metadata for net/minecraft/network/handshake/INetHandlerHandshakeServer to metadata cache
[17:40:56] [Netty Server IO #1/DEBUG] [mixin]: bungeeforge.mixins.json:server.network.NetHandlerHandshakeTCP from owner bungeeforge->@Inject::bungee$processHandshake(Lnet/minecraft/network/handshake/client/C00Handshake;Lorg/spongepowered/asm/mixin/injection/callback/CallbackInfo;)V doesn't use it's CallbackInfo
[17:40:56] [Netty Server IO #1/DEBUG] [mixin]: bungeeforge.mixins.json:server.network.NetHandlerHandshakeTCP from owner bungeeforge->@Inject::bungee$processHandshake(Lnet/minecraft/network/handshake/client/C00Handshake;Lorg/spongepowered/asm/mixin/injection/callback/CallbackInfo;)V has 0 override(s) in child classes
[17:40:56] [Netty Server IO #1/DEBUG] [mixin]: bungeeforge.mixins.json:server.network.NetHandlerHandshakeTCP from owner bungeeforge->@Inject::bungee$processHandshake(Lnet/minecraft/network/handshake/client/C00Handshake;Lorg/spongepowered/asm/mixin/injection/callback/CallbackInfo;)V won't be passed a CallbackInfo as a result
When using the mod BungeeForge
It looks to me that both Packetfixer and BungeeForge mixins are trying to modify the same method in Netty’s internal packet handling code.
Since Mixin can only apply one such modification per constant or method, one of them is skipped.
Both mods are injecting mixins into the same constant NettyVarint21FrameDecoder
I would suggest a solution by resolving the mixin conflict manually by either changing the target method or adjusting priorities.
Alternatively in packetfixer.common.mixins.json the mixin Varint21FrameDecoderMixin and Varint21LengthFieldPrependerMixin could be removed safely.
I made a fork and applied the fix (or rather removed the mixins that were not necessary)
Im not seeing the errors anymore in my console, and players are connecting just fine.
Will wait and check for stability, can make a push after if this is something you want implemented :)
Made pull request
#71
Iv had a test server running for 2 days with players playing as normal. No issues.