Rename Action to EntityActionType, Apply Rename refactoring.

This commit is contained in:
CarbonNeuron 2020-05-03 11:21:34 -05:00
parent 222a552c88
commit 0cd7f2043b
5 changed files with 9 additions and 9 deletions

View file

@ -674,14 +674,14 @@ namespace MinecraftClient
/// </summary> /// </summary>
protected bool Sneak(bool on) protected bool Sneak(bool on)
{ {
return SendEntityAction(on ? Protocol.ActionType.StartSneaking : Protocol.ActionType.StopSneaking); return SendEntityAction(on ? Protocol.EntityActionType.StartSneaking : Protocol.EntityActionType.StopSneaking);
} }
/// <summary> /// <summary>
/// Send Entity Action /// Send Entity Action
/// </summary> /// </summary>
private bool SendEntityAction(Protocol.ActionType action) private bool SendEntityAction(Protocol.EntityActionType entityAction)
{ {
return Handler.sendEntityAction(action); return Handler.sendEntityAction(entityAction);
} }
/// <summary> /// <summary>
/// SetSlot /// SetSlot

View file

@ -16,13 +16,13 @@ namespace MinecraftClient.Commands
Console.WriteLine(command); Console.WriteLine(command);
if (sneaking) if (sneaking)
{ {
var result = handler.sendEntityAction(Protocol.ActionType.StopSneaking); var result = handler.sendEntityAction(Protocol.EntityActionType.StopSneaking);
sneaking = false; sneaking = false;
return result ? "Success" : "Fail"; return result ? "Success" : "Fail";
} }
else else
{ {
var result = handler.sendEntityAction(Protocol.ActionType.StartSneaking); var result = handler.sendEntityAction(Protocol.EntityActionType.StartSneaking);
sneaking = true; sneaking = true;
return result ? "Success" : "Fail"; return result ? "Success" : "Fail";
} }

View file

@ -1494,9 +1494,9 @@ namespace MinecraftClient
/// Send the Entity Action packet with the Specified ID /// Send the Entity Action packet with the Specified ID
/// </summary> /// </summary>
/// <returns>TRUE if the item was successfully used</returns> /// <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> /// <summary>
/// Use the item currently in the player's hand /// Use the item currently in the player's hand

View file

@ -120,7 +120,7 @@
<Compile Include="Mapping\Entity.cs" /> <Compile Include="Mapping\Entity.cs" />
<Compile Include="Mapping\EntityType.cs" /> <Compile Include="Mapping\EntityType.cs" />
<Compile Include="Mapping\MaterialExtensions.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\DataTypes.cs" />
<Compile Include="Protocol\Handlers\PacketIncomingType.cs" /> <Compile Include="Protocol\Handlers\PacketIncomingType.cs" />
<Compile Include="Protocol\Handlers\PacketOutgoingType.cs" /> <Compile Include="Protocol\Handlers\PacketOutgoingType.cs" />

View file

@ -5,7 +5,7 @@ using System.Text;
namespace MinecraftClient.Protocol namespace MinecraftClient.Protocol
{ {
public enum ActionType public enum EntityActionType
{ {
StartSneaking, StartSneaking,
StopSneaking, StopSneaking,