CustomiesDevs / Customies

A PocketMine-MP plugin that implements support for custom blocks, items and entities.
MIT License
107 stars 48 forks source link

Tools not work #115

Closed GabBiswajit closed 3 months ago

GabBiswajit commented 6 months ago

Now it's work like a axe ? No it's not work I can't break woods i miss anything if not why it's not work ?


use customiesdevs\customies\item\component\HandEquippedComponent;
use customiesdevs\customies\item\CreativeInventoryInfo;
use customiesdevs\customies\item\ItemComponentsTrait;
use pocketmine\item\ItemIdentifier;
use pocketmine\item\ToolTier;
use pocketmine\nbt\tag\CompoundTag;
use pocketmine\nbt\tag\ListTag;

class axe_2 extends \pocketmine\item\Axe implements \customiesdevs\customies\item\ItemComponents{
    use ItemComponentsTrait; 

    public function __construct(ItemIdentifier $identifier, string $name = "axe_2"){
        parent::__construct($identifier, $name, ToolTier::DIAMOND());
        $this->initComponent("axe_2", new CreativeInventoryInfo(CreativeInventoryInfo::CATEGORY_EQUIPMENT, CreativeInventoryInfo::GROUP_AXE));
        $this->addComponent(new HandEquippedComponent(true));
    }

    public function getMaxDurability() : int{
        return 2031;
    }

    protected function getBaseMiningEfficiency() : float{
        return 12;
    }
}
J1b1x commented 6 months ago

No hablo ingles!!!!! No understand??? (Basically means: "Learn english you men loving indian balls sniffer")

LUKAY207 commented 3 months ago

You need to add the "minecraft:digger" component to the item..