mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Rename Action to EntityActionType, Apply Rename refactoring.
This commit is contained in:
parent
222a552c88
commit
0cd7f2043b
5 changed files with 9 additions and 9 deletions
|
|
@ -674,14 +674,14 @@ namespace MinecraftClient
|
|||
/// </summary>
|
||||
protected bool Sneak(bool on)
|
||||
{
|
||||
return SendEntityAction(on ? Protocol.ActionType.StartSneaking : Protocol.ActionType.StopSneaking);
|
||||
return SendEntityAction(on ? Protocol.EntityActionType.StartSneaking : Protocol.EntityActionType.StopSneaking);
|
||||
}
|
||||
/// <summary>
|
||||
/// Send Entity Action
|
||||
/// </summary>
|
||||
private bool SendEntityAction(Protocol.ActionType action)
|
||||
private bool SendEntityAction(Protocol.EntityActionType entityAction)
|
||||
{
|
||||
return Handler.sendEntityAction(action);
|
||||
return Handler.sendEntityAction(entityAction);
|
||||
}
|
||||
/// <summary>
|
||||
/// SetSlot
|
||||
|
|
|
|||
|
|
@ -16,13 +16,13 @@ namespace MinecraftClient.Commands
|
|||
Console.WriteLine(command);
|
||||
if (sneaking)
|
||||
{
|
||||
var result = handler.sendEntityAction(Protocol.ActionType.StopSneaking);
|
||||
var result = handler.sendEntityAction(Protocol.EntityActionType.StopSneaking);
|
||||
sneaking = false;
|
||||
return result ? "Success" : "Fail";
|
||||
}
|
||||
else
|
||||
{
|
||||
var result = handler.sendEntityAction(Protocol.ActionType.StartSneaking);
|
||||
var result = handler.sendEntityAction(Protocol.EntityActionType.StartSneaking);
|
||||
sneaking = true;
|
||||
return result ? "Success" : "Fail";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1494,9 +1494,9 @@ namespace MinecraftClient
|
|||
/// Send the Entity Action packet with the Specified ID
|
||||
/// </summary>
|
||||
/// <returns>TRUE if the item was successfully used</returns>
|
||||
public bool sendEntityAction(ActionType action)
|
||||
public bool sendEntityAction(EntityActionType entityAction)
|
||||
{
|
||||
return handler.SendEntityAction(playerEntityID, (int) action);
|
||||
return handler.SendEntityAction(playerEntityID, (int) entityAction);
|
||||
}
|
||||
/// <summary>
|
||||
/// Use the item currently in the player's hand
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@
|
|||
<Compile Include="Mapping\Entity.cs" />
|
||||
<Compile Include="Mapping\EntityType.cs" />
|
||||
<Compile Include="Mapping\MaterialExtensions.cs" />
|
||||
<Compile Include="Protocol\Action.cs" />
|
||||
<Compile Include="Protocol\EntityActionType.cs" />
|
||||
<Compile Include="Protocol\Handlers\DataTypes.cs" />
|
||||
<Compile Include="Protocol\Handlers\PacketIncomingType.cs" />
|
||||
<Compile Include="Protocol\Handlers\PacketOutgoingType.cs" />
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ using System.Text;
|
|||
|
||||
namespace MinecraftClient.Protocol
|
||||
{
|
||||
public enum ActionType
|
||||
public enum EntityActionType
|
||||
{
|
||||
StartSneaking,
|
||||
StopSneaking,
|
||||
Loading…
Add table
Add a link
Reference in a new issue