Skip to content

Commit

Permalink
protocol/item_stack.go: Renamed unknown field in MineBlockStackReques…
Browse files Browse the repository at this point in the history
…tAction.
  • Loading branch information
Sandertv committed Feb 22, 2022
1 parent 9144e62 commit 5667bbd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions minecraft/protocol/item_stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,8 @@ func (a *BeaconPaymentStackRequestAction) Unmarshal(r *Reader) {

// MineBlockStackRequestAction is sent by the client when it breaks a block.
type MineBlockStackRequestAction struct {
// Unknown1 ... TODO: Find out what this is for
Unknown1 int32
// HotbarSlot is the slot held by the player while mining a block.
HotbarSlot int32
// PredictedDurability is the durability of the item that the client assumes to be present at the time.
PredictedDurability int32
// StackNetworkID is the unique stack ID that the client assumes to be present at the time. The server
Expand All @@ -482,14 +482,14 @@ type MineBlockStackRequestAction struct {

// Marshal ...
func (a *MineBlockStackRequestAction) Marshal(w *Writer) {
w.Varint32(&a.Unknown1)
w.Varint32(&a.HotbarSlot)
w.Varint32(&a.PredictedDurability)
w.Varint32(&a.StackNetworkID)
}

// Unmarshal ...
func (a *MineBlockStackRequestAction) Unmarshal(r *Reader) {
r.Varint32(&a.Unknown1)
r.Varint32(&a.HotbarSlot)
r.Varint32(&a.PredictedDurability)
r.Varint32(&a.StackNetworkID)
}
Expand Down

0 comments on commit 5667bbd

Please sign in to comment.