mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Added enchanting
This commit is contained in:
parent
d222d5f683
commit
4dc1b420f5
12 changed files with 474 additions and 1 deletions
|
|
@ -1364,6 +1364,13 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
handler.OnWindowItems(windowId, inventorySlots, stateId);
|
||||
}
|
||||
break;
|
||||
case PacketTypesIn.WindowProperty:
|
||||
byte containerId = dataTypes.ReadNextByte(packetData);
|
||||
short propertyId = dataTypes.ReadNextShort(packetData);
|
||||
short propertyValue = dataTypes.ReadNextShort(packetData);
|
||||
|
||||
handler.OnWindowProperties(containerId, propertyId, propertyValue);
|
||||
break;
|
||||
case PacketTypesIn.SetSlot:
|
||||
if (handler.GetInventoryEnabled())
|
||||
{
|
||||
|
|
@ -2866,6 +2873,21 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
catch (ObjectDisposedException) { return false; }
|
||||
}
|
||||
|
||||
public bool ClickContainerButton(int windowId, int buttonId)
|
||||
{
|
||||
try
|
||||
{
|
||||
List<byte> packet = new();
|
||||
packet.Add((byte)windowId);
|
||||
packet.Add((byte)buttonId);
|
||||
SendPacket(PacketTypesOut.ClickWindowButton, packet);
|
||||
return true;
|
||||
}
|
||||
catch (SocketException) { return false; }
|
||||
catch (System.IO.IOException) { return false; }
|
||||
catch (ObjectDisposedException) { return false; }
|
||||
}
|
||||
|
||||
public bool SendAnimation(int animation, int playerid)
|
||||
{
|
||||
try
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue