You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.
Items having at least 1 namedtag can/will keep glitching in and out of your inventory.
When you drop them, it won't drop anything; and when you pick them up and open your inventory, the item drops by itself.
This does not happen with allow-cheats turned on.
Steps to reproduce the issue
Using this code:
$item = Item::get(Item::TNT, 0, 10);
$item->setCustomName(TextFormat::RESET.TextFormat::AQUA.'A Custom Named TNT');
Player::getInventory()->addItem($item);
Now throw the item. If the above code doesn't work, try with this item...
$item = Item::get(Item::DIAMOND_SWORD, 0, 10);
$item->setCustomName(TextFormat::RESET.TextFormat::AQUA.'A Custom Named TNT');
$nbt = $item->getNamedTag();
$nbt->tag1 = new StringTag('tag1', 'A custom tag');
$nbt->tag2 = new StringTag('tag2', 'Another custom tag');
$item->setNamedTag($nbt);
//Player::getInventory()->addItem($item);
Issue description
Items having at least 1 namedtag can/will keep glitching in and out of your inventory.
When you drop them, it won't drop anything; and when you pick them up and open your inventory, the item drops by itself.
This does not happen with
allow-cheats
turned on.Steps to reproduce the issue
Using this code:
Now throw the item. If the above code doesn't work, try with this item...
OS and versions
Crashdump, backtrace, memory dumps, plugins list or other files
The text was updated successfully, but these errors were encountered: