pmmp / PocketMine-MP

A server software for Minecraft: Bedrock Edition in PHP
https://pmmp.io
GNU Lesser General Public License v3.0
3.24k stars 1.52k forks source link

Magma blocks don't work any more #2041

Open dktapps opened 6 years ago

dktapps commented 6 years ago

Issue description

Since the bug fix in https://github.com/pmmp/PocketMine-MP/commit/cb90e30bcf3c8012146bc37441bc59cb79ff2281, magma blocks no longer deal damage when an entity walks over the top of them. This is because the hack that was used to trigger onEntityCollide() is now no longer in effect.

Steps to reproduce the issue

  1. walk on magma
  2. notice it doesn't damage you

OS and versions

Squashhh commented 6 months ago

What's it been like since 2018?

dktapps commented 6 months ago

No one cares enough to fix it.

The issue is that we have no mechanism for detecting when an entity is touching the surface of a block. The logic currently in the code was implemented incorrectly.

onEntityInside() (previously poorly named onEntityCollide()) isn't suitable for this, because that's used for entities intersecting with the block. You can't intersect with a magma block because it's a solid cube.