How do i fix this item not working How do i add a ID And Register It Heres The Code PHP: <?php/* * * * ░█████╗░██╗░░░██╗░██████╗████████╗░█████╗░███╗░░░███╗ * ██╔══██╗██║░░░██║██╔════╝╚══██╔══╝██╔══██╗████╗░████║ * ██║░░╚═╝██║░░░██║╚█████╗░░░░██║░░░██║░░██║██╔████╔██║ * ██║░░██╗██║░░░██║░╚═══██╗░░░██║░░░██║░░██║██║╚██╔╝██║ * ╚█████╔╝╚██████╔╝██████╔╝░░░██║░░░╚█████╔╝██║░╚═╝░██║ * ░╚════╝░░╚═════╝░╚═════╝░░░░╚═╝░░░░╚════╝░╚═╝░░░░░╚═╝ * * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. */declare(strict_types=1);namespace Arthur\CustomItems\Items;use pocketmine\item\Item;use pocketmine\item\ItemFactory;use pocketmine\nbt\tag\ByteTag;use pocketmine\nbt\tag\CompoundTag;use pocketmine\nbt\tag\IntTag;use pocketmine\nbt\tag\ShortTag;use pocketmine\nbt\tag\StringTag;final class test2{ $tag = new CompoundTag("", [ new CompoundTag("components", [ new CompoundTag("minecraft:icon", [ new StringTag("texture", iron_ingot), ]), new CompoundTag("item_properties", [ new IntTag("max_stack_size", 1), new ByteTag("max_damage", 55) new ByteTag("hand_equipped", 1), new ByteTag("creative_category", 1), new ByteTag("can_destroy_in_creative", 1), new ByteTag("animates_in_toolbar", 1), new ByteTag("allow_off_hand", 1), new ByteTag("hand_equipped", 1), ]), ]), new ShortTag("minecraft:identifier", test:item), new CompoundTag("minecraft:display_name", [ new StringTag("value", CustomItem) ]), ]);} Any Help Would Be appreciated!
Also, what is you pocketmine api? (use the command about to see it) I say this because the nbt thing was deleted or i can't found it on official github of pocketmine. (https://github.com/pmmp/PocketMine-MP/tree/3.22.0/src/pocketmine/nbt
'Nbt thing' as you say, is not in pocketmine. It is in the vendor folder. In github, its NBT repository.
Also to load items, you could see https://github.com/alvin0319/CustomItemLoader or https://github.com/Refaltor77/CustomItem and https://github.com/Refaltor77/CustomArmor
He wouldn't cause he only has an nbt tag right now, nothing is registered, no resource packs, nothing. So it won't work