blob: 34334b65a2277a91877bd9318fd53cb922bd7d4f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
package moe.nea.notenoughupdates.mixins;
import moe.nea.notenoughupdates.events.WorldReadyEvent;
import net.minecraft.client.network.ClientPlayNetworkHandler;
import net.minecraft.network.packet.s2c.play.PlayerSpawnPositionS2CPacket;
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(ClientPlayNetworkHandler.class)
public class MixinClientPlayNetworkHandler {
@Inject(method = "onPlayerSpawnPosition", at = @At("RETURN"))
public void onOnPlayerSpawnPosition(PlayerSpawnPositionS2CPacket packet, CallbackInfo ci) {
WorldReadyEvent.Companion.publish(new WorldReadyEvent());
}
}
|