GeyserMC / Geyser

A bridge/proxy allowing you to connect to Minecraft: Java Edition servers with Minecraft: Bedrock Edition.
https://geysermc.org
MIT License
4.72k stars 676 forks source link

Issue with boat and plugins #3487

Open tbvns opened 1 year ago

tbvns commented 1 year ago

Describe the bug

I will report 3 bugs in one. First of all, bedrock player can bypass the unmount event cancelation: I have the code in my plugins: public void Unmount(EntityDismountEvent event) { event.setCancelled(true); } java player can't unmount the boat, bedrock player can. After that we have the velocity, bedrock player in a boat will not receive velocity aplied by a plugins: This is the code i use: if (block.getType() == Material.SLIME_BLOCK) { Vector vel = boat.getVelocity(); double vx = vel.getX(); double vy = vel.getY(); double vz = vel.getZ(); Vector bd = boat.getLocation().getDirection(); double bdx = bd.getX() 4; double bdz = bd.getZ() 4; Vector velocity = new Vector(vx + bdx, vy +1, vz + bdz); boat.setVelocity(velocity); } Java player jump but bedrock player dont. Then when you try to use boat.setGravity(false); , it doesn't work. It work on java but bedrock player just fall.

I know boat movement are mostly client side (on java at least) and will understand if you can't, wont fix those bugs.

To Reproduce

  1. take a boat
  2. make a plugins
  3. try the thing i showed above
  4. watch it not work

Expected behaviour

It should work like on java.

Screenshots / Videos

No response

Server Version and Plugins

I use latest geyser with latest waterfall. All my server run viaversion with 1.19.2.

Geyser Dump

https://dump.geysermc.org/V57Za8YTgJHdNQZ6lycDV27o8cMCXZ1P

Geyser Version

git-master-566b263 (2.1.0-SNAPSHOT)

Minecraft: Bedrock Edition Device/Version

1.19.51 on phone

Additional Context

This was on the spigot API, I don't know if I need to precise it.

Camotoy commented 1 year ago

In the future, please report separate issues for all three bugs.

The first issue should now be mitigated.

tbvns commented 1 year ago

Do I need to create another issue for the others bugs in this issue, or is it just fine for this time ?