mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
Added a command to (re)name items in the Anvil
This commit is contained in:
parent
9855e2e0f1
commit
fce12db33f
8 changed files with 174 additions and 0 deletions
|
|
@ -4150,6 +4150,29 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
}
|
||||
}
|
||||
|
||||
public bool SendRenameItem(string itemName)
|
||||
{
|
||||
try
|
||||
{
|
||||
List<byte> packet = new();
|
||||
packet.AddRange(dataTypes.GetString(itemName.Length > 50 ? itemName[..50] : itemName));
|
||||
SendPacket(PacketTypesOut.NameItem, packet);
|
||||
return true;
|
||||
}
|
||||
catch (SocketException)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
catch (System.IO.IOException)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
catch (ObjectDisposedException)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private byte[] GenerateSalt()
|
||||
{
|
||||
byte[] salt = new byte[8];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue