diff --git a/Obsidian/Assets/tags.json b/Obsidian/Assets/tags.json index ef2c2c3b7..20c240293 100644 --- a/Obsidian/Assets/tags.json +++ b/Obsidian/Assets/tags.json @@ -1,7 +1,7 @@ { "blocks/players_can_interact": { "name": "players_can_interact", - "type": "block", + "type": "blocks", "values": [ "minecraft:chest", "minecraft:ender_chest", diff --git a/Obsidian/Client.cs b/Obsidian/Client.cs index adc2dbe7a..483eb5db0 100644 --- a/Obsidian/Client.cs +++ b/Obsidian/Client.cs @@ -555,6 +555,7 @@ await QueuePacketAsync(new UpdateRecipeBookPacket await SendPlayerListDecoration(); await SendPlayerInfoAsync(); + await this.QueuePacketAsync(new GameEventPacket(ChangeGameStateReason.StartWaitingForLevelChunks)); await Player.UpdateChunksAsync(distance: 7); await SendInfoAsync(); await this.server.Events.PlayerJoin.InvokeAsync(new PlayerJoinEventArgs(Player, this.server, DateTimeOffset.Now)); diff --git a/Obsidian/Net/Packets/Play/Clientbound/SetCenterChunkPacket.cs b/Obsidian/Net/Packets/Play/Clientbound/SetCenterChunkPacket.cs index efa182897..34a542fec 100644 --- a/Obsidian/Net/Packets/Play/Clientbound/SetCenterChunkPacket.cs +++ b/Obsidian/Net/Packets/Play/Clientbound/SetCenterChunkPacket.cs @@ -2,7 +2,7 @@ namespace Obsidian.Net.Packets.Play.Clientbound; -// Source: https://wiki.vg/index.php?title=Protocol#Update_View_Position +// Source: https://wiki.vg/Protocol#Set_Center_Chunk public partial class SetCenterChunkPacket : IClientboundPacket { [Field(0), VarLength] diff --git a/Obsidian/Net/Packets/Play/Clientbound/SetDefaultSpawnPositionPacket.cs b/Obsidian/Net/Packets/Play/Clientbound/SetDefaultSpawnPositionPacket.cs index 30aba860a..efa732972 100644 --- a/Obsidian/Net/Packets/Play/Clientbound/SetDefaultSpawnPositionPacket.cs +++ b/Obsidian/Net/Packets/Play/Clientbound/SetDefaultSpawnPositionPacket.cs @@ -10,7 +10,7 @@ public partial class SetDefaultSpawnPositionPacket : IClientboundPacket [Field(1), DataFormat(typeof(float))] public Angle Angle { get; set; } - public int Id => 0x52; + public int Id => 0x54; public SetDefaultSpawnPositionPacket(VectorF position) { diff --git a/Obsidian/Net/Packets/Play/Serverbound/SetPlayerPositionAndRotationPacket.cs b/Obsidian/Net/Packets/Play/Serverbound/SetPlayerPositionAndRotationPacket.cs index bade2e589..e92b457a8 100644 --- a/Obsidian/Net/Packets/Play/Serverbound/SetPlayerPositionAndRotationPacket.cs +++ b/Obsidian/Net/Packets/Play/Serverbound/SetPlayerPositionAndRotationPacket.cs @@ -26,7 +26,7 @@ public async ValueTask HandleAsync(Server server, Player player) if (player.Position.ToChunkCoord() != player.LastPosition.ToChunkCoord()) { (int cx, int cz) = player.Position.ToChunkCoord(); - player.client.SendPacket(new SetCenterChunkPacket(cx, cz)); + await player.client.QueuePacketAsync(new SetCenterChunkPacket(cx, cz)); } player.LastPosition = player.Position; diff --git a/Obsidian/Net/Packets/Play/Serverbound/SetPlayerPositionPacket.cs b/Obsidian/Net/Packets/Play/Serverbound/SetPlayerPositionPacket.cs index c2387b18f..bb0fda817 100644 --- a/Obsidian/Net/Packets/Play/Serverbound/SetPlayerPositionPacket.cs +++ b/Obsidian/Net/Packets/Play/Serverbound/SetPlayerPositionPacket.cs @@ -31,7 +31,7 @@ public async ValueTask HandleAsync(Server server, Player player) { await player.UpdateChunksAsync(distance: player.ClientInformation.ViewDistance); (int cx, int cz) = player.Position.ToChunkCoord(); - player.client.SendPacket(new SetCenterChunkPacket(cx, cz)); + await player.client.QueuePacketAsync(new SetCenterChunkPacket(cx, cz)); } player.LastPosition = player.Position; diff --git a/Obsidian/Net/Packets/UpdateTagsPacket.cs b/Obsidian/Net/Packets/UpdateTagsPacket.cs index f92ab3e3a..e78e2c25b 100644 --- a/Obsidian/Net/Packets/UpdateTagsPacket.cs +++ b/Obsidian/Net/Packets/UpdateTagsPacket.cs @@ -7,7 +7,7 @@ public sealed partial class UpdateTagsPacket : IClientboundPacket public IDictionary Tags { get; } //TODO FOR RELOADS 0x74 for play state - public int Id { get; init; } = 0x08; + public int Id { get; init; } = 0x09; public static UpdateTagsPacket FromRegistry { get; } = new(Registries.TagsRegistry.Categories);