mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
More events (#1660)
* + OnBlockBreakAnimation * + OnBlockBreakAnimation * + OnEntityAnimation * Add checks * + OnBlockChange * + OnMultiBlockChange * Fix * Fix * Fix * add summary * Fix * fix other summary
This commit is contained in:
parent
c0f128f632
commit
48577bf034
4 changed files with 97 additions and 19 deletions
|
|
@ -628,7 +628,10 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
byte blockMeta = dataTypes.ReadNextByte(packetData);
|
||||
handler.GetWorld().SetBlock(new Location(blockX, blockY, blockZ), new Block(blockId, blockMeta));
|
||||
}
|
||||
else handler.GetWorld().SetBlock(dataTypes.ReadNextLocation(packetData), new Block((ushort)dataTypes.ReadNextVarInt(packetData)));
|
||||
else
|
||||
{
|
||||
handler.GetWorld().SetBlock(dataTypes.ReadNextLocation(packetData), new Block((ushort)dataTypes.ReadNextVarInt(packetData)));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case PacketTypesIn.MapChunkBulk:
|
||||
|
|
@ -1112,6 +1115,23 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
value = dataTypes.ReadNextVarInt(packetData);
|
||||
handler.OnUpdateScore(entityname, action3, objectivename2, value);
|
||||
break;
|
||||
case PacketTypesIn.BlockBreakAnimation:
|
||||
if (handler.GetEntityHandlingEnabled() && handler.GetTerrainEnabled())
|
||||
{
|
||||
int playerId = dataTypes.ReadNextVarInt(packetData);
|
||||
Location blockLocation = dataTypes.ReadNextLocation(packetData);
|
||||
byte stage = dataTypes.ReadNextByte(packetData);
|
||||
handler.OnBlockBreakAnimation(playerId, blockLocation, stage);
|
||||
}
|
||||
break;
|
||||
case PacketTypesIn.EntityAnimation:
|
||||
if (handler.GetEntityHandlingEnabled())
|
||||
{
|
||||
int playerId2 = dataTypes.ReadNextVarInt(packetData);
|
||||
byte animation = dataTypes.ReadNextByte(packetData);
|
||||
handler.OnEntityAnimation(playerId2, animation);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return false; //Ignored packet
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue