diff options
author | nea <romangraef@gmail.com> | 2022-10-09 04:58:37 +0200 |
---|---|---|
committer | nea <romangraef@gmail.com> | 2022-10-09 04:58:37 +0200 |
commit | ebffedd08c3ce32b7cd4ef6314f3f0efce7fbf51 (patch) | |
tree | a56760fa212cd20fc7719b56d10a92ac33ffc27e /src/main/kotlin/moe/nea/notenoughupdates/mixins | |
parent | 4d73331a449f0b0647066f7dde0628730fe0e178 (diff) | |
download | Firmament-ebffedd08c3ce32b7cd4ef6314f3f0efce7fbf51.tar.gz Firmament-ebffedd08c3ce32b7cd4ef6314f3f0efce7fbf51.tar.bz2 Firmament-ebffedd08c3ce32b7cd4ef6314f3f0efce7fbf51.zip |
stuff
Diffstat (limited to 'src/main/kotlin/moe/nea/notenoughupdates/mixins')
-rw-r--r-- | src/main/kotlin/moe/nea/notenoughupdates/mixins/MixinClientPlayNetworkHandler.kt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/notenoughupdates/mixins/MixinClientPlayNetworkHandler.kt b/src/main/kotlin/moe/nea/notenoughupdates/mixins/MixinClientPlayNetworkHandler.kt new file mode 100644 index 0000000..b94ff65 --- /dev/null +++ b/src/main/kotlin/moe/nea/notenoughupdates/mixins/MixinClientPlayNetworkHandler.kt @@ -0,0 +1,17 @@ +package moe.nea.notenoughupdates.mixins + +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 +import net.minecraft.client.network.ClientPlayNetworkHandler +import net.minecraft.network.packet.s2c.play.PlayerSpawnPositionS2CPacket +import moe.nea.notenoughupdates.events.WorldReadyEvent + +@Mixin(ClientPlayNetworkHandler::class) +class MixinClientPlayNetworkHandler { + @Inject(method = ["onPlayerSpawnPosition"], at = [At("RETURN")]) + fun onOnPlayerSpawnPosition(packet: PlayerSpawnPositionS2CPacket, ci: CallbackInfo) { + WorldReadyEvent.publish(WorldReadyEvent()) + } +} |