mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
blocks have slipperiness now, more movement tweaks
This commit is contained in:
parent
18dfe4c88f
commit
2277bf4c74
4 changed files with 81 additions and 122 deletions
|
|
@ -153,6 +153,8 @@ abstract class Block extends Position{
|
|||
public $x = 0;
|
||||
public $y = 0;
|
||||
public $z = 0;
|
||||
public $slipperiness;
|
||||
|
||||
|
||||
public function __construct($id, $meta = 0, $name = "Unknown"){
|
||||
$this->id = (int) $id;
|
||||
|
|
@ -160,6 +162,7 @@ abstract class Block extends Position{
|
|||
$this->name = $name;
|
||||
$this->breakTime = 0.20;
|
||||
$this->hardness = 10;
|
||||
$this->slipperiness = 0.6;
|
||||
$this->boundingBox = new AxisAlignedBB($this->x, $this->y, $this->z, $this->x + 1, $this->y + 1, $this->z + 1);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ class IceBlock extends TransparentBlock{
|
|||
public function __construct(){
|
||||
parent::__construct(ICE, 0, "Ice");
|
||||
$this->hardness = 2.5;
|
||||
$this->slipperiness = 0.98;
|
||||
}
|
||||
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
$ret = $this->level->setBlock($this, $this, true, false, true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue