diff options
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()) + } +} |