Add PlayerAction (block breaking etc) packet

This commit is contained in:
Alpyne 2020-10-31 01:20:06 -07:00
parent b370853c2a
commit 150ad7b9ac
2 changed files with 28 additions and 0 deletions

View File

@ -317,4 +317,10 @@ namespace Feather
for (auto& client : clients)
client.SendMessage(message);
}
template <>
void DedicatedServer::HandlePacket(MinecraftClient& client, const Play::ServerboundPlayerAction& action)
{
}
}

View File

@ -196,6 +196,28 @@
id : int64
}
}
PlayerAction: {
id: 0x1A
enums: {
Action: {
.type: varint
StartBreakBlock: 0
AbortBreakBlock: 1
FinishedBreakBlock: 2
DropItemStack: 3
DropItem: 4
ReleaseUseItem: 5 # shoot array, finished eating, etc
SwapItemHands: 6
}
}
vars: {
action: Action
pos: position
direction: direction
}
}
}
clientbound :