idk what freehij added

Co-authored-by: FreeHij <111121573+FreeHij@users.noreply.github.com>
This commit is contained in:
GameHerobrine 2023-07-22 10:26:02 +03:00
parent 6fbd52c1a5
commit 31fbbd86e7
7 changed files with 49 additions and 6 deletions

View file

@ -8,6 +8,8 @@ class WoodSlabBlock extends TransparentBlock{
1 => "Spruce",
2 => "Birch",
3 => "Jungle",
4 => "Acacia",
5 => "Dark Oak"
);
$this->name = (($this->meta & 0x08) === 0x08 ? "Upper ":"") . $names[$this->meta & 0x07] . " Wooden Slab";
if(($this->meta & 0x08) === 0x08){

View file

@ -0,0 +1,13 @@
<?php
class LilypadBlock extends FlowableBlock{
public function __construct($meta = 0){
parent::__construct(LILY_PAD, 0, "Lily Pad");
$this->isSolid = false;
$this->isFullBlock = false;
}
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){//TODO: directions & only on water placement, im too lazy to make it cuz it's 0:17
$this->level->setBlock($block, $this, true, false, true);
}
}

View file

@ -8,7 +8,7 @@ class VinesBlock extends FlowableBlock{
$this->hardness = 2;
}
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){//TODO: make replacement
if($face === 0 || $face === 1){
return false; //fix of placing invalid ids without array
}

View file

@ -8,6 +8,8 @@ class DoubleWoodSlabBlock extends SolidBlock{
1 => "Spruce",
2 => "Birch",
3 => "Jungle",
4 => "Acacia",
5 => "Dark Oak",
);
$this->name = "Double " . $names[$this->meta & 0x07] . " Wooden Slab";
$this->hardness = 15;

View file

@ -21,7 +21,7 @@ class Log2Block extends SolidBlock{
5 => 0b0100,
);
$this->meta = ($this->meta & 0x02) | $faces[$face];
$this->meta = ($this->meta & 0x03) | $faces[$face];
$this->level->setBlock($block, $this, true, false, true);
return true;
}