mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
Multiple changes
* Fixed hoe durability * Fixed some blocks hitbox * Added Creative pseudo-inventory * Added Carrots and Carrot Crops * Added Potatoes, Baked potatoes and Potato Crops
This commit is contained in:
parent
f8d8052ec3
commit
e700179bb0
15 changed files with 355 additions and 23 deletions
|
|
@ -19,7 +19,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
class CarpetBlock extends TransparentBlock{
|
||||
class CarpetBlock extends FlowableBlock{
|
||||
public function __construct($meta = 0){
|
||||
parent::__construct(CARPET, $meta, "Carpet");
|
||||
$names = array(
|
||||
|
|
@ -42,7 +42,8 @@ class CarpetBlock extends TransparentBlock{
|
|||
);
|
||||
$this->name = $names[$this->meta];
|
||||
$this->hardness = 0;
|
||||
$this->isFullBlock = false;
|
||||
$this->isFullBlock = false;
|
||||
$this->isSolid = true;
|
||||
}
|
||||
|
||||
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
|
|
@ -57,6 +58,7 @@ class CarpetBlock extends TransparentBlock{
|
|||
public function onUpdate($type){
|
||||
if($type === BLOCK_UPDATE_NORMAL){
|
||||
if($this->getSide(0)->getID() === AIR){ //Replace with common break method
|
||||
ServerAPI::request()->api->entity->drop($this, BlockAPI::getItem($this->id, $this->meta, 1));
|
||||
$this->level->setBlock($this, new AirBlock(), true, false, true);
|
||||
return BLOCK_UPDATE_NORMAL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue