Skip to content

no event call (break) when using a pickaxe #19

Description

@royaljacques

I put you a small video, as well as my code

class SupraPickaxeTier1 extends Pickaxe implements ItemComponents
{
    use ItemComponentsTrait;

    protected int $xp = 0;
    protected int $level = 0;
    protected array $config = [
        0 => 2,
        1 => 3,
        2 => 4
    ];
    public function __construct(ItemIdentifier $identifier, string $name = 'supra_pickaxe'){
        parent::__construct($identifier, $name, ToolTier::DIAMOND());
        $cti = new CreativeInventoryInfo(CreativeInventoryInfo::CATEGORY_EQUIPMENT,CreativeInventoryInfo::GROUP_PICKAXE);
        $this->initComponent('supra_pickaxe', 1, $cti);
        $this->addProperty("minecraft:on_use", true);
        $this->addProperty("minecraft:on_use_on", true);
    }```
https://youtu.be/Z8dw--h2TMw

Metadata

Metadata

Assignees

No one assigned

    Labels

    user problemThe problem here is the user doing something wrong

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions