diff options
author | Linnea Gräf <nea@nea.moe> | 2024-08-12 22:15:07 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-08-12 22:15:07 +0200 |
commit | b8a45b9a0438a12ba3c609f6e416d519829471be (patch) | |
tree | aff190bb953d94f1187896b2c245644a29e6badf /src/main/java/moe/nea/firmament/mixins/custompayload/CustomPayloadEventDispatcher.java | |
parent | 3c7e6b6177de6ef3cff8a46bb1726466a299cdde (diff) | |
download | firmament-b8a45b9a0438a12ba3c609f6e416d519829471be.tar.gz firmament-b8a45b9a0438a12ba3c609f6e416d519829471be.tar.bz2 firmament-b8a45b9a0438a12ba3c609f6e416d519829471be.zip |
Improve location and profile detection
Diffstat (limited to 'src/main/java/moe/nea/firmament/mixins/custompayload/CustomPayloadEventDispatcher.java')
-rw-r--r-- | src/main/java/moe/nea/firmament/mixins/custompayload/CustomPayloadEventDispatcher.java | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/main/java/moe/nea/firmament/mixins/custompayload/CustomPayloadEventDispatcher.java b/src/main/java/moe/nea/firmament/mixins/custompayload/CustomPayloadEventDispatcher.java deleted file mode 100644 index 2084821..0000000 --- a/src/main/java/moe/nea/firmament/mixins/custompayload/CustomPayloadEventDispatcher.java +++ /dev/null @@ -1,22 +0,0 @@ - -package moe.nea.firmament.mixins.custompayload; - -import moe.nea.firmament.apis.ingame.FirmamentCustomPayload; -import moe.nea.firmament.events.FirmamentCustomPayloadEvent; -import net.minecraft.client.network.ClientCommonNetworkHandler; -import net.minecraft.network.packet.s2c.common.CustomPayloadS2CPacket; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -@Mixin(value = ClientCommonNetworkHandler.class, priority = 500) -public class CustomPayloadEventDispatcher { - @Inject(method = "onCustomPayload(Lnet/minecraft/network/packet/s2c/common/CustomPayloadS2CPacket;)V", at = @At("HEAD"), cancellable = true) - private void handleFirmamentParsedPayload(CustomPayloadS2CPacket packet, CallbackInfo ci) { - if (packet.payload() instanceof FirmamentCustomPayload customPayload) { - FirmamentCustomPayloadEvent.Companion.publishSync(new FirmamentCustomPayloadEvent(customPayload)); - ci.cancel(); - } - } -} |