GeyserMC / Geyser

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

I encountered two problems after the latest Geyser update #5099

Open robloxchild opened 4 weeks ago

robloxchild commented 4 weeks ago

Describe the bug

so there is 2 issues i faced with the new update :

  1. Bedrock Players Flying Through Cobwebs Using Fireworks:

    Bedrock players can use fireworks to bypass cobwebs and fly through them, which shouldn't be possible. This seems to be a behavior discrepancy between Java and Bedrock clients.

  2. Server Not Listening to Firework Events for Bedrock Players (i guess):

The server fails to detect certain events related to Bedrock players when they use fireworks. Specifically, the following events are not triggered for Bedrock players: PlayerInteractEvent , ProjectileLaunchEvent (especially for FIREWORKS (((ONLY))) ) i mean i can listen for ender_peral,trident ProjectileLaunchEvent , but FIREWORKS ❌

Code Example:

Before the update, the following code worked correctly for both Java and Bedrock players. After the update, it no longer functions for Bedrock players using fireworks.

 @EventHandler
public void onProjShoot (ProjectileLaunchEvent e) {
    if (!(e.getEntity().getShooter() instanceof Player player)) return;
    if (!WorldGuardEvents.isPlayerInAnyRegion(player.getUniqueId() , region)) return;
    if (!Cache.getProjectiles().contains(e.getEntityType())) return;
    player.sendActionBar(Utils.mm(MSG));
    e.setCancelled(true);
}

NOTE The code still works for other projectiles (e.g., ENDER_PEARL, TRIDENT). The issue appears to be isolated to fireworks when used by Bedrock players.

To Reproduce

  1. Attempt to use fireworks as a Bedrock player while in a cobweb. Notice that the player can bypass the cobweb.

  2. Bedrock player and observe that the server does not detect the ProjectileLaunchEvent (FIREWORK_ROCKET EntityType especially).

Expected behaviour

  1. Bedrock players should not be able to bypass cobwebs using fireworks.
  2. Firework-related events should be correctly detected for Bedrock players, as they are for Java players.

Screenshots / Videos

This is works in overworld too!

https://github.com/user-attachments/assets/29821a47-b538-438d-a968-13456135c00b

Server Version and Plugins

This server is running Pufferfish version git-Pufferfish-27 (MC: 1.20.1) (Implementing API version 1.20.1-R0.1-SNAPSHOT) (Git: 979d3a2 on HEAD)

Geyser Dump

https://dump.geysermc.org/KL7hFKOmSxLNzJOSp9ioLYfTT8SWsvuR

Geyser Version

2.4.3-b692 (git-master-264a914)

Minecraft: Bedrock Edition Device/Version

latest

Additional Context

fireworks wired