Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-27 08:30:12 +01:00
BedrockInventoryTransactionTranslator: check to make sure bucket usage is on purpose (#1280)
Otherwise buckets can be activated when opening block inventories.
Dieser Commit ist enthalten in:
Ursprung
8c8630814d
Commit
46c34842d8
@ -98,7 +98,9 @@ public class BedrockInventoryTransactionTranslator extends PacketTranslator<Inve
|
|||||||
session.sendDownstreamPacket(blockPacket);
|
session.sendDownstreamPacket(blockPacket);
|
||||||
|
|
||||||
// Otherwise boats will not be able to be placed in survival and buckets wont work on mobile
|
// Otherwise boats will not be able to be placed in survival and buckets wont work on mobile
|
||||||
if (packet.getItemInHand() != null && (packet.getItemInHand().getId() == ItemRegistry.BOAT.getBedrockId() || packet.getItemInHand().getId() == ItemRegistry.BUCKET.getBedrockId())) {
|
// Check actions, otherwise buckets may be activated when block inventories are accessed
|
||||||
|
if (packet.getItemInHand() != null && (packet.getItemInHand().getId() == ItemRegistry.BOAT.getBedrockId() ||
|
||||||
|
packet.getItemInHand().getId() == ItemRegistry.BUCKET.getBedrockId()) && !packet.getActions().isEmpty()) {
|
||||||
ClientPlayerUseItemPacket itemPacket = new ClientPlayerUseItemPacket(Hand.MAIN_HAND);
|
ClientPlayerUseItemPacket itemPacket = new ClientPlayerUseItemPacket(Hand.MAIN_HAND);
|
||||||
session.sendDownstreamPacket(itemPacket);
|
session.sendDownstreamPacket(itemPacket);
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren