mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
fixed falling sand
This commit is contained in:
parent
be0a11875a
commit
eda78f9e17
6 changed files with 54 additions and 15 deletions
|
|
@ -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){}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue