mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
entities will collide with blocks like door, glass pane, iron bars
This commit is contained in:
parent
df54826e4c
commit
f3d726cddf
10 changed files with 107 additions and 8 deletions
|
|
@ -157,6 +157,9 @@ abstract class Block extends Position{
|
|||
|
||||
public static function onRandomTick(Level $level, $x, $y, $z){}
|
||||
public static function fallOn(Level $level, $x, $y, $z, Entity $entity, $fallDistance){}
|
||||
public static function getCollisionBoundingBoxes(Level $level, $x, $y, $z, Entity $entity){
|
||||
return [new AxisAlignedBB($x, $y, $z, $x, $y, $z)];
|
||||
}
|
||||
public function __construct($id, $meta = 0, $name = "Unknown"){
|
||||
$this->id = (int) $id;
|
||||
$this->meta = (int) $meta;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue