mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 13:09:44 +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
|
|
@ -28,6 +28,8 @@ class LadderBlock extends TransparentBlock{
|
|||
$this->isSolid = false;
|
||||
$this->isFullBlock = false;
|
||||
$this->hardness = 2;
|
||||
$this->breakTime = 0.4;
|
||||
$this->material = Material::$decoration;
|
||||
}
|
||||
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
if($face === 0 || $face === 1){
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ class SignPostBlock extends TransparentBlock{
|
|||
$this->isSolid = false;
|
||||
$this->isFullBlock = false;
|
||||
$this->hardness = 5;
|
||||
$this->breakTime = 1;
|
||||
$this->material = Material::$wood;
|
||||
}
|
||||
|
||||
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ class TorchBlock extends FlowableBlock implements LightingBlock{
|
|||
public function __construct($meta = 0){
|
||||
parent::__construct(TORCH, $meta, "Torch");
|
||||
$this->hardness = 0;
|
||||
$this->breakTime = 0;
|
||||
$this->material = Material::$decoration;
|
||||
}
|
||||
|
||||
public function getMaxLightValue(){
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ class TrapdoorBlock extends TransparentBlock{
|
|||
$this->isFullBlock = true;
|
||||
}
|
||||
$this->hardness = 15;
|
||||
$this->breakTime = 3;
|
||||
$this->material = Material::$wood;
|
||||
}
|
||||
|
||||
public function canAttachTo(Block $target){
|
||||
|
|
|
|||
|
|
@ -9,6 +9,9 @@ class WallSignBlock extends SignPostBlock{
|
|||
public function __construct($meta = 0){
|
||||
TransparentBlock::__construct(WALL_SIGN, $meta, "Wall Sign");
|
||||
$this->isSolid = false;
|
||||
$this->breakTime = 1;
|
||||
$this->hardness = 5;
|
||||
$this->material = Material::$wood;
|
||||
}
|
||||
|
||||
public static function neighborChanged(Level $level, $x, $y, $z, $nX, $nY, $nZ, $oldID){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue