SteppedOnBlock 5.47.0
A block which acts on the entities standing on it (vanilla Block.stepOn()), like magma blocks hurting them, slime slowing them down or turtle eggs being trampled.
Every tick, an entity on the ground looks up the block under its feet (the one at 0.2 blocks below its position), and calls SteppedOnBlock::onEntityStepOn() if that block implements this interface. Which block states implement it is cached by state ID, so the other blocks cost nothing.
Methods
onEntityStepOn()
php
public function onEntityStepOn(\pocketmine\entity\Entity $entity) : voidCalled every tick while the entity stands on this block (players included, also when they don't move).
