mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
idk what freehij added
Co-authored-by: FreeHij <111121573+FreeHij@users.noreply.github.com>
This commit is contained in:
parent
6fbd52c1a5
commit
31fbbd86e7
7 changed files with 49 additions and 6 deletions
|
|
@ -143,11 +143,14 @@ abstract class Block extends Position{
|
|||
LEAVES2 => "Leaves2Block",
|
||||
END_PORTAL_FRAME => "EndPortalFrameBlock",
|
||||
COCOA => "CocoaBlock",
|
||||
RED_MUSHROOM_BLOCK => "RedMushroomSolidBlock",
|
||||
BROWN_MUSHROOM_BLOCK => "BrownMushroomSolidBlock",
|
||||
MONSTER_SPAWNER => "MobSpawnerBlock",
|
||||
RED_MUSHROOM_BLOCK => "RedMushroomBlock",
|
||||
BROWN_MUSHROOM_BLOCK => "BrownMushroomBlock",
|
||||
MONSTER_SPAWNER => "MonsterSpawnerBlock",
|
||||
VINES => "VinesBlock",
|
||||
MYCELIUM => "MyceliumBlock",
|
||||
PODZOL => "PodzolBlock",
|
||||
STAINED_CLAY => "StainedClayBlock",
|
||||
LILY_PAD => "LilypadBlock",
|
||||
);
|
||||
protected $id;
|
||||
protected $meta;
|
||||
|
|
|
|||
|
|
@ -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){
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue