Translate PlayerAuthInput.ItemStackRequest
This commit is contained in:
@@ -46,7 +46,7 @@ type PlayerAuthInput struct {
|
||||
// ItemInteractionData is the transaction data if the InputData includes an item interaction.
|
||||
ItemInteractionData protocol.UseItemTransactionData
|
||||
// ItemStackRequest is sent by the client to change an item in their inventory.
|
||||
ItemStackRequest protocol.ItemStackRequest
|
||||
ItemStackRequest proto.ItemStackRequest
|
||||
// BlockActions is a slice of block actions that the client has interacted with.
|
||||
BlockActions []protocol.PlayerBlockAction
|
||||
// VehicleRotation is the rotation of the vehicle that the player is in, if any.
|
||||
|
||||
@@ -158,7 +158,7 @@ func (p *Protocol) downgradePackets(pks []packet.Packet, conn *minecraft.Conn) [
|
||||
Tick: pk.Tick,
|
||||
Delta: pk.Delta,
|
||||
ItemInteractionData: pk.ItemInteractionData,
|
||||
ItemStackRequest: pk.ItemStackRequest,
|
||||
ItemStackRequest: (&proto.ItemStackRequest{}).FromLatest(pk.ItemStackRequest),
|
||||
BlockActions: pk.BlockActions,
|
||||
VehicleRotation: pk.VehicleRotation,
|
||||
ClientPredictedVehicle: pk.ClientPredictedVehicle,
|
||||
@@ -436,7 +436,7 @@ func (p *Protocol) upgradePackets(pks []packet.Packet, conn *minecraft.Conn) []p
|
||||
Tick: pk.Tick,
|
||||
Delta: pk.Delta,
|
||||
ItemInteractionData: pk.ItemInteractionData,
|
||||
ItemStackRequest: pk.ItemStackRequest,
|
||||
ItemStackRequest: pk.ItemStackRequest.ToLatest(),
|
||||
BlockActions: pk.BlockActions,
|
||||
VehicleRotation: pk.VehicleRotation,
|
||||
ClientPredictedVehicle: pk.ClientPredictedVehicle,
|
||||
|
||||
Reference in New Issue
Block a user