◆ __construct()
EntityEatBlockEvent constructor.
- Parameters
-
Entity | $entity | |
FoodSource | $foodSource | |
37 if(!($foodSource instanceof Block)){
38 throw new \InvalidArgumentException(
"Food source must be a block");
40 parent::__construct(
$entity, $foodSource);
◆ getResidue()
- Returns
- Block
47 return parent::getResidue();
◆ setResidue()
- Parameters
-
54 if(!($residue instanceof Block)){
55 throw new \InvalidArgumentException(
"Eating a Block can only result in a Block residue");
57 parent::setResidue($residue);
The documentation for this class was generated from the following file:
- src/pocketmine/event/entity/EntityEatBlockEvent.php