]> git.lizzy.rs Git - BoundingBoxOutlineReloaded.git/blob - src/main/java/com/irtimaled/bbor/mixin/network/play/server/MixinSPacketSpawnPosition.java
Upgrade to 1.14.2
[BoundingBoxOutlineReloaded.git] / src / main / java / com / irtimaled / bbor / mixin / network / play / server / MixinSPacketSpawnPosition.java
1 package com.irtimaled.bbor.mixin.network.play.server;
2
3 import com.irtimaled.bbor.client.interop.ClientInterop;
4 import net.minecraft.network.play.server.SSpawnPositionPacket;
5 import net.minecraft.util.math.BlockPos;
6 import org.spongepowered.asm.mixin.Mixin;
7 import org.spongepowered.asm.mixin.Shadow;
8 import org.spongepowered.asm.mixin.injection.At;
9 import org.spongepowered.asm.mixin.injection.Inject;
10 import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
11
12 @Mixin(SSpawnPositionPacket.class)
13 public abstract class MixinSPacketSpawnPosition {
14     @Shadow
15     private BlockPos spawnBlockPos;
16
17     @Inject(method = "processPacket", at = @At("RETURN"))
18     private void afterProcessPacket(CallbackInfo ci) {
19         ClientInterop.updateWorldSpawnReceived(spawnBlockPos);
20     }
21 }