fixed falling sand

This commit is contained in:
GameHerobrine 2024-01-14 06:29:49 +03:00
parent be0a11875a
commit eda78f9e17
6 changed files with 54 additions and 15 deletions

View file

@ -155,6 +155,20 @@ abstract class Block extends Position{
public $z = 0;
public $slipperiness;
public static $minX = 0, $minY = 0, $minZ = 0, $maxX = 1, $maxY = 1, $maxZ = 1;
public static function setBlockBounds($minX, $minY, $minZ, $maxX, $maxY, $maxZ){ //TODO call for some specific blocks
static::$minX = $minX;
static::$minY = $minY;
static::$minZ = $minZ;
static::$maxX = $maxX;
static::$maxY = $maxY;
static::$maxZ = $maxZ;
}
public static function getAABB(Level $level, $x, $y, $z){
return new AxisAlignedBB(static::$minX + $x, static::$minY + $y, static::$minZ + $z, static::$maxX + $x, static::$maxY + $y, static::$maxZ + $z);
}
public static function addVelocityToEntity(Level $level, $x, $y, $z, Entity $entity, Vector3 $velocityVector){}
public static function onRandomTick(Level $level, $x, $y, $z){}
public static function fallOn(Level $level, $x, $y, $z, Entity $entity, $fallDistance){}