mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 04:29:43 +00:00
static blockID for all blocks
This commit is contained in:
parent
205e432f52
commit
36be0211f9
109 changed files with 111 additions and 13 deletions
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
class LadderBlock extends TransparentBlock{
|
||||
public static $blockID;
|
||||
public static function getAABB(Level $level, $x, $y, $z){
|
||||
[$id, $meta] = $level->level->getBlock($x, $y, $z);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
class SignPostBlock extends TransparentBlock{
|
||||
|
||||
public static $blockID;
|
||||
public static $faces = [
|
||||
2 => 2,
|
||||
3 => 3,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
class TorchBlock extends FlowableBlock implements LightingBlock{
|
||||
public static $blockID;
|
||||
public function __construct($meta = 0){
|
||||
parent::__construct(TORCH, $meta, "Torch");
|
||||
$this->hardness = 0;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
class TrapdoorBlock extends TransparentBlock{
|
||||
public static $blockID;
|
||||
public function __construct($meta = 0){
|
||||
parent::__construct(TRAPDOOR, $meta, "Trapdoor");
|
||||
$this->isActivable = true;
|
||||
|
|
@ -23,7 +24,7 @@ class TrapdoorBlock extends TransparentBlock{
|
|||
|
||||
public static function getAABB(Level $level, $x, $y, $z){
|
||||
static::updateShape($level, $x, $y, $z);
|
||||
return StaticBlock::getAABB($level, $x, $y, $z);
|
||||
return StaticBlock::getAABB(static::$blockID, $x, $y, $z);
|
||||
}
|
||||
|
||||
public static function getCollisionBoundingBoxes(Level $level, $x, $y, $z, Entity $entity){
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ require_once("SignPostBlock.php");
|
|||
/***REM_END***/
|
||||
|
||||
class WallSignBlock extends SignPostBlock{
|
||||
public static $blockID;
|
||||
public function __construct($meta = 0){
|
||||
TransparentBlock::__construct(WALL_SIGN, $meta, "Wall Sign");
|
||||
$this->isSolid = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue