Implement pressure plate activation logic and events (#5991)

closes #5936

This implements all of the basic activation logic for pressure plates.
It also introduces a PressurePlateUpdateEvent, which is called in pulses when entities are standing on top of the plate and when it deactivates. Deactivation can be detected by checking if the list of activating entities is empty.

---------

Co-authored-by: Javier León <58715544+JavierLeon9966@users.noreply.github.com>
This commit is contained in:
Dylan T
2023-08-16 13:00:23 +01:00
committed by GitHub
parent f516c3c502
commit e323c5dd76
11 changed files with 340 additions and 6 deletions

View File

@ -23,6 +23,9 @@ declare(strict_types=1);
namespace pocketmine\block;
/**
* @deprecated
*/
class WeightedPressurePlateHeavy extends WeightedPressurePlate{
}