I'm trying to put the sword in a drowned's hand, but getInventory() is not usable for this type of entity.
PHP: $nbt = Entity::createBaseNBT($block->add(1, 1, 1), null, lcg_value() * 360, 0); $entity = new Slaughter($player->level, $nbt); $entity->spawnToAll(); $entity->getInventory()->setItemInHand(Item::get(276)); Console report getInventory don't exists to entity