mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Fixed Auto Fishing not working
Fixed Auto Fishing not working
This commit is contained in:
commit
4ff7712f20
1 changed files with 6 additions and 9 deletions
|
|
@ -502,9 +502,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
entityZ = ReadNextDouble(cache); // Z
|
||||
}
|
||||
|
||||
|
||||
int metadata = -1;
|
||||
bool hasData = false;
|
||||
int data = -1;
|
||||
byte entityPitch, entityYaw;
|
||||
|
||||
if (living)
|
||||
|
|
@ -522,15 +520,14 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
entityYaw = ReadNextByte(cache); // Head Yaw
|
||||
|
||||
// Data
|
||||
if (protocolversion >= Protocol18Handler.MC_1_19_Version)
|
||||
ReadNextVarInt(cache);
|
||||
else hasData = ReadNextInt(cache) == 1;
|
||||
data = protocolversion >= Protocol18Handler.MC_1_19_Version
|
||||
? ReadNextVarInt(cache) : ReadNextInt(cache);
|
||||
}
|
||||
|
||||
// In 1.8 those 3 fields for Velocity are optional
|
||||
if (protocolversion < Protocol18Handler.MC_1_9_Version)
|
||||
{
|
||||
if (hasData)
|
||||
if (data != 0)
|
||||
{
|
||||
ReadNextShort(cache);
|
||||
ReadNextShort(cache);
|
||||
|
|
@ -544,7 +541,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
ReadNextShort(cache);
|
||||
}
|
||||
|
||||
return new Entity(entityID, entityType, new Location(entityX, entityY, entityZ), entityYaw, entityPitch, metadata);
|
||||
return new Entity(entityID, entityType, new Location(entityX, entityY, entityZ), entityYaw, entityPitch, data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue