static blockID for all blocks

This commit is contained in:
GameHerobrine 2024-07-10 19:58:25 +03:00
parent 205e432f52
commit 36be0211f9
109 changed files with 111 additions and 13 deletions

View file

@ -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);

View file

@ -1,7 +1,7 @@
<?php
class SignPostBlock extends TransparentBlock{
public static $blockID;
public static $faces = [
2 => 2,
3 => 3,

View file

@ -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;

View file

@ -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){

View file

@ -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;