mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Final code clean up and adding summary
This commit is contained in:
parent
221d2525be
commit
6ee16513e0
7 changed files with 113388 additions and 55 deletions
|
|
@ -597,7 +597,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
DeltaX = DeltaX / (128 * 32);
|
||||
DeltaY = DeltaY / (128 * 32);
|
||||
DeltaZ = DeltaZ / (128 * 32);
|
||||
handler.OnEntityPosition(EntityID, DeltaX, DeltaY, DeltaZ, OnGround);
|
||||
//handler.OnEntityPosition(EntityID, DeltaX, DeltaY, DeltaZ, OnGround);
|
||||
break;
|
||||
case PacketIncomingType.EntityProperties:
|
||||
EntityID = dataTypes.ReadNextVarInt(packetData);
|
||||
|
|
@ -632,6 +632,16 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
long TimeOfday = dataTypes.ReadNextLong(packetData);
|
||||
handler.OnTimeUpdate(WorldAge, TimeOfday);
|
||||
break;
|
||||
case PacketIncomingType.EntityTeleport:
|
||||
EntityID = dataTypes.ReadNextVarInt(packetData);
|
||||
X = dataTypes.ReadNextDouble(packetData);
|
||||
Y = dataTypes.ReadNextDouble(packetData);
|
||||
Z = dataTypes.ReadNextDouble(packetData);
|
||||
EntityYaw = dataTypes.ReadNextByte(packetData);
|
||||
EntityPitch = dataTypes.ReadNextByte(packetData);
|
||||
OnGround = dataTypes.ReadNextBool(packetData);
|
||||
handler.OnEntityTeleport(EntityID, X, Y, Z, OnGround);
|
||||
break;
|
||||
default:
|
||||
return false; //Ignored packet
|
||||
}
|
||||
|
|
@ -1122,6 +1132,12 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
}
|
||||
|
||||
// reinforce
|
||||
/// <summary>
|
||||
/// Send an Interact Entity Packet to server
|
||||
/// </summary>
|
||||
/// <param name="EntityID"></param>
|
||||
/// <param name="type"></param>
|
||||
/// <returns></returns>
|
||||
public bool SendInteractEntityPacket(int EntityID, int type)
|
||||
{
|
||||
try
|
||||
|
|
@ -1136,6 +1152,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
catch (System.IO.IOException) { return false; }
|
||||
catch (ObjectDisposedException) { return false; }
|
||||
}
|
||||
// TODO: Interact at block location
|
||||
public bool SendInteractEntityPacket(int EntityID, int type, float X, float Y, float Z, int hand)
|
||||
{
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue