Muqsit/InvMenu

Class "pocketmine\network\mcpe\convert\RunningTimeBlockMapping" not found

ClickedTran opened this issue · 7 comments

Can you edit it and tell me how to setItem to be 1 block?
Example pm4: $inventory->setItem(0, ItemFactory::getInstance()->get(1, 0, 1));
Pm5: ???
Please help me :<

Muqsit commented

The class RunningTimeBlockMapping does not exist in PocketMine and hasn't been used in InvMenu. Can you send the full crashdump / error?

The class RunningTimeBlockMapping does not exist in PocketMine and hasn't been used in InvMenu. Can you send the full crashdump / error?

Maybe it's because I downloaded your version before PocketMine-MP 5.0 officially came out, so there's still an error, I just saw you update 3 days ago
If yes, can you show me how to set item as block in your virion?

Muqsit commented

InvMenu's API hasn't changed between PM4 and PM5 versions. However, ItemFactory doesn't exist in PM5 so you'll need to use VanillaItems or another way to obtain Item instances. Are you currently on PM5?

InvMenu's API hasn't changed between PM4 and PM5 versions. However, ItemFactory doesn't exist in PM5 so you'll need to use VanillaItems or another way to obtain Item instances. Are you currently on PM5?

Yes sir, but VanillaItems I know how to do it, but how to get Block in PM5 I don't know
I'm tested: $inventory->setItem(0, VanillaBlocks::DIAMOND); but error :<

Muqsit commented

InvMenu's API hasn't changed between PM4 and PM5 versions. However, ItemFactory doesn't exist in PM5 so you'll need to use VanillaItems or another way to obtain Item instances. Are you currently on PM5?

Yes sir, but VanillaItems I know how to do it, but how to get Block in PM5 I don't know I'm tested: $inventory->setItem(0, VanillaBlocks::DIAMOND); but error :<

$inventory->setItem(0, VanillaBlocks::DIAMOND()->asItem());

Thanks sir, I will always be your fan

Me fan of you both