-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(mod): add MixinServerGamePacketListenerImpl.java to git
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
versions/src/main/java/su/plo/slib/mod/mixin/MixinServerGamePacketListenerImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package su.plo.slib.mod.mixin; | ||
|
||
//#if FORGE | ||
//#if MC<12002 | ||
//$$ import net.minecraft.network.protocol.game.ServerboundCustomPayloadPacket; | ||
//$$ import net.minecraft.server.level.ServerPlayer; | ||
//$$ import net.minecraft.server.network.ServerGamePacketListenerImpl; | ||
//$$ 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.Inject; | ||
//$$ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
//$$ import su.plo.slib.mod.mixinkt.MixinServerGamePacketListenerImplKt; | ||
//$$ | ||
//$$ @Mixin(ServerGamePacketListenerImpl.class) | ||
//$$ public abstract class MixinServerGamePacketListenerImpl { | ||
//$$ | ||
//$$ @Shadow public ServerPlayer player; | ||
//$$ | ||
//$$ @Inject(method = "handleCustomPayload", at = @At("HEAD")) | ||
//$$ public void handleCustomPayload(ServerboundCustomPayloadPacket packet, CallbackInfo ci) { | ||
//$$ MixinServerGamePacketListenerImplKt.INSTANCE.handleCustomPayload(player, packet); | ||
//$$ } | ||
//$$ } | ||
//#endif | ||
//#endif |