mirror of
https://github.com/ViaVersion/ViaFabric.git
synced 2024-12-24 16:47:36 +01:00
Use HandlerNames class for netty injection in 1.20.6
This commit is contained in:
parent
2c47fabcd5
commit
cb0d2aea88
@ -31,6 +31,7 @@ import io.netty.channel.ChannelPipeline;
|
|||||||
import io.netty.channel.socket.SocketChannel;
|
import io.netty.channel.socket.SocketChannel;
|
||||||
import net.minecraft.network.ClientConnection;
|
import net.minecraft.network.ClientConnection;
|
||||||
import net.minecraft.network.NetworkSide;
|
import net.minecraft.network.NetworkSide;
|
||||||
|
import net.minecraft.network.handler.HandlerNames;
|
||||||
import net.minecraft.network.handler.PacketSizeLogger;
|
import net.minecraft.network.handler.PacketSizeLogger;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
@ -38,7 +39,6 @@ import org.spongepowered.asm.mixin.injection.At;
|
|||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
|
|
||||||
@Mixin(ClientConnection.class)
|
@Mixin(ClientConnection.class)
|
||||||
public class MixinClientConnection {
|
public class MixinClientConnection {
|
||||||
@Shadow
|
@Shadow
|
||||||
@ -61,8 +61,8 @@ public class MixinClientConnection {
|
|||||||
protocolPipeline.add(HostnameParserProtocol.INSTANCE);
|
protocolPipeline.add(HostnameParserProtocol.INSTANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
pipeline.addBefore(clientSide ? "encoder" : "outbound_config", CommonTransformer.HANDLER_ENCODER_NAME, new FabricEncodeHandler(user));
|
pipeline.addBefore(clientSide ? HandlerNames.ENCODER : HandlerNames.OUTBOUND_CONFIG, CommonTransformer.HANDLER_ENCODER_NAME, new FabricEncodeHandler(user));
|
||||||
pipeline.addBefore(clientSide ? "inbound_config" : "decoder", CommonTransformer.HANDLER_DECODER_NAME, new FabricDecodeHandler(user));
|
pipeline.addBefore(clientSide ? HandlerNames.INBOUND_CONFIG : HandlerNames.DECODER, CommonTransformer.HANDLER_DECODER_NAME, new FabricDecodeHandler(user));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user