mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-05 17:41:46 +00:00
Block: improve documentation of hasEntityCollision() and onEntityInside()
This commit is contained in:
parent
cb7c136035
commit
140a809c40
@ -329,10 +329,6 @@ class Block{
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function hasEntityCollision() : bool{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether entities can climb up this block.
|
* Returns whether entities can climb up this block.
|
||||||
*/
|
*/
|
||||||
@ -561,10 +557,21 @@ class Block{
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether the block has actions to be executed when an entity enters its cell (full cube space).
|
||||||
|
*
|
||||||
|
* @see Block::onEntityInside()
|
||||||
|
*/
|
||||||
|
public function hasEntityCollision() : bool{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when an entity's bounding box clips inside this block's cell. Note that the entity may not be intersecting
|
* Called when an entity's bounding box clips inside this block's cell. Note that the entity may not be intersecting
|
||||||
* with the collision box or bounding box.
|
* with the collision box or bounding box.
|
||||||
*
|
*
|
||||||
|
* WARNING: This will not be called if {@link Block::hasEntityCollision()} returns false.
|
||||||
|
*
|
||||||
* @return bool Whether the block is still the same after the intersection. If it changed (e.g. due to an explosive
|
* @return bool Whether the block is still the same after the intersection. If it changed (e.g. due to an explosive
|
||||||
* being ignited), this should return false.
|
* being ignited), this should return false.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user