2

I posted an issue about this on the Geyser GitHub here: Shooting Projectiles via Plugin is Glitchy #2913. My mini-game used the PlayerInteractEvent, so this was obviously a big problem for me. A little while later, "chrismwiggs" posted about a couple of other issues similar to mine as you can see. I noticed he said the second issue had a possible solution (this issue: Left click events not detected by other plugins when punching "air"... #2113). At the time, that seemed like too much work to try to fix on my own and I wanted the developers to fix it. I noticed they probably wouldn't ever fix it, so I just dropped cross platform support.

Today, I think it would be really cool to have cross platform support back on my server. I would be willing to fork Geyser and try to fix it myself, but I would say I'm an advanced beginner at plugin development. So, does anyone think they can help me figure out:

  • Whether I would need ServerboundSwingPacket or something else to make it work on all Bedrock platforms (this is talked about at the end of issue 2113).
  • How to add this to Geyser (where in the source code)
  • The actual code I would need to add

I also posted this on Spigot here.

  • `ServerboundSwingPacket` would honestly be the most reliable approach out of your options, which is essentially a pseudo-packet wrapper around the native packets sent by either bedrock or the java edition clients. From a quick look, you could implement this workaround through defining your own `PacketTranslator` ([here's an example](https://github.com/GeyserMC/Geyser/blob/33af9e094c9b3b7844e57c67c25b8c5b3577c127/core/src/main/java/org/geysermc/geyser/translator/protocol/bedrock/BedrockInventoryTransactionTranslator.java) of one). I would've answered this more in-depth, but ran out of time. – Rogue Aug 18 '22 at 13:35
  • Okay, yeah I kind of thought so. Do you think you might be able to answer more in depth later? – ThrownRedstone Aug 18 '22 at 15:04
  • I may have some time to do so this weekend, my own work keeps me a little busy for investigations of this sort during the week. – Rogue Aug 18 '22 at 15:15

1 Answers1

-2

according to my analysis on your problem, ,,, ServerboundSwingPacket ,,, is the best possible solution to your problem.

you should elaborate your question based on modules, so that it will be easier for both you and users at stackoverflow

Ashutosh7i
  • 100
  • 10
  • That only answers the first part of my problem dude – ThrownRedstone Aug 18 '22 at 16:50
  • you should ask one question at a time and or make them seperated, read about how to create a stackoverflow question – Ashutosh7i Aug 18 '22 at 16:52
  • 1
    I didn't think that's how it worked. This is all about how to fix the issue with Geyser. I would have to make one question about the right packet, another about where to add it, and help with the actual code. I don't see that you need to make separate questions anywhere: https://stackoverflow.com/help/how-to-ask. – ThrownRedstone Aug 18 '22 at 17:40