Pocketmine-mp: Players can fall up to 5 blocks without taking any damage

Created on 5 May 2017  路  4Comments  路  Source: pmmp/PocketMine-MP

In vanilla, you take 1/2 heart of damage for every block fallen above 3 blocks. In PocketMine-MP, this appears to be 5. I don't understand why this is a problem, since the logic for fall damage appears correct, but it appears that the fall calculation is always less than the actual distance by 2 blocks.

Steps to reproduce the issue

  • build a stack of something 4-5 blocks tall and jump off the top
  • /tp ~ ~5 ~ in survival

OS and versions

  • PocketMine-MP: c4f461f65d71efc0b5e0ca00c49e3c4b97c57757
  • PHP: 7.0.18
  • Server OS: w10
  • Game version: PE/Win10
Gameplay Fixed

All 4 comments

This is partly due to a hacky checkGroundState() override for Players which checks a whole block beneath the player to see if they are on the ground.

Maybe use PlayerFallPacket?

Using PlayerFallPacket would allow hacked clients to cheat their way out of taking fall damage. I don't know why Mojang added it, but it's not a sensible solution. This is a core bug which hasn't yet been isolated.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RedstoneAlmeida picture RedstoneAlmeida  路  3Comments

HipsterAF picture HipsterAF  路  3Comments

nmo0ory picture nmo0ory  路  3Comments

L3ice picture L3ice  路  3Comments

Muqsit picture Muqsit  路  3Comments