Skip to content

Commit

Permalink
Thank you mojang very cool
Browse files Browse the repository at this point in the history
  • Loading branch information
Tides committed Jun 7, 2024
1 parent 8703377 commit 3f8b497
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions Obsidian/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -588,11 +588,11 @@ internal async Task SendInfoAsync()

await SendTimeUpdateAsync();
await SendWeatherUpdateAsync();
//await QueuePacketAsync(new SetContainerContentPacket(0, Player.Inventory.ToList())
//{
// StateId = Player.Inventory.StateId++,
// CarriedItem = Player.GetHeldItem(),
//});
await QueuePacketAsync(new SetContainerContentPacket(0, Player.Inventory.ToList())
{
StateId = Player.Inventory.StateId++,
CarriedItem = Player.GetHeldItem(),
});

await QueuePacketAsync(new SetEntityMetadataPacket
{
Expand Down
10 changes: 5 additions & 5 deletions Obsidian/Net/MinecraftStream.Writing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -691,12 +691,12 @@ public void WriteCommandNode(CommandNode value)
public void WriteItemStack(ItemStack value)
{
value ??= new ItemStack(0, 0) { Present = true };
WriteBoolean(value.Present);
if (value.Present)
{
var item = value.AsItem();

WriteVarInt(item.Id);
var item = value.AsItem();
WriteVarInt(item.Id);

if (item.Id != 0)
{
WriteByte((sbyte)value.Count);

NbtWriter writer = new(this, true);
Expand Down

0 comments on commit 3f8b497

Please sign in to comment.