arrow collision tweaks

This commit is contained in:
GameHerobrine 2024-05-04 05:51:31 +03:00
parent f8ec00dad9
commit 8b07056323
17 changed files with 137 additions and 51 deletions

View file

@ -171,8 +171,12 @@ abstract class Block extends Position{
return $v == null ? false : $v->x >= StaticBlock::$minXs[$id] && $v->x <= StaticBlock::$maxXs[$id] && $v->y >= StaticBlock::$minYs[$id] && $v->y <= StaticBlock::$maxYs[$id];
}
public static function updateShape(Level $level, $x, $y, $z){
}
public static function clip(Level $level, $x, $y, $z, Vector3 $start, Vector3 $end){
//self::updateShape($level, $x, $y, $z); TODO update shape
static::updateShape($level, $x, $y, $z);
$id = $level->level->getBlockID($x, $y, $z);
$start = $start->subtract($x, $y, $z);