mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 12:39:43 +00:00
better break time checks, added block materials
This commit is contained in:
parent
71da620aa3
commit
625e9ca71f
143 changed files with 496 additions and 54 deletions
|
|
@ -15,6 +15,7 @@ class AirBlock extends TransparentBlock{
|
|||
$this->isSolid = false;
|
||||
$this->isFullBlock = true;
|
||||
$this->hardness = 0;
|
||||
$this->material = Material::$air;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ class BedBlock extends TransparentBlock{
|
|||
$this->isActivable = true;
|
||||
$this->isFullBlock = false;
|
||||
$this->hardness = 1;
|
||||
$this->breakTime = 0.2;
|
||||
$this->material = Material::$cloth;
|
||||
}
|
||||
|
||||
public static function getCollisionBoundingBoxes(Level $level, $x, $y, $z, Entity $entity){
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ class FireBlock extends FlowableBlock implements LightingBlock{
|
|||
$this->breakable = false;
|
||||
$this->isFullBlock = true;
|
||||
$this->hardness = 0;
|
||||
$this->breakTime = 0;
|
||||
$this->material = Material::$fire;
|
||||
}
|
||||
public static function getAABB(Level $level, $x, $y, $z){
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@ class NetherReactorBlock extends SolidBlock{
|
|||
public function __construct($meta = 0){
|
||||
parent::__construct(NETHER_REACTOR, $meta, "Nether Reactor");
|
||||
$this->isActivable = true;
|
||||
$this->hardness = 15;
|
||||
$this->breakTime = 3;
|
||||
$this->material = Material::$metal;
|
||||
}
|
||||
|
||||
public function onActivate(Item $item, Player $player){
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@ class TNTBlock extends SolidBlock{
|
|||
public function __construct(){
|
||||
parent::__construct(TNT, 0, "TNT");
|
||||
$this->hardness = 0;
|
||||
$this->breakTime = 0;
|
||||
$this->isActivable = true;
|
||||
$this->material = Material::$explosive;
|
||||
}
|
||||
|
||||
public function onActivate(Item $item, Player $player){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue