Translate PlayerAuthInput.ItemStackRequest

This commit is contained in:
AkmalFairuz
2025-01-10 19:05:12 +07:00
parent 03c065881e
commit 79af874e5b
2 changed files with 3 additions and 3 deletions

View File

@@ -46,7 +46,7 @@ type PlayerAuthInput struct {
// ItemInteractionData is the transaction data if the InputData includes an item interaction. // ItemInteractionData is the transaction data if the InputData includes an item interaction.
ItemInteractionData protocol.UseItemTransactionData ItemInteractionData protocol.UseItemTransactionData
// ItemStackRequest is sent by the client to change an item in their inventory. // 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 is a slice of block actions that the client has interacted with.
BlockActions []protocol.PlayerBlockAction BlockActions []protocol.PlayerBlockAction
// VehicleRotation is the rotation of the vehicle that the player is in, if any. // VehicleRotation is the rotation of the vehicle that the player is in, if any.

View File

@@ -158,7 +158,7 @@ func (p *Protocol) downgradePackets(pks []packet.Packet, conn *minecraft.Conn) [
Tick: pk.Tick, Tick: pk.Tick,
Delta: pk.Delta, Delta: pk.Delta,
ItemInteractionData: pk.ItemInteractionData, ItemInteractionData: pk.ItemInteractionData,
ItemStackRequest: pk.ItemStackRequest, ItemStackRequest: (&proto.ItemStackRequest{}).FromLatest(pk.ItemStackRequest),
BlockActions: pk.BlockActions, BlockActions: pk.BlockActions,
VehicleRotation: pk.VehicleRotation, VehicleRotation: pk.VehicleRotation,
ClientPredictedVehicle: pk.ClientPredictedVehicle, ClientPredictedVehicle: pk.ClientPredictedVehicle,
@@ -436,7 +436,7 @@ func (p *Protocol) upgradePackets(pks []packet.Packet, conn *minecraft.Conn) []p
Tick: pk.Tick, Tick: pk.Tick,
Delta: pk.Delta, Delta: pk.Delta,
ItemInteractionData: pk.ItemInteractionData, ItemInteractionData: pk.ItemInteractionData,
ItemStackRequest: pk.ItemStackRequest, ItemStackRequest: pk.ItemStackRequest.ToLatest(),
BlockActions: pk.BlockActions, BlockActions: pk.BlockActions,
VehicleRotation: pk.VehicleRotation, VehicleRotation: pk.VehicleRotation,
ClientPredictedVehicle: pk.ClientPredictedVehicle, ClientPredictedVehicle: pk.ClientPredictedVehicle,