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
I put you a small video, as well as my code