]> git.lizzy.rs Git - BoundingBoxOutlineReloaded.git/blobdiff - src/main/java/com/irtimaled/bbor/mixin/network/play/client/MixinCPacketCustomPayload.java
Upgrade to 1.14.2
[BoundingBoxOutlineReloaded.git] / src / main / java / com / irtimaled / bbor / mixin / network / play / client / MixinCPacketCustomPayload.java
index a53d2db102849d5bdb527b3ad110bb2bccff8a6a..2bcbd71cda3b202028a274b33e8a2200fbbffc72 100644 (file)
@@ -2,24 +2,24 @@ package com.irtimaled.bbor.mixin.network.play.client;
 
 import com.irtimaled.bbor.common.interop.CommonInterop;
 import com.irtimaled.bbor.common.messages.SubscribeToServer;
-import net.minecraft.network.NetHandlerPlayServer;
-import net.minecraft.network.play.INetHandlerPlayServer;
-import net.minecraft.network.play.client.CPacketCustomPayload;
+import net.minecraft.network.play.IServerPlayNetHandler;
+import net.minecraft.network.play.ServerPlayNetHandler;
+import net.minecraft.network.play.client.CCustomPayloadPacket;
 import net.minecraft.util.ResourceLocation;
 import org.spongepowered.asm.mixin.Mixin;
 import org.spongepowered.asm.mixin.Shadow;
 import org.spongepowered.asm.mixin.injection.At;
 import org.spongepowered.asm.mixin.injection.Redirect;
 
-@Mixin(CPacketCustomPayload.class)
+@Mixin(CCustomPayloadPacket.class)
 public class MixinCPacketCustomPayload {
     @Shadow
     private ResourceLocation channel;
 
-    @Redirect(method = "processPacket", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/play/INetHandlerPlayServer;processCustomPayload(Lnet/minecraft/network/play/client/CPacketCustomPayload;)V"))
-    private void processPacket(INetHandlerPlayServer netHandlerPlayServer, CPacketCustomPayload packet) {
+    @Redirect(method = "processPacket", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/play/IServerPlayNetHandler;processCustomPayload(Lnet/minecraft/network/play/client/CCustomPayloadPacket;)V"))
+    private void processPacket(IServerPlayNetHandler netHandlerPlayServer, CCustomPayloadPacket packet) {
         if (this.channel.toString().equals(SubscribeToServer.NAME)) {
-            CommonInterop.playerSubscribed(((NetHandlerPlayServer) netHandlerPlayServer).player);
+            CommonInterop.playerSubscribed(((ServerPlayNetHandler) netHandlerPlayServer).player);
         } else {
             netHandlerPlayServer.processCustomPayload(packet);
         }