GlowstoneMC / Glowstone

A fast, customizable and compatible open source server for Minecraft: Java Edition
https://glowstone.net
Other
1.89k stars 271 forks source link

Player entities floating above ground when using Mineflayer emulator #974

Open phylib opened 5 years ago

phylib commented 5 years ago

Title: Player entities floating above ground when using Mineflayer emulator

Glowstone build: 2018.9.0 Release, exact commit c6e1ed01

An emulated player using the mineflayer emulator can't move because it is floating above the ground. To reproduce the issue, try using the example script from the navigate plugin.

When looking to the code, it appears that the PlayerUpdateMessage received from mineflayer contains the correct position (especially is on ground), but Glowstone does not apply this position because it assumes it as invalid in PlayerUpdateHandler line 50.

When removing the if/else construct, mineflayer works perfectly fine. I would propose to adapt the if-clause in line 46. I would do it if nobody can see problems, but I don't know the exact reason for the if/else construct. The commit message only says: "First test for this".

I would love to fix this if someone gives me the OK for adapting the if clause.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/65858353-player-entities-floating-above-ground-when-using-mineflayer-emulator?utm_campaign=plugin&utm_content=tracker%2F14691067&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F14691067&utm_medium=issues&utm_source=github).
cedws commented 5 years ago

If you have a fix then you should submit a PR :+1: we can always discuss the changes once they're submitted.

Pr0methean commented 5 years ago

This sounds like an anti-cheat feature that should only be disabled if the admin wants.