Right now, feather has no way of knowing what item a player is holding because it doesn't handle the packets for it. This prevents feather from knowing what blocks are being placed, which tools are being used, etc.
feather should keep track of which slot the player's cursor is on, which can then be used to determine which item is being held based on the inventory state.
I'm not entirely sure where the best place to store this state in. Window seems like a possible candidate but it also seems too generic for this. It may make sense to make another component (HeldItem?) and attach that to the player.
Right now, feather has no way of knowing what item a player is holding because it doesn't handle the packets for it. This prevents feather from knowing what blocks are being placed, which tools are being used, etc.
feather should keep track of which slot the player's cursor is on, which can then be used to determine which item is being held based on the inventory state.
I'm not entirely sure where the best place to store this state in. Window seems like a possible candidate but it also seems too generic for this. It may make sense to make another component (HeldItem?) and attach that to the player.