xSuperr / VanillaBlocks

A plugin to add more blocks to PocketMine
GNU General Public License v3.0
26 stars 12 forks source link

Code example: Block of Copprr #38

Closed TheBalkanDev closed 3 years ago

TheBalkanDev commented 3 years ago

<?php

namespace xSuper\VanillaBlocks\blocks;

use JavierLeon9966\ExtendedBlocks\block\PlaceholderTrait; use pocketmine\block\BlockToolType; use pocketmine\block\Solid; use pocketmine\item\TieredTool;

class CopperBlock extends Solid { use PlaceholderTrait;

public function __construct(int $meta = 0)
{
    parent::__construct(VanillaBlockIds::COPPER, $meta, "Copper");
}

public function getBlastResistance(): float
{
    return 6;
}

public function getHardness(): float
{
    return 3;
}

public function getToolType(): int
{
    return BlockToolType::TYPE_PICKAXE;
}

public function getToolHarvestLevel(): int
{
    return TieredTool::TIER_STONE;
}

}

TheBalkanDev commented 3 years ago

<?php

namespace xSuper\VanillaBlocks\blocks;

use JavierLeon9966\ExtendedBlocks\block\PlaceholderTrait; use pocketmine\block\BlockToolType; use pocketmine\block\Solid; use pocketmine\item\TieredTool;

class CopperBlock extends Solid { use PlaceholderTrait;

public function __construct(int $meta = 0)
{
    parent::__construct(VanillaBlockIds::COPPER, $meta, "Copper");
}

public function getBlastResistance(): float
{
    return 6;
}

public function getHardness(): float
{
    return 3;
}

public function getToolType(): int
{
    return BlockToolType::TYPE_PICKAXE;
}

public function getToolHarvestLevel(): int
{
    return TieredTool::TIER_STONE;
}

}

TheBalkanDev commented 3 years ago

BlockOfCopper.zip

supercrafter333 commented 3 years ago

1.17 Block/Items aren't working ob Pocketmine!!

xSuperr commented 3 years ago

I don't need help adding anything unless its already an issue and has the help wanted tag, its a 1.17 block and pocketmine does not like those right now, and I am extremely busy.