mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-15 10:25:06 -04:00
interactions: don't interact with offhand if unavailable (<1.9)
This commit is contained in:
parent
56b495a514
commit
bc0dc833f4
@ -89,6 +89,10 @@ class UseHandler(
|
||||
// check both hands if we can interact
|
||||
// if we can, stop further interactions
|
||||
for (hand in Hands.VALUES) {
|
||||
if (hand == Hands.OFF && !connection.version.hasOffhand) {
|
||||
// only one hand available
|
||||
return
|
||||
}
|
||||
val stack = connection.player.items.inventory[hand]
|
||||
|
||||
if (target != null && short.tryUse(hand, target, stack)) {
|
||||
@ -115,12 +119,6 @@ class UseHandler(
|
||||
return
|
||||
}
|
||||
sendItemUse(hand, stack)
|
||||
|
||||
|
||||
if (!connection.version.hasOffhand) {
|
||||
// only one hand available
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user