diff options
| author | Linnea Gräf <nea@nea.moe> | 2025-09-05 21:13:30 +0200 |
|---|---|---|
| committer | Linnea Gräf <nea@nea.moe> | 2025-09-05 21:13:34 +0200 |
| commit | 88eff36d950ad34fd9450273d991d2b292eabf1e (patch) | |
| tree | 814d7ec3c785c6503625778e980b0768cd46616a | |
| parent | fe84a9033b0911cd3a68d3fe99cf2eb4f0754361 (diff) | |
| download | Firmament-88eff36d950ad34fd9450273d991d2b292eabf1e.tar.gz Firmament-88eff36d950ad34fd9450273d991d2b292eabf1e.tar.bz2 Firmament-88eff36d950ad34fd9450273d991d2b292eabf1e.zip | |
fix: Right click actions not being blocked sometimes
Fixes https://github.com/nea89o/Firmament/issues/285
| -rw-r--r-- | src/main/kotlin/events/registration/ChatEvents.kt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/kotlin/events/registration/ChatEvents.kt b/src/main/kotlin/events/registration/ChatEvents.kt index aadf498..7fe040a 100644 --- a/src/main/kotlin/events/registration/ChatEvents.kt +++ b/src/main/kotlin/events/registration/ChatEvents.kt @@ -45,21 +45,21 @@ fun registerFirmamentEvents() { AttackBlockCallback.EVENT.register(AttackBlockCallback { player, world, hand, pos, direction -> if (AttackBlockEvent.publish(AttackBlockEvent(player, world, hand, pos, direction)).cancelled) - ActionResult.CONSUME + ActionResult.FAIL else ActionResult.PASS }) UseBlockCallback.EVENT.register(UseBlockCallback { player, world, hand, hitResult -> if (UseBlockEvent.publish(UseBlockEvent(player, world, hand, hitResult)).cancelled) - ActionResult.CONSUME + ActionResult.FAIL else ActionResult.PASS }) UseBlockCallback.EVENT.register(UseBlockCallback { player, world, hand, hitResult -> if (UseItemEvent.publish(UseItemEvent(player, world, hand)).cancelled) - ActionResult.CONSUME + ActionResult.FAIL else ActionResult.PASS }) UseItemCallback.EVENT.register(UseItemCallback { playerEntity, world, hand -> - if (UseItemEvent.publish(UseItemEvent(playerEntity, world, hand)).cancelled) ActionResult.CONSUME + if (UseItemEvent.publish(UseItemEvent(playerEntity, world, hand)).cancelled) ActionResult.FAIL else ActionResult.PASS }) ClientPlayConnectionEvents.JOIN.register { networkHandler, packetSender, _ -> |
