Closed rayblon closed 1 year ago
I have yet to look into this fully, but I can elaborate on one point:
Geyser detects the click just fine when tapping 'air' (you can see the hit cooldown bar when it happens)
This is specifically Bedrock sending a "sound event" that indicates it wants some form of an attack sound to be played - it was the workaround we devised to make the cooldown play in more scenarios. It doesn't mean that a packet is sent by Bedrock indicating what it's trying to hit. https://github.com/GeyserMC/Geyser/blob/master/connector/src/main/java/org/geysermc/connector/network/translators/bedrock/world/BedrockLevelSoundEventTranslator.java
Hmm. I don't have the technical knowledge of packets to know what can and cant be done for this scenario, but would it be reasonably possible to extrapolate and construct the PlayerInteract event when a "sound packet" is sent without any accompanying data about what the client wishes to interact with?
It's not complete touch screen functionality, but it would achieve parity between touch controls and the other schemas wrt plugins, if it is possible.
We would also have to track if an interact event was sent recently, so it's probably not worth it to fix this tiny difference.
I had a similar problem with Skript not detecting right click events with an empty hand UNLESS you were looking at a block. Also, holding an item made it work just fine too. Not sure if that information will help but thought I'd contribute.
I am able to confirm this - it is probably fixable, but would require timing the last sent arm swing as well, I believe, as the client sometimes intentionally does not send an arm swing packet.
Adding to this in favour of reclassifying it from low priority to something higher; this (in my opinion) seriously affects a wider range of plugins than the example of skript. It's a good way to quickly see that this event doesn't fire, but this also affects many other plugins that use the PlayerInteractEvent (RIGHT_CLICK_AIR) like ProjectKorra, Magic, some pets plugins, some plugins that use items as triggers (I've had this issue with Itemsadder items needing to be "clicked" on the ground for bedrock players) etc.
It gets used (for better or worse) fairly often and does seem important to feature parity! It's very confusing to new Bedrock players too; it appears as though things "sometimes" work because they don't realize that you have to target a block. Would go a long way in my eyes (and of course selfishly, my network's own use case of Projectkorra and ItemsAdder)!
Posting a conversation from Discord with some potentially relevant info for completeness:
Kastle: Has anything changed since 1.16 that would make this less tedious to fix? Someone asked me about it so i figured I would relay https://github.com/GeyserMC/Geyser/issues/2113
Camotoy: There's a "workaround".
Kastle: Like the one described in the issue or?
Geyser hacks?
Camotoy: Something to do with the sound events Bedrock sends us.
Kastle: So the one mentioned in the issue then?
Camotoy: Yes.
Kastle: Oof
Redned: We just need to send the ServerboundSwingPacket to the server
Camotoy: I thought it was the UseItemPacket? Or both?
The swing packet I think is tough because doesn’t PC Bedrock swing?
Are you able to take a look later on?
Redned: for the air hit?
swing arm works fine in this case
iirc thats all java sends too
but... regardless it'll trigger everything needed for plugin devs, like the arm swing event & the playerinteractevent with the LEFT_CLICK_AIR action
A previous workaround for this was to connect a controller or keyboard to one's mobile device... but as of the 1.19.50 update, this no longer works. Seems like some sort of regression...
Also experiencing this regression, which is unfortunate because of how long this has been an issue and that one workaround was all we could direct players to. Would love to see some conversation about this if nothing else!
I'm having a similar problem a different server. It's happening on an avatar bending server. When I try to use an ability that involves punching air it doesn't work.
See b5e1ddc3c86bd560e3ebbb8814c7d074c1bd6a69. Let us know if there's still an issue somewhere.
Describe the bug
When using the touch control schema on (probably) any bedrock client, tapping an area without an entity or block in the client's melee range will result in the 'air tap' being properly caught by Geyser (which will then render the hit cooldown as expected), but other plugins won't detect the left click.
To Reproduce
Expected behaviour
The left click with touch controls should be caught by plugins other than just Geyser, just like the controller and mouse&keyboard control schemas.
Screenshots / Videos
No response
Server Version and Plugins
ActionHealth, BKCommonLib, BottledExp, BungeeTabListPlus, BuycraftX, Citizens, CoreProtect, DeluxeChat, DiscordSRV, Essentials, EssentialsSpawn, FastAsyncWorldEdit (WorldEdit), floodgate-bukkit, Geyser-Spigot, goBrush, GriefPrevention, Guilds, HolographicDisplays, InventoryRollback, LibsDisguises, LightCleaner, LuckPerms, LWC, LWCTrust, MagicSpells, MMOItems, MobArena, MobArenaExtension, Multiverse-Core, Multiverse-NetherPortals, MundoSK, MythicLib, MythicMobs, OldCombatMechanics, PacketListenerApi, PerWorldInventory, PlaceholderAPI, PlotSquared, ProtocolLib, React, Shopkeepers, ShowItem, SkBee, Skellett, SkQuery, skRayFall, Skript, skript-reflect, skript-yaml, skUtilities, SkyChanger, spark, SuperVanish, TuSKe*, Vault, WarPlus, WorldGuard
Waterfall(Geyser & Floodgate are installed on the Waterfall bungee) Paper version 519
Geyser Dump
https://dump.geysermc.org/Z2qPhglFP9u82J2ahxoC5o0A0Pk79zPP
Geyser Version
1.2.1-SNAPSHOT (git-master-86b2901)
Minecraft: Bedrock Edition Version
Confirmed in 1.16.220 & 1.16.210
Additional Context
What we've tested
What isn't detected by other plugins: (on an android phone)
Tapping air in Mobile Bedrock with touch controls and the split controls setting toggled on
(on a touch capable laptop)
What IS detected by other plugins:
What we've discovered about touch control left clicking