send tick info with client level data

This commit is contained in:
gnembon committed 2023-05-19 00:45:27 +02:00
1 parent b744956777
commit e140a5ddb0
2 files changed
+18 -3

No files matched your search

@@ -1,7 +1,9 @@
package carpet.mixins;
import carpet.CarpetServer;
import carpet.network.ServerNetworkHandler;
import net.minecraft.network.Connection;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.server.players.PlayerList;
import org.spongepowered.asm.mixin.Mixin;
@@ -18,4 +20,10 @@ public class PlayerList_coreMixin
{
CarpetServer.onPlayerLoggedIn(player);
}
@Inject(method = "sendLevelInfo", at = @At("RETURN"))
private void onLevelChanged(final ServerPlayer serverPlayer, final ServerLevel serverLevel, final CallbackInfo ci)
{
ServerNetworkHandler.sendPlayerLevelData(serverPlayer, serverLevel);
}
}