mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-29 13:04:59 +00:00
Added Entity Action handling, and A TSneak command that will Toggle Sneak.
This commit is contained in:
parent
9dae40153c
commit
384c804e54
10 changed files with 176 additions and 5 deletions
|
|
@ -17,6 +17,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
ClientSettings,
|
||||
PluginMessage,
|
||||
TabComplete,
|
||||
EntityAction,
|
||||
PlayerPosition,
|
||||
PlayerPositionAndLook,
|
||||
TeleportConfirm,
|
||||
|
|
@ -27,4 +28,4 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
CloseWindow,
|
||||
PlayerBlockPlacement
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -239,6 +239,10 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
}
|
||||
else return "";
|
||||
}
|
||||
public bool SendEntityAction(int PlayerEntityID, int ActionID)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
private byte[] readNextByteArray()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -965,6 +965,22 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
catch (System.IO.IOException) { return false; }
|
||||
catch (ObjectDisposedException) { return false; }
|
||||
}
|
||||
|
||||
public bool SendEntityAction(int PlayerEntityID, int ActionID)
|
||||
{
|
||||
try
|
||||
{
|
||||
List<byte> fields = new List<byte>();
|
||||
fields.AddRange(dataTypes.GetVarInt(PlayerEntityID));
|
||||
fields.AddRange(dataTypes.GetVarInt(ActionID));
|
||||
fields.AddRange(dataTypes.GetVarInt(0));
|
||||
SendPacket(PacketOutgoingType.EntityAction, fields);
|
||||
return true;
|
||||
}
|
||||
catch (SocketException) { return false; }
|
||||
catch (System.IO.IOException) { return false; }
|
||||
catch (ObjectDisposedException) { return false; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Send a respawn packet to the server
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue